Skip to content

Commit

Permalink
modify image path
Browse files Browse the repository at this point in the history
  • Loading branch information
moimo committed Dec 13, 2015
1 parent 0eaf8ae commit aee859a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Pando protocol是Pando物联网解决方案中的协议部分。
* [数据结构](#数据结构)
* [快速开始](#快速开始)
* [贡献项目](#贡献项目)
* [其他索引](#其他索引)

## Pando协议的目标

Expand Down Expand Up @@ -140,3 +141,9 @@ flag:用于未来协议扩展
* **反馈问题**:我们鼓励通过[提交Issue](https://github.com/PandoCloud/pando-protocol/issues/new)的方式反馈您在了解协议过程中遇到的疑问或问题。
* **提出建议**:同样,可以通过[提交Issue](https://github.com/PandoCloud/pando-protocol/issues/new)向我们提供协议改进意见,同时可以通过加入我们的讨论QQ群(488074716)或者参加我们主办的线下物联网技术沙龙一起讨论。
* **贡献代码**:非常欢迎有能力的朋友一起参与Pando物联网平台的开发,一起构建开放、免费、开源的物联网解决方案。请按照[贡献流程](./docs/zh-cn/contribution/work-flow.md)参与项目开发。

## 其他索引
添加索引便于统一查找
[平台通用的指令和事件](doc/universal-event-and-command.md)
[C语言-MQTT实现](doc/c-mqtt-implementation.md)
[http api](doc/http-api.md)
12 changes: 6 additions & 6 deletions doc/c-mqtt-implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ payload length:表示数据包携带的关键信息的长度
1. mqtt协议连接时需要一个client id作为连接标识符,此时使用了device id作为client id。一个device只会创建一条mqtt连接,因此通过这条连接发送的数据包就隐含着device id。这种方式最多可以减少8字节的数据包开销
2. mqtt协议头部中有topic字段,这个字段可用来标识payload type,现在使用c,d,e分别表示command, data, event
3. mqtt头部中的有该协议本身的payload length字段。mqtt payload length = 服务器header + pando payload length。而下图中服务器header的长度是固定的,因此从mqtt的length中可以计算出pando payload length。这样又可以减少2字节的开销
![接入设备-服务器](https://github.com/PandoCloud/pando-protocol/blob/master/doc/server-access.jpg)
![接入设备-服务器](images/server-access.jpg)

#### 硬件子设备header
![](https://github.com/PandoCloud/pando-protocol/blob/master/doc/access-hardware.jpg)
![](images/access-hardware.jpg)

#### Payload
* **指令**
![](https://github.com/PandoCloud/pando-protocol/blob/master/doc/command-payload.jpg)
![](images/command-payload.jpg)
* **事件**
![](https://github.com/PandoCloud/pando-protocol/blob/master/doc/event-payload.jpg)
![](images/event-payload.jpg)
* **数据**
![](https://github.com/PandoCloud/pando-protocol/blob/master/doc/data-payload.jpg)
![](images/data-payload.jpg)
* **参数**
![](https://github.com/PandoCloud/pando-protocol/blob/master/doc/tlv.jpg)
![](images/tlv.jpg)

### 2. 数据结构

Expand Down

0 comments on commit aee859a

Please sign in to comment.