240717班级,工业化控制系统,煤矿相关行业,昆仑系统
Administrator
2024-11-09 7715b34a33983c42907615671e7f77f024927fa9
common.h
@@ -83,9 +83,9 @@
   //历史查询
   HISTORY_DEV_REQ,        //历史查询硬件请求
    HISTORY_DEV_RES,     //历史查询硬件响应
    HISTORY_PRODUCE_REQ, //历史查询生产请求
    HISTORY_PRODUCE_RES, //历史查询生产响应
    HISTORY_DEV_RES,        //历史查询硬件响应
    HISTORY_PRODUCE_REQ,    //历史查询生产请求
    HISTORY_PRODUCE_RES,    //历史查询生产响应
    HISTORY_ENV_REQ,    //历史查询环境请求
    HISTORY_ENV_RES,    //历史查询环境响应
    HISTORY_MON_REQ,    //历史查询月产量请求
@@ -292,16 +292,17 @@
//设备管理
struct DevicesInfo
{
   char deviceName[32];//设备名称
   char deviceStatus[32];//设备状态
   char area[32];//地区
   double longitude;//经度
   double latitude;//纬度
   char purchasingTime[15];//购买时间
   char installTime[15];//安装时间
   char manufacturer[100];//厂家
    char deviceSerialNumber[32];//设备编码
    int id;//设备ID
    char deviceName[32];//设备名称
    char deviceType[32];//设备类型
    char deviceSerialNumber[32];//设备编码
    char deviceStatus[32];//设备状态
    char area[100];//地区
    double longitude;//经度
    double latitude;//纬度
    char purchasingTime[15];//购买时间
    char installTime[15];//安装时间
    char manufacturer[100];//厂家
};
//添加设备
struct ADReq//添加请求
@@ -330,6 +331,9 @@
{
   Head head;
   DevicesInfo info;
    char condition[32];
    char modifiedContent[100];
    double laOrLo;
   MDReq() {
      head.type = MD_REQ;
      head.len = sizeof(MDReq);
@@ -339,6 +343,9 @@
{
   Head head;
   int status;
    char conditon[32];
    char modifiedContent[100];
    double laOrLo;
   MDRes() {
      head.type = MD_RES;
      head.len = sizeof(MDRes);
@@ -940,6 +947,7 @@
    char keyWord[32];
    HistoryDevReq() {
        // 初始化数据头
        memset(this,0,sizeof(HistoryDevReq));
        head.type = HISTORY_DEV_REQ;
        head.len = sizeof(HISTORY_DEV_REQ);
        // 初始化查询条件字段
@@ -955,6 +963,7 @@
    char keyWord[32];
    HistoryProReq() {
        // 初始化数据头
        memset(this,0,sizeof(HistoryProReq ));
        head.type = HISTORY_PRODUCE_REQ;
        head.len = sizeof(HistoryProReq);
        // 初始化查询条件字段
@@ -970,6 +979,7 @@
    char keyWord[32];
    HistoryMonReq() {
        // 初始化数据头
       memset(this,0,sizeof(HistoryMonReq));
        head.type = HISTORY_MON_REQ;
        head.len = sizeof(HistoryMonReq);
        // 初始化查询条件字段
@@ -985,6 +995,7 @@
    char keyWord[32];
    HistoryEnvReq() {
        // 初始化数据头
        memset(this,0,sizeof(HistoryEnvReq));
        head.type = HISTORY_ENV_REQ;
        head.len = sizeof(HistoryEnvReq);
        // 初始化查询条件字段