From 07671116767c77058b3ce584be161b4b194ec9bd Mon Sep 17 00:00:00 2001 From: hxb <hxb@hdlchina.com.cn> Date: 星期五, 30 六月 2023 15:57:59 +0800 Subject: [PATCH] Merge branch 'hxb' of http://172.16.1.23:6688/r/~wjc/HDLPhotovoltaicDebugAPP into hxb --- 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