wxr
2020-03-31 002a3f2e9d2f9579c01f88af12bd8a320003569f
HDL_ON/DAL/Net/MqttCommon.cs
@@ -2,14 +2,9 @@
using System;
using MQTTnet.Client;
using System.Threading.Tasks;
using Shared;
using System.Text;
using System.Security.Cryptography;
using System.IO;
using HDL_ON.DAL;
using HDL_ON.UI;
using MQTTnet;
using HDL_ON.DAL.Server;
namespace HDL_ON.DAL.Net
{
@@ -58,7 +53,7 @@
        /// <summary>
        /// 启动远程Mqtt
        /// </summary>
        public static async System.Threading.Tasks.Task StartCloudMqtt()
        public static async Task StartCloudMqtt()
        {
            /*
            try
@@ -338,7 +333,7 @@
        /// <param name="message">附加数据包</param>
        /// <param name="optionType">操作类型:0=网关控制;1=订阅网关数据;2=订阅网关上线数据</param>
        /// <returns></returns>
        public static async System.Threading.Tasks.Task MqttRemoteSend(byte[] message, int optionType = 0)
        public static async Task MqttRemoteSend(byte[] message, int optionType = 0)
        {
            try
            {
@@ -350,7 +345,7 @@
                {
                    return;
                }
                var topicName = @"/" + MainPage.LoginUser.AccountString.ToLower() + @"/" + UserConfig.Instance.GatewayMAC.Replace(".", "") + @"/" + currentGuid;
                var topicName = "";//@"/" + MainPage.LoginUser.AccountString.ToLower() + @"/" + currentGuid;//+ @"/" + UserConfig.Instance.CurrentRegion.MAC.Replace(".", "")
                switch (optionType)
                {
                    case 0: