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