123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217 |
- #ifndef _SERVER_CONST_DEF_H_
- #define _SERVER_CONST_DEF_H_
- #define MAXCRITICALSECTIONSPINCOUNT 4000
- #define TEST_WEB_URL "http://localhost:8080/yaloc/servlet/main?"
- //#define TEST_WS_URL "ws://localhost:8086"
- //#define TEST_WS_URL "ws://192.168.0.36:8086"
- #define TEST_WS_URL "ws://182.92.224.191:8086"
- #define TEST_CONFIRM_COUNT 1
- #define PARAM_NAME_USERNAME "username"
- #define PARAM_NAME_INTERFACE "interface"
- #define PARAM_NAME_DATA "data"
- #define PARAM_NAME_VERSION "version"
- #define JSON_ROOT_KEY_CMD "cmd"
- #define JSON_ROOT_KEY_DATA "data"
- #define JSON_ROOT_KEY_DIFF_TICK_COUNT "difftick"
- // 采集端接收接口
- #define JSON_CMD_VALUE_SET_LIMIT_VALUE "set_limit_value"
- #define JSON_CMD_VALUE_CALL_CARD "call_card"
- #define JSON_CMD_VALUE_CLEAR_CARD "clear_card"
- #define JSON_CMD_VALUE_DEAL_HELP "helpme_done" //deal_help
- #define JSON_CMD_VALUE_EDIT_MAP "edit_map"
- #define JSON_CMD_VALUE_EDIT_AREA "edit_area"
- #define JSON_CMD_VALUE_EDIT_STATION "edit_station"
- #define JSON_CMD_VALUE_EDIT_PATH "edit_path"
- #define JSON_CMD_VALUE_EDIT_CARD "edit_card"
- #define JSON_CMD_VALUE_EDIT_STAFFER "edit_staffer"
- #define JSON_CMD_VALUE_EDIT_VEHICLE "edit_vehicle"
- #define JSON_CMD_VALUE_REQUEST_ALL_POSTION "request_all_postion"
- #define JSON_CMD_VALUE_CALL_CARD_START "call_card_start"
- #define JSON_CMD_VALUE_CALL_CARD_CANCEL "call_card_cancel"
- #define JSON_CMD_VALUE_META_DATA_CHANGED "meta_data_changed"
- #define JSON_KEY_NAME "name"
- #define JSON_KEY_ID "id"
- #define JSON_KEY_OP_TYPE "op_type"
- #define JSON_KEY_NAME_MAP "map"
- #define JSON_KEY_NAME_AREA "area"
- #define JSON_KEY_NAME_PATH "path"
- #define JSON_KEY_NAME_READER "reader"
- #define JSON_KEY_NAME_CARD "card"
- #define JSON_KEY_NAME_STAFF "staff"
- #define JSON_KEY_NAME_VEHICLE "vehicle"
- #define JSON_KEY_OP_TYPE_INSERT "INSERT"
- #define JSON_KEY_OP_TYPE_UPDATE "UPDATE"
- #define JSON_KEY_OP_TYPE_DELETE "DELETE"
- #define JSON_KEY_CALL_CARD_CALL_ID "call_id"
- #define JSON_KEY_CALL_CARD_CALL_TIME_OUT "call_time_out"
- #define JSON_KEY_CALL_CARD_CALL_TIME "call_time"
- #define JSON_KEY_CALL_CARD_CALL_TYPE "call_type_id"
- #define JSON_KEY_CALL_CARD_USER_NAME "user_name"
- #define JSON_KEY_CALL_CARD_CALL_TIME "call_time"
- #define JSON_KEY_CALL_CARD_STATIONS "stations"
- #define JSON_KEY_CALL_CARD_STATION_ID "stationid"
- #define JSON_KEY_CALL_CARD_CARDS "cards"
- #define JSON_KEY_CALL_CARD_CARD_ID "cardid"
- #define JSON_KEY_CALL_CARD_CARD_TYPE_ID "cardtype"
- #define JSON_KEY_EDIT_MAP_ID "map_id"
- #define JSON_KEY_EDIT_AREA_ID "areaid"
- #define JSON_KEY_EDIT_READER_ID "stationid"
- #define JSON_KEY_EDIT_CARD_ID "cardid"
- #define JSON_KEY_EDIT_CARD_TYPE "cardtype"
- #define JSON_KEY_EDIT_STAFFER_ID "stafferid"
- #define JSON_KEY_EDIT_VEHICLE_ID "vehicleid"
- #define JSON_KEY_EDIT_EDIT_TYPE_ID "edittype"
- // 采集端调用接口
- #define JSON_CMD_VALUE_LOGIN "login"
- #define JSON_CMD_VALUE_LOGOUT "logout"
- #define JSON_KEY_USERNAME "user_name"
- #define JSON_KEY_PASSWORD "user_pass"
- #define JSON_VALUE_USERNAME "COLLECTOR"
- #define JSON_VALUE_PASSWORD "666666" //"666666"
- //#define JSON_VALUE_USERNAME "lihz"
- //#define JSON_VALUE_PASSWORD "000"
- //#define JSON_KEY_VEHICLE_ID "编号"
- //#define JSON_KEY_VEHICLE_TYPE "车辆类型"
- //#define JSON_KEY_VEHICLE_DEPT "部门"
- //#define JSON_KEY_VEHICLE_NO "车牌号"
- #define JSON_KEY_CARD_ID "card_id" //"卡号"
- #define JSON_KEY_CARD_TYPE_ID "card_type_id"
- #define JSON_KEY_CARD_NUM "number" //"编号"
- #define JSON_KEY_CARD_NAME "name" // "名称"
- #define JSON_KEY_CARD_WORKTYPE "work_type" // "类型"
- #define JSON_KEY_CARD_COMP "company" // "单位"
- #define JSON_KEY_CARD_DEPT "dept" // "部门"
- #define JSON_KEY_REC_TIME "rec_time" // "接收时间"
- #define JSON_KEY_DOWN_TIME "down_time" // "入井时间"
- #define JSON_KEY_UP_TIME "up_time" // "升井时间"
- #define JSON_KEY_ENTER_PARK_TIME "enter_park_time" // "回场时间"
- #define JSON_KEY_LEAVE_PARK_TIME "leave_park_time" // "出场时间"
- #define JSON_KEY_WORK_TIME "work_time" // "工作时间"
- #define JSON_KEY_ENTER_AREA_TIME "enter_area_time" // "进入区域时间"
- #define JSON_KEY_ENTER_READER_TIME "enter_reader_time" // "进入分站时间"
- #define JSON_KEY_CORDINATE_X "x"
- #define JSON_KEY_CORDINATE_Y "y"
- #define JSON_KEY_CORDINATE_Z "z"
- #define JSON_KEY_STATE "state" // "状态"
- #define JSON_KEY_STATE_DESC "state_desc" // "状态"
- #define JSON_KEY_STATE_MOVING "state_moving" // 运动状态
- #define JSON_KEY_STATE_BIZ "state_biz" // 运动状态
- #define JSON_KEY_ANGLE "angle" // "角度"
- #define JSON_KEY_MAP_ID "map_id" // "地图编号"
- #define JSON_KEY_MAP_NAME "map_name" // "地图名称"
- #define JSON_KEY_MAP_PATH "map_path" // "地图路径"
- #define JSON_KEY_MAP_HEIGHT "map_height" // "地图高度"
- #define JSON_KEY_MAP_WIDTH "map_width" // "地图宽度"
- #define JSON_KEY_MAP_SCALE "map_scale" // "地图比例"
- #define JSON_KEY_MAP_TYPE "map_type" // "地图类型"
- #define JSON_KEY_DEPT_ID "dept_id"
- #define JSON_KEY_SPEED "speed" //速度
- // id, name, type, map_id
- #define JSON_KEY_AREA_ID "area_id" // "区域编号"
- #define JSON_KEY_AREA_TYPE "area_type" // "区域类型"
- #define JSON_KEY_AREA_NAME "area_name" // "区域名称"
- #define JSON_KEY_AREA_X "area_x" // "区域坐标"
- #define JSON_KEY_AREA_Y "area_y" //
- #define JSON_KEY_AREA_Z "area_z" //
- #define JSON_KEY_AREA_R "area_radius" // "区域半径"
- // id, name, angle, x, y, z, type, map_id, area_id
- #define JSON_KEY_READER_ID "reader_id" // "分站编号"
- #define JSON_KEY_READER_NAME "reader_name" // "分站名称"
- #define JSON_KEY_READER_POS_STATE "reader_type" // "分站类型"
- #define JSON_KEY_READER_STATE "reader_state" // "分站状态"
- #define JSON_KEY_ANTENNA_ID "ant_id" // "天线编号"
- #define JSON_KEY_ANTENNA_NAME "ant_name" // "天线名称"
- #define JSON_KEY_DEV_MAP "dev_map"
- #define JSON_KEY_DEV_AREA "dev_area"
- #define JSON_KEY_DEV_READER "dev_reader"
- #define JSON_KEY_DEV_CARD "dev_card"
- #define JSON_KEY_DEV_TRAFFIC "dev_traffic"
- #define JSON_KEY_DEV_TURNOUT "dev_turnout"
- #define JSON_KEY_DEV_LOUDSPEEKER "dev_loudspeeker"
- // down_mine,up_mine
- #define JSON_CMD_VALUE_DOWN_MINE "down_mine"
- #define JSON_CMD_VALUE_UP_MINE "up_mine"
- #define JSON_CMD_VALUE_COUNTING "counting"
- #define JSON_CMD_VALUE_DEV_STATE "device_state"
- #define JSON_CMD_VALUE_ALARM "alarm"
- #define JSON_CMD_VALUE_CALL "CALL"
- #define JSON_CMD_VALUE_PUSH "PUSH"
- #define JSON_CMD_VALUE_USER "USER" //"USER"
- #define JSON_CMD_VALUE_WS_ERR "WS_ERR"
- // pos_map
- #define JSON_CMD_VALUE_POS_MAP "pos_map"
- #define JSON_CMD_VALUE_POSITION_ALL "position_all"
- #define JSON_KEY_POS_CARD "pos_card"
- #define JSON_KEY_POS_MAP "pos_map"
- // device state, stat_map
- #define JSON_KEY_DEV_STATE_MAP_ID "map_id"
- #define JSON_KEY_DEV_STATE_DEVICES "devices"
- #define JSON_KEY_DEV_STATE_DEVICE_ID "device_id"
- #define JSON_KEY_DEV_STATE_STATE "state"
- #define JSON_KEY_DEV_STATE_STATE_DESC "state_desc"
- #define JSON_KEY_DEV_STATE_DEVICE_TYPE_ID "device_type_id"
- #define JSON_KEY_DEV_STATE_TIME "time"
- //#define JSON_KEY_STAT_MAP_STAT_TRAFFIC "stat_traffic"
- //#define JSON_KEY_STAT_MAP_STAT_TURNOUT "stat_turnout"
- //#define JSON_KEY_STAT_MAP_STAT_LOUDSPEEKER "stat_loudspeeker"
- // counting
- #define JSON_KEY_COUNTING_COUNT_TOTAL "total" // 总卡数
- #define JSON_KEY_COUNTING_COUNT_VEHICLE "vehicle" // 总车数
- #define JSON_KEY_COUNTING_COUNT_PERSON "staff" // 总人数
- #define JSON_KEY_COUNTING_MAP_COUNT "maps"
- #define JSON_KEY_COUNTING_MAP_ID "id"
- #define JSON_KEY_COUNTING_MAP_COUNT_TOTAL "total" // 当前图中总数
- #define JSON_KEY_COUNTING_MAP_COUNT_PERSON "staff" // "map_count_vehicle" // 当前图车数
- #define JSON_KEY_COUNTING_MAP_COUNT_VEHICLE "vehicle"// "map_count_person" // 当前图车数
- #define JSON_KEY_COUNTING_AREA_COUNT "areas"
- #define JSON_KEY_COUNTING_AREA_ID "id"
- #define JSON_KEY_COUNTING_AREA_COUNT_TOTAL "total" // 区域总卡数
- #define JSON_KEY_COUNTING_AREA_COUNT_PERSON "staff" // 区域人数
- #define JSON_KEY_COUNTING_AREA_COUNT_VEHICLE "vehicle" // 区域车数
- #define JSON_KEY_COUNTING_DEPT_COUNT "depts"
- #define JSON_KEY_COUNTING_DEPT_ID "id"
- //#define JSON_KEY_COUNTING_DEPT_NAME "dept_name"
- #define JSON_KEY_COUNTING_DEPT_COUNT_TOTAL "total"
- #define JSON_KEY_COUNTING_DEPT_COUNT_VEHICLE "vehicle"
- #define JSON_KEY_COUNTING_DEPT_COUNT_PERSON "staff"
- // alarm
- #define JSON_KEY_ALARM_OVER_COUNT_PERSON "over_count_person"
- #define JSON_KEY_ALARM_OVER_COUNT_VEHICLE "over_count_vehicle"
- #define JSON_KEY_ALARM_OVER_TIME_PERSON "over_time_person"
- #define JSON_KEY_ALARM_OVER_TIME_VEHICLE "over_time_vehicle"
- #define JSON_KEY_ALARM_OVER_SPEED_VEHICLE "over_speed_vehicle"
- #define JSON_KEY_ALARM_AREA_FORBIDDEN "area_forbidden"
- #define JSON_KEY_ALARM_GLOBAL "global"
- #define JSON_KEY_ALARM_ITEM "item"
- #define JSON_KEY_ALARM_DETAIL "detail"
- #define JSON_KEY_ALARM_MAX "max"
- #define JSON_KEY_ALARM_CURRENT "current"
- #define JSON_KEY_ALARM_AREA "areas"
- #define JSON_KEY_ALARM_AREA_ID "area_id"
- #define JSON_KEY_ALARM_ALARMS "alarms"
- #define JSON_KEY_ALARM_PERSON "person"
- #define JSON_KEY_ALARM_VEHICLE "vehicle"
- #define JSON_KEY_ALARM_ADHOC "adhoc"
- #define JSON_KEY_ALARM_READER "readers"
- #define JSON_KEY_ALARM_READER_ID "reader_id"
- #define JSON_KEY_ALARM_TYPE_ID "alarm_type_id"
- #define JSON_KEY_ALARM_TYPE_NAME "alarm_type_name"
- #define JSON_KEY_ALARM_START_TIME "alarm_start_time"
- #define JSON_KEY_ALARM_STAFF "staff"
- #define JSON_KEY_ALARM_STAFFER_ID "staffer_id"
- #define JSON_KEY_ALARM_VEHICLE_ID "vehicle_id"
- #endif // !_SERVER_CONST_DEF_H_
|