Browse Source

更新告警

master
fyf 2 years ago
parent
commit
e5b470660b
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      DataVAPI/UpAndDown/ProcessServer.cs

+ 14
- 0
DataVAPI/UpAndDown/ProcessServer.cs View File

@@ -68,6 +68,8 @@ namespace DataVAPI.UpAndDown
ConsoleHelper.WriteSuccessLine($"阿里云【Transit】连接失败"); ConsoleHelper.WriteSuccessLine($"阿里云【Transit】连接失败");
} }
Subscribe(IOTDevServer.HeartbeatSubTopic); Subscribe(IOTDevServer.HeartbeatSubTopic);
Subscribe(IOTDevServer.BroadcastTopic);

IOTDevServer.UNConnectMqtt += new Action<string>((o) => { ConsoleHelper.WriteSuccessLine(o); }); IOTDevServer.UNConnectMqtt += new Action<string>((o) => { ConsoleHelper.WriteSuccessLine(o); });


IOTDevServer.DevIOTAction += DevIOTActionHandler; 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));

}
}
} }
} }
} }

Loading…
Cancel
Save