constdef.h 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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_KEY_ID "id"
  43. #define JSON_KEY_OP_TYPE "op_type"
  44. #define JSON_KEY_OP_TYPE_INSERT "INSERT"
  45. #define JSON_KEY_OP_TYPE_UPDATE "UPDATE"
  46. #define JSON_KEY_OP_TYPE_DELETE "DELETE"
  47. #define JSON_KEY_NAME "name"
  48. #define JSON_KEY_NAME_MAP_GIS "map_gis"
  49. #define JSON_KEY_NAME_MAP "map"
  50. #define JSON_KEY_NAME_AREA "area"
  51. #define JSON_KEY_NAME_PATH "reader_path_tof_n"
  52. #define JSON_KEY_NAME_READER "reader"
  53. #define JSON_KEY_NAME_CARD "card"
  54. #define JSON_KEY_NAME_STAFF "staff"
  55. #define JSON_KEY_NAME_STAFF_EXTEND "staff_extend"
  56. #define JSON_KEY_NAME_VEHICLE "vehicle"
  57. #define JSON_KEY_NAME_ANTENNA "antenna"
  58. #define JSON_KEY_NAME_VEHICLE_EXTEND "vehicle_extend"
  59. #define JSON_KEY_NAME_SECTION "section"
  60. #define JSON_KEY_NAME_LIGHT "light"
  61. #define JSON_KEY_NAME_LIGHTS_GROUP "lights_group"
  62. #define JSON_KEY_NAME_CHAMBER "chamber"
  63. #define JSON_KEY_NAME_SHIFT "shift"
  64. #define JSON_KEY_NAME_PATROL_TASK "patrol_task"
  65. #define JSON_KEY_NAME_RULES "rules"
  66. #define JSON_KEY_NAME_SETTING "setting"
  67. #define JSON_KEY_NAME_DRIVINGFACE "drivingface_vehicle"
  68. #define JSON_KEY_NAME_DRIVINGFACE_WARNING_POINT "dat_drivingface_warning_point"
  69. #define JSON_KEY_NAME_HAND_UP "dat_handup_vehicle"
  70. #define JSON_KEY_NAME_GEO_FAULT "geofault"
  71. #define JSON_KEY_NAME_LANDMARK "landmark"
  72. #define JSON_KEY_NAME_COALFACE "coalface"
  73. #define JSON_KEY_NAME_COALFACE_VEHICLE "coalface_vehicle"
  74. #define JSON_KEY_NAME_DRIVING_FACE "drivingface"
  75. #define JSON_KEY_NAME_DRIVINGFACE_VEHICLE "drivingface_vehicle"
  76. //掘进面基准点
  77. #define JSON_KEY_NAME_DRIVINGFACE_REF_POINT "drivingface_ref_point"
  78. //禁止指定人员下井
  79. #define JSON_KEY_NAME_FORBID_PERSON_DOWN_MINE "rt_person_forbid_down_mine"
  80. //设置区域中时间段人员超员阈值等数据
  81. #define JSON_KEY_NAME_PERSONS_DYNAMIC_THRE "area_persons_dynamic_thre"
  82. #define JSON_KEY_CALL_CARD_CALL_TYPE "call_type_id"
  83. #define JSON_KEY_CALL_CARD_CALL_TIME_OUT "call_time_out"
  84. #define JSON_KEY_CALL_CARD_CALL_TIME "call_time"
  85. #define JSON_KEY_CALL_CARD_CALL_LEVEL "call_level_id"
  86. #define JSON_KEY_CALL_CARD_USER_NAME "user_name"
  87. #define JSON_KEY_CALL_CARD_STATIONS "stations"
  88. #define JSON_KEY_CALL_CARD_STATION_ID "stationid"
  89. #define JSON_KEY_CALL_CARD_CARDS "cards"
  90. #define JSON_KEY_CALL_CARD_CARD_ID "cardid"
  91. #define JSON_KEY_CALL_CARD_CARD_TYPE_ID "cardtype"
  92. #define JSON_KEY_CALL_LIGHT_TASK_ID "task_id"
  93. #define JSON_KEY_CALL_LIGHT_OBJ_TYPE "obj_type"
  94. #define JSON_KEY_CALL_LIGHT_CTRL_TYPE "ctrl_type"
  95. #define JSON_KEY_CALL_LIGHT_LIGHT_STATE "light_state"
  96. #define JSON_KEY_CALL_LIGHT_USER_ID "user_id"
  97. #define JSON_KEY_CALL_LIGHT_LIGHTS "lights"
  98. #define JSON_KEY_CALL_LIGHT_ID "id"
  99. #define JSON_KEY_EDIT_CARD_ID "cardid"
  100. #define JSON_KEY_EDIT_EDIT_TYPE_ID "edittype"
  101. // �ɼ��˵��ýӿ�
  102. #define JSON_CMD_VALUE_LOGIN "login"
  103. #define JSON_CMD_VALUE_LOGOUT "logout"
  104. #define JSON_KEY_USERNAME "user_name"
  105. #define JSON_KEY_PASSWORD "user_pass"
  106. #define JSON_VALUE_USERNAME "COLLECTOR"
  107. #define JSON_VALUE_PASSWORD "666666" //"666666"
  108. #define JSON_KEY_CARD_ID "card_id" //"����"
  109. #define JSON_KEY_CARD_TYPE_ID "card_type_id"
  110. #define JSON_KEY_REC_TIME "rec_time" // "����ʱ��"
  111. #define JSON_KEY_DOWN_TIME "down_time" // "�뾮ʱ��"
  112. #define JSON_KEY_WORK_TIME "work_time" // "����ʱ��"
  113. #define JSON_KEY_ENTER_AREA_TIME "enter_area_time" // "��������ʱ��"
  114. #define JSON_KEY_CORDINATE_X "x"
  115. #define JSON_KEY_CORDINATE_Y "y"
  116. #define JSON_KEY_CORDINATE_Z "z"
  117. #define JSON_KEY_STATE "state" // "״̬"
  118. #define JSON_KEY_STATE_MOVING "state_moving" // �˶�״̬
  119. #define JSON_KEY_STATE_BIZ "state_biz" // ҵ��״̬
  120. #define JSON_KEY_MAP_ID "map_id" // "��ͼ���"
  121. #define JSON_KEY_DEPT_ID "dept_id"
  122. #define JSON_KEY_SPEED "speed" //�ٶ�
  123. #define JSON_KEY_LANDMARK_ID "landmark_id"
  124. #define JSON_KEY_DIRECTORY_ID "landmark_direction_id"
  125. #define JSON_KEY_LANDMARK_DIS "landmark_distance"
  126. #define JSON_KEY_NAME_ANTI_COLLISION "anti_collision"
  127. // id, name, type, map_id
  128. #define JSON_KEY_AREA_ID "area_id" // "������"
  129. #define JSON_KEY_AREA_IS_SPECIAL "is_special_area" // "��������"
  130. // down_mine,up_mine
  131. #define JSON_CMD_VALUE_DOWN_MINE "down_mine"
  132. #define JSON_CMD_VALUE_UP_MINE "up_mine"
  133. #define JSON_CMD_VALUE_SPECIAL_AREA_UP_MINE "special_area_up_mine"
  134. #define JSON_CMD_VALUE_DEV_STATE "device_state"
  135. #define JSON_CMD_VALUE_EVENT "event"
  136. #define JSON_CMD_VALUE_CALL "CALL"
  137. #define JSON_CMD_VALUE_PUSH "PUSH"
  138. #define JSON_CMD_VALUE_USER "USER"
  139. #define JSON_CMD_DRIVING_FACE_STATE "tunneller_stat"
  140. // pos_map
  141. #define JSON_CMD_VALUE_POS_MAP "pos_map"
  142. // �澯�¼�
  143. #define JSON_KEY_EVENT_EVENT_ID "event_id"
  144. #define JSON_KEY_EVENT_STATUS "status"
  145. #define JSON_KEY_EVENT_TYPE_ID "type_id"
  146. #define JSON_KEY_EVENT_OBJ_TYPE_ID "obj_type_id"
  147. #define JSON_KEY_EVENT_OBJ_ID "obj_id"
  148. #define JSON_KEY_EVENT_DIS_TYPE_ID "dis_type_id"
  149. #define JSON_KEY_EVENT_MAP_ID "map_id"
  150. #define JSON_KEY_EVENT_AREA_ID "area_id"
  151. #define JSON_KEY_EVENT_X "x"
  152. #define JSON_KEY_EVENT_Y "y"
  153. #define JSON_KEY_EVENT_LIMIT_VALUE "limit_value"
  154. #define JSON_KEY_EVENT_CUR_VALUE "cur_value"
  155. #define JSON_KEY_EVENT_CUR_TIME "cur_time"
  156. #define JSON_KEY_EVENT_LANDMARK_ID "lmid"
  157. #define JSON_KEY_EVENT_LANDMARK_DIRECTION "lmdirect"
  158. #define JSON_KEY_EVENT_LANDMARK_DISTANCE "lmdistance"
  159. #define JSON_KEY_EVENT_READER_POS_CHANGE "reader_pos_change"
  160. // alarm
  161. #define JSON_KEY_ALARM_OVER_COUNT_PERSON "over_count_person"
  162. #define JSON_KEY_ALARM_OVER_COUNT_VEHICLE "over_count_vehicle"
  163. #define JSON_KEY_ALARM_OVER_TIME_PERSON "over_time_person"
  164. #define JSON_KEY_ALARM_OVER_TIME_VEHICLE "over_time_vehicle"
  165. #define JSON_KEY_ALARM_OVER_SPEED_VEHICLE "over_speed_vehicle"
  166. #define JSON_KEY_ALARM_START_TIME "alarm_start_time"
  167. #define JSON_KEY_ALARM_STAFFER_ID "staffer_id"
  168. #define JSON_KEY_ALARM_VEHICLE_ID "vehicle_id"
  169. #define JSON_KEY_ALARM_SECTION "section_info"
  170. #define JSON_KEY_ALARM_SECTION_ID "section_id"
  171. #define JSON_KEY_ALARM_SECTION_VEHICLE_COUNTS "vehicle_counts"
  172. #define JSON_KEY_ALARM_SECTION_STAFFER_COUNTS "staffer_counts"
  173. #define JSON_KEY_ALARM_SECTION_STATE "state"
  174. #define JSON_KEY_ALARM_LIGHT "light_info"
  175. #define JSON_KEY_ALARM_LIGHT_ID "light_id"
  176. #define JSON_KEY_ALARM_LIGHT_GROUP_ID "light_group_id"
  177. #define JSON_KEY_ALARM_LIGHT_GROUP_NAME "light_group_name"
  178. #define JSON_KEY_ALARM_TRAFFIC_RED_LIGHT "traffic_red_light"
  179. // �����
  180. #define JSON_KEY_DRIVINGFACE_DIS "driving_face_moving_dis"
  181. #define JSON_KEY_DRIVINGFACE_WARNING_POINT_ID "driving_face_warning_point_id"
  182. #define JSON_KEY_DRIVINGFACE_WARNING_POINT_DIS "driving_face_warning_point_dis"
  183. #define JSON_KEY_DRIVINGFACE_CURSHIFT_LENGTH "drivingface_curshift_length"
  184. //���ϳ�״̬
  185. #define JSON_KEY_PERSON_ON_CAR "person_on_car"
  186. #define JSON_CMD_REQ_ALL_PERSON_ON_CAR "req_all_person_on_car"
  187. #define JSON_CMD_RESP_ALL_PERSON_ON_CAR "resp_all_person_on_car"
  188. #endif // !_SERVER_CONST_DEF_H_