From 665678d3d14f06af9070c74913d3fad03332aaaa Mon Sep 17 00:00:00 2001
From: lhl <1281544429@qq.com>
Date: 星期四, 31 十月 2024 16:10:00 +0800
Subject: [PATCH] 提交结构体代码
---
Client/黎弘霖/code/Devices_Management_Struct.h | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 107 insertions(+), 0 deletions(-)
diff --git "a/Client/\351\273\216\345\274\230\351\234\226/code/Devices_Management_Struct.h" "b/Client/\351\273\216\345\274\230\351\234\226/code/Devices_Management_Struct.h"
new file mode 100644
index 0000000..70ae3d4
--- /dev/null
+++ "b/Client/\351\273\216\345\274\230\351\234\226/code/Devices_Management_Struct.h"
@@ -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);
+ }
+};
\ No newline at end of file
--
Gitblit v1.8.0