Pārlūkot izejas kodu

localmqtt

样式分支
NXX pirms 2 gadiem
vecāks
revīzija
0d439f8247
1 mainītis faili ar 8 papildinājumiem un 3 dzēšanām
  1. +8
    -3
      BPASmartClient.Business/Plugin/LocalMqtt.cs

+ 8
- 3
BPASmartClient.Business/Plugin/LocalMqtt.cs Parādīt failu

@@ -15,13 +15,18 @@ namespace BPASmartClient.Business.Plugin
public static LocalMqtt GetInstance => _Instance ?? (_Instance = new LocalMqtt());
private LocalMqtt() { }

SendScreenDataModel MqttPush = new SendScreenDataModel();
/// <summary>
///
/// </summary>
SendScreenDataModel MqttPushs = new SendScreenDataModel();

MQTTProxy mQTTProxy = new MQTTProxy();

public void Init(ScreenDeviceType DeviceType)
{
Dictionary<string, string> MqttPushdata = new Dictionary<string, string>();
MqttPush.mqttDataDic.Add(DeviceType.ToString(), SetTopic(DeviceType, MqttPushdata));
MQTTProxy mQTTProxy = new MQTTProxy();
MqttPushs.mqttDataDic.Add(DeviceType.ToString(), SetTopic(DeviceType, MqttPushdata));
mQTTProxy.Connected = new Action(() =>
{
mQTTProxy.Subscrib(ScreenTOPIC.GetInstance.GetTopic(DeviceType)) ;


Notiek ielāde…
Atcelt
Saglabāt