From 5d320cd16c9fc2b45d0b9cbd7225febf42489f9e Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期一, 03 七月 2023 18:56:11 +0800 Subject: [PATCH] 2023年07月03日18:56:09 --- 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