2025-01-16 16:17:01 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* @file: $RCSfile: mms_json_inter.h,v $
|
|
|
|
|
|
* @brief: $IEC 61850 Protocol
|
|
|
|
|
|
*
|
|
|
|
|
|
* @version: $Revision: 1.5 $
|
|
|
|
|
|
* @date: $Date: 2018/12/25 13:31:25 $
|
|
|
|
|
|
* @author: $Author: lizhongming $
|
|
|
|
|
|
* @state: $State: Exp $
|
|
|
|
|
|
*
|
|
|
|
|
|
* @latest: $Id: mms_json_inter.h,v 1.5 2018/12/25 13:31:25 lizhongming Exp $
|
|
|
|
|
|
*
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef MMS_JSON_INTER_92327hyhy0923r_H
|
|
|
|
|
|
#define MMS_JSON_INTER_92327hyhy0923r_H
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
|
#include <QList>
|
|
|
|
|
|
#include <QMutex>
|
|
|
|
|
|
#include <QMap>
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-05-09 16:53:07 +08:00
|
|
|
|
#define STAT_DATA_BASE_NODE_ID 100 //稳态、统计数据
|
|
|
|
|
|
#define THREE_SECS_DATA_BASE_NODE_ID 200 // 三秒数据、实时数据
|
|
|
|
|
|
#define SOE_COMTRADE_BASE_NODE_ID 300 // soe 录波
|
|
|
|
|
|
#define HIS_DATA_BASE_NODE_ID 400 //历史、补招
|
2025-01-16 16:17:01 +08:00
|
|
|
|
|
2025-05-09 16:53:07 +08:00
|
|
|
|
class json_block_data //json拼接参数类
|
2025-01-16 16:17:01 +08:00
|
|
|
|
{
|
|
|
|
|
|
public:
|
2025-05-09 16:53:07 +08:00
|
|
|
|
int monitorId; //监测点ID
|
|
|
|
|
|
int func_type; //对应(#define宏定义中100 — 400)功能选项
|
|
|
|
|
|
int flag; //剔除标记,1不剔除,0剔除,默认剔除 ——————问下王巍,此参数如何从线路装置处获取???2018-11-21 19:32:38
|
|
|
|
|
|
long long time; //时间戳(毫秒)
|
|
|
|
|
|
double voltage_level; //CZY 2023-08-23 电压等级(翻译后的double类型)
|
|
|
|
|
|
QString mp_id; //char型监测点
|
|
|
|
|
|
QString dev_type;//设备类型
|
|
|
|
|
|
|
2026-03-04 19:15:32 +08:00
|
|
|
|
bool data_have_statistic;//是否有统计数据,0没有,1有
|
|
|
|
|
|
|
2025-05-09 16:53:07 +08:00
|
|
|
|
QMap<QString, double> mms_str_map; //数据值(61850数据属性名, 数据值)
|
2025-01-16 16:17:01 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
2025-05-09 16:53:07 +08:00
|
|
|
|
class Ckafka_data_t //kafka发送数据结构类
|
2025-01-16 16:17:01 +08:00
|
|
|
|
{
|
|
|
|
|
|
public:
|
2025-05-09 16:53:07 +08:00
|
|
|
|
int monitor_id; //监测点ID
|
|
|
|
|
|
QString strTopic; //kafka发送topic
|
|
|
|
|
|
QString strText; //kafka发送的json字符串
|
|
|
|
|
|
QString mp_id; //char类型id
|
2025-01-16 16:17:01 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
2025-05-09 16:53:07 +08:00
|
|
|
|
class oss_data_t //oss推送发送数据结构类 zw 2023-9-22 新增
|
2025-01-16 16:17:01 +08:00
|
|
|
|
{
|
|
|
|
|
|
public:
|
2025-05-09 16:53:07 +08:00
|
|
|
|
QString filename; //云保存路径
|
|
|
|
|
|
QString savename; //本地保存路径
|
|
|
|
|
|
QString data; //保存的数据
|
2025-01-16 16:17:01 +08:00
|
|
|
|
|
|
|
|
|
|
|
2025-05-09 16:53:07 +08:00
|
|
|
|
//日志通用参数
|
|
|
|
|
|
QString log_name; //终端id或监测点id
|
|
|
|
|
|
QString id; //终端id或监测点id
|
|
|
|
|
|
QString time; //时间
|
2025-01-16 16:17:01 +08:00
|
|
|
|
int base_mat_num;
|
|
|
|
|
|
int adv_mat_num;
|
|
|
|
|
|
int base_act_num;
|
|
|
|
|
|
int adv_act_num;
|
|
|
|
|
|
int list_num;
|
|
|
|
|
|
};
|
2025-04-29 15:05:36 +08:00
|
|
|
|
|
2025-05-09 16:53:07 +08:00
|
|
|
|
int transfer_json_block_data(char v_wiring_type[], json_block_data* data);//lnk2024-8-16添加参数
|
2025-01-16 16:17:01 +08:00
|
|
|
|
|
|
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
|
extern "C" {
|
|
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
2025-03-11 21:07:17 +08:00
|
|
|
|
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, char* uuid_cfg, char* uuid_dat, char* mp_id, char* Qvvr_rptname, char* devtype);
|
2025-01-16 16:17:01 +08:00
|
|
|
|
void processGGIO_start_data_end(char* mp_id, char* fullname, double v,long long time,char* devtype,int monitor_id);
|
2025-05-09 16:53:07 +08:00
|
|
|
|
void Set_xml_databaseinfo(char* MODEL_ID, char* TMNL_TYPE, char* TMNL_FACTORY, char* FILE_NAME, int year, int month, int day, int hour, int minute, int second);//zw修改 新增调用函数
|
|
|
|
|
|
void Set_xml_nodeinfo();//zw修改
|
2025-01-16 16:17:01 +08:00
|
|
|
|
char* Get_xmlpath(char* devtype);
|
|
|
|
|
|
char* Get_IED(char* devtype);
|
|
|
|
|
|
char* Get_LDevice(char* devtype);
|
|
|
|
|
|
void connectlog_pgsql(char* id,char* datetime,int status);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif //MMS_JSON_INTER_92327hyhy0923r_H
|