Browse Source

更改场景

master
itachilee 2 years ago
parent
commit
3df5208b5a
3 changed files with 12 additions and 11 deletions
  1. +6
    -6
      HBLConsole.Communication/LebaiHelper.cs
  2. +4
    -3
      HBLConsole.MainConsole/Main.cs
  3. +2
    -2
      HBLConsole/App.config

+ 6
- 6
HBLConsole.Communication/LebaiHelper.cs View File

@@ -15,12 +15,12 @@ namespace HBLConsole.Communication
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;
public static LebaiHelper GetInstance => _Instance ?? (_Instance = new LebaiHelper());


+ 4
- 3
HBLConsole.MainConsole/Main.cs View File

@@ -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 上报


+ 2
- 2
HBLConsole/App.config View File

@@ -4,14 +4,14 @@
<!--通用配置-->

<!--测试服务 Consul 地址-->
<add key="ConsulAddress" value="http://1.14.74.54" />
<add key="ConsulAddress" value="http://1.14.74.54:9005" />

<!--正式服务 Consul 地址-->
<!--<add key="ConsulAddress" value="http://162.14.105.138:9005" />-->

<!--客户端ID-->
<!--MorkD = 2,MorkS 且时且多 = 8,MorkS 珠海 = 9,冰淇淋 = 4,咖啡机 = 13-->
<add key="ClientId" value="5"/>
<add key="ClientId" value="4"/>
<!--IOT大屏上报-->
<add key="ProductKey" value="grgpECHSL7q"/>
<add key="DeviceName" value="test"/>


Loading…
Cancel
Save