From 4a209c4c6ef8b4402114ca26b45dd4bbe869190b Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期四, 29 六月 2023 15:31:36 +0800
Subject: [PATCH] 2023年06月29日15:31:33

---
 HDLLinkLocalSdk/src/main/res/values/strings_code.xml                            |   48 +++---
 HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/gateway/HDLLinkLocalGateway.java |   17 +-
 app/src/main/assets/data/dcloud_control.xml                                     |    4 
 app/src/main/java/com/hdl/photovoltaic/internet/api/TopicApi.java               |  308 ++++++++++++++++++++++++++++++++++++++++++++
 app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java                   |   15 +
 app/src/main/java/com/hdl/photovoltaic/internet/TcpClient.java                  |   22 +++
 6 files changed, 376 insertions(+), 38 deletions(-)

diff --git a/HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/gateway/HDLLinkLocalGateway.java b/HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/gateway/HDLLinkLocalGateway.java
index d7b6668..1f50858 100644
--- a/HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/gateway/HDLLinkLocalGateway.java
+++ b/HDLLinkLocalSdk/src/main/java/com/hdl/sdk/link/gateway/HDLLinkLocalGateway.java
@@ -716,25 +716,26 @@
     /**
      * 鍙戦�佹暟鎹埌Link缃戝叧
      *
-     * @param ip        缃戝叧IP
      * @param mac       缃戝叧mac
      * @param isEncrypt 鏄惁鍔犲瘑
      * @param topic     璇锋眰涓婚
      * @param jObject   璐熻浇鏁版嵁<娌℃湁濉玭ull></>
      * @param sendPath  鍙戦�佽矾寰�<绫诲悕+鏂规硶鍚�>class->methodName</>
      */
-    public void sendDataToLinkGateway(String ip, String mac, boolean isEncrypt,
+    public void sendDataToLinkGateway(String mac, boolean isEncrypt,
                                       String topic, Object jObject, String sendPath, HDLLinkCallBack callBack) {
-        String topicSend = topic.replace("%s", mac);
+        GatewayBean gatewayBean = this.getLocalGateway(mac);
+        if (gatewayBean == null) {
+            callBack.onError(HDLLinkException.getErrorWithCode(hdlLinkCode));
+            return;
+        }
+        String topicSend = topic.replace("%s", gatewayBean.getOid());
         //缁勮闇�瑕佸彂閫佺殑鏁版嵁
         String sendStr = createSendData(jObject);
 //        LogUtils.i("sendDataToLinkGateway->" + sendPath + "->鏈湴鍙戦�乗r\n" + topicSend + "\r\n" + sendStr);
         LinkRequest message = new LinkRequest(topicSend, sendStr, isEncrypt);
-        GatewayBean gatewayBean = this.getLocalGateway(mac);
-        if (gatewayBean != null) {
-            message.setCloudTopic(topic.replace("%s", gatewayBean.getGatewayId()));
-        }
-        new HDLConnectHelper(ip, message, new HDLConnectHelper.HdlSocketListener() {
+        message.setCloudTopic(topic.replace("%s", gatewayBean.getGatewayId()));
+        new HDLConnectHelper(gatewayBean.getIp_address(), message, new HDLConnectHelper.HdlSocketListener() {
             @Override
             public void onSucceed(Object msg) {
                 if (callBack == null) return;
diff --git a/HDLLinkLocalSdk/src/main/res/values/strings_code.xml b/HDLLinkLocalSdk/src/main/res/values/strings_code.xml
index ca99860..00a28c6 100644
--- a/HDLLinkLocalSdk/src/main/res/values/strings_code.xml
+++ b/HDLLinkLocalSdk/src/main/res/values/strings_code.xml
@@ -1,27 +1,27 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-<string name="HDL_DATA_ERROR">Parameter exception</string>
-<string name="HDL_DATA_NULL_ERROR">Parameter cannot be empty</string>
-<string name="HDL_AUTH_ERROR">Authentication failed</string>
-<string name="HDL_SEND_ERROR">fail in send</string>
-<string name="HDL_TIMEOUT_ERROR">timeout,gateway no response</string>
-<string name="HDL_UNAUTHORIZED_ERROR">Not certified, please authenticate first</string>
-<string name="HDL_AUTH_ERROR_GATEWAY_NOT_REGISTERED">Authentication failed. The gateway is not registered to the cloud</string>
-<string name="HDL_SEARCH_GATEWAY_TIMEOUT_ERROR">Failed to search gateway, timeout</string>
-<string name="HDL_AUTH_MAC_KEY_ERROR">Authentication failed. The device key corresponding to the MAC does not exist</string>
-<string name="HDL_DATA_PARSING_ERROR">Data parsing error</string>
-<string name="HDL_GET_DEVICE_LIST_ERROR">Failed to get device list</string>
-<string name="HDL_GET_FUNCTION_LIST_ERROR">Failed to get function list</string>
-<string name="HDL_GET_FUNCTION_PROPERTIES_ERROR">Failed to get function attribute</string>
-<string name="HDL_CONTROL_FAILURE_ERROR">Control failure</string>
-<string name="HDL_GET_GATEWAY_FAILURE_ERROR">Failed to get gateway list</string>
-<string name="HDL_GET_Zigbee_FAILURE_ERROR">Sending timeout, no response from gateway</string>
-<string name="HDL_GATEWAY_NOT_EXIST">Gateway does not exist</string>
-<string name="HDL_GET_Zigbee_DEVICE_LIST_FAILURE_ERROR">Failed to get the device list</string>
-<string name="HDL_MILLIMETER_NOT_EXIST">Millimeter does not exist</string>
-<string name="HDL_UNKOWN_CODE">Unkown Error</string>
-<string name="HDL_APPLICATION_EXCEPTION">System Exception</string>
-<string name="HDL_TOPIC_NOT_RIGHT">Theme does not match</string>
-<string name="HDL_OBJECT_NOT_SUPPORT">Object not supported</string>
-<string name="HDL_GATEWAY_REMOTE_NOT_RESPONSE">Gateway local connection failed, unable to reply through remote communication</string>
+    <string name="HDL_DATA_ERROR">Parameter exception</string>
+    <string name="HDL_DATA_NULL_ERROR">Parameter cannot be empty</string>
+    <string name="HDL_AUTH_ERROR">Authentication failed</string>
+    <string name="HDL_SEND_ERROR">fail in send</string>
+    <string name="HDL_TIMEOUT_ERROR">timeout,gateway no response</string>
+    <string name="HDL_UNAUTHORIZED_ERROR">Not certified, please authenticate first</string>
+    <string name="HDL_AUTH_ERROR_GATEWAY_NOT_REGISTERED">Authentication failed. The gateway is not registered to the cloud</string>
+    <string name="HDL_SEARCH_GATEWAY_TIMEOUT_ERROR">Failed to search gateway, timeout</string>
+    <string name="HDL_AUTH_MAC_KEY_ERROR">Authentication failed. The device key corresponding to the MAC does not exist</string>
+    <string name="HDL_DATA_PARSING_ERROR">Data parsing error</string>
+    <string name="HDL_GET_DEVICE_LIST_ERROR">Failed to get device list</string>
+    <string name="HDL_GET_FUNCTION_LIST_ERROR">Failed to get function list</string>
+    <string name="HDL_GET_FUNCTION_PROPERTIES_ERROR">Failed to get function attribute</string>
+    <string name="HDL_CONTROL_FAILURE_ERROR">Control failure</string>
+    <string name="HDL_GET_GATEWAY_FAILURE_ERROR">Failed to get gateway list</string>
+    <string name="HDL_GET_Zigbee_FAILURE_ERROR">Sending timeout, no response from gateway</string>
+    <string name="HDL_GATEWAY_NOT_EXIST">Gateway does not exist</string>
+    <string name="HDL_GET_Zigbee_DEVICE_LIST_FAILURE_ERROR">Failed to get the device list</string>
+    <string name="HDL_MILLIMETER_NOT_EXIST">Millimeter does not exist</string>
+    <string name="HDL_UNKOWN_CODE">Unkown Error</string>
+    <string name="HDL_APPLICATION_EXCEPTION">System Exception</string>
+    <string name="HDL_TOPIC_NOT_RIGHT">Theme does not match</string>
+    <string name="HDL_OBJECT_NOT_SUPPORT">Object not supported</string>
+    <string name="HDL_GATEWAY_REMOTE_NOT_RESPONSE">Gateway local connection failed, unable to reply through remote communication</string>
 </resources>
\ No newline at end of file
diff --git a/app/src/main/assets/data/dcloud_control.xml b/app/src/main/assets/data/dcloud_control.xml
index 727b81a..acfad40 100644
--- a/app/src/main/assets/data/dcloud_control.xml
+++ b/app/src/main/assets/data/dcloud_control.xml
@@ -1,6 +1,6 @@
-<hbuilder version="1.9.9.80110" debug="false" syncDebug ="false">
+<hbuilder debug="true" syncDebug="false" version="1.9.9.80110">
     <apps>
-        <app appid="unimp" appver="1.0"/>
+        <app appid="unimp" appver="1.0" />
     </apps>
 </hbuilder>
 
diff --git a/app/src/main/java/com/hdl/photovoltaic/internet/TcpClient.java b/app/src/main/java/com/hdl/photovoltaic/internet/TcpClient.java
index 9afc648..47e9e8b 100644
--- a/app/src/main/java/com/hdl/photovoltaic/internet/TcpClient.java
+++ b/app/src/main/java/com/hdl/photovoltaic/internet/TcpClient.java
@@ -1,4 +1,26 @@
 package com.hdl.photovoltaic.internet;
 
+
+import com.hdl.sdk.link.core.callback.HDLLinkCallBack;
+import com.hdl.sdk.link.gateway.HDLLinkLocalGateway;
+
+/**
+ * 瀹㈡埛绔搷浣滈�昏緫
+ */
 public class TcpClient {
+
+    /**
+     * 鍙戦�佹暟鎹埌Link缃戝叧
+     *
+     * @param mac       缃戝叧mac
+     * @param isEncrypt 鏄惁鍔犲瘑
+     * @param topic     璇锋眰涓婚
+     * @param jObject   璐熻浇鏁版嵁<娌℃湁濉玭ull></>
+     * @param sendPath  鍙戦�佽矾寰�<绫诲悕+鏂规硶鍚�>class->methodName</>
+     */
+    public void sendDataToLinkGateway(String mac, boolean isEncrypt,
+                                      String topic, Object jObject, String sendPath, HDLLinkCallBack callBack) {
+        HDLLinkLocalGateway.getInstance().sendDataToLinkGateway(mac, isEncrypt, topic, jObject, sendPath, callBack);
+
+    }
 }
diff --git a/app/src/main/java/com/hdl/photovoltaic/internet/api/TopicApi.java b/app/src/main/java/com/hdl/photovoltaic/internet/api/TopicApi.java
index d814fe7..1b70139 100644
--- a/app/src/main/java/com/hdl/photovoltaic/internet/api/TopicApi.java
+++ b/app/src/main/java/com/hdl/photovoltaic/internet/api/TopicApi.java
@@ -1,4 +1,312 @@
 package com.hdl.photovoltaic.internet.api;
 
 public class TopicApi {
+    /*
+     *閫氱煡鍒犻櫎骞堕��缃戝瓙璁惧鎷撴墤鍏崇郴
+     *鍒犻櫎浠庣綉鍏�
+     * */
+    public static final String DELETING_GATEWAY_SLAVE = "/base/%s/thing/topo/delete/notify";
+
+    /*
+     *缃戝叧鐗╃悊閫�缃戝悗涓婃姤鍒犻櫎(閫�缃�)瀛愯澶�
+     * */
+    public static final String DELETING_GATEWAY_SLAVE_RESULT = "/base/%s/thing/topo/delete/up";
+
+
+    /*
+    缃戝叧鏁版嵁澶囦唤杩樺師
+     * */
+    public static final String GATEWAY_BACKUP_RESTORE_DOWN = "/base/%s/device/backup/restore/down";
+
+    /*
+   璋冭瘯浜哄憳涓诲姩閫氱煡缃戝叧澶囦唤鏁版嵁
+    * */
+    public static final String GATEWAY_BACKUP_NOTICE_DOWN = "/base/%s/device/backup/notice/down";
+    /*
+   澶囦唤杩樺師杩涘害鑾峰彇
+    * */
+    public static final String GATEWAY_BACKUP_PROGRESS_GET = "/base/%s/device/backup/restore/progress/get";
+
+    /*
+     * 缃戝叧缂栬緫鍛戒护
+     * 鍐欒繙绋嬩俊鎭殑锛屼緥濡傛湇鍔″櫒鍦板潃銆丠omeId銆佸瘑閽ヤ箣绫�
+     * 涓庢湇鍔″櫒鐩稿叧鐨�
+     * */
+    public static final String GATEWAY_EDIT_REMOTE = "/user/%s/custom/gateway/remote/edit";
+
+    /*
+     * 缃戝叧鎭㈠鍑哄満璁剧疆鍛戒护
+     * */
+    public static final String GATEWAY_INITIALIZE_REMOTE = "/user/%s/custom/gateway/initialize";
+    public static final String GATEWAY_FIND_REMOTE = "/base/%s/thing/service/mmv_device_find/down";
+
+    /**
+     * 绾㈠瀹濈殑瀹氫綅
+     */
+    public static final String IR_FIND_REMOTE = "/base/%s/thing/service/irDeviceFind/down";
+    /**
+     * 绾㈠瀹濊瘯鐮�
+     */
+    public static final String IR_CODE_TEST = "/base/%s/thing/service/irCodeTest/down";
+    /**
+     * 绾㈠瀹濋仴鎺у櫒娣诲姞
+     */
+    public static final String IR_DEVICE_ADD = "/base/%s/thing/service/irDeviceAdd/down";
+    /**
+     * 绾㈠瀹濋仴鎺у櫒鍒楄〃鑾峰彇
+     */
+    public static final String IR_DEVICE_LIST = "/base/%s/thing/service/irDeviceListGet/down";
+    /**
+     * 绾㈠瀹濊嚜瀛︾爜
+     */
+    public static final String IR_CODE_STUDY = "/base/%s/thing/service/irCodeStudy/down";
+    /**
+     * 绾㈠瀹濊嚜瀛︾爜鍒犻櫎
+     */
+    public static final String IR_CODE_REMOVE = "/base/%s/thing/service/irCodeRemove/down";
+
+
+    /*
+     * 缃戝叧缂栬緫鍛戒护
+     * 涓庢湇鍔″櫒鏃犲叧鐨�
+     * */
+    public static final String GATEWAY_SEND_EDIT = "/user/%s/custom/gateway/edit";
+
+    /**
+     * 璁剧疆缃戝叧鍏ョ綉妯″紡
+     * 鍏ョ綉浠庢満璁惧浣跨敤
+     * 浠庣綉鍏炽�佺孩澶栧疂绛夌綉缁滆澶�
+     */
+    public static final String GATEWAY_AUTH = "/user/%s/custom/device/auth_gateway";
+    //鑾峰彇缃戝叧淇℃伅
+    public static final String GATEWAY_GET = "/user/%s/custom/gateway/remote/get";
+
+    //缃戝叧骞挎挱鍏ョ綉鎸囦护
+    public static final String GATEWAY_AUTH_BROADCAST = "/user/all/custom/device/network_access/broadcast";
+
+    //璁惧鍏ョ綉鍜岃璇�
+    public static final String DEIVCE_AUTH_REQUEST = "/user/all/custom/device/network_access/request";
+
+    //璁惧鍏ョ綉鍜岃璇佸搷搴�
+    public static final String DEIVCE_AUTH_REQUEST_REPLY = "/user/all/custom/device/network_access/request_reply";
+
+    /**
+     * 鎼滅储缃戝叧
+     */
+    public static final String GATEWAY_SEARCH = "/user/all/custom/gateway/search";
+
+    /**
+     * 鎼滅储缃戝叧鍝嶅簲
+     */
+    public static final String GATEWAY_SEARCH_REPLY = "/user/all/custom/gateway/search_reply";
+
+    //缃戝叧璇︾粏淇℃伅鑾峰彇s=gw_id
+    public static final String GATEWAY_INFO = "/user/%s/custom/gateway/get";
+
+    //鑾峰彇鐗╃悊璁惧鍒楄〃
+    public static final String GET_DEVICE_LIST = "/user/%s/custom/device/list/get";
+
+    //鑾峰彇鐗╃悊璁惧鍒楄〃鍝嶅簲
+    public static final String GET_DEVICE_LIST_REPLY = "/user/%s/custom/device/list/get_reply";
+
+    //鑾峰彇鍔熻兘鍒楄〃
+    public static final String GET_FUNCTION_LIST = "/user/%s/custom/function/list/get";
+
+    //妯℃嫙浜戠ota
+    public static final String OTA_UPGRADE_DOWN = "/base/%s/ota/device/upgrade/down";
+
+    /**
+     * 缂栬緫sid
+     */
+    public static final String EDIT_FUNCTION = "/user/%s/custom/function/attribute/edit";
+
+    //鑾峰彇鍔熻兘鍝嶅簲
+    public static final String GET_FUNCTION_LIST_REPLY = "/user/%s/custom/function/list/get_reply";
+
+    //鍔熻兘灞炴�ц鍙�
+    public static final String GET_FUNCTION_ATTRIBUTE = "/user/%s/custom/function/attribute/get";
+    //鍔熻兘灞炴�х紪杈�
+    public static final String EDIT_FUNCTION_ATTRIBUTE = "/user/%s/custom/function/attribute/edit";
+
+    //鍔熻兘灞炴�у搷搴�
+    public static final String GET_FUNCTION_ATTRIBUTE_REPLY = "/user/%s/custom/function/attribute/get_reply";
+
+    //鎺у埗
+    public static final String PROPERTY_DOWN = "/base/%s/thing/property/down";
+
+    //鎺у埗鍝嶅簲
+    public static final String PROPERTY_DOWN_REPLY = "/base/%s/thing/property/down_reply";
+
+    //鐘舵�佷笂鎶�
+    public static final String PROPERTY_UP = "/base/%s/thing/property/up";
+
+    //鐘舵�佷笂鎶ュ搷搴�
+    public static final String PROPERTY_UP_REPLY = "/base/%s/thing/property/up_reply";
+
+    //璇诲彇鐘舵��
+    public static final String PROPERTY_READ = "/base/%s/thing/property/read";
+
+    //璇诲彇鐘舵�佸搷搴�
+    public static final String PROPERTY_READ_REPLY = "/base/%s/thing/property/read_reply";
+
+    //鏇存敼缃戝叧澶囨敞鍚�
+    public static final String GATEWAY_RENAME = "/user/%s/custom/gateway/edit";
+
+    //8.1鑾峰彇鍦烘櫙鍒楄〃
+    public static final String SCENE_LIST_GET = "/user/%s/custom/scene/list/get";
+
+    //8.2鑾峰彇鍦烘櫙
+    public static final String SCENE_GET = "/user/%s/custom/scene/get";
+
+    //8.3鎵ц鍦烘櫙
+    public static final String SCENE_CONTROL = "/user/%s/custom/scene/execute";
+
+    //8.4鍦烘櫙澧炲姞
+    public static final String CREATE_SCENE = "/user/%s/custom/scene/add";
+
+    //8.5鍦烘櫙缂栬緫
+    public static final String SCENE_EDIT = "/user/%s/custom/scene/edit";
+
+    //8.6鍦烘櫙鍒犻櫎
+    public static final String SCENE_DELETE = "/user/%s/custom/scene/delete";
+
+    //9.1 鎴块棿淇℃伅鍒楄〃鑾峰彇
+    public static final String ROOM_LIST_GET = "/user/%s/custom/room/list/get";
+
+    //9.2 鎴块棿淇℃伅娣诲姞锛堝閲忥級
+    public static final String ROOM_ADD = "/user/%s/custom/room/add";
+
+    //9.2.1 鎴块棿淇℃伅娣诲姞锛堝叏閲忥級
+    public static final String ROOM_COVER_ADD = "/user/%s/custom/room/cover/add";
+
+    //9.3 鎴块棿淇℃伅缂栬緫
+    public static final String ROOM_EDIT = "/user/%s/custom/room/edit";
+
+    //9.4 鎴块棿淇℃伅鍒犻櫎
+    public static final String ROOM_DELETE = "/user/%s/custom/room/delete";
+
+    //9.5 鎴块棿缁戝畾鍏崇郴鍒楄〃鑾峰彇
+    public static final String ROOM_BIND_LIST_GET = "/user/%s/custom/room/bind/list/get";
+
+    //9.6 鎴块棿缁戝畾鍏崇郴娣诲姞锛堝閲忥級
+    public static final String ROOM_BIND_ADD = "/user/%s/custom/room/bind/add";
+
+    //9.6.1 鎴块棿缁戝畾鍏崇郴娣诲姞(鍏ㄩ噺)
+    public static final String ROOM_BIND_COVER_ADD = "/user/%s/custom/room/bind/cover/add";
+
+    //9.7 鎴块棿缁戝畾鍏崇郴鍒犻櫎
+    public static final String ROOM_BIND_DELETE = "/user/%s/custom/room/bind/delete";
+
+    //10.1 鑷姩鍖栧垪琛ㄨ幏鍙�
+    public static final String LOGIC_LIST_GET = "/user/%s/custom/logic/list/get";
+
+    //10.2 鑷姩鍖栨墜鍔ㄦ墽琛�
+    public static final String LOGIC_execute = "/user/%s/custom/logic/execute";
+
+    //10.3 鑷姩鍖栬幏鍙� 鍒楄〃涓�娆℃�ц鍏�
+    public static final String LOGIC_GET = "/user/%s/custom/logic/get";
+
+    //10.4 鑷姩鍖栨柊澧�/缂栬緫
+    public static final String LOGIC_EDIT = "/user/%s/custom/logic/edit";
+
+    //10.5 鑷姩鍖栧垹闄�
+    public static final String LOGIC_DELETE = "/user/%s/custom/logic/delete";
+
+    //10.6 鑷姩鍖栧惎鐢ㄧ鐢�
+    public static final String LOGIC_ENABLE_EDIT = "/user/%s/custom/logic/enable/edit";
+
+    //10.7 鑷姩鍖栫姸鎬佷笂鎶� 鎵ц缁撴灉銆佹湰鍦板惎鐢ㄧ鐢ㄧ姸鎬佷笂鎶�
+    public static final String LOGIC_STATUS_UP = "/user/%s/custom/logic/status/up";
+
+    //11.1 瀹夐槻鍒楄〃鑾峰彇
+    public static final String SECURITY_LIST_GET = "/user/%s/custom/security/list/get";
+
+    //11.2 瀹夐槻鑾峰彇
+    public static final String SECURITY_GET = "/user/%s/custom/security/get";
+
+    //11.3 瀹夐槻鏂板/缂栬緫
+    public static final String SECURITY_EDIT = "/user/%s/custom/security/edit";
+
+    //11.4 瀹夐槻鍒犻櫎
+    public static final String SECURITY_DELETE = "/user/%s/custom/security/delete";
+
+    //11.5 甯冮槻璁剧疆
+    public static final String SECURITY_STATUS_SET = "/user/%s/custom/security/status/set";
+
+    //11.6 瀹夐槻闃插尯鐘舵�佽鍙�
+    public static final String SECURITY_STATUS_GET = "/user/%s/custom/security/status/get";
+
+    //11.7 瀹夐槻闃插尯鎶ヨ鐘舵�佷笂鎶�
+    public static final String SECURITY_STATUS_UP = "/user/%s/custom/security/status/up";
+
+    //11.8 瀹夐槻Bypass璇诲彇
+    public static final String SECURITY_BYPASS_GET = "/user/%s/custom/security/bypass/get";
+
+    //11.9 瀹夐槻Bypass璁剧疆
+    public static final String SECURITY_BYPASS_SET = "/user/%s/custom/security/bypass/set";
+
+    /**
+     * 璁惧杩炴帴TCP涔嬪墠骞挎挱
+     */
+    public static final String BROADCAST = "/user/all/custom/gateway/broadcast";
+
+    /**
+     * 涓荤綉鍏冲洖澶�
+     */
+    public static final String BROADCAST_REPLY = "/user/all/custom/gateway/broadcast_reply";
+
+    /**
+     * sid缁戝畾鎴块棿
+     */
+    public static final String SID_BIND_ROOM = "/user/%s/custom/room/bind/add";
+
+    /**
+     * sid瑙g粦鎴块棿
+     */
+    public static final String SID_DELETE_ROOM = "/user/%s/custom/room/bind/delete";
+
+    /**
+     * 蹇冭烦妫�娴�
+     */
+    public static final String HEARTBEAT = "/user/%s/custom/gateway/heartbeat";
+//    public static final String HEARTBEAT="/user/%s/custom/gateway1/qqheartbeat";
+    /**
+     * 蹇冭烦妫�娴嬪洖澶�
+     */
+    public static final String HEARTBEAT_REPLY = "/user/%s/custom/gateway/heartbeat_reply";
+
+    public static final String NATIVE_ZIGBEE_DOWN = "/user/%s/custom/native/zigbee/down";
+
+    public static final String NATIVE_ZIGBEE_DOWN_REPLY = "/user/%s/custom/native/zigbee/down_reply";
+
+    public static final String NATIVE_ZIGBEE_UP = "/user/%s/custom/native/zigbee/up";
+
+    public static final String NATIVE_ZIGBEE_DOWN_SLAVE = "/user/%s/custom/native/zigbee/down/slaveoid/%s";
+
+    public static final String NATIVE_ZIGBEE_DOWN_SLAVE_REPLY = "/user/%s/custom/native/zigbee/down_reply/slaveoid/%s";
+
+    public static final String NATIVE_ZIGBEE_UP_SLAVE = "/user/%s/custom/native/zigbee/up/slaveoid/%s";
+
+    public static final String NATIVE_LINK_DOWN = "/user/%s/custom/native/a/down";
+
+    public static final String NATIVE_LINK_DOWN_REPLY = "/user/%s/custom/native/a/down_reply";
+
+    public static final String NATIVE_LINK_UP = "/user/%s/custom/native/a/up";
+
+    public static final String NATIVE_LINK_DOWN_SLAVE = "/user/%s/custom/native/a/down/slaveoid/%s";
+
+    public static final String NATIVE_LINK_DOWN_SLAVE_REPLY = "/user/%s/custom/native/a/down_reply/slaveoid/%s";
+
+    public static final String NATIVE_LINK_UP_SLAVE = "/user/%s/custom/native/a/up/slaveoid/%s";
+
+    public static final String GATEWAY_LOCATION_EDIT = "/user/%s/custom/gateway/location/edit";
+
+    public static final String GATEWAY_LOCATION_GET = "/user/%s/custom/gateway/location/get";
+
+    public static final String NATIVE_MODBUS_DOWN = "/user/%s/custom/native/inverter/down";
+    public static final String NATIVE_MODBUS_UP = "/user/%s/custom/native/inverter/up";
+    public static final String NATIVE_MODBUS_DOWN_REPLY = "/user/%s/custom/native/inverter/down_reply";
+
+    public static final String NATIVE_MODBUS_DOWN_SLAVE = "/user/%s/custom/native/inverter/down/slaveoid/%s";
+    public static final String NATIVE_MODBUS_DOWN_SLAVE_REPLY = "/user/%s/custom/native/inverter/down_reply/slaveoid/%s";
 }
diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java
index 063f4ab..e49931a 100644
--- a/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java
+++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java
@@ -52,6 +52,8 @@
         return sHdlUniLogic;
     }
 
+    //region ******銆愬師鐢熴�戝拰銆愬皬绋嬪簭銆戦�氳鐨勬柟娉� onOtherUniMPEventReceive();openUniMP();sendUni();******
+
     /**
      * 鍘熺敓鎺ユ敹鍒皍ni鍙戞潵鐨勬暟鎹�
      *
@@ -99,10 +101,10 @@
                         HdlDeviceLogic.getInstance().searchGateway(new GatewayCallBack() {
                             @Override
                             public void onSuccess(List<GatewayBean> gatewayBeanList) {
-                                HDLUniMP.UniCallBackBaseBean callBackBaseBean = new HDLUniMP.UniCallBackBaseBean();
-                                callBackBaseBean.setType(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_LIST);
-                                callBackBaseBean.setData(gatewayBeanList);
-                                sendUni(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_MODEL, callBackBaseBean);
+//                                HDLUniMP.UniCallBackBaseBean callBackBaseBean = new HDLUniMP.UniCallBackBaseBean();
+//                                callBackBaseBean.setType(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_LIST);
+//                                callBackBaseBean.setData(gatewayBeanList);
+//                                uniCallbackData(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_MODEL, "", "", callBackBaseBean);
                             }
 
                             @Override
@@ -190,6 +192,10 @@
     public void checkRemoveOtherUniMPEventCallBack() {
         HDLUniMPSDKManager.getInstance().checkRemoveOtherUniMPEventCallBack(this);
     }
+    //endregion
+
+
+    //region ******涓�鑸柟娉�******
 
     /**
      * 缁勮uni鍙戦�佹暟鎹牸寮�
@@ -284,6 +290,7 @@
             return "";
         }
     }
+    //endregion
 
 }
 

--
Gitblit v1.8.0