From 458014d31e19481ccd46186408719712ad7edfb4 Mon Sep 17 00:00:00 2001 From: yuxiaolei Date: Thu, 9 Jun 2022 01:38:49 +0000 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=20'doc/=E6=96=B9=E6=A1=88/=E8=BE=B9=E7=BC=98=E7=BD=91=E5=85=B3?= =?UTF-8?q?'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yuxiaolei --- .../边缘网关/边缘网关即时采集.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 doc/方案/边缘网关/边缘网关即时采集.md diff --git a/doc/方案/边缘网关/边缘网关即时采集.md b/doc/方案/边缘网关/边缘网关即时采集.md new file mode 100644 index 0000000..4207a8f --- /dev/null +++ b/doc/方案/边缘网关/边缘网关即时采集.md @@ -0,0 +1,33 @@ +# 边缘网关即时采集 +>本文档描写IOT边缘网关即时采集的设计思想及方案概要,不涉及具体实现方案和技术实现方案。 +##功能 +实现边缘设备即时采集,平台点击下发按钮后进行即时的采集指令下发,并将返回数据或错误显示在平台上。 +##通讯流程 +1. 平台即时采集指令下发(kafka) +2. edge server 处理封装mqtt消息格式并推送 +1. edge 处理能力驱动及时采集 +1. kafka上报数据,边缘网关回传数据信息到平台 +##环境配置 +测试环境:windows +> "db.conn": "postgres://postgres:postgres@10.8.30.156:5432/iota20211206?sslmode=disable" +> "msg.mqtt.center": "10.8.30.157:31883" +> "kafka.brokers":"10.8.30.190:9092" + +##通讯设计 + +- 平台->edge server +>func NewSyncService(conf *util.Properties, consumerTopic string, consumer kafka.ReceiverFunc) +> +>SyncService.go + + +- edge server-> edge +>func (m *Manager) onConsumer(data []byte) +> +> manager.go + + +- edge —>平台 +>func (s *SyncController) onConsumer(value string) (msg *mqtt.MqttMsg, err error) +> +>controller.go