constdef.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  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_3 "1.0.0.3"
  6. #define INTERFACE_VERSION_1_4 "1.0.0.4"
  7. #define TEST_WEB_URL "http://localhost:8080/yaloc/servlet/main?"
  8. //#define TEST_WS_URL "ws://localhost:8086"
  9. //#define TEST_WS_URL "ws://192.168.0.36:8086"
  10. #define TEST_WS_URL "ws://182.92.224.191:8086"
  11. #define TEST_CONFIRM_COUNT 1
  12. #define PARAM_NAME_USERNAME "username"
  13. #define PARAM_NAME_INTERFACE "interface"
  14. #define PARAM_NAME_DATA "data"
  15. #define PARAM_NAME_VERSION "version"
  16. #define JSON_ROOT_KEY_CMD "cmd"
  17. #define JSON_ROOT_KEY_VERSION "version"
  18. #define JSON_ROOT_KEY_DATA "data"
  19. #define JSON_ROOT_KEY_DIFF_TICK_COUNT "difftick"
  20. #define JSON_ROOT_KEY_TOTAL "total"
  21. #define JSON_ROOT_KEY_STATISTIC_VEHICLE_DATA "v"
  22. #define JSON_ROOT_KEY_STATISTIC_STAFF_DATA "s"
  23. #define JSON_ROOT_KEY_STATISTIC_STAT "stat"
  24. #define JSON_ROOT_KEY_STATISTIC_DETAIL "detail"
  25. #define JSON_ROOT_KEY_STATISTIC_GLOBAL "glbl"
  26. #define JSON_ROOT_KEY_STATISTIC_DEPT "dept"
  27. #define JSON_ROOT_KEY_STATISTIC_SUM "sum"
  28. #define JSON_ROOT_KEY_STATISTIC_AREA "area"
  29. #define JSON_ROOT_KEY_STATISTIC_AREA_ID "area_id"
  30. #define JSON_ROOT_KEY_STATISTIC_DEPT_ID "dept_id"
  31. #define JSON_ROOT_KEY_STATISTIC_LEVEL "occupation_level"
  32. #define JSON_ROOT_KEY_STATISTIC_LEVEL_ID "level_id"
  33. // 采集端接收接口
  34. #define JSON_CMD_VALUE_SET_LIMIT_VALUE "set_limit_value"
  35. #define JSON_CMD_VALUE_CALL_CARD "call_card"
  36. #define JSON_CMD_VALUE_CLEAR_CARD "clear_card"
  37. #define JSON_CMD_VALUE_DEAL_HELP "helpme_done" //deal_help
  38. #define JSON_CMD_VALUE_EDIT_MAP "edit_map"
  39. #define JSON_CMD_VALUE_EDIT_AREA "edit_area"
  40. #define JSON_CMD_VALUE_EDIT_STATION "edit_station"
  41. #define JSON_CMD_VALUE_EDIT_PATH "edit_path"
  42. #define JSON_CMD_VALUE_EDIT_CARD "edit_card"
  43. #define JSON_CMD_VALUE_EDIT_STAFFER "edit_staffer"
  44. #define JSON_CMD_VALUE_EDIT_VEHICLE "edit_vehicle"
  45. #define JSON_CMD_VALUE_REQUEST_ALL_POSTION "request_all_postion"
  46. #define JSON_CMD_VALUE_SET_LIGHT_COLOR "set_light_color"
  47. #define JSON_CMD_VALUE_REQUEST_ALL_DATA "req_all_data"
  48. #define JSON_CMD_VALUE_RESPONSE_ALL_DATA "resp_all_data"
  49. #define JSON_CMD_VALUE_CALL_CARD_START "call_card_start"
  50. #define JSON_CMD_VALUE_CALL_CARD_CANCEL "call_card_cancel"
  51. //呼叫命令
  52. #define JSON_CMD_VALUE_CALL_CARD_REQUEST "call_card_req"
  53. #define JSON_CMD_VALUE_CALL_CARD_RESPONSE "call_card_resp"
  54. #define JSON_CMD_VALUE_CALL_CARD_CANCEL_REQUEST "call_card_cancel_req"
  55. #define JSON_CMD_VALUE_CALL_CARD_CANCEL_RESPONSE "call_card_cancel_resp"
  56. #define JSON_CMD_VALUE_CALL_CARD_LIST "callcardlist"
  57. #define JSON_CMD_VALUE_META_DATA_CHANGED "meta_data_changed"
  58. #define JSON_CMD_VALUE_LIGHTS_CTRL_REQUEST "lights_ctrl_req"
  59. #define JSON_CMD_VALUE_LIGHTS_CTRL_RESPONSE "lights_ctrl_res"
  60. #define JSON_KEY_NAME "name"
  61. #define JSON_KEY_ID "id"
  62. #define JSON_KEY_OP_TYPE "op_type"
  63. #define JSON_KEY_NAME_MAP "map"
  64. #define JSON_KEY_NAME_AREA "area"
  65. #define JSON_KEY_NAME_PATH "path"
  66. #define JSON_KEY_NAME_READER "reader"
  67. #define JSON_KEY_NAME_CARD "card"
  68. #define JSON_KEY_NAME_STAFF "staff"
  69. #define JSON_KEY_NAME_VEHICLE "vehicle"
  70. #define JSON_KEY_NAME_SECTION "section"
  71. #define JSON_KEY_NAME_LIGHT "light"
  72. #define JSON_KEY_NAME_CHAMBER "chamber"
  73. #define JSON_KEY_NAME_SHIFT "shift"
  74. #define JSON_KEY_NAME_PATROL_TASK "patrol_task"
  75. #define JSON_KEY_OP_TYPE_INSERT "INSERT"
  76. #define JSON_KEY_OP_TYPE_UPDATE "UPDATE"
  77. #define JSON_KEY_OP_TYPE_DELETE "DELETE"
  78. #define JSON_KEY_CALL_CARD_CALL_ID "call_id"
  79. #define JSON_KEY_CALL_CARD_CALL_TIME_OUT "call_time_out"
  80. #define JSON_KEY_CALL_CARD_CALL_TIME "call_time"
  81. #define JSON_KEY_CALL_CARD_CALL_TYPE "call_type_id"
  82. #define JSON_KEY_CALL_CARD_USER_NAME "user_name"
  83. #define JSON_KEY_CALL_CARD_CALL_TIME "call_time"
  84. #define JSON_KEY_CALL_CARD_STATIONS "stations"
  85. #define JSON_KEY_CALL_CARD_STATION_ID "stationid"
  86. #define JSON_KEY_CALL_CARD_CARDS "cards"
  87. #define JSON_KEY_CALL_CARD_CARD_ID "cardid"
  88. #define JSON_KEY_CALL_CARD_CARD_TYPE_ID "cardtype"
  89. #define JSON_KEY_CALL_LIGHT_TASK_ID "task_id"
  90. #define JSON_KEY_CALL_LIGHT_OBJ_TYPE "obj_type"
  91. #define JSON_KEY_CALL_LIGHT_CTRL_TYPE "ctrl_type"
  92. #define JSON_KEY_CALL_LIGHT_LIGHT_STATE "light_state"
  93. #define JSON_KEY_CALL_LIGHT_USER_ID "user_id"
  94. #define JSON_KEY_CALL_LIGHT_LIGHTS "lights"
  95. #define JSON_KEY_CALL_LIGHT_ID "id"
  96. #define JSON_KEY_EDIT_MAP_ID "map_id"
  97. #define JSON_KEY_EDIT_AREA_ID "areaid"
  98. #define JSON_KEY_EDIT_READER_ID "stationid"
  99. #define JSON_KEY_EDIT_CARD_ID "cardid"
  100. #define JSON_KEY_EDIT_CARD_TYPE "cardtype"
  101. #define JSON_KEY_EDIT_STAFFER_ID "stafferid"
  102. #define JSON_KEY_EDIT_VEHICLE_ID "vehicleid"
  103. #define JSON_KEY_EDIT_EDIT_TYPE_ID "edittype"
  104. // 采集端调用接口
  105. #define JSON_CMD_VALUE_LOGIN "login"
  106. #define JSON_CMD_VALUE_LOGOUT "logout"
  107. #define JSON_KEY_USERNAME "user_name"
  108. #define JSON_KEY_PASSWORD "user_pass"
  109. #define JSON_VALUE_USERNAME "COLLECTOR"
  110. #define JSON_VALUE_PASSWORD "666666" //"666666"
  111. //#define JSON_VALUE_USERNAME "lihz"
  112. //#define JSON_VALUE_PASSWORD "000"
  113. //#define JSON_KEY_VEHICLE_ID "编号"
  114. //#define JSON_KEY_VEHICLE_TYPE "车辆类型"
  115. //#define JSON_KEY_VEHICLE_DEPT "部门"
  116. //#define JSON_KEY_VEHICLE_NO "车牌号"
  117. #define JSON_KEY_CARD_ID "card_id" //"卡号"
  118. #define JSON_KEY_CARD_TYPE_ID "card_type_id"
  119. #define JSON_KEY_CARD_NUM "number" //"编号"
  120. #define JSON_KEY_CARD_NAME "name" // "名称"
  121. #define JSON_KEY_CARD_WORKTYPE "work_type" // "类型"
  122. #define JSON_KEY_CARD_COMP "company" // "单位"
  123. #define JSON_KEY_CARD_DEPT "dept" // "部门"
  124. #define JSON_KEY_REC_TIME "rec_time" // "接收时间"
  125. #define JSON_KEY_DOWN_TIME "down_time" // "入井时间"
  126. #define JSON_KEY_UP_TIME "up_time" // "升井时间"
  127. #define JSON_KEY_ENTER_PARK_TIME "enter_park_time" // "回场时间"
  128. #define JSON_KEY_LEAVE_PARK_TIME "leave_park_time" // "出场时间"
  129. #define JSON_KEY_WORK_TIME "work_time" // "工作时间"
  130. #define JSON_KEY_ENTER_AREA_TIME "enter_area_time" // "进入区域时间"
  131. #define JSON_KEY_ENTER_READER_TIME "enter_reader_time" // "进入分站时间"
  132. #define JSON_KEY_CORDINATE_X "x"
  133. #define JSON_KEY_CORDINATE_Y "y"
  134. #define JSON_KEY_CORDINATE_Z "z"
  135. #define JSON_KEY_STATE "state" // "状态"
  136. #define JSON_KEY_STATE_DESC "state_desc" // "状态"
  137. #define JSON_KEY_STATE_MOVING "state_moving" // 运动状态
  138. #define JSON_KEY_STATE_BIZ "state_biz" // 业务状态
  139. #define JSON_KEY_ANGLE "angle" // "角度"
  140. #define JSON_KEY_MAP_ID "map_id" // "地图编号"
  141. #define JSON_KEY_MAP_NAME "map_name" // "地图名称"
  142. #define JSON_KEY_MAP_PATH "map_path" // "地图路径"
  143. #define JSON_KEY_MAP_HEIGHT "map_height" // "地图高度"
  144. #define JSON_KEY_MAP_WIDTH "map_width" // "地图宽度"
  145. #define JSON_KEY_MAP_SCALE "map_scale" // "地图比例"
  146. #define JSON_KEY_MAP_TYPE "map_type" // "地图类型"
  147. #define JSON_KEY_DEPT_ID "dept_id"
  148. #define JSON_KEY_SPEED "speed" //速度
  149. #define JSON_KEY_LANDMARK_ID "landmark_id"
  150. #define JSON_KEY_DIRECTORY_ID "landmark_direction_id"
  151. #define JSON_KEY_LANDMARK_DIS "landmark_distance"
  152. // id, name, type, map_id
  153. #define JSON_KEY_AREA_ID "area_id" // "区域编号"
  154. #define JSON_KEY_AREA_TYPE "area_type" // "区域类型"
  155. #define JSON_KEY_AREA_NAME "area_name" // "区域名称"
  156. #define JSON_KEY_AREA_IS_SPECIAL "is_special_area" // "区域名称"
  157. #define JSON_KEY_AREA_X "area_x" // "区域坐标"
  158. #define JSON_KEY_AREA_Y "area_y" //
  159. #define JSON_KEY_AREA_Z "area_z" //
  160. #define JSON_KEY_AREA_R "area_radius" // "区域半径"
  161. // id, name, angle, x, y, z, type, map_id, area_id
  162. #define JSON_KEY_READER_ID "reader_id" // "分站编号"
  163. #define JSON_KEY_READER_NAME "reader_name" // "分站名称"
  164. #define JSON_KEY_READER_POS_STATE "reader_type" // "分站类型"
  165. #define JSON_KEY_READER_STATE "reader_state" // "分站状态"
  166. #define JSON_KEY_ANTENNA_ID "ant_id" // "天线编号"
  167. #define JSON_KEY_ANTENNA_NAME "ant_name" // "天线名称"
  168. #define JSON_KEY_DEV_MAP "dev_map"
  169. #define JSON_KEY_DEV_AREA "dev_area"
  170. #define JSON_KEY_DEV_READER "dev_reader"
  171. #define JSON_KEY_DEV_CARD "dev_card"
  172. #define JSON_KEY_DEV_TRAFFIC "dev_traffic"
  173. #define JSON_KEY_DEV_TURNOUT "dev_turnout"
  174. #define JSON_KEY_DEV_LOUDSPEEKER "dev_loudspeeker"
  175. // down_mine,up_mine
  176. #define JSON_CMD_VALUE_DOWN_MINE "down_mine"
  177. #define JSON_CMD_VALUE_UP_MINE "up_mine"
  178. #define JSON_CMD_VALUE_SPECIAL_AREA_UP_MINE "special_area_up_mine"
  179. #define JSON_CMD_VALUE_COUNTING "counting"
  180. #define JSON_CMD_VALUE_DEV_STATE "device_state"
  181. #define JSON_CMD_VALUE_ALARM "alarm"
  182. #define JSON_CMD_VALUE_EVENT "event"
  183. #define JSON_CMD_VALUE_CALL "CALL"
  184. #define JSON_CMD_VALUE_PUSH "PUSH"
  185. #define JSON_CMD_VALUE_USER "USER" //"USER"
  186. #define JSON_CMD_VALUE_WS_ERR "WS_ERR"
  187. #define JSON_CMD_DRIVING_FACE_STATE "tunneller_stat"
  188. // pos_map
  189. #define JSON_CMD_VALUE_POS_MAP "pos_map"
  190. #define JSON_CMD_VALUE_POSITION_ALL "position_all"
  191. #define JSON_CMD_VALUE_STATISTIC "postition_statistic"
  192. #define JSON_KEY_POS_CARD "pos_card"
  193. #define JSON_KEY_POS_MAP "pos_map"
  194. // device state, stat_map
  195. #define JSON_KEY_DEV_STATE_MAP_ID "map_id"
  196. #define JSON_KEY_DEV_STATE_DEVICES "devices"
  197. #define JSON_KEY_DEV_STATE_DEVICE_ID "device_id"
  198. #define JSON_KEY_DEV_STATE_STATE "state"
  199. #define JSON_KEY_DEV_STATE_STATE_DESC "state_desc"
  200. #define JSON_KEY_DEV_STATE_DEVICE_TYPE_ID "device_type_id"
  201. #define JSON_KEY_DEV_STATE_TIME "time"
  202. //#define JSON_KEY_STAT_MAP_STAT_TRAFFIC "stat_traffic"
  203. //#define JSON_KEY_STAT_MAP_STAT_TURNOUT "stat_turnout"
  204. //#define JSON_KEY_STAT_MAP_STAT_LOUDSPEEKER "stat_loudspeeker"
  205. // counting
  206. #define JSON_KEY_COUNTING_COUNT_TOTAL "total" // 总卡数
  207. #define JSON_KEY_COUNTING_COUNT_VEHICLE "vehicle" // 总车数
  208. #define JSON_KEY_COUNTING_COUNT_PERSON "staff" // 总人数
  209. #define JSON_KEY_COUNTING_MAP_COUNT "maps"
  210. #define JSON_KEY_COUNTING_MAP_ID "id"
  211. #define JSON_KEY_COUNTING_MAP_COUNT_TOTAL "total" // 当前图中总数
  212. #define JSON_KEY_COUNTING_MAP_COUNT_PERSON "staff" // "map_count_vehicle" // 当前图车数
  213. #define JSON_KEY_COUNTING_MAP_COUNT_VEHICLE "vehicle"// "map_count_person" // 当前图车数
  214. #define JSON_KEY_COUNTING_AREA_COUNT "areas"
  215. #define JSON_KEY_COUNTING_AREA_ID "id"
  216. #define JSON_KEY_COUNTING_AREA_COUNT_TOTAL "total" // 区域总卡数
  217. #define JSON_KEY_COUNTING_AREA_COUNT_PERSON "staff" // 区域人数
  218. #define JSON_KEY_COUNTING_AREA_COUNT_VEHICLE "vehicle" // 区域车数
  219. #define JSON_KEY_COUNTING_DEPT_COUNT "depts"
  220. #define JSON_KEY_COUNTING_DEPT_ID "id"
  221. //#define JSON_KEY_COUNTING_DEPT_NAME "dept_name"
  222. #define JSON_KEY_COUNTING_AREA_PERSON_COUNT "area_person"
  223. #define JSON_KEY_COUNTING_DEPT_COUNT_TOTAL "total"
  224. #define JSON_KEY_COUNTING_DEPT_COUNT_VEHICLE "vehicle"
  225. #define JSON_KEY_COUNTING_DEPT_COUNT_PERSON "staff"
  226. #define JSON_KEY_COUNTING_SPECIAL_ERROR_TOTAL "special_error_total"
  227. #define JSON_KEY_REQ_COUNTS_USER "req_user"
  228. #define JSON_KEY_REQ_COUNTS_TYPE "count_type"
  229. #define JSON_KEY_REQ_COUNTS_TIME "req_time"
  230. // #define JSON_CMD_VALUE_REQUEST_COUNTS_INFO "count_detail_req" //web端请求统计总数详细列表
  231. // #define JSON_KEY_RESPONSE_COUNTS_DETAIL "count_detail_resp"
  232. #define JSON_KEY_EVENT_EVENT_ID "event_id"
  233. #define JSON_KEY_EVENT_STATUS "status"
  234. #define JSON_KEY_EVENT_TYPE_ID "type_id"
  235. #define JSON_KEY_EVENT_OBJ_TYPE_ID "obj_type_id"
  236. #define JSON_KEY_EVENT_OBJ_ID "obj_id"
  237. #define JSON_KEY_EVENT_MAP_ID "map_id"
  238. #define JSON_KEY_EVENT_AREA_ID "area_id"
  239. #define JSON_KEY_EVENT_X "x"
  240. #define JSON_KEY_EVENT_Y "y"
  241. #define JSON_KEY_EVENT_LIMIT_VALUE "limit_value"
  242. #define JSON_KEY_EVENT_CUR_VALUE "cur_value"
  243. #define JSON_KEY_EVENT_CUR_TIME "cur_time"
  244. #define JSON_KEY_EVENT_LANDMARK_ID "lmid"
  245. #define JSON_KEY_EVENT_LANDMARK_DIRECTION "lmdirect"
  246. #define JSON_KEY_EVENT_LANDMARK_DISTANCE "lmdistance"
  247. #define JSON_CMD_VALUE_REQUEST_COUNTS_INFO "count_detail_req" //web端请求统计总数详细列表
  248. #define JSON_KEY_RESPONSE_COUNTS_DETAIL "count_detail_resp"
  249. #define JSON_KEY_EVENT_READER_POS_CHANGE "reader_pos_change"
  250. // alarm
  251. #define JSON_KEY_ALARM_OVER_COUNT_PERSON "over_count_person"
  252. #define JSON_KEY_ALARM_OVER_COUNT_VEHICLE "over_count_vehicle"
  253. #define JSON_KEY_ALARM_OVER_TIME_PERSON "over_time_person"
  254. #define JSON_KEY_ALARM_OVER_TIME_VEHICLE "over_time_vehicle"
  255. #define JSON_KEY_ALARM_OVER_SPEED_VEHICLE "over_speed_vehicle"
  256. #define JSON_KEY_ALARM_AREA_FORBIDDEN "area_forbidden"
  257. #define JSON_KEY_ALARM_AREA_OVER_TIME_PERSON "area_over_time_person"
  258. #define JSON_KEY_ALARM_AREA_OVER_TIME_VEHICLE "area_over_time_vehicle"
  259. #define JSON_KEY_ALARM_AREA_OVER_PERSON "area_over_person"
  260. #define JSON_KEY_ALARM_AREA_OVER_VEHICLE "area_over_vehicle"
  261. #define JSON_KEY_ALARM_GLOBAL "global"
  262. #define JSON_KEY_ALARM_ITEM "item"
  263. #define JSON_KEY_ALARM_DETAIL "detail"
  264. #define JSON_KEY_ALARM_MAX "max"
  265. #define JSON_KEY_ALARM_CURRENT "current"
  266. #define JSON_KEY_ALARM_AREA "areas"
  267. #define JSON_KEY_ALARM_AREA_ID "area_id"
  268. #define JSON_KEY_ALARM_ALARMS "alarms"
  269. #define JSON_KEY_ALARM_PERSON "person"
  270. #define JSON_KEY_ALARM_VEHICLE "vehicle"
  271. #define JSON_KEY_ALARM_ADHOC "adhoc"
  272. #define JSON_KEY_ALARM_READER "readers"
  273. #define JSON_KEY_ALARM_READER_ID "reader_id"
  274. #define JSON_KEY_ALARM_TYPE_ID "alarm_type_id"
  275. #define JSON_KEY_ALARM_TYPE_NAME "alarm_type_name"
  276. #define JSON_KEY_ALARM_START_TIME "alarm_start_time"
  277. #define JSON_KEY_ALARM_STAFF "staff"
  278. #define JSON_KEY_ALARM_STAFFER_ID "staffer_id"
  279. #define JSON_KEY_ALARM_VEHICLE_ID "vehicle_id"
  280. #define JSON_KEY_ALARM_SECTION "section_info"
  281. #define JSON_KEY_ALARM_SECTION_ID "section_id"
  282. #define JSON_KEY_ALARM_SECTION_VEHICLE_COUNTS "vehicle_counts"
  283. #define JSON_KEY_ALARM_SECTION_STAFFER_COUNTS "staffer_counts"
  284. #define JSON_KEY_ALARM_SECTION_STATE "state"
  285. #define JSON_KEY_ALARM_LIGHT "light_info"
  286. #define JSON_KEY_ALARM_LIGHT_ID "light_id"
  287. #define JSON_KEY_ALARM_LIGHT_GROUP_ID "light_group_id"
  288. #define JSON_KEY_ALARM_LIGHT_GROUP_NAME "light_group_name"
  289. #define JSON_KEY_ALARM_TRAFFIC_RED_LIGHT "traffic_red_light"
  290. #define JSON_KEY_DRIVINGFACE_DIS "driving_face_moving_dis"
  291. #define JSON_KEY_DRIVINGFACE_WARNING_POINT_ID "driving_face_warning_point_id"
  292. #define JSON_KEY_DRIVINGFACE_WARNING_POINT_DIS "driving_face_warning_point_dis"
  293. #endif // !_SERVER_CONST_DEF_H_