1
wei
2021-06-09 cda2410f9c29f2fadc16e9de38ccae95b75a89dd
HDL_ON/DAL/DriverLayer/Control_Udp.cs
@@ -711,7 +711,7 @@
                                //4   运行模式    1 - 通风,2 - 加湿
                                byte airFreshMode = 1;
                                if (commandDictionary.ContainsKey(FunctionAttributeKey.Mode) == true
                                    && commandDictionary[FunctionAttributeKey.Mode] == "fan")
                                    && commandDictionary[FunctionAttributeKey.Mode] == "humidification")
                                {
                                    airFreshMode = 2;
                                }
@@ -984,7 +984,7 @@
            try
            {
                //MainPage.Log("发送数据:" + SendFlag);
                MainPage.Log("发送数据:" + SendFlag);
                UdpSocket._BusSocket.AsyncBeginSend(packet);
                packet.HaveSendCount--;
@@ -1107,11 +1107,22 @@
                var sendBytes = Control.Ins.ConvertSendBodyData(CommunicationTopic.SearchLoaclGateway, bodyString);
                //组播发送
                packet = new Packet(sendBytes, new System.Net.IPEndPoint(System.Net.IPAddress.Parse("239.0.168.188"), 8585));
                packet.HaveSendCount = 4;//ps:没有重发,后期有时间可以增加重发判断
                packet.HaveSendCount = 4;
                System.Threading.Thread thread = new System.Threading.Thread(new System.Threading.ParameterizedThreadStart(managerSendCount));
                thread.IsBackground = true;
                thread.Start(packet);
                //wait();不需要等待
                //hjSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
                //hjSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, true);
                //EndPoint ipep = new IPEndPoint(IPAddress.Parse(CsConst.myLocalIP), HDLUDP.UDPPort);
                //hjSocket.Bind(ipep);
            }
            catch (Exception ex)
            {