diff --git a/BPASmartClient.IoT/DataVClient.cs b/BPASmartClient.IoT/DataVClient.cs index d69186e5..e5e98d4e 100644 --- a/BPASmartClient.IoT/DataVClient.cs +++ b/BPASmartClient.IoT/DataVClient.cs @@ -140,7 +140,6 @@ namespace BPASmartClient.IoT MessageLog.GetInstance.Show($"客户端:【{ClientId}】,设备名称{DeviceDataV.deviceTable.devicename}阿里云连接成功"); } else MessageLog.GetInstance.ShowEx(message); - } /// @@ -171,17 +170,14 @@ namespace BPASmartClient.IoT /// private void DevIOTActionHandler(string deviceId, string topic, string message) { - //if (DeviceDataVs.ContainsKey() DeviceDataVs[deviceId].BroadcastTopic == topic && !string.IsNullOrEmpty(message))//广播主题消息,将广播消息发送到相应客户端 - //{ - // IOTCommandModel iOTCommand = Tools.JsonToObjectTools(message); - // if (iOTCommand.deviceName == DeviceDataVs[deviceId].deviceTable.devicename) - // ActionManage.GetInstance.Send("IotBroadcast", iOTCommand); - //} + if (DeviceDataV.BroadcastTopic == topic && !string.IsNullOrEmpty(message))//广播主题消息,将广播消息发送到相应客户端 + { + IOTCommandModel iOTCommand = Tools.JsonToObjectTools(message); + if (iOTCommand.deviceName == DeviceDataV.deviceTable.devicename) + ActionManage.GetInstance.Send("IotBroadcast", iOTCommand); + } } #endregion - - - } //命令实体类