240717班级,工业化控制系统,煤矿相关行业,昆仑系统
lhl
2024-10-31 665678d3d14f06af9070c74913d3fad03332aaaa
提交结构体代码
1个文件已添加
107 ■■■■■ 已修改文件
Client/黎弘霖/code/Devices_Management_Struct.h 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Client/黎弘霖/code/Devices_Management_Struct.h
New file
@@ -0,0 +1,107 @@
#pragma once
enum TypeInfo
{
    AD_Req,//娣诲姞璁惧璇锋眰
    AD_Res,//娣诲姞璁惧鍝嶅簲
    DD_Req,//鍏抽棴璁惧璇锋眰
    DD_Res,//鍏抽棴璁惧璇锋眰
    PD_Req,//鏆傚仠璁惧璇锋眰
    PD_Res,//鏆傚仠璁惧璇锋眰
};
struct Head
{
    int type;
    int len;
};
//娣诲姞璁惧
struct ADReq
{
    Head head;
    char Device_Name[32];
    ADReq() {
        head.type = AD_Req;
        head.len = sizeof(AD_Req);
    }
};
struct ADPermission
{
    char Device_Name[32];
    char Device_Status[32];
    char Start_Time[32];
    char Work_Time[32];
    char Manufacturer[100];
    char Devices_Type[32];
};
struct ADRes
{
    Head head;
    ADPermission per;
    ADRes() {
        head.type = AD_Res;
        head.len = sizeof(ADRes);
    }
};
//鍏抽棴璁惧
struct DDReq
{
    Head head;
    char Device_Name[32];
    DDReq() {
        head.type = DD_Req;
        head.len = sizeof(DDReq);
    }
};
struct DDPermission
{
    char Device_Name[32];
    char Device_Status[32];
    char Start_Time[32];
    char Work_Time[32];
    char Manufacturer[100];
    char Devices_Type[32];
};
struct DDRes
{
    Head head;
    DDPermission per;
    DDRes() {
        head.type = DD_Res;
        head.len = sizeof(DDRes);
    }
};
//鏆傚仠璁惧
struct PDReq
{
    Head head;
    char Device_Name[32];
    PDReq() {
        head.type = PD_Req;
        head.len = sizeof(PDReq);
    }
};
struct PDPermission
{
    char Device_Name[32];
    char Device_Status[32];
    char Start_Time[32];
    char Work_Time[32];
    char Manufacturer[100];
    char Devices_Type[32];
};
struct PDRes
{
    Head head;
    PDPermission per;
    PDRes() {
        head.type = PD_Res;
        head.len = sizeof(PDRes);
    }
};