文档更新
This commit is contained in:
parent
461fb6831e
commit
d36b8a04ab
@ -94,19 +94,69 @@
|
|||||||
|
|
||||||
`ws://127.0.0.1:7790/gate/{nodeId}`
|
`ws://127.0.0.1:7790/gate/{nodeId}`
|
||||||
|
|
||||||
|
PS: 同一节点只允许建立一条连接。
|
||||||
|
|
||||||
## 通讯报文
|
## 通讯报文
|
||||||
|
|
||||||
### 节点上线请求
|
### 报文格式
|
||||||
|
|
||||||
?> 方向: `采集程序` -> `系统`
|
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
//节点ID
|
|
||||||
"nodeId" : "nx10928234",
|
|
||||||
//消息ID
|
|
||||||
"messageId": "123512351235123",
|
|
||||||
//命令
|
//命令
|
||||||
"action" : "online"
|
"cmd": "heartbeat",
|
||||||
|
//命令ID
|
||||||
|
"cmdId": "123123",
|
||||||
|
//发送时间(毫秒)
|
||||||
|
"time": 123123123123,
|
||||||
|
//数据体
|
||||||
|
"data": {}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 节点心跳报文
|
||||||
|
|
||||||
|
?> 方向: `采集程序` -> `系统`
|
||||||
|
|
||||||
|
**命令:** `heartbeat`
|
||||||
|
|
||||||
|
**数据体:**
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
//心跳生存时间(毫秒)
|
||||||
|
"ttl": 30000,
|
||||||
|
//终端状态, 0 - 离线, 1 - 在线
|
||||||
|
"status": 0,
|
||||||
|
//通讯链路监控信息
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
//通讯链路IRN
|
||||||
|
"linkId": 3444,
|
||||||
|
//通讯链路状态
|
||||||
|
"online": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"linkId": 123,
|
||||||
|
"online": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
### 实时数据上报
|
||||||
|
|
||||||
|
?> 方向: `采集程序` -> `系统`
|
||||||
|
|
||||||
|
**命令:** `realdata`
|
||||||
|
|
||||||
|
**数据体:**
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
//key为设备ID
|
||||||
|
"1123451235": {
|
||||||
|
//key为属性名
|
||||||
|
"Ia": 123.1,
|
||||||
|
"Ib": 122.1,
|
||||||
|
"Ic": 123.1,
|
||||||
|
"Switch01": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user