Browse Source

数据接入,新协议接入文档补充

jianghouwei 6 years ago
parent
commit
aba5653884
1 changed files with 26 additions and 0 deletions
  1. 26 0
      src/README.md

+ 26 - 0
src/README.md

@@ -0,0 +1,26 @@
+data-acceptance  新协议接入流程
+
+1:在 com.tidecloud.dataacceptance.service.impl 目录下加入新协议类: XXXXServerHandler
+
+
+2: XXXXServerHandler extends HexBinaryAcceptanceHandlerAdapter
+
+
+3:实现protected void handle(ByteBuf in, Channel channel) throws Exception {} 方法
+  依据协议解析 同时回复必要报文
+  
+  
+  
+4:正对 application.yml 增加相关配置
+   acceptance:
+    device:
+     deviceList: 
+     
+    -- 增加相关配置:
+        name: xxxx_gps  #日志输出目录
+        topic: device-XXX-gps  #发送topic
+        ip: 10.25.19.87 #(目前没有意义)
+        port: 6003  #监听端口
+        dataFileDir: /home/service/collector_7527/rawdata/ # 数据解析本地文件缓存目录 备份
+        handlerClass: com.tidecloud.dataacceptance.service.impl.XXXXServerHandler  # 接口报文实现类
+        enable: true  # 是否生效