|
|
@@ -53,7 +53,7 @@ namespace HBLConsole.MainConsole |
|
|
|
{ |
|
|
|
ThreadManage.GetInstance.Start(new Action(() => |
|
|
|
{ |
|
|
|
SimpleFactory.GetInstance.DeviceInit();//设备初始化 |
|
|
|
//SimpleFactory.GetInstance.DeviceInit();//设备初始化 |
|
|
|
|
|
|
|
InternetInfo.ConfigInit();//从 consul 获取配置数据 |
|
|
|
Topics.Clear(); |
|
|
@@ -65,7 +65,7 @@ namespace HBLConsole.MainConsole |
|
|
|
//MQTT 连接成功 |
|
|
|
MqttHelper.GetInstance.ConnectOk = new Action(() => |
|
|
|
{ |
|
|
|
//SimpleFactory.GetInstance.DeviceInit();//设备初始化 |
|
|
|
SimpleFactory.GetInstance.DeviceInit();//设备初始化 |
|
|
|
|
|
|
|
MqttHelper.GetInstance.MqttSubscriptionAsync(Topics.ToArray());//主题订阅 |
|
|
|
|
|
|
@@ -98,7 +98,6 @@ namespace HBLConsole.MainConsole |
|
|
|
{ |
|
|
|
ThreadManage.GetInstance.Start(new Action(() => |
|
|
|
{ |
|
|
|
SimpleFactory.GetInstance.DeviceInit();//设备初始化 |
|
|
|
|
|
|
|
InternetInfo.ConfigInit();//从 consul 获取配置数据 |
|
|
|
Topics.Clear(); |
|
|
@@ -108,6 +107,8 @@ namespace HBLConsole.MainConsole |
|
|
|
//MQTT 连接成功 |
|
|
|
MqttHelper.GetInstance.ConnectOk = new Action(() => |
|
|
|
{ |
|
|
|
SimpleFactory.GetInstance.DeviceInit();//设备初始化 |
|
|
|
|
|
|
|
MqttHelper.GetInstance.MqttSubscriptionAsync(Topics.ToArray());//主题订阅 |
|
|
|
|
|
|
|
IotReport.GetInstance.Init();//IOT 上报 |
|
|
|