From 653f2dbcad10e90f40ab478d5e95c5e1d92e484d Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期二, 01 十二月 2020 17:15:29 +0800
Subject: [PATCH] 20201201
---
HDL_ON/DAL/Mqtt/MqttClient.cs | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index c06c840..1682fc1 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -1,7 +1,6 @@
锘�/*
鏇存柊浜咵MQ杩炴帴鏂瑰紡
*/
-using System.Collections.Generic;
using System;
using MQTTnet.Client;
using System.Threading.Tasks;
@@ -9,8 +8,8 @@
using MQTTnet;
using System.Text;
using System.Security.Cryptography;
-using System.IO;
using HDL_ON.DriverLayer;
+using HDL_ON.Entity;
namespace HDL_ON.DAL.Mqtt
{
@@ -646,6 +645,18 @@
{
MqttInfoConfig.Current.mMqttInfo = mqttInfoRequestResult_Obj;
await MQTTConnectAsync();
+ //1.鍒ゆ柇鏄惁缁戝畾浜嗙綉鍏筹紝鑾峰彇缃戝叧杩滅▼杩炴帴鐨勫姞瀵咾EY
+ if (DB_ResidenceData.residenceData.CheckWhetherGatewayIsBound())
+ {
+ //2.鎵惧嚭鏄惁瀛樺湪鍖归厤褰撳墠浣忓畢鐨刴ac锛屽瓨鍦ㄥ啀杩涜杩滅▼銆�
+ MqttInfoConfig.Current.HomeGatewayInfo = DB_ResidenceData.residenceData.HomeGateway;
+ //3.寮�濮嬭繛鎺�
+ await MQTTConnectAsync();
+ }
+ else
+ {
+ Utlis.WriteLine("============>杩樻病缁戝畾缃戝叧");
+ }
}
}
--
Gitblit v1.8.0