49 lines
1.2 KiB
C
49 lines
1.2 KiB
C
|
|
#pragma once
|
|||
|
|
/**
|
|||
|
|
* @file exp_sample1D.h
|
|||
|
|
* @brief 根据置信度自动统计自信区间,定期更新统计结果
|
|||
|
|
* @author your name (you@domain.com)
|
|||
|
|
* @version 0.1
|
|||
|
|
* @date 2024-02-19
|
|||
|
|
*
|
|||
|
|
* Copyright: Baosight Co. Ltd.
|
|||
|
|
* DO NOT COPY/USE WITHOUT PERMISSION
|
|||
|
|
*
|
|||
|
|
*/
|
|||
|
|
#include <eqpalg/algs/exp_base.h>
|
|||
|
|
#include <eqpalg/stat_tools/frame.h>
|
|||
|
|
class ExpSample1D : public ExpBase {
|
|||
|
|
public:
|
|||
|
|
ExpSample1D(const string& name, const mix_cc::json& rule_json,
|
|||
|
|
const string& ruleId, size_t exp_type);
|
|||
|
|
|
|||
|
|
~ExpSample1D() override;
|
|||
|
|
|
|||
|
|
virtual int init() override;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* @brief 最小的执行单元
|
|||
|
|
* @return AlarmInfo
|
|||
|
|
*/
|
|||
|
|
virtual AlarmInfo mon_proc() override;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* @brief 单次执行
|
|||
|
|
* @param time_range My Param doc
|
|||
|
|
* @return std::vector<AlarmInfo>
|
|||
|
|
*/
|
|||
|
|
std::vector<AlarmInfo> exec_task(mix_cc::time_range_t time_range) override;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* @brief 重载定时任务函数
|
|||
|
|
* @return mix_cc::json
|
|||
|
|
*/
|
|||
|
|
mix_cc::json exec_cron() override;
|
|||
|
|
|
|||
|
|
protected:
|
|||
|
|
int reload_param();
|
|||
|
|
|
|||
|
|
protected:
|
|||
|
|
double judge_diff_; ///< 评判的数据差值
|
|||
|
|
std::unique_ptr<stat_tools::Frame> sample_stat_; ///< 样本统计
|
|||
|
|
};
|