240717班级,工业化控制系统,煤矿相关行业,昆仑系统
lzx
2024-11-09 204ed8bff86568e57acae30cd905a4ba70f5f0f0
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
#ifndef COMMON_H
#define COMMON_H
 
#include <string.h>
 
enum TypeInfo {
 
    //×¢²áµÇ¼
    LOGIN_REQ, // µÇ¼ÇëÇó
    LOGIN_RES, // µÇ¼ÏìÓ¦
    REGISTER_REQ, //×¢²áÇëÇó
    REGISTER_RES, //×¢²áÏìÓ¦
    RESET_REQ, //ÖØÖÃÃÜÂëÇëÇó
    RESET_RES, //ÖØÖÃÃÜÂëÏìÓ¦
 
 
    //ȨÏÞ¹ÜÀí
    QUERY_PMS_REQ,      // °´Ô±¹¤±àºÅ¡¢Ãû×Ö»òְλ²éѯÈËԱȨÏÞÐÅÏ¢ÇëÇó
    UPDATE_PMS_REQ,     // °´½ÇÉ«id¸üÐÂȨÏÞÐÅÏ¢ÇëÇó
    QUERY_PMS_RES,      // ²éѯÈËÔ±ºÍ½ÇÉ«ÐÅÏ¢µÄÏìÓ¦½á¹¹Ìå
    UPDATE_PMS_RES,     // È¨ÏÞ¸üнá¹ûÏìÓ¦Ìå
 
    //É豸¹ÜÀí
    AD_REQ,//Ìí¼ÓÉ豸ÇëÇó
    AD_RES,//Ìí¼ÓÉ豸ÏìÓ¦
    MD_REQ,//ÐÞ¸ÄÉ豸ÇëÇó
    MD_RES,//ÐÞ¸ÄÉ豸ÏìÓ¦
    QD_REQ,//²éѯÉ豸ÇëÇó
    QD_RES,//²éѯÉ豸ÏìÓ¦
 
    //µØÍ¼±ê×¢
    MML_REQ,//µØÍ¼±ê×¢¼ÓÔØÇëÇó
    MML_RES,//µØÍ¼±ê×¢¼ÓÔØÏìÓ¦    
    MMI_REQ,//µØÍ¼±ê×¢²åÈëÇëÇó
    MMI_RES,//µØÍ¼±ê×¢²åÈëÏìÓ¦    
    MMD_REQ,//µØÍ¼±êעɾ³ýÇëÇó
    MMD_RES,//µØÍ¼±êעɾ³ýÏìÓ¦
 
    //´óÆÁÏÔʾ
    ENVIRONMENT_REQ,//»·¾³Êý¾ÝÇëÇó
    ENVIRONMENT_RES,//»·¾³Êý¾ÝÏìÓ¦
    DEVICESTATUS_REQ,//É豸״̬ÇëÇó
    DEVICESTATUS_RES,//É豸״̬ÏìÓ¦
    MOVEMENTRECORD_REQ,//²Ù×÷ÈÕÖ¾ÇëÇó
    MOVEMENTRECORD_RES,//²Ù×÷ÈÕÖ¾ÏìÓ¦
    ALARMRECORD_REQ,//¾¯±¨¼Ç¼ÇëÇó
    ALARMRECORD_RES,//¾¯±¨¼Ç¼ÏìÓ¦
    YIELD_REQ,//ú¿ó²úÁ¿ÇëÇó
    YIELD_RES,//ú¿ó²úÁ¿ÏìÓ¦
    COAL_MINE_RODER_REQ,//ú¿ó¶©µ¥ÇëÇó
    COAL_MINE_RODER_RES,//ú¿ó¶©µ¥ÏìÓ¦
 
    //¾¯±¨¹ÜÀí
    WARNING_REQ, // ¾¯±¨ÇëÇó
    WARNING_RES, // ¾¯±¨ÏìÓ¦
    DATA_REQ,  // Êý¾ÝÇëÇó
    DATA_RES,  // Êý¾ÝÏìÓ¦
    THRESHOLD_REQ, //ãÐÖµÇëÇó
    THRESHOLD_RES, //ãÐÖµÏìÓ¦
 
 
 
    //Éú²ú¼Æ»®¹ÜÀí
    ADD_PDPLAN_REQ,//Ìí¼ÓÉú²ú¼Æ»®µÄÇëÇó½á¹¹Ìå
    ADD_PDPLAN_RES,//Ìí¼ÓÉú²ú¼Æ»®µÄÏìÓ¦½á¹¹Ìå
    DEL_PDPLAN_REQ,//ɾ³ýÉú²ú¼Æ»®µÄÇëÇó½á¹¹Ìå
    DEL_PDPLAN_RES,//ɾ³ýÉú²ú¼Æ»®µÄÏìÓ¦½á¹¹Ìå
    UPDATE_PDPLAN_REQ,//¸ü¸ÄÉú²ú¼Æ»®µÄÇëÇó½á¹¹Ìå
    UPDATE_PDPLAN_RES,//¸ü¸ÄÉú²ú¼Æ»®µÄÏìÓ¦½á¹¹Ìå
    QUERY_PDPLAN_REQ,//²éѯÉú²ú¼Æ»®µÄÇëÇó½á¹¹Ìå
    QUERY_PDPLAN_RES,//²éѯÉú²ú¼Æ»®µÄÏìÓ¦½á¹¹Ìå
 
 
    ADD_MONOUTPUT_REQ,//Ìí¼ÓÈÕ²úÁ¿µÄÇëÇó½á¹¹Ìå
    ADD_MONOUTPUT_RES,//Ìí¼ÓÈÕ²úÁ¿µÄÏìÓ¦½á¹¹Ìå
    DEL_MONOUTPUT_REQ,//ɾ³ýÈÕ²úÁ¿µÄÇëÇó½á¹¹Ìå
    DEL_MONOUTPUT_RES,//ɾ³ýÈÕ²úÁ¿µÄÏìÓ¦½á¹¹Ìå
    UPDATE_MONOUTPUT_REQ,//¸üÐÂÈÕ²úÁ¿µÄÇëÇó½á¹¹Ìå
    UPDATE_MONOUTPUT_RES,//¸üÐÂÈÕ²úÁ¿µÄÏìÓ¦½á¹¹Ìå
    QUERY_MONOUTPUT_REQ,//²éѯÈÕ²úÁ¿µÄÇëÇó½á¹¹Ìå
    QUERY_MONOUTPUT_RES,//²éѯÈÕ²úÁ¿µÄÏìÓ¦½á¹¹Ìå
 
 
    //ÀúÊ·²éѯ
    HISTORY_DEV_REQ,        //ÀúÊ·²éѯӲ¼þÇëÇó
    HISTORY_DEV_RES,        //ÀúÊ·²éѯӲ¼þÏìÓ¦
    HISTORY_PRODUCE_REQ,    //ÀúÊ·²éѯÉú²úÇëÇó
    HISTORY_PRODUCE_RES,    //ÀúÊ·²éѯÉú²úÏìÓ¦
    HISTORY_ENV_REQ,    //ÀúÊ·²éѯ»·¾³ÇëÇó
    HISTORY_ENV_RES,    //ÀúÊ·²éѯ»·¾³ÏìÓ¦
    HISTORY_MON_REQ,    //ÀúÊ·²éѯÔ²úÁ¿ÇëÇó
    HISTORY_MON_RES,    //ÀúÊ·²éѯÔ²úÁ¿ÏìÓ¦
 
 
    //×Ô¶¯Éý¼¶
    VERSION_UPDATE_REQ, // °æ±¾¸üÐÂÇëÇó
    VERSION_UPDATE_RES, // °æ±¾¸üÐÂÏìÓ¦
    FILE_DOWNLOADS_REQ, // °æ±¾¸üÐÂÎļþÏÂÔØÇëÇó
    FILE_DOWNLOADS_RES, // °æ±¾¸üÐÂÎļþÏÂÔØÏìÓ¦
    DOWNLOAD_SUCCESSFULLY_RES,       // ¸üÐÂÎļþÏÂÔØ³É¹¦µÄÏìÓ¦
    
    //°æ±¾¹ÜÀí
    VERSION_NUM_REQ,  // °æ±¾ºÅÇëÇó
    VERSION_NUM_RES,   // °æ±¾ºÅÏìÓ¦
    UPLOAD_FILE_REQ, // ÉÏ´«ÎļþµÄÇëÇó
    UPLOAD_FILE_RES, // ÉÏ´«ÎļþµÄÏìÓ¦
    VERSION_INFOENTRY_REQ,       // °æ±¾ÐÅϢ¼ÈëÇëÇó
    VERSION_INFOENTRY_RES,       //°æ±¾ÐÅϢ¼ÈëÏìÓ¦
 
    //ÈÕÖ¾
    LOGSEARCH_REQ,//ÈÕÖ¾²éѯÇëÇó
    LOGSEARCH_RES,//ÈÕÖ¾²éѯÏìÓ¦
 
};
 
struct Head {
    int type;
    int len;
};
 
//×¢²áµÇ¼
//µÇ¼ÇëÇó 
struct LoginReq
{
    Head head;
    char userName[32];
    char password[100];
    LoginReq() {
        head.type = LOGIN_REQ;
        head.len = sizeof(LoginReq);
    }
};
 
struct Permission
{
    int admin;//³¬¼¶¹ÜÀíÔ±
    int loggerSearch; //ÈÕÖ¾²éѯ
    int queryHistory; //ÀúÊ·¼Ç¼
    int mapMark;//µØÍ¼
    int versionManage; // °æ±¾¹ÜÀí
    int warning; //¾¯±¨
    int devManage; //É豸¹ÜÀí
    int productPlan;//Éú²ú¼Æ»®
    char roleName[32]; // ½ÇÉ«Ãû
};
 
//µÇ¼ÏìÓ¦
struct LoginRes
{
    Head head;
    char userName[32];
    int status; // µÇ¼״̬
    // µÇ¼³É¹¦Ê±£¬¸ÃÕ˺ŶÔÓ¦µÄȨÏÞ×éºÏ
    Permission per;
    LoginRes()
    {
        head.type = LOGIN_RES;
        head.len = sizeof(LoginRes);
    }
};
 
//×¢²áÇëÇó 
struct RegisterReq
{
    Head head;
    char userName[32];
    char password[100];
    char email[32];
    char telephone[32];
    RegisterReq() {
        head.type = REGISTER_REQ;
        head.len = sizeof(RegisterReq);
    }
};
 
//×¢²áÏìÓ¦
struct RegisterRes
{
    Head head;
    char userName[32];
    int status; // ×¢²á״̬
    RegisterRes()
    {
        head.type = REGISTER_RES;
        head.len = sizeof(RegisterRes);
    }
};
 
//ÖØÖÃÃÜÂëÇëÇó 
struct ResetReq
{
    Head head;
    char userName[32];
    char email[32];
    char password[100];//ÐÂÃÜÂë
    ResetReq() {
        head.type = RESET_REQ;
        head.len = sizeof(ResetReq);
    }
};
 
//ÖØÖÃÃÜÂëÏìÓ¦
struct ResetRes
{
    Head head;
    char userName[32];
    int status; // ÖØÖÃÃÜÂë״̬
    ResetRes()
    {
        head.type = RESET_RES;
        head.len = sizeof(ResetRes);
    }
};
 
//ȨÏÞ¹ÜÀí
// °´Ô±¹¤±àºÅ¡¢Ãû×Ö»òְλ²éѯÈËԱȨÏÞÐÅÏ¢ÇëÇó
typedef struct QueryPmsReq {
    Head head;
    char userNo[32];
    char name[32];
    char permissonType[32];
    QueryPmsReq() {
        head.type = QUERY_PMS_REQ;
        memset(userNo, 0, 32);
        memset(permissonType, 0, 32);
        memset(name, 0, 32);
        head.len = sizeof(QueryPmsReq);
    }
} QueryPmsReq;
 
// °´½ÇÉ«id¸üÐÂȨÏÞÐÅÏ¢ÇëÇó
typedef struct UpdatePmsReq {
    Head head;
    // ÈËÔ±±íÖ÷¼üid
    int id;
    int queryHistory;
    int loggerSearch;
    int mapMark;
    int devManage;
    int productPlan;
    int warningManage;
    int versionManage; //°æ±¾¹ÜÀí
    int admin; //ϵͳ¹ÜÀíÔ±
 
    char permissonType[32];
    UpdatePmsReq() {
        head.type = QUERY_PMS_RES;
        head.len = sizeof(UpdatePmsReq);
    }
} UpdatePmsReq;
 
// µ¥¸öÈËÔ±ºÍȨÏÞÁªºÏ²éѯ½á¹¹Ìå
typedef struct PmsRes {
    int queryHistory;
    int loggerSearch;
    int mapMark;
    int devManage;
    int productPlan;
    int versionManage; //°æ±¾¹ÜÀí
    int warningManage;
    int admin; //ϵͳ¹ÜÀíÔ±
 
    int id;
 
    char userNo[32];
    char name[32];
 
    char permissonType[32];  // ½ÇÉ«ÀàÐÍ
 
    char department[32];
    char loginTime[32];
    char registerTime[32];
} PmsRes;
 
// ²éѯÈËÔ±ºÍ½ÇÉ«ÐÅÏ¢µÄÏìÓ¦½á¹¹Ìå
typedef struct QueryPmsRes {
    Head head;
    int success; // 1Ϊ³É¹¦ ,0Ϊʧ°Ü
    PmsRes pmsList[0];
    QueryPmsRes() {
        head.type = QUERY_PMS_REQ;
    }
} QueryPmsRes;
 
// È¨ÏÞ¸üнá¹ûÏìÓ¦Ìå
struct UpdatePmsRes {
    Head head;
    int success; // 1Ϊ³É¹¦ ,0Ϊʧ°Ü
    UpdatePmsRes() {
        head.type = UPDATE_PMS_RES;
        head.len = sizeof(UpdatePmsRes);
    }
 
};
 
 
 
 
 
//É豸¹ÜÀí
struct DevicesInfo
{
    int id;//É豸ID
    char deviceName[32];//É豸Ãû³Æ
    char deviceType[32];//É豸ÀàÐÍ
    char deviceSerialNumber[32];//É豸±àÂë
    char deviceStatus[32];//É豸״̬
    char area[100];//µØÇø
    double longitude;//¾­¶È
    double latitude;//γ¶È
    char purchasingTime[15];//¹ºÂòʱ¼ä
    char installTime[15];//°²×°Ê±¼ä
    char manufacturer[100];//³§¼Ò
};
//Ìí¼ÓÉ豸
struct ADReq//Ìí¼ÓÇëÇó
{
    Head head;
    DevicesInfo devInfo[0];
    ADReq() {
        head.type = AD_REQ;
        head.len = sizeof(ADReq);
    }
 
};
 
struct ADRes//Ìí¼ÓÏìÓ¦
{
    Head head;
    int status;
    ADRes() {
        head.type = AD_RES;
        head.len = sizeof(ADRes);
    }
 
};
//ÐÞ¸ÄÉ豸
struct MDReq//ÐÞ¸ÄÇëÇó
{
    Head head;
    DevicesInfo info;
    char condition[32];
    char modifiedContent[100];
    double laOrLo;
    MDReq() {
        head.type = MD_REQ;
        head.len = sizeof(MDReq);
    }
};
struct MDRes//ÐÞ¸ÄÏìÓ¦
{
    Head head;
    int status;
    char conditon[32];
    char modifiedContent[100];
    double laOrLo;
    MDRes() {
        head.type = MD_RES;
        head.len = sizeof(MDRes);
    }
};
//²éѯÉ豸
struct QDReq//²éѯÇëÇó
{
    Head head;
    DevicesInfo info;
    char buyTimeBegin[15];
    char buyTimeEnd[15];
    char installTimeBegin[15];
    char installTimeEnd[15];
    QDReq() {
        head.type = QD_REQ;
        head.len = sizeof(QDReq);
    }
};
struct QDRes//²éѯÏìÓ¦
{
    Head head;
    int status;
    DevicesInfo info[0];
    QDRes() {
        head.type = QD_RES;
        head.len = sizeof(QDRes);
    }
};
 
 
//µØÍ¼±ê×¢
struct MarkInfo
{
    char markId[32];//±ê×¢µãidÉ豸±àºÅ
    double latitude;//γ¶È
    double longitude;//¾­¶È
    char deviceStatus[32];//É豸״̬
    char deviceName[32];//É豸Ãû³Æ
};
//µØÍ¼±ê×¢¼ÓÔØÇëÇó
struct MMLReq//µØÍ¼
{
    Head head;
    MMLReq() {
        head.type = MML_REQ;
        head.len = sizeof(MMLReq);
    }
};
//µØÍ¼±ê×¢¼ÓÔØÏìÓ¦£º
struct MMLRes
{
    Head head;
    int status;//²Ù×÷״̬
    MarkInfo info[0];
    MMLRes() {
        head.type = MML_RES;
        head.len = sizeof(MMLRes);
    }
};
//µØÍ¼±ê×¢²åÈëÇëÇó
struct MMIReq//µØÍ¼
{
    Head head;
    MarkInfo info[0];
    MMIReq() {
        head.type = MMI_REQ;
        head.len = sizeof(MMIReq);
    }
};
//µØÍ¼±ê×¢²åÈëÏìÓ¦£º
struct MMIRes
{
    Head head;
    int status;//²Ù×÷״̬
    MarkInfo info[0];
    MMIRes() {
        head.type = MMI_RES;
        head.len = sizeof(MMIRes);
    }
};
 
//µØÍ¼±êעɾ³ýÇëÇó
struct MMDReq//µØÍ¼
{
    Head head;
    MarkInfo info[0];
    MMDReq() {
        head.type = MMD_REQ;
        head.len = sizeof(MMDReq);
    }
};
//µØÍ¼±êעɾ³ýÏìÓ¦£º
struct MMDRes
{
    Head head;
    int status;//²Ù×÷״̬
    MarkInfo info[0];
    MMDRes() {
        head.type = MMD_RES;
        head.len = sizeof(MMDRes);
    }
};
 
//´óÆÁÏÔʾ
//»·¾³Êý¾ÝÇëÇó
struct EnvironmentReq
{
    Head head;
    char place[32];//µØÇø
    char nowTime[32];//µ±Ê±Ê±¼ä
        EnvironmentReq(){
        head.type = ENVIRONMENT_REQ;
        head.len = sizeof(EnvironmentReq);
    }
};
//»·¾³Êý¾ÝÏìÓ¦
struct Environment
{
    char dataType[32];//Êý¾ÝÀàÐÍ
    float envdata;//Êý¾Ý
};
struct EnvironmentRes
{
    Head head;
    int status;
    Environment environment[0];
        EnvironmentRes(){
        head.type = ENVIRONMENT_RES;
        head.len = sizeof(EnvironmentRes);
    }
};
//É豸״̬ÇëÇó
struct DeviceStatusReq
{
    Head head;
        DeviceStatusReq(){
        head.type = DEVICESTATUS_REQ;
        head.len = sizeof(DeviceStatusReq);
    }
};
//É豸״̬ÏìÓ¦
struct Area
{
    double longitude;//¾­¶È
    double latitude;//γ¶ÈAA
    char area[64];//µØÇø
};
struct DeviceStatus
{  
    int deviceID;//É豸±àºÅ
    char deviceName[32];//É豸Ãû³Æ
    double longitude;//¾­¶È
    double latitude;//γ¶ÈAA
    char deviceStatus[32];//É豸״̬
    char area[64];//µØÇø
};
struct DeviceStatusRes
{
    Head head;
    int status;
    DeviceStatus deviceStatus[0];
        DeviceStatusRes(){
        head.type = DEVICESTATUS_RES;
        head.len = sizeof(DeviceStatusRes);
    }
};
//²Ù×÷ÈÕÖ¾ÇëÇó
struct MovementRecordReq
{
    Head head;
        MovementRecordReq(){
        head.type = MOVEMENTRECORD_REQ;
        head.len = sizeof(MovementRecordReq);
    }
};
//²Ù×÷ÈÕÖ¾ÏìÓ¦
struct MovementRecord
{
    char userName[32];//²Ù×÷Óû§Ãû
    char operateTime[32];//²Ù×÷ʱ¼ä
    char deviceName[32];//²Ù×÷É豸
    double longitude;//¾­¶È
    double latitude;//γ¶È
    char movement[256];//²Ù×÷ÃèÊö
};
struct MovementRecordRes
{
    Head head;
    int status;
    MovementRecord movementRecord[0];
        MovementRecordRes(){
        head.type = MOVEMENTRECORD_RES;
        head.len = sizeof(MovementRecordRes);
    }
};
//¾¯±¨¼Ç¼ÇëÇó
struct AlarmRecordReq
{
    Head head;
        AlarmRecordReq(){
        head.type = ALARMRECORD_REQ;
        head.len = sizeof(AlarmRecordReq);
    }
};
//¾¯±¨¼Ç¼ÏìÓ¦
struct AlarmRecord
{
    char alarmTime[32];//¾¯±¨Ê±¼ä
    char alarmtype[32];//´¦Àí״̬
    double longitude;//¾­¶È
    double latitude;//γ¶È
    char alarmContent[256];//¾¯±¨ÄÚÈÝ
};
struct AlarmRecordRes
{
    Head head;
    int status;
    AlarmRecord alarmRecord[0];
        AlarmRecordRes(){
        head.type = ALARMRECORD_RES;
        head.len = sizeof(AlarmRecordRes);
    }
};
//ú¿ó²úÁ¿ÇëÇó
struct YieldReq
{
    Head head;
    char startTime[64];//¿ªÊ¼Ê±¼ä
    char finishTime[64];//½áÊøÊ±¼ä
        YieldReq(){
        head.type = YIELD_REQ;
        head.len = sizeof(YieldReq);
    }
};
//ú¿ó²úÁ¿ÏìÓ¦
struct Yield
{
    double sumA;//A²úÁ¿
    double sumB;//B²úÁ¿
    double sumC;//C²úÁ¿
};
struct YieldRes
{
    Head head;
    int status;
    Yield yield[0];
        YieldRes(){
        head.type = YIELD_RES;
        head.len = sizeof(YieldRes);
    }
};
//¶©µ¥²éѯÇëÇó
struct CoaMinRodReq
{
    Head head;
    char planName[64];//¶©µ¥Ãû
        CoaMinRodReq(){
        head.type = COAL_MINE_RODER_REQ;
        head.len = sizeof(CoaMinRodReq);
    }
};
//¶©µ¥²éѯÏìÓ¦
struct CoaMinRod
{
    char startTime[64];//ÆðʼÈÕÆÚ
    char finishTime[64];//½»¸¶ÈÕÆÚ
    char proName[64];//²úÆ·Ãû
    double planPro;//¼Æ»®Éú²úÁ¿
    double actPro;//ʵ¼ÊÉú²úÁ¿
};
struct CoaMinRodRes
{
    Head head;
    int status;
    CoaMinRod coaMinRod[0];
        CoaMinRodRes(){
        head.type = COAL_MINE_RODER_RES;
        head.len = sizeof(CoaMinRodReS);
    }
};
 
//¾¯±¨¹ÜÀí
struct warningInfo {
    char device_name[32];//É豸Ãû³Æ
    char des[32];//¾¯±¨ÃèÊö
    char time[32];//¾¯±¨Ê±¼ä
    float warningdata;//¾¯±¨Êý¾Ý
    char type[16];//¾¯±¨ÀàÐÍ
    char status[16];//¾¯±¨×´Ì¬
};
 
struct dataInfo {
    char device_name[32];
    char type[16];//»·¾³Êý¾ÝÀàÐÍ
    float data;
    char time[32];//ÉÏ´«Êý¾Ýʱ¼ä
};
 
struct threshInfo {
    char device_name[32];
    char type[16];//»·¾³ÀàÐÍ
    float min;//×îСãÐÖµ
    float max;//×î´óãÐÖµ
    char time[32];//ãÐÖµÐÞ¸Äʱ¼ä
};
 
//¾¯±¨ÇëÇó½á¹¹Ìå
struct WarningReq {
    Head head;
    warningInfo info[0];
 
    WarningReq() {
        head.type = WARNING_REQ;
        head.len = sizeof(WarningReq);
    }
};
 
//Êý¾ÝÇëÇó½á¹¹Ìå
struct DataReq {
    Head head;
    dataInfo Info[0];
 
    DataReq() {
        head.type = DATA_REQ;
        head.len = sizeof(DataReq);
    }
};
 
//ãÐÖµÇëÇó½á¹¹Ìå
struct ThresholdReq {
    Head head;
    threshInfo threInfo[0];
 
    ThresholdReq() {
        head.type = THRESHOLD_REQ;
        head.len = sizeof(ThresholdReq);
    }
};
 
 
//¾¯±¨ÏìÓ¦½á¹¹Ìå
struct WarningRes {
    Head head;
    int status;// ÏìӦ״̬
    warningInfo warninginfo[0];
 
    WarningRes() {
        head.type = WARNING_RES;
        head.len = sizeof(WarningRes);
    }
};
 
struct DataRes {
    Head head;
    int status;// ÏìӦ״̬
    dataInfo datainfo[0];
 
    DataRes() {
        head.type = DATA_RES;
        head.len = sizeof(DataRes);
    }
};
 
struct ThresholdRes {
    Head head;
    int status;// ÏìӦ״̬
    threshInfo threInfo[0];
 
    ThresholdRes() {
        head.type = THRESHOLD_RES;
        head.len = sizeof(ThresholdRes);
    }
};
 
 
//Éú²ú¼Æ»®¹ÜÀí
struct PdplanInfo
{
    char planName[32];//¶©µ¥»®Ãû×Ö
    char startDate[32];//ÆðʼÈÕÆÚ
    char closingDate[32];//½»¸¶ÈÕÆÚ
    char pdName[8];//²úÆ·Ãû
    double plannedPd;//¼Æ»®Éú²úÁ¿
    double actualPd;//ʵ¼ÊÉú²úÁ¿
    double progress;//Éú²ú½ø¶È
    int finishOntime;//ÊÇ·ñ°´ÆÚÍê³É
};
 
struct MonoutputInfo
{
<<<<<<< HEAD
    char month[32];//月份
    double aOutput;//a产品月产量
    double bOutput;//b产品月产量
    double cOutput;//c产品月产量
=======
    char date[32];//ÈÕÆÚ
    double aOutput;//a²úÆ·Ô²úÁ¿
    double bOutput;//b²úÆ·Ô²úÁ¿
    double cOutput;//c²úÆ·Ô²úÁ¿
>>>>>>> 83817169914cd859e4a7e0b5f0685dd0c072a974
};
 
//Ìí¼ÓÉú²ú¼Æ»®µÄÇëÇó½á¹¹Ìå
struct AddPdplanReq
{
    Head head;
    PdplanInfo info[0];
    AddPdplanReq() {
        head.type = ADD_PDPLAN_REQ;
        head.len = sizeof(AddPdplanReq);
    }
};
//Ìí¼ÓÒ»ÌõÉú²ú¼Æ»®µÄÏìÓ¦½á¹¹Ìå
struct AddPdplanRes
{
    Head head;
    int status;//±íʾÊÇ·ñÌí¼Ó³É¹¦£¬0·ñ1ÊÇ
    AddPdplanRes() {
        head.type = ADD_PDPLAN_RES;
        head.len = sizeof(AddPdplanRes);
    }
};
 
//ɾ³ýÉú²ú¼Æ»®µÄÇëÇó½á¹¹Ìå
struct DelPdplanReq
{
    Head head;
    PdplanInfo info[0];
    DelPdplanReq() {
        head.type = DEL_PDPLAN_REQ;
        head.len = sizeof(DelPdplanReq);
    }
};
 
//ɾ³ýÉú²ú¼Æ»®µÄÏìÓ¦½á¹¹Ìå
struct DelPdplanRes
{
    Head head;
    int status;//±íʾÊÇ·ñɾ³ý³É¹¦£¬0·ñ1ÊÇ
    DelPdplanRes() {
        head.type = DEL_PDPLAN_RES;
        head.len = sizeof(DelPdplanRes);
    }
};
 
//¸ü¸ÄÉú²ú¼Æ»®µÄÇëÇó½á¹¹Ìå.
struct UpdatePdplanReq
{
    Head head;
    PdplanInfo info;
    UpdatePdplanReq() {
        head.type = UPDATE_PDPLAN_REQ;
        head.len = sizeof(UpdatePdplanReq);
    }
};
 
//¸ü¸ÄÉú²ú¼Æ»®µÄÏìÓ¦½á¹¹Ìå
struct UpdatePdplanRes
{
    Head head;
    int status;//±íʾÊÇ·ñ¸üгɹ¦£¬0·ñ1ÊÇ
    UpdatePdplanRes() {
        head.type = UPDATE_PDPLAN_RES;
        head.len = sizeof(UpdatePdplanRes);
    }
};
 
//²éѯÉú²ú¼Æ»®µÄÇëÇó½á¹¹Ìå
struct QueryPdplanReq
{
    Head head;
    int planId;//¶©µ¥±àºÅ
    char planName[32];//¶©µ¥»®Ãû×Ö
    char startDate[32];//ÆðʼÈÕÆÚ
    char closingDate[32];//½»¸¶ÈÕÆÚ
    char pdName[8];//²úÆ·Ãû
    double plannedPd;//¼Æ»®Éú²úÁ¿
    double actualPd;//ʵ¼ÊÉú²úÁ¿
    double progress;//Éú²ú½ø¶È
    int finishOntime;//ÊÇ·ñ°´ÆÚÍê³É
    QueryPdplanReq() {
        head.type = QUERY_PDPLAN_REQ;
        head.len = sizeof(QueryPdplanReq);
    }
};
 
//²éѯÉú²ú¼Æ»®µÄÏìÓ¦½á¹¹Ìå
struct QueryPdplanRes
{
    Head head;
    int status;//±íʾÊÇ·ñÌí¼Ó³É¹¦£¬0·ñ1ÊÇ
    PdplanInfo info[0];
    QueryPdplanRes() {
        head.type = QUERY_PDPLAN_RES;
        head.len = sizeof(QueryPdplanRes);
    }
};
 
 
//Ìí¼ÓÈÕ²úÁ¿µÄÇëÇó½á¹¹Ìå
struct AddMonoutputReq
{
    Head head;
    MonoutputInfo info[0];
    AddMonoutputReq() {
        head.type = ADD_MONOUTPUT_REQ;
        head.len = sizeof(AddMonoutputReq);
    }
};
 
//Ìí¼ÓÈÕ²úÁ¿µÄÏìÓ¦½á¹¹Ìå
struct AddMonoutputRes
{
    Head head;
    int status;//±íʾÊÇ·ñÌí¼Ó³É¹¦£¬0·ñ1ÊÇ
    AddMonoutputRes() {
        head.type = ADD_MONOUTPUT_RES;
        head.len = sizeof(AddMonoutputRes);
    }
};
 
//ɾ³ýÈÕ²úÁ¿µÄÇëÇó½á¹¹Ìå
struct DelMonoutputReq
{
    Head head;
    MonoutputInfo info[0];
    DelMonoutputReq() {
        head.type = DEL_MONOUTPUT_REQ;
        head.len = sizeof(DelMonoutputReq);
    }
};
 
//ɾ³ýÈÕ²úÁ¿µÄÏìÓ¦½á¹¹Ìå
struct DelMonoutputRes
{
    Head head;
    int status;//±íʾÊÇ·ñɾ³ý³É¹¦£¬0·ñ1ÊÇ
    DelMonoutputRes() {
        head.type = DEL_MONOUTPUT_RES;
        head.len = sizeof(DelMonoutputRes);
    }
};
 
//¸ü¸ÄÈÕ²úÁ¿µÄÇëÇó½á¹¹Ìå.
struct UpdateMonoutputReq
{
    Head head;
    MonoutputInfo info[0];
    UpdateMonoutputReq() {
        head.type = UPDATE_MONOUTPUT_REQ;
        head.len = sizeof(UpdateMonoutputReq);
    }
};
 
//¸ü¸ÄÈÕ²úÁ¿µÄÏìÓ¦½á¹¹Ìå
struct UpdateMonoutputRes
{
    Head head;
    int status;//±íʾÊÇ·ñ¸üгɹ¦£¬0·ñ1ÊÇ
    MonoutputInfo info[0];
    UpdateMonoutputRes() {
        head.type = UPDATE_MONOUTPUT_RES;
        head.len = sizeof(UpdateMonoutputRes);
    }
};
 
//²éѯÈÕ²úÁ¿µÄÇëÇó½á¹¹Ìå
struct QueryMonoutputReq
{
    Head head;
    int date;//ÈÕÆÚ
    double aOutput;//a²úÆ·Ô²úÁ¿
    double bOutput;//b²úÆ·Ô²úÁ¿
    double cOutput;//c²úÆ·Ô²úÁ¿
 
    QueryMonoutputReq() {
        head.type = QUERY_MONOUTPUT_REQ;
        head.len = sizeof(QueryMonoutputReq);
    }
};
 
//²éѯÈÕ²úÁ¿µÄÏìÓ¦½á¹¹Ìå
struct QueryMonoutputRes
{
    Head head;
    int status;//±íʾÊÇ·ñÌí¼Ó³É¹¦£¬0·ñ1ÊÇ
    MonoutputInfo info[0];
    QueryMonoutputRes() {
        head.type = QUERY_MONOUTPUT_RES;
        head.len = sizeof(QueryMonoutputRes);
    }
};
 
 
 
//ÀúÊ·²éѯ
// ÀúÊ·²éѯÉ豸ÐÅÏ¢ÇëÇó½á¹¹Ìå
struct HistoryDevReq {
    Head head;
    //¸ù¾Ýʱ¼ä·¶Î§²éѯ
    char startTime[32];
    char endTime[32];
    //¹Ø¼ü×Ö²éѯ
    char keyWord[32];
    HistoryDevReq() {
        // ³õʼ»¯Êý¾ÝÍ·
        memset(this,0,sizeof(HistoryDevReq));
        head.type = HISTORY_DEV_REQ;
        head.len = sizeof(HISTORY_DEV_REQ);
        // ³õʼ»¯²éѯÌõ¼þ×Ö¶Î
    }
};
// ÀúÊ·²éѯÉú²ú¼Æ»®ÇëÇó½á¹¹Ìå
struct HistoryProReq {
    Head head;
    //¸ù¾Ýʱ¼ä·¶Î§²éѯ
    char startTime[32];
    char endTime[32];
    //¹Ø¼ü×Ö²éѯ
    char keyWord[32];
    HistoryProReq() {
        // ³õʼ»¯Êý¾ÝÍ·
        memset(this,0,sizeof(HistoryProReq ));
        head.type = HISTORY_PRODUCE_REQ;
        head.len = sizeof(HistoryProReq);
        // ³õʼ»¯²éѯÌõ¼þ×Ö¶Î
    }
};
// ÀúÊ·²éѯÔ²úÁ¿ÇëÇó½á¹¹Ìå
struct HistoryMonReq {
    Head head;
    //¸ù¾Ýʱ¼ä·¶Î§²éѯ
    char startTime[32];
    char endTime[32];
    //¹Ø¼ü×Ö²éѯ
    char keyWord[32];
    HistoryMonReq() {
        // ³õʼ»¯Êý¾ÝÍ·
       memset(this,0,sizeof(HistoryMonReq));
        head.type = HISTORY_MON_REQ;
        head.len = sizeof(HistoryMonReq);
        // ³õʼ»¯²éѯÌõ¼þ×Ö¶Î
    }
};
// ÀúÊ·²éѯ»·¾³ÐÅÏ¢ÇëÇó½á¹¹Ìå
struct HistoryEnvReq {
    Head head;
    //¸ù¾Ýʱ¼ä·¶Î§²éѯ
    char startTime[32];
    char endTime[32];
    //¹Ø¼ü×Ö²éѯ
    char keyWord[32];
    HistoryEnvReq() {
        // ³õʼ»¯Êý¾ÝÍ·
        memset(this,0,sizeof(HistoryEnvReq));
        head.type = HISTORY_ENV_REQ;
        head.len = sizeof(HistoryEnvReq);
        // ³õʼ»¯²éѯÌõ¼þ×Ö¶Î
    }
};
//²éѯÉ豸ÐÅÏ¢ÏìÓ¦½á¹¹Ìå
struct HistoryDevRes {
    Head head;
    DevicesInfo dev[0];
    HistoryDevRes() {
        // ³õʼ»¯Êý¾ÝÍ·
        head.type = HISTORY_DEV_RES;
        head.len = sizeof(HistoryDevRes);
    }
};
//²éѯÉú²ú¼Æ»®ÏìÓ¦½á¹¹Ìå
struct HistoryProRes {
    Head head;
    PdplanInfo pro[0];
    HistoryProRes() {
        // ³õʼ»¯Êý¾ÝÍ·
        head.type = HISTORY_PRODUCE_RES;
        head.len = sizeof(HistoryProRes);
    }
};
 
//²éѯ»·¾³ÐÅÏ¢ÏìÓ¦½á¹¹Ìå
struct HistoryEnvRes {
    Head head;
    dataInfo env[0];
    HistoryEnvRes() {
        // ³õʼ»¯Êý¾ÝÍ·
        head.type = HISTORY_ENV_RES;
        head.len = sizeof(HistoryEnvRes);
    }
};
//²éѯÔ²úÁ¿
struct HistoryMonRes {
    Head head;
    MonoutputInfo  mon[0];
    HistoryMonRes() {
        // ³õʼ»¯Êý¾ÝÍ·
        head.type = HISTORY_MON_RES;
        head.len = sizeof(HistoryMonRes);
    }
};
 
 
//×Ô¶¯Éý¼¶
// °æ±¾¸üÐÂÇëÇó
struct VersionUpdateReq {
    Head head;
 
    char curVersionId[64]; // °æ±¾ºÅ
    VersionUpdateReq()
    {
        head.type = VERSION_UPDATE_REQ;
        head.len = sizeof(VersionUpdateReq);
    }
};
 
 
// °æ±¾¸üÐÂÏìÓ¦
struct VersionUpdateRes {
    Head head;
    bool state = false;
    char versionId[64]; // °æ±¾ºÅ
    char updateDate[32]; // ¸üÐÂʱ¼ä
    char versionDescription[1024]; //¸üÐÂÃèÊö
 
    VersionUpdateRes()
    {
        head.type = VERSION_UPDATE_RES;
        head.len = sizeof(VersionUpdateRes);
    }
};
 
// °æ±¾¸üÐÂÎļþÏÂÔØÇëÇó
struct FileDownloadsReq {
    Head head;
    char versionId[64]; // °æ±¾ºÅ
    FileDownloadsReq()
    {
        head.type = FILE_DOWNLOADS_REQ;
        head.len = sizeof(FileDownloadsReq);
    }
};
 
// °æ±¾¸üÐÂÎļþÏÂÔØÏìÓ¦
struct FileDownloadsRes {
    Head head;
    char versionId[64]; // °æ±¾ºÅ
    char filename[128]; //ÎļþÃû
    long long filesize; //Îļþ´óС
    char c_filepath[128];    //¿Í»§¶Ë·Å×îа汾µÄ±¾µØÂ·¾¶
    int fileNum; // ÎļþÊýÁ¿
    long long allFileSize; // Îļþ×Ü´óС
    char content[0];
    FileDownloadsRes()
    {
        head.type = FILE_DOWNLOADS_RES;
        head.len = sizeof(FileDownloadsRes);
    }
};
 
// ¸üÐÂÎļþÏÂÔØ³É¹¦µÄÏìÓ¦
struct DownloadSuccessfullyRes {
    Head head;
    bool state = false;
    char fileName[256];
    long long fileSize;
    DownloadSuccessfullyRes()
    {
        head.type = DOWNLOAD_SUCCESSFULLY_RES;
        head.len = sizeof(DownloadSuccessfullyRes);
    }
};
 
//°æ±¾¹ÜÀí
struct VersionNumReq        // °æ±¾ºÅÇëÇó
{
    Head head;
    VersionNumReq() {
        head.type = VERSION_NUM_REQ;
        head.len = sizeof(VersionNumReq);
    }
};
 
struct VersionNumRes        // °æ±¾ºÅÏìÓ¦
{
    Head head;
    char versionId[64]; // °æ±¾ºÅ
    VersionNumRes() {
        head.type = VERSION_NUM_RES;
        head.len = sizeof(VersionNumRes);
    }
};
 
// Îļþ´«Êä
struct FileInfo
{
    char fileName[256];
    long long fileSize;
    char s_filepath[128];
};
 
struct UploadFileReq        // ÉÏ´«ÎļþµÄÇëÇó
{
    Head head;
    FileInfo fileInfo;
    UploadFileReq() {
        head.type = UPLOAD_FILE_REQ;
        head.len = sizeof(UploadFileReq);
    }
};
 
struct UploadFileRes {      // ÉÏ´«ÎļþµÄÏìÓ¦
    Head head;
    bool state = false;
    char fileName[256];
    long long file_size;
    UploadFileRes()
    {
        head.type = UPLOAD_FILE_RES;
        head.len = sizeof(UploadFileRes);
    }
};
 
// °æ±¾ÐÅϢ¼Èë
// ÇëÇó
struct VersionInfoEntryReq {
    Head head;
    char versionId[64]; // °æ±¾ºÅ
    char versionIdOld[64]; // ÉÏÒ»¸ö°æ±¾ºÅ
    int fileNum;
    char c_filepath[32];    //·þÎñÆ÷·Å×îа汾µÄ·¾¶
    char versionDescription[256]; //¸üÐÂÄÚÈÝ
    char versionCreattime[32]; // ¸üÐÂʱ¼ä
    FileInfo fileInfo[0] ;        //°üº¬ÏÂÔØÎļþÐÅÏ¢
 
    VersionInfoEntryReq()
    {
        head.type = VERSION_INFOENTRY_REQ;
        head.len = sizeof(VersionInfoEntryReq);
    }
};
 
// °æ±¾ÐÅϢ¼ÈëÏìÓ¦
struct VersionInfoEntryRes {
    Head head;
    bool state = false;
    VersionInfoEntryRes()
    {
        head.type = VERSION_INFOENTRY_RES;
        head.len = sizeof(VersionInfoEntryRes);
    }
};
 
//ÈÕÖ¾
struct ParsedLog {
    char timeStamp[64]; // Ê±¼ä´Á
    char deviceId[64]; // É豸ID
    char level[16];    // ÈÕÖ¾¼¶±ð
    char content[256];  // ÈÕÖ¾ÄÚÈÝ
    char userId[64];    // Óû§ID
    char fileName[32];   //ÎļþÃû
    int problemLine;    //²úÉú´íÎóÐкÅ
    char functionName[32];  //º¯ÊýÃû
};
 
// ÈÕÖ¾²éѯÇëÇó½á¹¹Ìå
struct LogQueryReq {
    Head head;                      // Êý¾ÝÍ·
    int logLimit;                   //·þÎñ¶Ë·¢ËÍÈÕÖ¾ÊýÁ¿ÏÞÖÆ
    char startTime[20]; // ¸ù¾Ýʵ¼ÊÐèÒªµ÷Õû´óС
    char endTime[20];   // ¸ù¾Ýʵ¼ÊÐèÒªµ÷Õû´óС
    char content[256];           // ÈÕÖ¾ÄÚÈÝ
    char level[16];                 //ÈÕÖ¾¼¶±ð
    char deviceId[64];             // É豸ID
                                   // Î޲ι¹Ô캯Êý
    LogQueryReq() {
        head.type = LOGSEARCH_REQ;
        head.len = sizeof(LogQueryReq);
    }
};
 
// ÈÕÖ¾²éѯÏìÓ¦½á¹¹Ìå
struct LogQueryRes {
    Head head;
    int status;                    // ÏìӦ״̬ (Èç 1 ±íʾ³É¹¦)
    ParsedLog parsedLog[0];  // Ê¹ÓÃÈáÐÔÊý×é´æ´¢²éѯ½á¹û
 
    // Î޲ι¹Ô캯Êý
    LogQueryRes() {
        head.type = LOGSEARCH_RES;
        head.len = sizeof(LogQueryRes);
    }
};
 
 
 
 
 
#endif // COMMON_H