添加文件路径接口函数和文件下载接口函数
This commit is contained in:
@@ -49,6 +49,33 @@ public:
|
||||
std::string VOLTAGE; //补招暂态事件标识 0-不补招;1-补招
|
||||
};
|
||||
|
||||
//录波文件和暂态事件
|
||||
class qvvr_data
|
||||
{
|
||||
int used_status; //是否占用
|
||||
int QVVR_type; //暂态类型
|
||||
uint64_t QVVR_time; //暂态开始时间 unsigned longlong
|
||||
double QVVR_PerTime; //暂态持续时间
|
||||
double QVVR_Amg; //暂态幅值
|
||||
int phase; //相别(仅瞬态上送)0-A 1-B 2-C 3-AB 4-BC 5-CA 其他-ABC/异常
|
||||
};
|
||||
|
||||
class qvvr_file
|
||||
{
|
||||
bool file_start;
|
||||
int file_time_count; //组内文件下载时间计数(第一个文件下载后十分钟内如果其他文件没下载全或者下载全了没匹配事件则将已下载的文件都移到备份区comtrade_bak)
|
||||
bool is_download; //文件是否下载完全,最后一个文件下载成功后对比成功则更新这个标志
|
||||
bool is_pair; //文件是否和事件匹配,从comtrade/mac/路径下取file_download中的cfg文件提取时间和持续时间来匹配,匹配后接口发送这组file_download全部文件,发送成功后删除这组文件,然后更新事件中的文件列表
|
||||
std::list<std::string> file_name; //文件列表(文件列表上送后就记录)
|
||||
std::list<std::string> file_download; //文件已下载列表(每次列表上送会有多个文件,多个文件都下载完全则开始匹配,每次更新都去重并对比file_name)
|
||||
};
|
||||
|
||||
class qvvr_event
|
||||
{
|
||||
std::vector<qvvr_data> qvvrdata; //暂态事件列表
|
||||
std::vector<qvvr_file> qvvrfile; //暂态文件组列表
|
||||
};
|
||||
|
||||
//监测点台账
|
||||
class ledger_monitor
|
||||
{
|
||||
@@ -66,6 +93,8 @@ public:
|
||||
double PT2; // 电压变比2
|
||||
double CT1; // 电流变比1
|
||||
double CT2; // 电流变比2
|
||||
|
||||
qvvr_event qvvrevent; //暂态事件
|
||||
};
|
||||
|
||||
//终端台账
|
||||
@@ -84,13 +113,13 @@ public:
|
||||
std::string dev_type;
|
||||
std::string dev_key;
|
||||
std::string dev_series;
|
||||
std::string addr_str;
|
||||
std::string port;
|
||||
std::string addr_str; //装置ip
|
||||
std::string port; //装置端口
|
||||
std::string timestamp;
|
||||
std::string processNo;
|
||||
std::string maxProcessNum;
|
||||
|
||||
std::string mac; // 装置MAC地址
|
||||
std::string mac; // 装置MAC地址,接口中从addr_str获取,因为ip和mac放同一位置
|
||||
|
||||
std::vector<ledger_monitor> line;
|
||||
};
|
||||
@@ -425,6 +454,15 @@ std::string generate_json( //构造装置主动上送数据的报文
|
||||
const std::vector<DataArrayItem>& dataArray //数据数组。
|
||||
);
|
||||
|
||||
int transfer_json_qvvr_data(unsigned int func_type, int monitor_id, //暂态事件的接口
|
||||
double mag, double dur, long long start_tm, long long end_tm, int dis_kind,
|
||||
const std::string& uuid_cfg, const std::string& uuid_dat,
|
||||
const std::string& mp_id, const std::string& Qvvr_rptname, const std::string& devtype);
|
||||
|
||||
//录波文件目录接口
|
||||
|
||||
//录波文件下载完成通知接口
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user