Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zgwit authored Aug 2, 2024
1 parent b8b46be commit 88e9357
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,44 @@
[![Go Report Card](https://goreportcard.com/badge/github.com/zgwit/iot-gateway)](https://goreportcard.com/report/github.com/zgwit/iot-gateway)


## 网关协议

网关与云平台之前的通讯协议,支持标准mqtt和平台自定义的gpack

### 数据包
| 标识 | 长度(位) | 说明 |
|----|----|----|
| 魔术字 | 16 | 0x1234 |
| 类型 | 4 | |
| 包长 | 20 | 0- 1MB |


### 包类型
| 类型 | id | 说明 |
|----|----|----|
| CONNECT | 1 | 连接 |
| CONNECT_ACK | 2 | 连接响应 |
| HEARTBEAT | 3 | 心跳 |
| PING | 4 | |
| PONG | 5 | |
| STREAM | 6 | 数据流 |
| REQUEST | 7 | |
| RESPONSE | 8 | |
| | 9 | |
| | 10 | |
| | 11 | |
| | 12 | |
| | 13 | |
| | 14 | |
| DISCONNECT | 15 | 断开连接 |


###





## 协议支持

- [x] Modbus协议(内置)
Expand Down

0 comments on commit 88e9357

Please sign in to comment.