New file |
| | |
| | | #pragma once |
| | | enum TypeInfo |
| | | { |
| | | AD_Req,//娣诲姞璁惧璇锋眰 |
| | | AD_Res,//娣诲姞璁惧鍝嶅簲 |
| | | CD_Req,//鍏抽棴璁惧璇锋眰 |
| | | CD_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 Manufacturer[100]; |
| | | char Devices_Type[32]; |
| | | double Longitude; |
| | | double Latitude; |
| | | }; |
| | | struct ADRes |
| | | { |
| | | Head head; |
| | | char Device_Name[32]; |
| | | char Device_Status[32]; |
| | | char Start_Time[32]; |
| | | char Work_Time[32]; |
| | | char Manufacturer[100]; |
| | | char Devices_Type[32]; |
| | | double Longitude; |
| | | double Latitude; |
| | | ADPermission per; |
| | | ADRes() { |
| | | head.type = AD_Res; |
| | | head.len = sizeof(ADRes); |
| | | } |
| | | |
| | | }; |
| | | |
| | | //鍏抽棴璁惧 |
| | | struct CDReq |
| | | { |
| | | Head head; |
| | | char Device_Name[32]; |
| | | CDReq() { |
| | | head.type = CD_Req; |
| | | head.len = sizeof(CDReq); |
| | | } |
| | | }; |
| | | struct CDPermission |
| | | { |
| | | char Device_Name[32]; |
| | | char Device_Status[32]; |
| | | char Start_Time[32]; |
| | | char Work_Time[32]; |
| | | char Manufacturer[100]; |
| | | char Devices_Type[32]; |
| | | double Longitude; |
| | | double Latitude; |
| | | }; |
| | | struct CDRes |
| | | { |
| | | Head head; |
| | | char Device_Status[32]; |
| | | int status; |
| | | CDPermission per; |
| | | CDRes() { |
| | | head.type = CD_Res; |
| | | head.len = sizeof(CDRes); |
| | | } |
| | | }; |
| | | |
| | | //鏆傚仠璁惧 |
| | | 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]; |
| | | double Longitude; |
| | | double Latitude; |
| | | }; |
| | | struct PDRes |
| | | { |
| | | Head head; |
| | | char Device_Status[32]; |
| | | char Work_Time[32]; |
| | | int status; |
| | | PDPermission per; |
| | | PDRes() { |
| | | head.type = PD_Res; |
| | | head.len = sizeof(PDRes); |
| | | } |
| | | }; |