黄学彪
2019-11-25 5727cf0b9b54da0a191dd1e23cb5abf21320fbff
ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
@@ -3456,7 +3456,7 @@
        /// <summary>
        /// 远程发送数据格式
        /// </summary>
        async System.Threading.Tasks.Task SendRemoteMsg(string topicName, byte[] message, MQTTnet.Core.Protocol.MqttQualityOfServiceLevel qosLevel = MQTTnet.Core.Protocol.MqttQualityOfServiceLevel.ExactlyOnce, bool retain = false)
        async System.Threading.Tasks.Task SendRemoteMsg(string topicName, byte[] message,  bool retain = false)
        {
            if (this.getGatewayBaseInfo?.gwID == null || !GateWayBaseInfomations.ContainsKey(this.getGatewayBaseInfo?.gwID))
            {
@@ -3498,7 +3498,7 @@
        /// <param name="message"></param>
        /// <param name="qosLevel"></param>
        /// <param name="retain"></param>
        public async System.Threading.Tasks.Task Send(string topic, byte[] message, MQTTnet.Core.Protocol.MqttQualityOfServiceLevel qosLevel = MQTTnet.Core.Protocol.MqttQualityOfServiceLevel.ExactlyOnce, bool retain = false)
        public async System.Threading.Tasks.Task Send(string topic, byte[] message, bool retain = false)
        {
            try
            {
@@ -3509,7 +3509,7 @@
                if (IsRemote)
                {
                    await SendRemoteMsg(topic, message, qosLevel, retain);
                    await SendRemoteMsg(topic, message, retain);
                    DebugPrintLog($"远程——发送到网关的主题:{topic}_发送到网关的数据:{System.Text.Encoding.UTF8.GetString(message)}_当前网关{CurrentGateWayId}");//{System.DateTime.Now.ToString()}");// DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fff")
                }
                else
@@ -3548,13 +3548,13 @@
        /// <param name="message"></param>
        /// <param name="qosLevel"></param>
        /// <param name="retain"></param>
        public async System.Threading.Tasks.Task Send(string topic, string message, MQTTnet.Core.Protocol.MqttQualityOfServiceLevel qosLevel = MQTTnet.Core.Protocol.MqttQualityOfServiceLevel.ExactlyOnce, bool retain = false)
        public async System.Threading.Tasks.Task Send(string topic, string message,  bool retain = false)
        {
            if (string.IsNullOrEmpty(message))
            {
                return;
            }
            await Send(topic, System.Text.Encoding.UTF8.GetBytes(message), qosLevel, retain);
            await Send(topic, System.Text.Encoding.UTF8.GetBytes(message), retain);
        }