|
|
@@ -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)) ; |
|
|
|