constdef.h 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. #ifndef _SERVER_CONST_DEF_H_
  2. #define _SERVER_CONST_DEF_H_
  3. #define MAXCRITICALSECTIONSPINCOUNT 4000
  4. #define INTERFACE_VERSION "1.0.0.2"
  5. #define INTERFACE_VERSION_1_1 "1.0.0.1"
  6. #define INTERFACE_VERSION_1_3 "1.0.0.3"
  7. #define INTERFACE_VERSION_1_4 "1.0.0.4"
  8. #define TEST_WS_URL "ws://182.92.224.191:8086"
  9. #define JSON_ROOT_KEY_CMD "cmd"
  10. #define JSON_ROOT_KEY_VERSION "version"
  11. #define JSON_ROOT_KEY_DATA "data"
  12. #define JSON_ROOT_KEY_TOTAL "total"
  13. #define JSON_ROOT_KEY_STATISTIC_VEHICLE_DATA "v"
  14. #define JSON_ROOT_KEY_STATISTIC_STAFF_DATA "s"
  15. #define JSON_ROOT_KEY_STATISTIC_STAT "stat"
  16. #define JSON_ROOT_KEY_STATISTIC_DETAIL "detail"
  17. #define JSON_ROOT_KEY_STATISTIC_GLOBAL "glbl"
  18. #define JSON_ROOT_KEY_STATISTIC_DEPT "dept"
  19. #define JSON_ROOT_KEY_STATISTIC_SUM "sum"
  20. #define JSON_ROOT_KEY_STATISTIC_AREA "area"
  21. #define JSON_ROOT_KEY_STATISTIC_LEVEL "occupation_level"
  22. // �ɼ��˽��սӿ�
  23. #define JSON_CMD_VALUE_CLEAR_CARD "clear_card"
  24. #define JSON_CMD_VALUE_DEAL_HELP "helpme_done" //deal_help
  25. #define JSON_CMD_VALUE_DEAL_HELP_RESPONSE "helpme_done_rsp" //deal_help
  26. #define JSON_CMD_VALUE_REQUEST_ALL_POSTION "request_all_postion"
  27. #define JSON_CMD_VALUE_REQUEST_ALL_DATA "req_all_data"
  28. #define JSON_CMD_VALUE_RESPONSE_ALL_DATA "resp_all_data"
  29. #define JSON_CMD_VALUE_CALL_CARD_START "call_card_start"
  30. #define JSON_CMD_VALUE_CALL_CARD_CANCEL "call_card_cancel"
  31. #define JSON_CMD_VALUE_LEADER_ARRANGE "leader_arrange"
  32. //��������
  33. #define JSON_CMD_VALUE_CALL_CARD_REQUEST "call_card_req"
  34. #define JSON_CMD_VALUE_CALL_CARD_RESPONSE "call_card_resp"
  35. #define JSON_CMD_VALUE_CALL_CARD_CANCEL_REQUEST "call_card_cancel_req"
  36. #define JSON_CMD_VALUE_CALL_CARD_CANCEL_RESPONSE "call_card_cancel_resp"
  37. #define JSON_CMD_VALUE_CALL_CARD_LIST "callcardlist"
  38. #define JSON_CMD_VALUE_META_DATA_CHANGED "meta_data_changed"
  39. #define JSON_CMD_VALUE_LIGHTS_CTRL_REQUEST "light_control"
  40. #define JSON_CMD_VALUE_LIGHTS_CTRL_RESPONSE "lights_ctrl_res"
  41. #define JSON_CMD_VALUE_HAND_UP_RESPONSE "deal_hand_up_res"
  42. #define JSON_CMD_VALUE_LOAD_HISTORY_REQUEST "load_history"
  43. #define JSON_KEY_ID "id"
  44. #define JSON_KEY_OP_TYPE "op_type"
  45. #define JSON_KEY_OP_TYPE_INSERT "INSERT"
  46. #define JSON_KEY_OP_TYPE_UPDATE "UPDATE"
  47. #define JSON_KEY_OP_TYPE_DELETE "DELETE"
  48. #define JSON_KEY_NAME "name"
  49. #define JSON_KEY_NAME_MAP_GIS "map_gis"
  50. #define JSON_KEY_NAME_MAP "map"
  51. #define JSON_KEY_NAME_AREA "area"
  52. #define JSON_KEY_NAME_PATH "reader_path_tof_n"
  53. #define JSON_KEY_NAME_READER "reader"
  54. #define JSON_KEY_NAME_CARD "card"
  55. #define JSON_KEY_NAME_STAFF "staff"
  56. #define JSON_KEY_NAME_STAFF_EXTEND "staff_extend"
  57. #define JSON_KEY_NAME_VEHICLE "vehicle"
  58. #define JSON_KEY_NAME_ANTENNA "antenna"
  59. #define JSON_KEY_NAME_VEHICLE_EXTEND "vehicle_extend"
  60. #define JSON_KEY_NAME_SECTION "section"
  61. #define JSON_KEY_NAME_LIGHT "light"
  62. #define JSON_KEY_NAME_LIGHTS_GROUP "lights_group"
  63. #define JSON_KEY_NAME_CHAMBER "chamber"
  64. #define JSON_KEY_NAME_SHIFT "shift"
  65. #define JSON_KEY_NAME_PATROL_TASK "patrol_task"
  66. #define JSON_KEY_NAME_RULES "rules"
  67. #define JSON_KEY_NAME_SETTING "setting"
  68. #define JSON_KEY_NAME_DRIVINGFACE "drivingface_vehicle"
  69. #define JSON_KEY_NAME_DRIVINGFACE_WARNING_POINT "dat_drivingface_warning_point"
  70. #define JSON_KEY_NAME_HAND_UP "dat_handup_vehicle"
  71. #define JSON_KEY_NAME_GEO_FAULT "geofault"
  72. #define JSON_KEY_NAME_LANDMARK "landmark"
  73. #define JSON_KEY_NAME_COALFACE "coalface"
  74. #define JSON_KEY_NAME_COALFACE_VEHICLE "coalface_vehicle"
  75. #define JSON_KEY_NAME_DRIVING_FACE "drivingface"
  76. #define JSON_KEY_NAME_DRIVINGFACE_VEHICLE "drivingface_vehicle"
  77. //掘进面基准点
  78. #define JSON_KEY_NAME_DRIVINGFACE_REF_POINT "drivingface_ref_point"
  79. //禁止指定人员下井
  80. #define JSON_KEY_NAME_FORBID_PERSON_DOWN_MINE "rt_person_forbid_down_mine"
  81. //设置区域中时间段人员超员阈值等数据
  82. #define JSON_KEY_NAME_PERSONS_DYNAMIC_THRE "area_persons_dynamic_thre"
  83. #define JSON_KEY_CALL_CARD_CALL_TYPE "call_type_id"
  84. #define JSON_KEY_CALL_CARD_CALL_TIME_OUT "call_time_out"
  85. #define JSON_KEY_CALL_CARD_CALL_TIME "call_time"
  86. #define JSON_KEY_CALL_CARD_CALL_LEVEL "call_level_id"
  87. #define JSON_KEY_CALL_CARD_USER_NAME "user_name"
  88. #define JSON_KEY_CALL_CARD_STATIONS "stations"
  89. #define JSON_KEY_CALL_CARD_STATION_ID "stationid"
  90. #define JSON_KEY_CALL_CARD_CARDS "cards"
  91. #define JSON_KEY_CALL_CARD_CARD_ID "cardid"
  92. #define JSON_KEY_CALL_CARD_CARD_TYPE_ID "cardtype"
  93. #define JSON_KEY_CALL_LIGHT_TASK_ID "task_id"
  94. #define JSON_KEY_CALL_LIGHT_OBJ_TYPE "obj_type"
  95. #define JSON_KEY_CALL_LIGHT_CTRL_TYPE "ctrl_type"
  96. #define JSON_KEY_CALL_LIGHT_LIGHT_STATE "light_state"
  97. #define JSON_KEY_CALL_LIGHT_USER_ID "user_id"
  98. #define JSON_KEY_CALL_LIGHT_LIGHTS "lights"
  99. #define JSON_KEY_CALL_LIGHT_ID "id"
  100. #define JSON_KEY_CALL_LOAD_HISTORY_COMPLETED "load_history_completed"
  101. #define JSON_KEY_EDIT_CARD_ID "cardid"
  102. #define JSON_KEY_EDIT_EDIT_TYPE_ID "edittype"
  103. // �ɼ��˵��ýӿ�
  104. #define JSON_CMD_VALUE_LOGIN "login"
  105. #define JSON_CMD_VALUE_LOGOUT "logout"
  106. #define JSON_KEY_USERNAME "user_name"
  107. #define JSON_KEY_PASSWORD "user_pass"
  108. #define JSON_VALUE_USERNAME "COLLECTOR"
  109. #define JSON_VALUE_PASSWORD "666666" //"666666"
  110. #define JSON_KEY_CARD_ID "card_id" //"����"
  111. #define JSON_KEY_CARD_TYPE_ID "card_type_id"
  112. #define JSON_KEY_REC_TIME "rec_time" // "����ʱ��"
  113. #define JSON_KEY_DOWN_TIME "down_time" // "�뾮ʱ��"
  114. #define JSON_KEY_WORK_TIME "work_time" // "����ʱ��"
  115. #define JSON_KEY_ENTER_AREA_TIME "enter_area_time" // "��������ʱ��"
  116. #define JSON_KEY_CORDINATE_X "x"
  117. #define JSON_KEY_CORDINATE_Y "y"
  118. #define JSON_KEY_CORDINATE_Z "z"
  119. #define JSON_KEY_STATE "state" // "״̬"
  120. #define JSON_KEY_STATE_MOVING "state_moving" // �˶�״̬
  121. #define JSON_KEY_STATE_BIZ "state_biz" // ҵ��״̬
  122. #define JSON_KEY_MAP_ID "map_id" // "��ͼ���"
  123. #define JSON_KEY_DEPT_ID "dept_id"
  124. #define JSON_KEY_SPEED "speed" //�ٶ�
  125. #define JSON_KEY_LANDMARK_ID "landmark_id"
  126. #define JSON_KEY_DIRECTORY_ID "landmark_direction_id"
  127. #define JSON_KEY_LANDMARK_DIS "landmark_distance"
  128. #define JSON_KEY_NAME_ANTI_COLLISION "anti_collision"
  129. // id, name, type, map_id
  130. #define JSON_KEY_AREA_ID "area_id" // "������"
  131. #define JSON_KEY_AREA_IS_SPECIAL "is_special_area" // "��������"
  132. // down_mine,up_mine
  133. #define JSON_CMD_VALUE_DOWN_MINE "down_mine"
  134. #define JSON_CMD_VALUE_UP_MINE "up_mine"
  135. #define JSON_CMD_VALUE_SPECIAL_AREA_UP_MINE "special_area_up_mine"
  136. #define JSON_CMD_VALUE_DEV_STATE "device_state"
  137. #define JSON_CMD_VALUE_EVENT "event"
  138. #define JSON_CMD_VALUE_CALL "CALL"
  139. #define JSON_CMD_VALUE_PUSH "PUSH"
  140. #define JSON_CMD_VALUE_USER "USER"
  141. #define JSON_CMD_DRIVING_FACE_STATE "tunneller_stat"
  142. // pos_map
  143. #define JSON_CMD_VALUE_POS_MAP "pos_map"
  144. // �澯�¼�
  145. #define JSON_KEY_EVENT_EVENT_ID "event_id"
  146. #define JSON_KEY_EVENT_STATUS "status"
  147. #define JSON_KEY_EVENT_TYPE_ID "type_id"
  148. #define JSON_KEY_EVENT_OBJ_TYPE_ID "obj_type_id"
  149. #define JSON_KEY_EVENT_OBJ_ID "obj_id"
  150. #define JSON_KEY_EVENT_DIS_TYPE_ID "dis_type_id"
  151. #define JSON_KEY_EVENT_MAP_ID "map_id"
  152. #define JSON_KEY_EVENT_AREA_ID "area_id"
  153. #define JSON_KEY_EVENT_X "x"
  154. #define JSON_KEY_EVENT_Y "y"
  155. #define JSON_KEY_EVENT_LIMIT_VALUE "limit_value"
  156. #define JSON_KEY_EVENT_CUR_VALUE "cur_value"
  157. #define JSON_KEY_EVENT_CUR_TIME "cur_time"
  158. #define JSON_KEY_EVENT_LANDMARK_ID "lmid"
  159. #define JSON_KEY_EVENT_LANDMARK_DIRECTION "lmdirect"
  160. #define JSON_KEY_EVENT_LANDMARK_DISTANCE "lmdistance"
  161. #define JSON_KEY_EVENT_READER_POS_CHANGE "reader_pos_change"
  162. // alarm
  163. #define JSON_KEY_ALARM_OVER_COUNT_PERSON "over_count_person"
  164. #define JSON_KEY_ALARM_OVER_COUNT_VEHICLE "over_count_vehicle"
  165. #define JSON_KEY_ALARM_OVER_TIME_PERSON "over_time_person"
  166. #define JSON_KEY_ALARM_OVER_TIME_VEHICLE "over_time_vehicle"
  167. #define JSON_KEY_ALARM_OVER_SPEED_VEHICLE "over_speed_vehicle"
  168. #define JSON_KEY_ALARM_START_TIME "alarm_start_time"
  169. #define JSON_KEY_ALARM_STAFFER_ID "staffer_id"
  170. #define JSON_KEY_ALARM_VEHICLE_ID "vehicle_id"
  171. #define JSON_KEY_ALARM_SECTION "section_info"
  172. #define JSON_KEY_ALARM_SECTION_ID "section_id"
  173. #define JSON_KEY_ALARM_SECTION_VEHICLE_COUNTS "vehicle_counts"
  174. #define JSON_KEY_ALARM_SECTION_STAFFER_COUNTS "staffer_counts"
  175. #define JSON_KEY_ALARM_SECTION_STATE "state"
  176. #define JSON_KEY_ALARM_LIGHT "light_info"
  177. #define JSON_KEY_ALARM_LIGHT_ID "light_id"
  178. #define JSON_KEY_ALARM_LIGHT_GROUP_ID "light_group_id"
  179. #define JSON_KEY_ALARM_LIGHT_GROUP_NAME "light_group_name"
  180. #define JSON_KEY_ALARM_TRAFFIC_RED_LIGHT "traffic_red_light"
  181. // �����
  182. #define JSON_KEY_DRIVINGFACE_DIS "driving_face_moving_dis"
  183. #define JSON_KEY_DRIVINGFACE_WARNING_POINT_ID "driving_face_warning_point_id"
  184. #define JSON_KEY_DRIVINGFACE_WARNING_POINT_DIS "driving_face_warning_point_dis"
  185. #define JSON_KEY_DRIVINGFACE_CURSHIFT_LENGTH "drivingface_curshift_length"
  186. //���ϳ�״̬
  187. #define JSON_KEY_PERSON_ON_CAR "person_on_car"
  188. #define JSON_CMD_REQ_ALL_PERSON_ON_CAR "req_all_person_on_car"
  189. #define JSON_CMD_RESP_ALL_PERSON_ON_CAR "resp_all_person_on_car"
  190. #endif // !_SERVER_CONST_DEF_H_