From 116def783f85af5896fc4500bc8a690d8b1eb5f3 Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期六, 23 九月 2023 14:46:27 +0800 Subject: [PATCH] Merge branch 'wjc' of http://59.41.255.150:6688/r/~wjc/HDLPhotovoltaicDebugAPP into wjc --- 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