56 lines
1.1 KiB
C
56 lines
1.1 KiB
C
|
|
|
||
|
|
#pragma once
|
||
|
|
// add mix_cc ihdb module to deal with ihyperDB
|
||
|
|
#include "mix_cc/ihyper_db.h"
|
||
|
|
#include <eqpalg/stat_tools/FFTStat.h>
|
||
|
|
|
||
|
|
// change done
|
||
|
|
|
||
|
|
#include <eqpalg/AlgCommonDefine.h>
|
||
|
|
#include <eqpalg/algs/AlgExp.h>
|
||
|
|
#include <iomanip>
|
||
|
|
#include <iostream>
|
||
|
|
#include <string>
|
||
|
|
|
||
|
|
class AlgExpFFTComp : virtual public AlgExp {
|
||
|
|
public:
|
||
|
|
AlgExpFFTComp(const string &name, const Json::Value &rulejson,
|
||
|
|
const string &ruleId);
|
||
|
|
|
||
|
|
virtual ~AlgExpFFTComp();
|
||
|
|
|
||
|
|
public:
|
||
|
|
virtual int init() override;
|
||
|
|
virtual Json::Value exec_mon();
|
||
|
|
|
||
|
|
private:
|
||
|
|
int mon_proc(string &outjson, HD3Record *hdRec);
|
||
|
|
|
||
|
|
double dest_value_;
|
||
|
|
|
||
|
|
// int GetHDTrend(const string &tag);
|
||
|
|
|
||
|
|
private:
|
||
|
|
MathExpression *exp_act_;
|
||
|
|
MathExpression *exp_feedback_;
|
||
|
|
|
||
|
|
int max_sample_count_; //
|
||
|
|
|
||
|
|
double full_tag_level_;
|
||
|
|
|
||
|
|
int level_count_;
|
||
|
|
// string m_sampletag_refer;
|
||
|
|
string m_sampletag_freq;
|
||
|
|
string m_sampletag_data;
|
||
|
|
|
||
|
|
// using sample data to storage data from ihdb
|
||
|
|
|
||
|
|
std::unique_ptr<FFTStat> fft_stat_;
|
||
|
|
|
||
|
|
long long expire_time_;
|
||
|
|
// SampleTrendAnalysis sample_tag_x_trend_;
|
||
|
|
// SampleTrendAnalysis sample_tag_y_trend_;
|
||
|
|
|
||
|
|
mix_cc::ihd::IhdCom hd_com;
|
||
|
|
};
|