wxr
2023-08-09 a7debf97f52b5f473c3316ecd06bf48f44b65406
HDL_ON/DAL/DriverLayer/Control.cs
@@ -261,6 +261,7 @@
        /// </summary>
        public void OpenTcpClent()
        {
            return;
            if (myTcpClient == null)
            {
                myTcpClient = new Control_TcpClient(reportIp);
@@ -535,7 +536,7 @@
                        var sendBytes = Ins.ConvertSendBodyData(CommunicationTopic.ct.ControlFunctionTopic, functionControlDataJson);
                        new Control_Udp().SendLocalHdlLinkData(sendBytes, functionControlDataObj.id, resend);
                        MainPage.Log($"本地通讯 发送HDL-Link数据:{functionControlDataJson}");
                            Ins.myTcpClient.SendMessage(sendBytes);
                            //Ins.myTcpClient.SendMessage(sendBytes);
                    }
                }
                //远程通讯
@@ -1011,7 +1012,7 @@
                if (receiveObj.Topic == CommunicationTopic.ct.HeartBeat + "_reply")
                {
                    Ins.myTcpClient.ClearHeartBeatLog();
                    //Ins.myTcpClient.ClearHeartBeatLog();
                    MainPage.Log("tcp心跳回复");
                    return null;
                }
@@ -1107,7 +1108,7 @@
                        Ins.IsLocalEncrypt = device.isLocalEncrypt;
                        //MainPage.Log("网关本地加密状态:" + device.local_encrypt.ToString());
                        //登录网关Tcp
                        OpenTcpClent();
                        //OpenTcpClent();
                    }
@@ -1271,7 +1272,7 @@
            //    return;
            //}
            var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<AlinkFunctionStatusObj>(revString);
            var temp = JsonConvert.DeserializeObject<AlinkFunctionStatusObj>(revString);
            if (temp != null)
            {
                Control_Udp.ReceiveRepeatManager(temp.id, usefulBytes);
@@ -1328,7 +1329,11 @@
                        {
                            localFunction.time_stamp = temp.time_stamp;
                            localFunction.SetAttrState(attr.key, attr.value);
                        }
                        if(localFunction.spk == SPK.AirSwitchP3)
                        {
                            localFunction.online = updateTemp.online;
                        }
                        //更新界面状态