|
|
@@ -61,23 +61,22 @@ namespace DataVAPI.UpAndDown |
|
|
|
//MQTT 数据接收处理 |
|
|
|
ConsoleHelper.WriteInfoLine("尝试连接阿里云."); |
|
|
|
if (IOTDevServer.GetInstance().CreateLinks(DataBus.ProductKey, DataBus.DeviceName, DataBus.DeviceSecret)) |
|
|
|
{ |
|
|
|
FistBOOL = true; |
|
|
|
{ |
|
|
|
//属性状态变xin |
|
|
|
//Subscribe(IOTDevServer.TargetStatusSubTopic); |
|
|
|
|
|
|
|
//订阅上下线 |
|
|
|
Subscribe(IOTDevServer.HeartbeatSubTopic); |
|
|
|
|
|
|
|
//订阅主播消息 |
|
|
|
Subscribe(IOTDevServer.BroadcastTopic); |
|
|
|
ConsoleHelper.WriteSuccessLine($"阿里云【Transit】连接成功"); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
FistBOOL = false; |
|
|
|
ConsoleHelper.WriteSuccessLine($"阿里云【Transit】连接失败"); |
|
|
|
} |
|
|
|
//属性状态变xin |
|
|
|
//Subscribe(IOTDevServer.TargetStatusSubTopic); |
|
|
|
|
|
|
|
//订阅上下线 |
|
|
|
Subscribe(IOTDevServer.HeartbeatSubTopic); |
|
|
|
|
|
|
|
//订阅主播消息 |
|
|
|
Subscribe(IOTDevServer.BroadcastTopic); |
|
|
|
|
|
|
|
IOTDevServer.UNConnectMqtt += new Action<string>((o) => { ConsoleHelper.WriteSuccessLine(o); }); |
|
|
|
|
|
|
|