From ed3bfb7462d44747230437717e8673a5192f833f Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期一, 30 十一月 2020 20:34:51 +0800 Subject: [PATCH] 2020-11-30-2 --- HDL_ON/DriverLayer/Packet.cs | 26 +++----------------------- 1 files changed, 3 insertions(+), 23 deletions(-) diff --git a/HDL_ON/DAL/DriverLayer/Packet.cs b/HDL_ON/DriverLayer/Packet.cs similarity index 96% rename from HDL_ON/DAL/DriverLayer/Packet.cs rename to HDL_ON/DriverLayer/Packet.cs index 8e7e8ca..d957a86 100644 --- a/HDL_ON/DAL/DriverLayer/Packet.cs +++ b/HDL_ON/DriverLayer/Packet.cs @@ -8,7 +8,7 @@ namespace HDL_ON { /// <summary> - /// bus鏁版嵁鍖� + /// bus鎺у埗鏁版嵁鍖� /// </summary> public class Packet { @@ -56,7 +56,7 @@ try { //濡傛灉褰撳墠閫氳鏂瑰紡涓嶆槸鏈湴bus udp鍒欓��鍑� - if(DriverLayer.Control.ins.communicationMode != DriverLayer.CommunicationMode.local_BusUdp) + if(DriverLayer.Control.ins.communicationMode == DriverLayer.CommunicationMode.local_BusUdp) { return; } @@ -571,13 +571,6 @@ } } break; - case Command.ReadGatewayACK: - var mac = ByteToHex16(receiveBytes[5]) + "." + ByteToHex16(receiveBytes[6]) + "." + ByteToHex16(receiveBytes[7]) + "." + ByteToHex16(receiveBytes[8]) + "." + ByteToHex16(receiveBytes[9]) + "." + ByteToHex16(receiveBytes[10]) + "." + ByteToHex16(receiveBytes[11]) + "." + ByteToHex16(receiveBytes[12]); - if (DB_ResidenceData.residenceData.residenceGatewayMAC == mac) - { - DriverLayer.Control.ins.gatewayOnline = true; - } - break; } } catch (Exception ex) @@ -585,20 +578,7 @@ MainPage.Log($"Bus Rev Erorr : {ex.Message}"); } } - /// <summary> - /// byte杞�16杩涘埗瀛楃涓� - /// </summary> - /// <param name="b"></param> - /// <returns></returns> - string ByteToHex16(byte b) - { - string s = Convert.ToString(b, 16).ToUpper(); - if (s.Length <= 1) - { - return "0" + s; - } - return s; - } + /// <summary> /// 澶勭悊鎺ユ敹鍥炴潵鐨勬暟鎹� -- Gitblit v1.8.0