1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
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);
| }
| };
|
|