| | |
| | | #pragma once |
| | | enum TypeInfo |
| | | { |
| | | AD_Req,//æ·»å 设å¤è¯·æ± |
| | | AD_Res,//æ·»å 设å¤ååº |
| | | CD_Req,//å
³é设å¤è¯·æ± |
| | | CD_Res,//å
³é设å¤è¯·æ± |
| | | PD_Req,//æå设å¤è¯·æ± |
| | | PD_Res,//æå设å¤è¯·æ± |
| | | AD_REQ,//æ·»å 设å¤è¯·æ± |
| | | AD_RES,//æ·»å 设å¤ååº |
| | | MD_REQ,//ä¿®æ¹è®¾å¤è¯·æ± |
| | | MD_RES,//ä¿®æ¹è®¾å¤ååº |
| | | QD_REQ,//æ¥è¯¢è®¾å¤è¯·æ± |
| | | QD_RES,//æ¥è¯¢è®¾å¤ååº |
| | | }; |
| | | struct Head |
| | | { |
| | | int type; |
| | | int len; |
| | | }; |
| | | |
| | | struct DevicesInfo |
| | | { |
| | | int deviceID; |
| | | char deviceName[32];//设å¤åç§° |
| | | char deviceStatus[32];//设å¤ç¶æ |
| | | char manufacturer[100];//åå®¶ |
| | | char devicesType[32];//设å¤ç±»å |
| | | double longitude;//ç»åº¦ |
| | | double latitude;//纬度 |
| | | char purchasingTime[15];//è´ä¹°æ¶é´ |
| | | char installTime[15];//å®è£
æ¶é´ |
| | | char devicesSerialNumber[32];//设å¤ç¼ç |
| | | }; |
| | | //æ·»å è®¾å¤ |
| | | struct ADReq |
| | | struct ADReq//æ·»å è¯·æ± |
| | | { |
| | | Head head; |
| | | char Device_Name[32]; |
| | | char deviceName[32]; |
| | | ADReq() { |
| | | head.type = AD_Req; |
| | | head.len = sizeof(AD_Req); |
| | | head.type = AD_REQ; |
| | | head.len = sizeof(ADReq); |
| | | } |
| | | |
| | | }; |
| | | struct ADPermission |
| | | { |
| | | char Device_Name[32]; |
| | | char Device_Status[32]; |
| | | char Manufacturer[100]; |
| | | char Devices_Type[32]; |
| | | double Longitude; |
| | | double Latitude; |
| | | }; |
| | | struct ADRes |
| | | |
| | | 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; |
| | | int type; |
| | | ADRes() { |
| | | head.type = AD_Res; |
| | | head.type = AD_RES; |
| | | head.len = sizeof(ADRes); |
| | | } |
| | | |
| | | }; |
| | | |
| | | //å
³éè®¾å¤ |
| | | struct CDReq |
| | | //ä¿®æ¹è®¾å¤ |
| | | struct MDRes//ä¿®æ¹è¯·æ± |
| | | { |
| | | Head head; |
| | | char Device_Name[32]; |
| | | CDReq() { |
| | | head.type = CD_Req; |
| | | head.len = sizeof(CDReq); |
| | | DevicesInfo info; |
| | | MDRes() { |
| | | head.type = MD_RES; |
| | | head.len = sizeof(MDRes); |
| | | } |
| | | }; |
| | | 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 |
| | | struct MDReq//ä¿®æ¹ååº |
| | | { |
| | | Head head; |
| | | char Device_Status[32]; |
| | | int status; |
| | | CDPermission per; |
| | | CDRes() { |
| | | head.type = CD_Res; |
| | | head.len = sizeof(CDRes); |
| | | int type; |
| | | MDReq() { |
| | | head.type = MD_REQ; |
| | | head.len = sizeof(MDReq); |
| | | } |
| | | }; |
| | | |
| | | //æåè®¾å¤ |
| | | struct PDReq |
| | | //æ¥è¯¢è®¾å¤ |
| | | struct QDReq//æ¥è¯¢è¯·æ± |
| | | { |
| | | Head head; |
| | | char Device_Name[32]; |
| | | PDReq() { |
| | | head.type = PD_Req; |
| | | head.len = sizeof(PDReq); |
| | | DevicesInfo info; |
| | | QDReq() { |
| | | head.type = QD_REQ; |
| | | head.len = sizeof(QDReq); |
| | | } |
| | | }; |
| | | 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 |
| | | struct QDRes//æ¥è¯¢ååº |
| | | { |
| | | Head head; |
| | | char Device_Status[32]; |
| | | char Work_Time[32]; |
| | | int status; |
| | | PDPermission per; |
| | | PDRes() { |
| | | head.type = PD_Res; |
| | | head.len = sizeof(PDRes); |
| | | int type; |
| | | QDRes() { |
| | | head.type = QD_RES; |
| | | head.len = sizeof(QDRes); |
| | | } |
| | | }; |