Browse Source

添加消防应急系统mqtt推送字段说明

James 3 years ago
parent
commit
89253790df
1 changed files with 87 additions and 1 deletions
  1. 87 1
      项目需求/山东党校/需求.md

+ 87 - 1
项目需求/山东党校/需求.md

@@ -43,5 +43,91 @@
 * 消费者监听这些队列,然后通过策略模式为不同的子系统进行不同的实现
 
 ### 子系统的业务需求
-#### 设备故障管理
+#### 消防应急系统
+
+* topic
+  * sd/fire/程序模块编号/info
+  * sd/fire/程序模块编号/alarm
+* 响应参数
+
+| 参数名称                   | 参数说明                          | 类型   | schema                                  |
+| -------------------------- | --------------------------------- | ------ | --------------------------------------- |
+| devId                      | 设备唯一编码                      | string |                                         |
+| connType                   | 传输方式                          | string | 通信方式 G:4G N:NB L:LoRa S:专线 B:总线 |
+| devs                       | 设备列表                          | array  | 设备列表                                |
+|   dp             | 设备属性                          | array  |                                         |
+|    property | 属性名称                          | string |                                         |
+|    value    | 属性值                            | string |                                         |
+|    serial   | 序号                              | string |                                         |
+|    status   | 告警状态                          | int    | 0未消除 1已消除                         |
+|   deviceName     | 设备名称                          | string |                                         |
+|   timeStamp      | 时间戳                            | string |                                         |
+|   devceType      | 设备类型                          | string |                                         |
+|   devcieModel    | 设备型号                          | string |                                         |
+|   devId          | 设备id                            | string |                                         |
+| type                       | 数据类型 INFO:心跳数据 ALARM:告警 | string |                                         |
+| timestamp                  | 时间戳                            | long   |                                         |
+
+```json
+{
+    "devId":"1000001",
+    "connType":"G",
+     "deviceName":"烟感",
+    "devs":[
+        {
+            "dp":[
+                {
+                    "property":"温度",
+                    "serial":"xxx",
+                    "value":"23"
+                },
+                {
+                    "property":"电池",
+                     "serial":"xxx",
+                    "value":"77"
+                },
+                {
+                    "property":"信号",
+                     "serial":"xxx",
+                    "value":"-144"
+                }
+            ],
+            "deviceName":"烟感",
+            "timeStamp":"",
+            "devceType":"",
+            "devcieModel":"xxxx",
+            "devId":"xxx"
+        }
+    ],
+    "type":"INFO",
+    "timeStamp":"1627978385065"
+}
+```
+
+```json
+{
+    "devId":"1000001",
+    "connType":"G",
+    "deviceName":"",
+    "alarams":[
+        {
+            "dp":[
+                {
+                    "property":"信号",
+                    "serial":"222",
+                    "value":"-144",
+                    "status":"1"
+                }
+            ],
+            "deviceName":"烟感",
+            "timeStamp":"",
+            "devcieModel":"xxxxx",
+            "deviceType":"",
+            "devId":""
+        }
+    ],
+    "type":"ALARM",
+    "timeStamp":"1627978385065"
+}
+```