| | |
| | | } |
| | | |
| | | MainPage.Log($"局域网信息: {receiveObj.Topic}"); |
| | | |
| | | MainPage.Log($"内容: {res[1]}"); |
| | | |
| | | //验证有效数据长度 |
| | | //if (res[1].Length != receiveObj.Length) |
| | |
| | | //} |
| | | receiveObj.BodyDataString = res[1]; |
| | | |
| | | var bodyJObj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResponsePack>(res[1]); |
| | | if (bodyJObj == null) |
| | | { |
| | | return receiveObj; |
| | | } |
| | | if (receiveObj.Topic == CommunicationTopic.SearchLoaclGatewayReply) |
| | | { |
| | | var bodyJObj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResponsePack>(res[1]); |
| | | if (bodyJObj == null) |
| | | { |
| | | return receiveObj; |
| | | } |
| | | var device = Newtonsoft.Json.JsonConvert.DeserializeObject<DeviceModule>(bodyJObj.objects.ToString()); |
| | | if (device.device_mac == DB_ResidenceData.Instance.residenceGatewayMAC) |
| | | { |
| | |
| | | //TODO 暂时不传正确的数据上去,如果后面要优化前面这些代码 |
| | | UpdataFunctionStatus(receiveObj.BodyDataString, null); |
| | | } |
| | | else |
| | | { |
| | | //一些特殊的主题处理(为了执行速度,尽可能的别加耗时的操作) |
| | | Stan.HdlCloudReceiveLogic.Current.CloudOverallMsgReceive(receiveObj.Topic, receiveObj.BodyDataString); |
| | | } |
| | | } |
| | | return receiveObj; |
| | | } |