|
|
@@ -68,6 +68,8 @@ namespace DataVAPI.UpAndDown |
|
|
|
ConsoleHelper.WriteSuccessLine($"阿里云【Transit】连接失败"); |
|
|
|
} |
|
|
|
Subscribe(IOTDevServer.HeartbeatSubTopic); |
|
|
|
Subscribe(IOTDevServer.BroadcastTopic); |
|
|
|
|
|
|
|
IOTDevServer.UNConnectMqtt += new Action<string>((o) => { ConsoleHelper.WriteSuccessLine(o); }); |
|
|
|
|
|
|
|
IOTDevServer.DevIOTAction += DevIOTActionHandler; |
|
|
@@ -305,6 +307,18 @@ namespace DataVAPI.UpAndDown |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else if (topic == IOTDevServer.BroadcastTopic)//广播主题 |
|
|
|
{ |
|
|
|
if (message.Contains("AlarmType")) |
|
|
|
{ |
|
|
|
alarmController.Create(Tools.JsonToObjectTools<AlarmTable>(message)); |
|
|
|
} |
|
|
|
else if (message.Contains("LogType")) |
|
|
|
{ |
|
|
|
logController.Create(Tools.JsonToObjectTools<LogTable>(message)); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |