/****************************************************************************************************************** * Action instruction algorithm(study sample data online,compare with sample *data) * * arg[0] action expression * arg[1] feedback expression * arg[2] expression of judgment result * * feedback expression * arg[2] expression of judgment result * * 1.0 2020-12-17 zoufuzhou * 1.1 2021-03-10 change format & add mix_cc ******************************************************************************************************************/ #ifndef _H_ALGORITHM_EXPRESSION_TREND_SAMPLE_MAN_H #define _H_ALGORITHM_EXPRESSION_TREND_SAMPLE_MAN_H // add 2021-03-10 by Cat //add mix_cc ihdb module to deal with ihyperDB #include "mix_cc/ihyper_db.h" //change done #include #include #include #include #include class AlgExpTrendSampleMan : virtual public AlgExp { public: AlgExpTrendSampleMan(const string &name, const Json::Value &rulejson, const string &ruleId); virtual ~AlgExpTrendSampleMan(); public: virtual int init() override; virtual Json::Value exec_mon(); private: int mon_proc(string &outjson, HD3Record *hdRec); int GetHDTrend(const string &tag); private: MathExpression *exp_act_; MathExpression *exp_feedback_; bool prev_execution_act_triggered__triggered_; time_t expired_time; // using sample data to storage data from ihdb std::vector sample_data; // delete //HD3Record m_ihdtrend[SAMPLE_COUNT]; string m_sampletag; mix_cc::ihd::IhdCom hd_com; // private: // float m_samples[3]; // float m_stat[3]; // bool m_nosample; // bool m_islearned; // vector mv_stat; // int archive_interval_day_; // time_t mt_lastsave; }; #endif