From 4e4f605f481af8a8f0ad9e13ae9ab4dbe73eecfd Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期四, 29 六月 2023 15:25:34 +0800
Subject: [PATCH] 调整了搜索网关回调

---
 HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/core/connect/HDLConnectHelper.java |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/core/connect/HDLConnectHelper.java b/HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/core/connect/HDLConnectHelper.java
index 18967d5..47e5363 100644
--- a/HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/core/connect/HDLConnectHelper.java
+++ b/HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/core/connect/HDLConnectHelper.java
@@ -12,6 +12,7 @@
 import com.hdl.sdk.link.common.utils.ThreadToolUtils;
 import com.hdl.sdk.link.core.bean.LinkRequest;
 import com.hdl.sdk.link.core.bean.LinkResponse;
+import com.hdl.sdk.link.core.bean.ModbusResponse;
 import com.hdl.sdk.link.core.bean.ZigbeeResponse;
 import com.hdl.sdk.link.core.bean.gateway.GatewayBean;
 import com.hdl.sdk.link.core.config.HDLLinkConfig;
@@ -126,6 +127,14 @@
                         else{
                             notifyFailure(HDLLinkCode.HDL_TOPIC_NOT_RIGHT);
                         }
+                    }else if(msg instanceof ModbusResponse){
+                        ModbusResponse response = (ModbusResponse) msg;
+                        if (replyTopic.equals(response.getTopic())) {
+                            notifySucceed(response.getData());
+                        }
+                        else{
+                            notifyFailure(HDLLinkCode.HDL_TOPIC_NOT_RIGHT);
+                        }
                     }
                     else{
                         notifyFailure(new HDLLinkCode(HDLLinkCode.HDL_OBJECT_NOT_SUPPORT.getCode(), "Object Name:" + msg));

--
Gitblit v1.8.0