2025-03-14 15:07:39 +08:00
|
|
|
|
#ifndef IDONG_COMMON_H
|
|
|
|
|
|
#define IDONG_COMMON_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
#include <boost/shared_ptr.hpp>
|
|
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
|
|
|
|
#include <boost/shared_ptr.hpp>
|
|
|
|
|
|
|
|
|
|
|
|
const std::string CN_PROCESSNAME = "iDongOpsWidget";
|
|
|
|
|
|
|
|
|
|
|
|
#define OPT_DESC_APP "app"
|
|
|
|
|
|
#define OPT_DESC_HELP "help"
|
|
|
|
|
|
|
|
|
|
|
|
//< 表名
|
|
|
|
|
|
#define INST_DEF "stat_inst_def"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// rdb 列名和值
|
|
|
|
|
|
#define INST_DEF_COL_PERIOD "period"
|
|
|
|
|
|
#define INST_DEF_COL_PERIOD_DISABLED_VALUE 0
|
|
|
|
|
|
|
|
|
|
|
|
#define COL_TRIGGER_METHOD "trigger_method"
|
|
|
|
|
|
#define COL_TRIGGER_METHOD_DISABLED_VALUE 0
|
|
|
|
|
|
#define COL_TRIGGER_METHOD_PERIOD 1 //< 周期触发
|
|
|
|
|
|
#define COL_TRIGGER_METHOD_TIMER 2 //< 定时触发
|
|
|
|
|
|
#define COL_TRIGGER_METHOD_PARACHG 3 //< 输入变动触发
|
|
|
|
|
|
|
|
|
|
|
|
#define RT_ANA_TBL "analog"
|
|
|
|
|
|
#define RT_ACC_TBL "accuml"
|
|
|
|
|
|
#define RT_MIX_TBL "mix"
|
|
|
|
|
|
#define RT_DIG_TBL "digital"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TEMPLATE_DEF_COL_TERMPLATE_TAG "template_tag"
|
|
|
|
|
|
#define TEMPLATE_PARA_COL_SORT "sort"
|
|
|
|
|
|
|
|
|
|
|
|
#define COL_INST_TAG "inst_tag"
|
|
|
|
|
|
#define COL_GRP_TAG "para_grp_tag"
|
|
|
|
|
|
#define COL_SORT "sort"
|
|
|
|
|
|
#define COL_RANK "rank"
|
|
|
|
|
|
#define COL_RANK_TOP "1"
|
|
|
|
|
|
#define COL_RANK_SECOND "2"
|
|
|
|
|
|
#define COL_VALUE "value"
|
|
|
|
|
|
#define COL_STATUS "status"
|
|
|
|
|
|
#define COL_STATUS_VALUE_VALID 1
|
|
|
|
|
|
#define COL_STATUS_VALUE_INVALID 0
|
|
|
|
|
|
// 返回值
|
|
|
|
|
|
#define kbdFailedRdb 2 // 内存库错误
|
|
|
|
|
|
|
|
|
|
|
|
#define valid_value 0
|
|
|
|
|
|
#define invalid_value 1
|
|
|
|
|
|
|
|
|
|
|
|
const std::string IDONG_CFG_FILENAME = "idong_ops_cfg.xml";
|
|
|
|
|
|
const std::string IDONG_SITEMAP_FILENAME = "idong_sitemap.json";
|
|
|
|
|
|
|
|
|
|
|
|
const std::string CN_FilePath_Model = "../../data/model/";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // IDONG_COMMON_H
|