@@ -15,12 +15,12 @@ namespace HBLConsole.Communication | |||||
public class LebaiHelper | public class LebaiHelper | ||||
{ | { | ||||
public const int SENCE_自嗨 = 10014; | |||||
public const int SENCE_接冰淇淋1 = 10008; | |||||
public const int SENCE_接冰淇淋2 = 10009; | |||||
public const int SENCE_接冰淇淋3 = 10013; | |||||
public const int SENCE_咖啡 = 10002; | |||||
public const int SENCE_欢迎 = 10015; | |||||
public const int SENCE_自嗨 = 10008; | |||||
public const int SENCE_接冰淇淋1 = 10004; | |||||
public const int SENCE_接冰淇淋2 = 10003; | |||||
public const int SENCE_接冰淇淋3 = 10005; | |||||
public const int SENCE_咖啡 = 10006; | |||||
public const int SENCE_欢迎 = 10002; | |||||
private volatile static LebaiHelper _Instance; | private volatile static LebaiHelper _Instance; | ||||
public static LebaiHelper GetInstance => _Instance ?? (_Instance = new LebaiHelper()); | public static LebaiHelper GetInstance => _Instance ?? (_Instance = new LebaiHelper()); | ||||
@@ -53,7 +53,7 @@ namespace HBLConsole.MainConsole | |||||
{ | { | ||||
ThreadManage.GetInstance.Start(new Action(() => | ThreadManage.GetInstance.Start(new Action(() => | ||||
{ | { | ||||
SimpleFactory.GetInstance.DeviceInit();//设备初始化 | |||||
//SimpleFactory.GetInstance.DeviceInit();//设备初始化 | |||||
InternetInfo.ConfigInit();//从 consul 获取配置数据 | InternetInfo.ConfigInit();//从 consul 获取配置数据 | ||||
Topics.Clear(); | Topics.Clear(); | ||||
@@ -65,7 +65,7 @@ namespace HBLConsole.MainConsole | |||||
//MQTT 连接成功 | //MQTT 连接成功 | ||||
MqttHelper.GetInstance.ConnectOk = new Action(() => | MqttHelper.GetInstance.ConnectOk = new Action(() => | ||||
{ | { | ||||
//SimpleFactory.GetInstance.DeviceInit();//设备初始化 | |||||
SimpleFactory.GetInstance.DeviceInit();//设备初始化 | |||||
MqttHelper.GetInstance.MqttSubscriptionAsync(Topics.ToArray());//主题订阅 | MqttHelper.GetInstance.MqttSubscriptionAsync(Topics.ToArray());//主题订阅 | ||||
@@ -98,7 +98,6 @@ namespace HBLConsole.MainConsole | |||||
{ | { | ||||
ThreadManage.GetInstance.Start(new Action(() => | ThreadManage.GetInstance.Start(new Action(() => | ||||
{ | { | ||||
SimpleFactory.GetInstance.DeviceInit();//设备初始化 | |||||
InternetInfo.ConfigInit();//从 consul 获取配置数据 | InternetInfo.ConfigInit();//从 consul 获取配置数据 | ||||
Topics.Clear(); | Topics.Clear(); | ||||
@@ -108,6 +107,8 @@ namespace HBLConsole.MainConsole | |||||
//MQTT 连接成功 | //MQTT 连接成功 | ||||
MqttHelper.GetInstance.ConnectOk = new Action(() => | MqttHelper.GetInstance.ConnectOk = new Action(() => | ||||
{ | { | ||||
SimpleFactory.GetInstance.DeviceInit();//设备初始化 | |||||
MqttHelper.GetInstance.MqttSubscriptionAsync(Topics.ToArray());//主题订阅 | MqttHelper.GetInstance.MqttSubscriptionAsync(Topics.ToArray());//主题订阅 | ||||
IotReport.GetInstance.Init();//IOT 上报 | IotReport.GetInstance.Init();//IOT 上报 | ||||
@@ -4,14 +4,14 @@ | |||||
<!--通用配置--> | <!--通用配置--> | ||||
<!--测试服务 Consul 地址--> | <!--测试服务 Consul 地址--> | ||||
<add key="ConsulAddress" value="http://1.14.74.54" /> | |||||
<add key="ConsulAddress" value="http://1.14.74.54:9005" /> | |||||
<!--正式服务 Consul 地址--> | <!--正式服务 Consul 地址--> | ||||
<!--<add key="ConsulAddress" value="http://162.14.105.138:9005" />--> | <!--<add key="ConsulAddress" value="http://162.14.105.138:9005" />--> | ||||
<!--客户端ID--> | <!--客户端ID--> | ||||
<!--MorkD = 2,MorkS 且时且多 = 8,MorkS 珠海 = 9,冰淇淋 = 4,咖啡机 = 13--> | <!--MorkD = 2,MorkS 且时且多 = 8,MorkS 珠海 = 9,冰淇淋 = 4,咖啡机 = 13--> | ||||
<add key="ClientId" value="5"/> | |||||
<add key="ClientId" value="4"/> | |||||
<!--IOT大屏上报--> | <!--IOT大屏上报--> | ||||
<add key="ProductKey" value="grgpECHSL7q"/> | <add key="ProductKey" value="grgpECHSL7q"/> | ||||
<add key="DeviceName" value="test"/> | <add key="DeviceName" value="test"/> | ||||