Commit 3fa956f13934e10d7c15d64ef40fdaae3b957a27
Merge branch 'master' of git@192.168.168.201:panzhaov5/bsth_control.git
Showing
1 changed file
with
110 additions
and
2 deletions
README.md
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | * [越站](#越站) |
| 15 | 15 | * [聚集](#聚集) |
| 16 | 16 | * [掉线](#掉线) |
| 17 | - | |
| 17 | + * [消息上传下发](#消息上传下发) | |
| 18 | 18 | |
| 19 | 19 | ---------- |
| 20 | 20 | |
| ... | ... | @@ -197,4 +197,112 @@ |
| 197 | 197 | | lon | float | 经度 | |
| 198 | 198 | | lat | float | 纬度| |
| 199 | 199 | | timestamp | long | 时间戳 | |
| 200 | -| createDate | Date | 时间 | | |
| 201 | 200 | \ No newline at end of file |
| 201 | +| createDate | Date | 时间 | | |
| 202 | + | |
| 203 | +## 消息上传下发 | |
| 204 | +---------- | |
| 205 | +### 消息下发接口 | |
| 206 | +[http://192.168.168.192:8080/transport_server/message](http://192.168.168.192:8080/transport_server/message/) | |
| 207 | + | |
| 208 | +<span style="color: red">Request</span>: | |
| 209 | +```json | |
| 210 | +{ | |
| 211 | + "deviceId":12345, | |
| 212 | + "timestamp":44324, | |
| 213 | + "operCode":0x60, | |
| 214 | + "data":{ | |
| 215 | + "companyCode":22,//short | |
| 216 | + "deviceId":"029L2222",//string | |
| 217 | + "timestamp":134326,//long | |
| 218 | + "instructType":00,//short | |
| 219 | + "dispatchInstruct":0x00,//short | |
| 220 | + "msgId":12345,//long | |
| 221 | + "alarmTime":201606012000,//long | |
| 222 | + "serviceState":00000000,//long | |
| 223 | + "txtContent":"你好"//string | |
| 224 | + } | |
| 225 | +} | |
| 226 | +``` | |
| 227 | +| .. | .. | .. | | |
| 228 | +| ---- | ---- | ---- | | |
| 229 | +| deviceId | string | 设备编号 | | |
| 230 | +| timestamp | long | 时间戳(ms) | | |
| 231 | +| operCode | short | 一级协议 | | |
| 232 | +| data.companyCode | short | 公司代码 | | |
| 233 | +| data.deviceId | string | 设备编号 | | |
| 234 | +| data.timestamp | long | 时间戳 | | |
| 235 | +| data.instructType | short | 保留 默认0 | | |
| 236 | +| data.dispatchInstruct | short | 调度指令 | | |
| 237 | +| data.msgId | long | 同上 | | |
| 238 | +| data.alarmTime | long | 闹钟 | | |
| 239 | +| data.serviceState | long | 多状态字节 | | |
| 240 | +| data.txtContent | string | 下发的消息文本 | | |
| 241 | +```json | |
| 242 | +{ | |
| 243 | + "deviceId":12345, | |
| 244 | + "timestamp":44324, | |
| 245 | + "operCode":0x64, | |
| 246 | + "data":{ | |
| 247 | + "cityCode":22,//int | |
| 248 | + "deviceId":"029L2222",//string | |
| 249 | + "lineId":"134326"//string | |
| 250 | + } | |
| 251 | +} | |
| 252 | +``` | |
| 253 | +| .. | .. | .. | | |
| 254 | +| ---- | ---- | ---- | | |
| 255 | +| deviceId | string | 设备编号 | | |
| 256 | +| timestamp | long | 时间戳(ms) | | |
| 257 | +| operCode | short | 一级协议 | | |
| 258 | +| data.cityCode | short | 城市区号 | | |
| 259 | +| data.deviceId | string | 设备编号 | | |
| 260 | +| data.lineId | string | 线路编号 | | |
| 261 | + | |
| 262 | +```json | |
| 263 | +{ | |
| 264 | + "deviceId":12345, | |
| 265 | + "timestamp":44324, | |
| 266 | + "operCode":0xC0, | |
| 267 | + "data":{ | |
| 268 | + "operCode":0x86, | |
| 269 | + "requestAck":0x06 // 0x06同意 0x15不同意 | |
| 270 | + } | |
| 271 | +} | |
| 272 | +``` | |
| 273 | +| .. | .. | .. | | |
| 274 | +| ---- | ---- | ---- | | |
| 275 | +| deviceId | string | 设备编号 | | |
| 276 | +| timestamp | long | 时间戳(ms) | | |
| 277 | +| operCode | short | 一级协议 | | |
| 278 | +| data.operCode | short | 二级协议 | | |
| 279 | +| data.requestAck | short | 请求应答字 | | |
| 280 | + | |
| 281 | +<span style="color: red">Response</span>: | |
| 282 | +```json | |
| 283 | +{ | |
| 284 | + "errCode":0 | |
| 285 | +} | |
| 286 | +``` | |
| 287 | + | |
| 288 | +### 消息上传接口 | |
| 289 | + | |
| 290 | +<span style="color: red">Request</span>: | |
| 291 | +```json | |
| 292 | +{ | |
| 293 | + "deviceId":12345, | |
| 294 | + "timestamp":44324, | |
| 295 | + "status":0,// 0x80时无数据 0表示失败 1表示成功或设备确认 2表示驾驶员阅读 | |
| 296 | + "operCode":0x80,// 消息确认时无数据 | |
| 297 | + "data":{ | |
| 298 | + "operCode":0x26,//二级协议 | |
| 299 | + "requestCode":22//short | |
| 300 | + }// 消息确认将无数据 | |
| 301 | +} | |
| 302 | +``` | |
| 303 | + | |
| 304 | +<span style="color: red">Response</span>: | |
| 305 | +```json | |
| 306 | +{ | |
| 307 | + "errCode":0 | |
| 308 | +} | |
| 309 | +``` | |
| 202 | 310 | \ No newline at end of file | ... | ... |