New file |
| | |
| | | #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); |
| | | } |
| | | }; |