| | |
| | | /// <summary> |
| | | /// 启动远程Mqtt |
| | | /// </summary> |
| | | public static async System.Threading.Tasks.Task StartCloudMqtt() |
| | | public static async Task StartCloudMqtt() |
| | | { |
| | | /* |
| | | try |
| | |
| | | /// <param name="message">附加数据包</param> |
| | | /// <param name="optionType">操作类型:0=网关控制;1=订阅网关数据;2=订阅网关上线数据</param> |
| | | /// <returns></returns> |
| | | public static async System.Threading.Tasks.Task MqttRemoteSend(byte[] message, int optionType = 0) |
| | | public static async Task MqttRemoteSend(byte[] message, int optionType = 0) |
| | | { |
| | | try |
| | | { |
| | |
| | | { |
| | | return; |
| | | } |
| | | var topicName = @"/" + MainPage.LoginUser.AccountString.ToLower() + @"/" + UserConfig.Instance.GatewayMAC.Replace(".", "") + @"/" + currentGuid; |
| | | var topicName = "";//@"/" + MainPage.LoginUser.AccountString.ToLower() + @"/" + currentGuid;//+ @"/" + UserConfig.Instance.CurrentRegion.MAC.Replace(".", "") |
| | | switch (optionType) |
| | | { |
| | | case 0: |