From 9efc5cef6ff75da58fe450add20ffab044e74b54 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期四, 18 一月 2024 09:59:33 +0800
Subject: [PATCH] 2024年01月18日09:59:27
---
HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/core/utils/mqtt/MqttRecvClient.java | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/core/utils/mqtt/MqttRecvClient.java b/HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/core/utils/mqtt/MqttRecvClient.java
index 07b3f0a..d6a0d1a 100644
--- a/HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/core/utils/mqtt/MqttRecvClient.java
+++ b/HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/core/utils/mqtt/MqttRecvClient.java
@@ -7,6 +7,7 @@
import com.hdl.sdk.link.common.utils.LogUtils;
import com.hdl.sdk.link.core.bean.LinkPacket;
+import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus;
import com.hdl.sdk.link.core.bean.eventbus.EventBindMiniRemoteSuccessInfo;
import com.hdl.sdk.link.core.bean.eventbus.EventNotifyRefreshGatewayAesKeyInfo;
import com.hdl.sdk.link.core.bean.gateway.GatewayBean;
@@ -30,6 +31,7 @@
import org.greenrobot.eventbus.EventBus;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
/**
@@ -207,9 +209,13 @@
return;
}
LogUtils.d(TAG, "缃戝叧閲嶈繛mqtt绉橀挜鏇存柊閫氱煡->" + topic);
- EventNotifyRefreshGatewayAesKeyInfo eventNotifyRefreshGatewayAesKeyInfo = new EventNotifyRefreshGatewayAesKeyInfo();
- eventNotifyRefreshGatewayAesKeyInfo.setGatewayId(topics[2]);
- EventBus.getDefault().post(eventNotifyRefreshGatewayAesKeyInfo);
+ BaseEventBus baseEventBus=new BaseEventBus();
+ baseEventBus.setTopic(topic);
+ EventBus.getDefault().post(baseEventBus);
+
+// EventNotifyRefreshGatewayAesKeyInfo eventNotifyRefreshGatewayAesKeyInfo = new EventNotifyRefreshGatewayAesKeyInfo();
+// eventNotifyRefreshGatewayAesKeyInfo.setGatewayId(topics[2]);
+// EventBus.getDefault().post(eventNotifyRefreshGatewayAesKeyInfo);
return;
}
@@ -239,7 +245,11 @@
return;
}
String bodyStr = new String(bytes);
- LogUtils.d(TAG, "\r\n" + "mqtt->杩滅▼鍥炲鏁版嵁" + bodyStr);
+ if (HDLConnectHelper.isInverterTopic(topic)) {
+ LogUtils.d(TAG, "\r\n" + "mqtt->杩滅▼鍥炲鏁版嵁" + Arrays.toString(HDLConnectHelper.byteArrayConvertIntArray(bytes)));
+ } else {
+ LogUtils.d(TAG, "\r\n" + "mqtt->杩滅▼鍥炲鏁版嵁" + bodyStr);
+ }
/**
* 绾㈠瀹濊澶囬�氳繃/thing/topo/found涓婚 涓婃姤绾㈠瀹濊澶囧凡缁忓叆缃戜簡 鐒跺悗鐩存帴return 涓嶉渶瑕佸啀涓嬭浜�
*/
--
Gitblit v1.8.0