240717班级,工业化控制系统,煤矿相关行业,昆仑系统
1
zhuhang
2024-11-01 87ef42b4f156750f9a80878b7cb15d75b67bf2b1
common.h
@@ -1,9 +1,7 @@
#ifndef COMMON_H
#define COMMON_H
#include <iostream>
#include <cstring>
#include <QString>
#include <string.h>
enum TypeInfo{
@@ -835,6 +833,26 @@
    }
};
<<<<<<< HEAD
//日志查询
enum Typeinfo{
   LOGSEARCH_REQ,//日志查询请求
   LOGSEARCH_RES,//日志查询响应
};
struct Head
{
    int type;   // 功能类型
    int len;    //封包长度
};
// 日志查询请求结构体
struct LogQueryReq {
    Head heade;                 // 数据头
    char keyWords[0];            // 存储多个关键字的柔性数组
=======
//日志
struct ParsedLog { 
    char timestamp[64]; // 时间戳
@@ -849,6 +867,7 @@
struct LogQueryReq {
    Head head;                 // 数据头
    char keyWords[32];            // 存储关键字的数组
>>>>>>> bb11cc624ab058fc3a6541f91f37985b8caae9b6
    // 无参构造函数
    LogQueryReq() {
        head.type = LOGSEARCH_REQ;
@@ -858,18 +877,27 @@
// 日志查询响应结构体
struct LogQueryRes {
<<<<<<< HEAD
    Head heade;
=======
    Head head;  
>>>>>>> bb11cc624ab058fc3a6541f91f37985b8caae9b6
    int status;                    // 响应状态 (如 0 表示成功,非 0 表示失败)
    char errorMessage[256];        // 错误信息(如果有)
    
    // 无参构造函数
    LogQueryRes() {
        head.type = LOGSEARCH_RES;
<<<<<<< HEAD
       head.len = sizeof(LogQueryRes);
=======
      head.len = sizeof(LogQueryRes);
>>>>>>> bb11cc624ab058fc3a6541f91f37985b8caae9b6
    }
};
#endif // COMMON_H
#endif // COMMON_H