From 2e7e5f9af5b32cfe1fc3c6ba40bf7eb984bbd0a4 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 11 五月 2020 17:52:06 +0800
Subject: [PATCH] ???????

---
 ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs | 1394 +++++++++++++--------------------------------------------
 1 files changed, 322 insertions(+), 1,072 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
index 2eb6f8a..a572e70 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
@@ -8,36 +8,165 @@
     [System.Serializable]
     public class CommonDevice
     {
+        #region 闇�瑕佷繚瀛樼殑鍙橀噺
+
+        /// <summary>
+        /// 鏄惁鏄嚜瀹氫箟鍥剧墖
+        /// </summary>
+        public bool IsCustomizeImage = false;
+        /// <summary>
+        /// 璁惧鍥剧墖
+        /// </summary>
+        public string IconPath = string.Empty;
+        /// <summary>
+        /// 璁惧鍥剧墖--鍦ㄧ嚎鎴栬�呴�変腑鐘舵��
+        /// </summary>
+        /// <value>The online icon path.</value>
+        [Newtonsoft.Json.JsonIgnore]
+        public string OnlineIconPath
+        {
+            get
+            {
+                if (string.IsNullOrEmpty(IconPath))
+                {
+                    return string.Empty;
+                }
+                var pathArr = IconPath.Split('.');
+                if (pathArr == null || string.IsNullOrEmpty(pathArr[0]))
+                {
+                    return string.Empty;
+                }
+                return $"{pathArr[0]}Selected.png";
+            }
+        }
+        /// <summary>
+        /// 褰撳墠缃戝叧鐨処D
+        /// </summary>
+        public string CurrentGateWayId;
+        /// <summary>
+        /// 褰撳墠璁惧绫诲瀷
+        /// </summary>
+        [Newtonsoft.Json.JsonIgnore]
+        public DeviceType Type = DeviceType.UnKown;
+        /// <summary>
+        /// 璁惧鐨勫姛鑳界被鍨�(姝ょ被鍨嬬洰鍓嶅彧閽堝缁х數鍣ㄥ洖璺湁鏁�,榛樿鏈寚瀹�)
+        /// </summary>
+        public DeviceFunctionType DfunctionType = DeviceFunctionType.A鏈畾涔�;
+        /// <summary>
+        /// MAC鍦板潃
+        /// </summary>
+        public string DeviceAddr;
+        /// <summary>
+        /// 璁惧绔彛鍙�
+        /// </summary>
+        public int DeviceEpoint;
+        /// <summary>
+        /// 璁惧id
+        /// <para>258:color dimmable light,璋冨叧鐏� </para>
+        /// <para>10:Door lock,闂ㄩ攣</para>
+        /// <para>514:Window covering device,绐楀笜</para>
+        /// <para>515:Window covering controller锛岀獥甯樻帶鍒跺櫒</para>
+        /// <para>769:Thermostat,鎭掓俯闈㈡澘/绌鸿皟</para>
+        /// <para>770:Temperature Sensor,娓╁害浼犳劅鍣�</para>
+        /// <para>775:Temperature Sensor,婀垮害浼犳劅鍣�</para>
+        /// <para>262:Light sensor,鍏夌収浼犳劅鍣�</para>
+        /// <para>1026:sensor,浼犳劅鍣紝鍏蜂綋绫诲瀷鐨勪紶鎰熷櫒DeviceType鏉ュ尯鍒�</para>
+        /// </summary>
+        public int DeviceID;
+        /// <summary>
+        /// 璇ュ瓧娈典富瑕侀拡瀵笽AS瀹夐槻璁惧璁剧珛銆傛墍鏈塈AS瀹夐槻璁惧鍏辩敤涓�涓狣eviceID涓�1026銆傛墍浠ヨ鍖哄垎瀛愯澶囩被鍨嬶紝闇�瑕佽瀛楁銆�
+        /// 鐬棿鏁版嵁涓婃姤鐨勪紶鎰熷櫒 (MomentStatus=1    TriggerZoneStatus>=1锛滄姤璀︼紴)
+        /// <para>13:Motion sensor (杩愬姩浼犳劅鍣級</para>
+        /// <para>40 Fire sensor 鐑熼浘浼犳劅鍣�</para>
+        /// <para>42 Water sensor 姘翠镜浼犳劅鍣�</para>
+        /// <para>43 Carbon Monoxide (CO) 鐕冩皵浼犳劅鍣�</para>
+        /// <para>44 Personal emergency device 绱ф�ユ寜閽�</para>
+        /// <para>277 Key fob 閽ュ寵鎵�</para>
+        /// <para>鎸佺画鏁版嵁涓婃姤(MomentStatus=0   TriggerZoneStatus>=1锛滄姤璀︼紴  TriggerZoneStatus=0锛滃彇娑堟姤璀︼紴)</para>
+        /// <para>21: Door/Window 闂ㄧ獥浼犳劅鍣紙鏈�21鍜�22锛岃繖閲屾病鏈夊啓閿欙級</para>
+        /// <para>22:Door/Window 闂ㄧ獥浼犳劅鍣紙鏈�21鍜�22锛岃繖閲屾病鏈夊啓閿�</para>
+        /// </summary>
+        public int IasDeviceType;
+        /// <summary>
+        /// 璁惧鍚嶇О,浠ヨ澶囩殑MAC鍛藉悕
+        /// </summary>
+        public string DeviceName = "UnKown";
+        /// <summary>
+        /// 璁惧绔偣鍚嶇О锛屼互璁惧绔偣鍚嶇О鍛藉悕
+        /// </summary>
+        public string DeviceEpointName = "UnKown";
+        /// <summary>
+        /// 鐢ㄤ簬鍒ゆ柇璁惧鐨剒igbee鍗忚鐗堟湰銆�
+        ///<para>49246锛歓LL1.0鏍囧噯璁惧銆�</para>
+        ///<para>260锛� ZHA1.2鏍囧噯璁惧銆� Z3.0鏍囧噯璁惧銆�</para>
+        ///<para>41440锛歓GP3.0鏍囧噯璁惧銆�</para>
+        ///<para>265锛歓SE1.4鏍囧噯璁惧銆�</para>
+        /// </summary>
+        [Newtonsoft.Json.JsonIgnore]
+        public int Profile;
+        /// <summary>
+        /// 0锛氳澶囦笉鍦ㄧ嚎
+        /// <para>1锛氳澶囧湪绾�</para>
+        /// </summary>
+        public int IsOnline;
+        /// <summary>
+        /// 褰撳墠杩愯绋嬪簭鐗堟湰淇℃伅銆� 鏈�澶�64瀛楄妭
+        /// </summary>
+        public int ImgVersion;
+        /// <summary>
+        /// 纭欢鐗堟湰
+        /// </summary>
+        public int HwVersion;
+        /// <summary>
+        /// 褰撳墠闀滃儚绫诲瀷id
+        /// </summary>
+        public int ImgTypeId;
+        /// <summary>
+        /// 椹卞姩浠g爜銆備负0鏃讹紝琛ㄧずzigbee鍗忚皟鍣ㄨ澶囥�傚叾浠栧�艰〃绀轰负铏氭嫙椹卞姩璁惧
+        /// </summary>
+        public int DriveCode;
+        /// <summary>
+        /// 鐢熶骇鍟嗗悕瀛�
+        /// </summary>
+        public string ManufacturerName = string.Empty;
+        /// <summary>
+        /// 妯″潡ID锛堣繖涓笢瑗夸篃鍙�愬瀷鍙风爜銆戯級
+        /// </summary>
+        public string ModelIdentifier = string.Empty;
+        /// <summary>
+        /// 鐢熶骇鏃ユ湡
+        /// </summary>
+        public string ProductionDate = string.Empty;
+        /// <summary>
+        /// 鐢垫簮
+        /// </summary>
+        public int PowerSource = -1;
+        /// <summary>
+        /// 搴忓垪鍙�
+        /// </summary>
+        public string SerialNumber = string.Empty;
+        /// <summary>
+        /// 杈撳叆绨囧垪琛�
+        /// </summary>
+        public List<InClusterObj> InClusterList = new List<InClusterObj>();
+        /// <summary>
+        /// 杈撳嚭绨囧垪琛�
+        /// </summary>
+        public List<OutClusterObj> OutClusterList = new List<OutClusterObj>();
+
         [Newtonsoft.Json.JsonIgnore]
         public DateTime LastDateTime = DateTime.MinValue;
-        /// <summary>
-        /// 鏄惁宸茬粡璇诲彇浜嗚澶囩姸鎬�(姝ゅ睘鎬ф槸缁欎富椤典娇鐢ㄧ殑)
+        /// <summary>
+        /// 鏄惁宸茬粡璇诲彇浜嗚澶囩姸鎬�(姝ゅ睘鎬ф槸缁欎富椤典娇鐢ㄧ殑)
         /// </summary>
         [Newtonsoft.Json.JsonIgnore]
         public bool HadReadDeviceStatu = false;
 
         /// <summary>
-        /// 璋冭瘯鏃舵墦寮�鎵撳嵃淇℃伅锛宼rue:鎵撳嵃锛宖alse:涓嶆墦鍗�
-        /// </summary>
-        /// <param name="msg">Message.</param>
-        /// <param name="flage">If set to <c>true</c> flage.</param>
-        public static void DebugPrintLog(string msg, bool flage = true)
-        {
-#if DEBUG
-            if (flage == true)
-            {
-                if (msg.Contains("DeviceStatusReport") == false)
-                {
-                    System.Console.WriteLine(msg + "  " + System.DateTime.Now.ToLongTimeString() + " " + System.DateTime.Now.Millisecond);
-                }
-            }
-#endif
-        }
-
-        /// <summary>
         /// 绛夊緟浠庣綉鍏虫帴鏀舵暟鎹殑鏃堕棿
         /// </summary>
         /// <value>The wait receive data time.</value>
+        [Newtonsoft.Json.JsonIgnore]
         public virtual int WaitReceiveDataTime
         {
             get
@@ -50,16 +179,6 @@
                 {
                     return 3000;
                 }
-            }
-        }
-
-
-        [Newtonsoft.Json.JsonIgnore]
-        public bool IsValid
-        {
-            get
-            {
-                return (DateTime.Now - LastDateTime).TotalSeconds < 10;
             }
         }
 
@@ -103,6 +222,82 @@
             }
         }
 
+        #endregion
+
+        #region 璁惧淇濆瓨鍙婄敓鎴�
+
+        /// <summary>
+        /// 鐢辫澶囧瓧绗︿覆姣旂壒鎭㈠璁惧瀵硅薄
+        /// </summary>
+        /// <param name="strDeviceType">璁惧DeviceType鐨勫瓧绗︿覆绫诲瀷</param>
+        /// <param name="strDeviceByte">璁惧Json鏂囦欢杞负姣旂壒鍚庡啀杞负鐨勫瓧绗︿覆</param>
+        /// <returns></returns>
+        public static CommonDevice CommonDeviceByByteString(string strDeviceType, string strDeviceByte)
+        {
+            CommonDevice device = null;
+            if (strDeviceType == ZigBee.Device.DeviceType.DimmableLight.ToString())
+            {
+                device = Newtonsoft.Json.JsonConvert.DeserializeObject<DimmableLight>(strDeviceByte);
+            }
+            else if (strDeviceType == ZigBee.Device.DeviceType.OnOffOutput.ToString())
+            {
+                device = Newtonsoft.Json.JsonConvert.DeserializeObject<ToggleLight>(strDeviceByte);
+            }
+            else if (strDeviceType == ZigBee.Device.DeviceType.WindowCoveringDevice.ToString())
+            {
+                device = Newtonsoft.Json.JsonConvert.DeserializeObject<Rollershade>(strDeviceByte);
+            }
+            else if (strDeviceType == ZigBee.Device.DeviceType.OnOffSwitch.ToString())
+            {
+                device = Newtonsoft.Json.JsonConvert.DeserializeObject<Panel>(strDeviceByte);
+            }
+            else if (strDeviceType == ZigBee.Device.DeviceType.IASZone.ToString())
+            {
+                device = Newtonsoft.Json.JsonConvert.DeserializeObject<IASZone>(strDeviceByte);
+            }
+            else if (strDeviceType == ZigBee.Device.DeviceType.OtaDevice.ToString() || strDeviceType == ZigBee.Device.DeviceType.OtaPanelDevice.ToString())
+            {
+                device = Newtonsoft.Json.JsonConvert.DeserializeObject<OTADevice>(strDeviceByte);
+            }
+            else if (strDeviceType == ZigBee.Device.DeviceType.AirSwitch.ToString())
+            {
+                device = Newtonsoft.Json.JsonConvert.DeserializeObject<AirSwitch>(strDeviceByte);
+            }
+            else if (strDeviceType == ZigBee.Device.DeviceType.Repeater.ToString())
+            {
+                device = Newtonsoft.Json.JsonConvert.DeserializeObject<Repeater>(strDeviceByte);
+            }
+            else if (strDeviceType == ZigBee.Device.DeviceType.Thermostat.ToString())
+            {
+                device = Newtonsoft.Json.JsonConvert.DeserializeObject<AC>(strDeviceByte);
+            }
+            else if (strDeviceType == ZigBee.Device.DeviceType.Transverter.ToString())
+            {
+                device = Newtonsoft.Json.JsonConvert.DeserializeObject<Transverter>(strDeviceByte);
+            }
+            else if (strDeviceType == ZigBee.Device.DeviceType.DoorLock.ToString())
+            {
+                device = Newtonsoft.Json.JsonConvert.DeserializeObject<DoorLock>(strDeviceByte);
+            }
+            else if (strDeviceType == ZigBee.Device.DeviceType.TemperatureSensor.ToString())
+            {
+                device = Newtonsoft.Json.JsonConvert.DeserializeObject<TemperatureSensor>(strDeviceByte);
+            }
+            else if (strDeviceType == ZigBee.Device.DeviceType.FreshAirHumiditySensor.ToString())
+            {
+                device = Newtonsoft.Json.JsonConvert.DeserializeObject<HumiditySensor>(strDeviceByte);
+            }
+            else if (strDeviceType == ZigBee.Device.DeviceType.FreshAir.ToString())
+            {
+                device = Newtonsoft.Json.JsonConvert.DeserializeObject<FreshAir>(strDeviceByte);
+            }
+            else { return null; }
+            //鑳藉皯瀛樹竴涓彉閲忓氨灏戝瓨涓�涓�
+            device.Type = (DeviceType)device.DeviceID;
+
+            return device;
+        }
+
         /// <summary>
         /// 鐢辫澶囪矾寰勬仮澶嶈澶囧璞�
         /// </summary>
@@ -116,77 +311,6 @@
                 return null;
             }
             return CommonDeviceByByteString(v[1], System.Text.Encoding.UTF8.GetString(Shared.Common.Global.ReadFileByHomeId(deviceFilePath)));
-        }
-
-        /// <summary>
-        /// 鐢辫澶囧瓧绗︿覆姣旂壒鎭㈠璁惧瀵硅薄
-        /// </summary>
-        /// <param name="strDeviceType">璁惧DeviceType鐨勫瓧绗︿覆绫诲瀷</param>
-        /// <param name="strDeviceByte">璁惧Json鏂囦欢杞负姣旂壒鍚庡啀杞负鐨勫瓧绗︿覆</param>
-        /// <returns></returns>
-        public static CommonDevice CommonDeviceByByteString(string strDeviceType, string strDeviceByte)
-        {
-            if (strDeviceType == ZigBee.Device.DeviceType.DimmableLight.ToString())
-            {
-                return Newtonsoft.Json.JsonConvert.DeserializeObject<DimmableLight>(strDeviceByte);
-            }
-            else if (strDeviceType == ZigBee.Device.DeviceType.OnOffOutput.ToString())
-            {
-                return Newtonsoft.Json.JsonConvert.DeserializeObject<ToggleLight>(strDeviceByte);
-            }
-            else if (strDeviceType == ZigBee.Device.DeviceType.WindowCoveringDevice.ToString())
-            {
-                return Newtonsoft.Json.JsonConvert.DeserializeObject<Rollershade>(strDeviceByte);
-            }
-            else if (strDeviceType == ZigBee.Device.DeviceType.OnOffSwitch.ToString())
-            {
-                return Newtonsoft.Json.JsonConvert.DeserializeObject<Panel>(strDeviceByte);
-            }
-            else if (strDeviceType == ZigBee.Device.DeviceType.IASZone.ToString())
-            {
-                return Newtonsoft.Json.JsonConvert.DeserializeObject<IASZone>(strDeviceByte);
-            }
-            else if (strDeviceType == ZigBee.Device.DeviceType.OtaDevice.ToString() || strDeviceType == ZigBee.Device.DeviceType.OtaPanelDevice.ToString())
-            {
-                return Newtonsoft.Json.JsonConvert.DeserializeObject<OTADevice>(strDeviceByte);
-            }
-            else if (strDeviceType == ZigBee.Device.DeviceType.AirSwitch.ToString())
-            {
-                return Newtonsoft.Json.JsonConvert.DeserializeObject<AirSwitch>(strDeviceByte);
-            }
-            else if (strDeviceType == ZigBee.Device.DeviceType.Repeater.ToString())
-            {
-                return Newtonsoft.Json.JsonConvert.DeserializeObject<Repeater>(strDeviceByte);
-            }
-            else if (strDeviceType == ZigBee.Device.DeviceType.Thermostat.ToString())
-            {
-                return Newtonsoft.Json.JsonConvert.DeserializeObject<AC>(strDeviceByte);
-            }
-            else if (strDeviceType == ZigBee.Device.DeviceType.Transverter.ToString())
-            {
-                return Newtonsoft.Json.JsonConvert.DeserializeObject<Transverter>(strDeviceByte);
-            }
-            else if (strDeviceType == ZigBee.Device.DeviceType.DoorLock.ToString())
-            {
-                return Newtonsoft.Json.JsonConvert.DeserializeObject<DoorLock>(strDeviceByte);
-            }
-            else if (strDeviceType == ZigBee.Device.DeviceType.TemperatureSensor.ToString())
-            {
-                return Newtonsoft.Json.JsonConvert.DeserializeObject<TemperatureSensor>(strDeviceByte);
-            }
-            else if (strDeviceType == ZigBee.Device.DeviceType.FreshAirHumiditySensor.ToString())
-            {
-                return Newtonsoft.Json.JsonConvert.DeserializeObject<HumiditySensor>(strDeviceByte);
-            }
-            else if (strDeviceType == ZigBee.Device.DeviceType.FreshAir.ToString())
-            {
-                return Newtonsoft.Json.JsonConvert.DeserializeObject<FreshAir>(strDeviceByte);
-            }
-            else if (strDeviceType == ZigBee.Device.DeviceType.PMSensor.ToString())
-            {
-                return Newtonsoft.Json.JsonConvert.DeserializeObject<PMSensor>(strDeviceByte);
-            }
-            return null;
         }
 
         /// <summary>
@@ -252,11 +376,6 @@
                     //鏂伴 
                     IconPath = "Device/FreshAirEpoint.png";
                 }
-                else if (this.Type == DeviceType.FreshAir)
-                {
-                    //PM2.5绌烘皵璐ㄩ噺浼犳劅鍣� 
-                    IconPath = "Device/FreshAirEpoint.png";
-                }
                 else if (this.Type == DeviceType.FreshAirHumiditySensor)
                 {
                     //婀垮害浼犳劅鍣�
@@ -287,192 +406,9 @@
             }
         }
 
-        /// <summary>
-        /// 鏄惁鏄嚜瀹氫箟鍥剧墖
-        /// </summary>
-        public bool IsCustomizeImage = false;
-        /// <summary>
-        /// 璁惧鍥剧墖
-        /// </summary>
-        public string IconPath = string.Empty;
-        /// <summary>
-        /// 璁惧鍥剧墖--鍦ㄧ嚎鎴栬�呴�変腑鐘舵��
-        /// </summary>
-        /// <value>The online icon path.</value>
-        [Newtonsoft.Json.JsonIgnore]
-        public string OnlineIconPath
-        {
-            get
-            {
-                if (string.IsNullOrEmpty(IconPath))
-                {
-                    return string.Empty;
-                }
-                var pathArr = IconPath.Split('.');
-                if (pathArr == null || string.IsNullOrEmpty(pathArr[0]))
-                {
-                    return string.Empty;
-                }
-                return $"{pathArr[0]}Selected.png";
-            }
-        }
+        #endregion
 
-        /// <summary>
-        /// 褰撳墠缃戝叧鐨処D
-        /// </summary>
-        public string CurrentGateWayId;
-        /// <summary>
-        /// 褰撳墠璁惧绫诲瀷
-        /// </summary>
-        public DeviceType Type = DeviceType.UnKown;
-        /// <summary>
-        /// 璁惧鐨勫姛鑳界被鍨�(姝ょ被鍨嬬洰鍓嶅彧閽堝缁х數鍣ㄥ洖璺湁鏁�,榛樿鏈寚瀹�)
-        /// </summary>
-        public DeviceFunctionType DfunctionType = DeviceFunctionType.A鏈畾涔�;
-        /// <summary>
-        /// MAC鍦板潃
-        /// </summary>
-        public string DeviceAddr;
-
-        /// <summary>
-        /// 璁惧绔彛鍙�
-        /// </summary>
-        public int DeviceEpoint;
-
-        /// <summary>
-        /// 璁惧鍛戒护鏍煎紡锛歁ac+绔彛
-        /// </summary>
-        /// <value>The common device address epoint.</value>
-        public string CommonDeviceAddrEpoint
-        {
-            get
-            {
-                return DeviceAddr + "_" + DeviceEpoint.ToString();
-            }
-        }
-
-        /// <summary>
-        /// 缃戝叧鍙嶉鐨勬椂闂存埑
-        /// </summary>
-        public int Time;
-
-        /// <summary>
-        /// 缃戝叧鍥炲鐨勬暟鎹甀D
-        /// </summary>
-        public int DataID;
-
-        /// <summary>
-        /// 璁惧id
-        /// <para>258:color dimmable light,璋冨叧鐏� </para>
-        /// <para>10:Door lock,闂ㄩ攣</para>
-        /// <para>514:Window covering device,绐楀笜</para>
-        /// <para>515:Window covering controller锛岀獥甯樻帶鍒跺櫒</para>
-        /// <para>769:Thermostat,鎭掓俯闈㈡澘/绌鸿皟</para>
-        /// <para>770:Temperature Sensor,娓╁害浼犳劅鍣�</para>
-        /// <para>775:Temperature Sensor,婀垮害浼犳劅鍣�</para>
-        /// <para>262:Light sensor,鍏夌収浼犳劅鍣�</para>
-        /// <para>1026:sensor,浼犳劅鍣紝鍏蜂綋绫诲瀷鐨勪紶鎰熷櫒DeviceType鏉ュ尯鍒�</para>
-        /// </summary>
-        public int DeviceID;
-
-        /// <summary>
-        /// 璇ュ瓧娈典富瑕侀拡瀵笽AS瀹夐槻璁惧璁剧珛銆傛墍鏈塈AS瀹夐槻璁惧鍏辩敤涓�涓狣eviceID涓�1026銆傛墍浠ヨ鍖哄垎瀛愯澶囩被鍨嬶紝闇�瑕佽瀛楁銆�
-        /// 鐬棿鏁版嵁涓婃姤鐨勪紶鎰熷櫒 (MomentStatus=1    TriggerZoneStatus>=1锛滄姤璀︼紴)
-        /// <para>13:Motion sensor (杩愬姩浼犳劅鍣級</para>
-        /// <para>40 Fire sensor 鐑熼浘浼犳劅鍣�</para>
-        /// <para>42 Water sensor 姘翠镜浼犳劅鍣�</para>
-        /// <para>43 Carbon Monoxide (CO) 鐕冩皵浼犳劅鍣�</para>
-        /// <para>44 Personal emergency device 绱ф�ユ寜閽�</para>
-        /// <para>277 Key fob 閽ュ寵鎵�</para>
-        /// <para>鎸佺画鏁版嵁涓婃姤(MomentStatus=0   TriggerZoneStatus>=1锛滄姤璀︼紴  TriggerZoneStatus=0锛滃彇娑堟姤璀︼紴)</para>
-        /// <para>21: Door/Window 闂ㄧ獥浼犳劅鍣紙鏈�21鍜�22锛岃繖閲屾病鏈夊啓閿欙級</para>
-        /// <para>22:Door/Window 闂ㄧ獥浼犳劅鍣紙鏈�21鍜�22锛岃繖閲屾病鏈夊啓閿�</para>
-        /// </summary>
-        public int IasDeviceType;
-
-        /// <summary>
-        /// 璁惧鍚嶇О,浠ヨ澶囩殑MAC鍛藉悕
-        /// </summary>
-        public string DeviceName = "UnKown";
-
-        /// <summary>
-        /// 璁惧绔偣鍚嶇О锛屼互璁惧绔偣鍚嶇О鍛藉悕
-        /// </summary>
-        public string DeviceEpointName = "UnKown";
-
-        /// <summary>
-        /// 鐢ㄤ簬鍒ゆ柇璁惧鐨剒igbee鍗忚鐗堟湰銆�
-        ///<para>49246锛歓LL1.0鏍囧噯璁惧銆�</para>
-        ///<para>260锛� ZHA1.2鏍囧噯璁惧銆� Z3.0鏍囧噯璁惧銆�</para>
-        ///<para>41440锛歓GP3.0鏍囧噯璁惧銆�</para>
-        ///<para>265锛歓SE1.4鏍囧噯璁惧銆�</para>
-        /// </summary>
-        public int Profile;
-        /// <summary>
-        /// 0锛氳澶囦笉鍦ㄧ嚎
-        /// <para>1锛氳澶囧湪绾�</para>
-        /// </summary>
-        public int IsOnline;
-        /// <summary>
-        /// 褰撳墠杩愯绋嬪簭鐗堟湰淇℃伅銆� 鏈�澶�64瀛楄妭
-        /// </summary>
-        public int ImgVersion;
-        /// <summary>
-        /// 纭欢鐗堟湰
-        /// </summary>
-        public int HwVersion;
-        /// <summary>
-        /// 褰撳墠闀滃儚绫诲瀷id
-        /// </summary>
-        public int ImgTypeId;
-        /// <summary>
-        /// 椹卞姩浠g爜銆備负0鏃讹紝琛ㄧずzigbee鍗忚皟鍣ㄨ澶囥�傚叾浠栧�艰〃绀轰负铏氭嫙椹卞姩璁惧
-        /// </summary>
-        public int DriveCode;
-        /// <summary>
-        /// 鐢熶骇鍟嗗悕瀛�
-        /// </summary>
-        public string ManufacturerName = string.Empty;
-        /// <summary>
-        /// 妯″潡ID锛堣繖涓笢瑗夸篃鍙�愬瀷鍙风爜銆戯級
-        /// </summary>
-        public string ModelIdentifier = string.Empty;
-        /// <summary>
-        /// 鐢熶骇鏃ユ湡
-        /// </summary>
-        public string ProductionDate = string.Empty;
-        /// <summary>
-        /// 鐢垫簮
-        /// </summary>
-        public int PowerSource = -1;
-        /// <summary>
-        /// 搴忓垪鍙�
-        /// </summary>
-        public string SerialNumber = string.Empty;
-        /// <summary>
-        /// 鎵�鏈夋寚瀹歝luster鏄惁閮藉凡缁忔垚鍔熺粦瀹氬崗璋冨櫒
-        ///<para>0:鏈畬鍏ㄧ粦瀹�</para>
-        ///<para>1锛氬凡缁忕粦瀹�</para>
-        /// </summary>
-        public int ClusterBindZbSuccess = -1;
-        /// <summary>
-        /// 鏄惁鑾峰彇鎵�鏈夐粯璁ょ粦瀹氫俊鎭�
-        ///<para>0锛氬惁</para>
-        ///<para>1锛氭槸</para>
-        /// </summary>
-        public int IsGetAllDefaultBind = -1;
-        /// <summary>
-        /// 杈撳叆绨囧垪琛�
-        /// </summary>
-        public List<InClusterObj> InClusterList = new List<InClusterObj>();
-        /// <summary>
-        /// 杈撳嚭绨囧垪琛�
-        /// </summary>
-        public List<OutClusterObj> OutClusterList = new List<OutClusterObj>();
-        /// <summary>
-        /// 鐢ㄤ簬璁板綍璁惧鏈�鏂颁笂鎶ョ殑灞炴�х姸鎬佷俊鎭�傛渶澶ф敮鎸佽褰�16涓睘鎬х姸鎬侊紝涓斿彧璁板綍灞炴�у�奸暱搴︿笉澶т簬4瀛楄妭鐨勬暟鎹��
-        /// </summary>
-        public List<AttributeStatusObj> AttributeStatus = new List<AttributeStatusObj>();
+        #region 杈撳叆杈撳嚭闀炲畾涔�
 
         /// <summary>
         /// 璁惧鏈�鏂颁笂鎶ョ殑灞炴�х姸鎬佷俊鎭�
@@ -618,12 +554,15 @@
             public int commandId;
         }
 
-        #region 浜屻�佽幏鍙栧凡鍏ョ綉璁惧淇℃伅
+        #endregion
+
+        #region 鑾峰彇宸插叆缃戣澶囦俊鎭�
 
         /// <summary>
         /// 缃戝叧涓殑璁惧淇℃伅
         /// </summary>
-        public DeviceInfoData DeviceInfo = new DeviceInfoData();
+        [Newtonsoft.Json.JsonIgnore]
+        public DeviceInfoData DeviceInfo = null;
         /// <summary>
         /// 缃戝叧涓殑璁惧淇℃伅
         /// </summary>
@@ -722,110 +661,15 @@
 
         }
 
+        #endregion
+
+        #region 閿欒缁撴灉瀹氫箟
+
         /// <summary>
-        /// 鑾峰彇鎵�鏈夌綉鍏崇殑鑺傜偣璁惧淇℃伅锛堢敤浜庝富缃戝叧锛�
-        /// </summary>
-        public AllGatewayDeviceInfo getAllGatewayDeviceInfo;
-        /// <summary>
-        /// 鑾峰彇鎵�鏈夌綉鍏崇殑鑺傜偣璁惧淇℃伅锛堢敤浜庝富缃戝叧锛�
+        /// 缃戝叧淇℃伅閿欒鍙嶉鍏遍��
         /// </summary>
         [System.Serializable]
-        public class AllGatewayDeviceInfo
-        {
-            /// <summary>
-            /// 鍏ョ綉璁惧鎬绘暟銆傜瓑浜�0鏃讹紝琛ㄧず娌℃湁璁惧淇℃伅锛屼笅闈㈠瓧娈靛皢涓嶅瓨鍦ㄣ��
-            /// </summary>
-            public int TotalNum;
-            /// <summary>
-            /// 鏍囪瘑褰撳墠璁惧鏄彂閫佺殑鏄鍑犱釜璁惧銆侱eviceNum浠�1寮�濮嬫瘡鍙戦�佷竴涓澶囦俊鎭紝涓嬩竴涓澶囦俊鎭殑DeviceNum灏嗗姞1銆傜洿鍒癉eviceNum绛変簬TotalNum璇存槑鎵�鏈夎澶囦俊鎭彂閫佸畬姣曘��
-            /// </summary>
-            public int DeviceNum;
-            /// <summary>
-            /// 璁惧鎵�鍦ㄧ綉鍏崇殑缃戝叧id
-            /// </summary>
-            public string GwId;
-            /// <summary>
-            /// 鍏ョ綉鐨剈tc鏃堕棿鎴�
-            /// </summary>
-            public int JoinTime;
-            /// <summary>
-            /// 1:璺敱鍣ㄨ澶�
-            /// <para>2:缁堢璁惧</para>
-            /// </summary>
-            public int ZigbeeType;
-            /// <summary>
-            /// 璁惧缃戠粶鍦板潃
-            /// </summary>
-            public int NwkAddr;
-            /// <summary>
-            /// 璇ュ瓧娈典富瑕侀拡瀵笽AS瀹夐槻璁惧璁剧珛銆傛墍鏈塈AS瀹夐槻璁惧鍏辩敤涓�涓狣eviceID涓�1026銆傛墍浠ヨ鍖哄垎瀛愯澶囩被鍨嬶紝闇�瑕佽瀛楁銆�
-            /// <para>13:Motion sensor (杩愬姩浼犳劅鍣級</para>
-            /// <para>43:Carbon Monoxide sensor (涓�姘у寲纰充紶鎰熷櫒锛�</para>
-            /// <para>44:Personal emergency device (绱ф�ユ寜閽級</para>
-            /// </summary>
-            public int DeviceType;
-            /// <summary>
-            /// 鐢ㄤ簬鍒ゆ柇璁惧鐨剒igbee鍗忚鐗堟湰銆�
-            /// <para>49246锛歓LL1.0鏍囧噯璁惧銆�</para>
-            /// <para>260锛� ZHA1.2鏍囧噯璁惧銆� Z3.0鏍囧噯璁惧銆�</para>
-            /// <para>41440锛歓GP3.0鏍囧噯璁惧銆�</para>
-            /// <para>265锛歓SE1.4鏍囧噯璁惧銆�</para>
-            /// </summary>
-            public int Profile;
-            /// <summary>
-            /// 璁惧绔偣鍚�
-            /// </summary>
-            public string DeviceName;
-            /// <summary>
-            /// 璁惧鍚�
-            /// </summary>
-            public string MacName;
-            /// <summary>
-            /// 0锛氳澶囦笉鍦ㄧ嚎
-            /// <para>1锛氳澶囧湪绾�</para>
-            /// </summary>
-            public int IsOnline;
-            /// <summary>
-            /// 褰撳墠杩愯绋嬪簭鐗堟湰淇℃伅銆� 鏈�澶�64瀛楄妭
-            /// </summary>
-            public int ImgVersion;
-            /// <summary>
-            /// 纭欢鐗堟湰
-            /// </summary>
-            public int HwVersion;
-            /// <summary>
-            /// 褰撳墠闀滃儚绫诲瀷id
-            /// </summary>
-            public int ImgTypeId;
-            /// <summary>
-            /// 椹卞姩浠g爜銆備负0鏃讹紝琛ㄧずzigbee鍗忚皟鍣ㄨ澶囥�傚叾浠栧�艰〃绀轰负铏氭嫙椹卞姩璁惧
-            /// </summary>
-            public int DriveCode;
-            /// <summary>
-            /// 杈撳叆绨囧垪琛�
-            /// </summary>
-            public List<InClusterObj> InClusterList = new List<InClusterObj>();
-
-            /// <summary>
-            /// 杈撳嚭绨囧垪琛�
-            /// </summary>
-            public List<OutClusterObj> OutClusterList = new List<OutClusterObj>();
-            /// <summary>
-            /// 鐢ㄤ簬璁板綍璁惧鏈�鏂颁笂鎶ョ殑灞炴�х姸鎬佷俊鎭�傛渶澶ф敮鎸佽褰�16涓睘鎬х姸鎬侊紝涓斿彧璁板綍灞炴�у�奸暱搴︿笉澶т簬4瀛楄妭鐨勬暟鎹��
-            /// </summary>
-            public List<AttributeStatusObj> AttributeStatus = new List<AttributeStatusObj>();
-
-        }
-
-        /// <summary>
-        /// 鑾峰彇缃戝叧璁板綍鐨勮澶囧睘鎬х姸鎬�
-        /// </summary>
-        public GetStatusRecordAllInfo getStatusRecordAllInfo;
-        /// <summary>
-        /// 鑾峰彇缃戝叧璁板綍鐨勮澶囧睘鎬х姸鎬�
-        /// </summary>
-        [System.Serializable]
-        public class GetStatusRecordAllInfo
+        public class ErrorResponCommon
         {
             /// <summary>
             /// 閿欒淇℃伅
@@ -836,269 +680,8 @@
             /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
             /// </summary>
             public ErrorResponData errorResponData;
-            /// <summary>
-            /// 璁惧鍚嶇О淇敼
-            /// </summary>
-            public GetStatusRecordInfo getStatusRecordInfo;
         }
 
-        /// <summary>
-        /// 鑾峰彇鎵�鏈夌綉鍏崇殑鑺傜偣璁惧淇℃伅锛堢敤浜庝富缃戝叧锛�
-        /// </summary>
-        public GetStatusRecordInfo getStatusRecordInfo;
-        /// <summary>
-        /// 鑾峰彇鎵�鏈夌綉鍏崇殑鑺傜偣璁惧淇℃伅锛堢敤浜庝富缃戝叧锛�
-        /// </summary>
-        [System.Serializable]
-        public class GetStatusRecordInfo
-        {
-            /// <summary>
-            /// 璁惧鎵�鍦ㄧ綉鍏崇殑缃戝叧id
-            /// </summary>
-            public string GwId;
-            /// <summary>
-            /// 鍏ョ綉鐨剈tc鏃堕棿鎴�
-            /// </summary>
-            public int JoinTime;
-            /// <summary>
-            /// 1:璺敱鍣ㄨ澶�
-            /// <para>2:缁堢璁惧</para>
-            /// </summary>
-            public int ZigbeeType;
-            /// <summary>
-            /// 璁惧缃戠粶鍦板潃
-            /// </summary>
-            public int NwkAddr;
-            /// <summary>
-            /// 璇ュ瓧娈典富瑕侀拡瀵笽AS瀹夐槻璁惧璁剧珛銆傛墍鏈塈AS瀹夐槻璁惧鍏辩敤涓�涓狣eviceID涓�1026銆傛墍浠ヨ鍖哄垎瀛愯澶囩被鍨嬶紝闇�瑕佽瀛楁銆�
-            /// <para>13:Motion sensor (杩愬姩浼犳劅鍣級</para>
-            /// <para>43:Carbon Monoxide sensor (涓�姘у寲纰充紶鎰熷櫒锛�</para>
-            /// <para>44:Personal emergency device (绱ф�ユ寜閽級</para>
-            /// </summary>
-            public int DeviceType;
-            /// <summary>
-            /// 鐢ㄤ簬鍒ゆ柇璁惧鐨剒igbee鍗忚鐗堟湰銆�
-            /// <para>49246锛歓LL1.0鏍囧噯璁惧銆�</para>
-            /// <para>260锛� ZHA1.2鏍囧噯璁惧銆� Z3.0鏍囧噯璁惧銆�</para>
-            /// <para>41440锛歓GP3.0鏍囧噯璁惧銆�</para>
-            /// <para>265锛歓SE1.4鏍囧噯璁惧銆�</para>
-            /// </summary>
-            public int Profile;
-            /// <summary>
-            /// 璁惧绔偣鍚�
-            /// </summary>
-            public string DeviceName;
-            /// <summary>
-            /// 璁惧鍚�
-            /// </summary>
-            public string MacName;
-            /// <summary>
-            /// 0锛氳澶囦笉鍦ㄧ嚎
-            /// <para>1锛氳澶囧湪绾�</para>
-            /// </summary>
-            public int IsOnline;
-            /// <summary>
-            /// 褰撳墠杩愯绋嬪簭鐗堟湰淇℃伅銆� 鏈�澶�64瀛楄妭
-            /// </summary>
-            public int ImgVersion;
-            /// <summary>
-            /// 纭欢鐗堟湰
-            /// </summary>
-            public int HwVersion;
-            /// <summary>
-            /// 褰撳墠闀滃儚绫诲瀷id
-            /// </summary>
-            public int ImgTypeId;
-            /// <summary>
-            /// 椹卞姩浠g爜銆備负0鏃讹紝琛ㄧずzigbee鍗忚皟鍣ㄨ澶囥�傚叾浠栧�艰〃绀轰负铏氭嫙椹卞姩璁惧
-            /// </summary>
-            public int DriveCode;
-            /// <summary>
-            /// 杈撳叆绨囧垪琛�
-            /// </summary>
-            public List<InClusterObj> InClusterList = new List<InClusterObj>();
-            /// <summary>
-            /// 杈撳嚭绨囧垪琛�
-            /// </summary>
-            public List<OutClusterObj> OutClusterList = new List<OutClusterObj>();
-            /// <summary>
-            /// 鐢ㄤ簬璁板綍璁惧鏈�鏂颁笂鎶ョ殑灞炴�х姸鎬佷俊鎭�傛渶澶ф敮鎸佽褰�16涓睘鎬х姸鎬侊紝涓斿彧璁板綍灞炴�у�奸暱搴︿笉澶т簬4瀛楄妭鐨勬暟鎹��
-            /// </summary>
-            public List<AttributeStatusObj> AttributeStatus = new List<AttributeStatusObj>();
-        }
-        #endregion
-
-        /// <summary>
-        /// 鏈夋柊璁惧鍔犲叆zigbee缃戠粶鐨勪俊鎭�
-        /// </summary>
-        public DeviceDeviceJoinZbNetResponData deviceDeviceJoinZbNetResponData;
-        /// <summary>
-        /// 鏈夋柊璁惧鍔犲叆zigbee缃戠粶鐨勪俊鎭�
-        /// </summary>
-        [System.Serializable]
-        public class DeviceDeviceJoinZbNetResponData
-        {
-            /// <summary>
-            /// 璁惧缃戠粶鍦板潃
-            /// </summary>
-            public int NwkAddr;
-            /// <summary>
-            /// 1:璺敱鍣ㄨ澶�
-            /// <para>2:缁堢璁惧</para>
-            /// </summary>
-            public int ZigbeeType;
-        }
-
-        /// <summary>
-        /// 鑾峰彇鏂拌澶囨墍鏈夌鐐逛俊鎭槸鍚︽垚鍔熶俊鎭�
-        /// </summary>
-        public DeviceIsGetEpointInfoResponData deviceIsGetEpointInfoResponData;
-        /// <summary>
-        /// 鑾峰彇鏂拌澶囨墍鏈夌鐐逛俊鎭槸鍚︽垚鍔熶俊鎭�
-        /// </summary>
-        [System.Serializable]
-        public class DeviceIsGetEpointInfoResponData
-        {
-            /// <summary>
-            /// 0锛氭垚鍔熻幏鍙栨墍鏈夌鐐逛俊鎭�
-            ///<para>1锛氳幏鍙栧け璐�</para>
-            /// </summary>
-            public int Result;
-        }
-
-        /// <summary>
-        /// 缃戝叧涓柊鎼滅储鍑虹殑璁惧淇℃伅
-        /// </summary>
-        public NewDeviceInfoData getNewDeviceInfo;
-        /// <summary>
-        /// 缃戝叧涓柊鎼滅储鍑虹殑璁惧淇℃伅
-        /// </summary>
-        [System.Serializable]
-        public class NewDeviceInfoData
-        {
-            /// <summary>
-            /// 鍏ョ綉鐨剈tc鏃堕棿鎴�
-            /// </summary>
-            public int JoinTime;
-            /// <summary>
-            /// 1:璺敱鍣ㄨ澶�
-            /// <para>2:缁堢璁惧</para>
-            /// </summary>
-            public int ZigbeeType;
-            /// <summary>
-            /// 璁惧缃戠粶鍦板潃
-            /// </summary>
-            public int NwkAddr;
-            /// <summary>
-            /// 璇ュ瓧娈典富瑕侀拡瀵笽AS瀹夐槻璁惧璁剧珛銆傛墍鏈塈AS瀹夐槻璁惧鍏辩敤涓�涓狣eviceID涓�1026銆傛墍浠ヨ鍖哄垎瀛愯澶囩被鍨嬶紝闇�瑕佽瀛楁銆�
-            /// <para>13:Motion sensor (杩愬姩浼犳劅鍣級</para>
-            /// <para>43:Carbon Monoxide sensor (涓�姘у寲纰充紶鎰熷櫒锛�</para>
-            /// <para>44:Personal emergency device (绱ф�ユ寜閽級</para>
-            /// </summary>
-            public int DeviceType;
-            /// <summary>
-            /// 鐢ㄤ簬鍒ゆ柇璁惧鐨剒igbee鍗忚鐗堟湰銆傚尯鍒�3.0璁惧鍜孼HA璁惧
-            /// <para>49246锛歓LL1.0鏍囧噯璁惧銆�</para>
-            /// <para>260锛� ZHA1.2鏍囧噯璁惧銆� Z3.0鏍囧噯璁惧銆�</para>
-            /// <para>41440锛歓GP3.0鏍囧噯璁惧銆�</para>
-            /// <para>265锛歓SE1.4鏍囧噯璁惧銆�</para>
-            /// </summary>
-            public int Profile;
-            /// <summary>
-            /// 鏄惁鏄柊鍏ョ綉璁惧銆�
-            /// <para>濡傛灉缃戝叧鍌ㄥ瓨鐨勮澶囧垪琛ㄤ腑鍘熸潵鏄病鏈夎璁惧鍒欎负鏂板叆缃戣澶囥��</para>
-            /// <para>濡傛灉缃戝叧鍌ㄥ瓨鐨勮澶囧垪琛ㄤ腑鏈夎璁惧鍒欎负鏃ц澶囥��</para>
-            /// <para>濡傛灉閲嶅叆缃戝悗璁惧淇℃伅宸茬粡鏀瑰彉锛堝璁惧鐨勭綉缁滃湴鍧�锛岃澶嘔D锛宑luster鍒楄〃锛夊垯涔熻涓烘柊璁惧鍏ョ綉銆�</para>
-            /// <para>璇ュ瓧娈电敤鏉ュ垽鍒敤鎴峰彲鑳介�氳繃鑺傜偣鐨勫疄浣撴寜閿皢璁惧鎭㈠鍑哄巶璁惧鍚庤妭鐐硅澶囬噸鏂板叆缃戠殑鎯呭喌鎴栬妭鐐硅澶囬噸鍚富鍔ㄥ彂閫佸叆缃戜俊鎭殑鎯呭喌銆�</para>
-            /// <para>0锛氭棫璁惧鍏ョ綉</para>
-            /// <para>1锛氭柊璁惧鍏ョ綉</para>
-            /// <para>2锛氳澶囦负鏂拌澶囷紝骞跺湪涓婃姤璇ヤ俊鎭墠宸茬粡閫�缃戯紝鍗宠澶囧叆缃戝悗缃戝叧杩樻潵涓嶅強涓婃姤璇ヨ澶囦俊鎭澶囦究宸茬粡閫�缃戙�傦紙璁惧鍏ョ綉锛屽埌缃戝叧涓婃姤璁惧淇℃伅鏈変竴娈靛欢鏃讹紝濡傛灉鍦ㄦ鏈熼棿濡傛灉璁惧宸茬粡閫�缃戯紝灏嗗弽棣堣鍊笺�傝鍊间负寮傚父鎯呭喌锛屽綋鏀跺埌璇ュ�兼椂鍊欒鏄庤澶囧苟娌″叆缃戯紝鍙涪寮冭繖涓叆缃戜俊鎭級</para>
-            /// </summary>
-            public int IsNewDev;
-            /// <summary>
-            /// 褰撳墠杩愯绋嬪簭鐗堟湰淇℃伅銆� 鏈�澶�64瀛楄妭
-            /// </summary>
-            public int ImgVersion;
-            /// <summary>
-            /// 纭欢鐗堟湰
-            /// </summary>
-            public int HwVersion;
-            /// <summary>
-            /// 褰撳墠闀滃儚绫诲瀷id
-            /// </summary>
-            public int ImgTypeId;
-            /// <summary>
-            /// 椹卞姩浠g爜銆備负0鏃讹紝琛ㄧずzigbee鍗忚皟鍣ㄨ澶囥�傚叾浠栧�艰〃绀轰负铏氭嫙椹卞姩璁惧
-            /// </summary>
-            public int DriveCode;
-            /// <summary>
-            /// 璁惧鎵�鍦ㄧ綉鍏崇殑缃戝叧id
-            /// </summary>
-            public string GwId;
-            /// <summary>
-            /// 璁惧鍚�
-            /// </summary>
-            public string MacName;
-            /// <summary>
-            /// 璁惧绔偣鍚�
-            /// </summary>
-            public string DeviceName;
-            /// <summary>
-            /// 0锛氳澶囦笉鍦ㄧ嚎
-            /// <para>1锛氳澶囧湪绾�</para>
-            /// </summary>
-            public int IsOnline;
-            /// <summary>
-            /// 鎵�鏈夋寚瀹歝luster鏄惁閮藉凡缁忔垚鍔熺粦瀹氬崗璋冨櫒
-            ///<para>0:鏈畬鍏ㄧ粦瀹�</para>
-            ///<para>1锛氬凡缁忕粦瀹�</para>
-            /// </summary>
-            public int ClusterBindZbSuccess = -1;
-            /// <summary>
-            /// 鏄惁鑾峰彇鎵�鏈夐粯璁ょ粦瀹氫俊鎭�
-            ///<para>0锛氬惁</para>
-            ///<para>1锛氭槸</para>
-            /// </summary>
-            public int IsGetAllDefaultBind = -1;
-            /// <summary>
-            /// 鐢熶骇鍟嗗悕瀛�
-            /// </summary>
-            public string ManufacturerName = string.Empty;
-            /// <summary>
-            /// 妯″潡ID锛堣繖涓笢瑗夸篃鍙�愬瀷鍙风爜銆戯級
-            /// </summary>
-            public string ModelIdentifier = string.Empty;
-            /// <summary>
-            /// 鐢熶骇鏃ユ湡
-            /// </summary>
-            public string ProductionDate = string.Empty;
-            /// <summary>
-            /// 鐢垫簮
-            /// </summary>
-            public int PowerSource = -1;
-            /// <summary>
-            /// 搴忓垪鍙�
-            /// </summary>
-            public string SerialNumber = string.Empty;
-            /// <summary>
-            /// 杈撳叆绨囧垪琛�
-            /// </summary>
-            public List<InClusterObj> InClusterList = new List<InClusterObj>();
-            /// <summary>
-            /// 杈撳嚭绨囧垪琛�
-            /// </summary>
-            public List<OutClusterObj> OutClusterList = new List<OutClusterObj>();
-            /// <summary>
-            /// 鐢ㄤ簬璁板綍璁惧鏈�鏂颁笂鎶ョ殑灞炴�х姸鎬佷俊鎭�傛渶澶ф敮鎸佽褰�16涓睘鎬х姸鎬侊紝涓斿彧璁板綍灞炴�у�奸暱搴︿笉澶т簬4瀛楄妭鐨勬暟鎹��
-            /// </summary>
-            public List<AttributeStatusObj> AttributeStatus = new List<AttributeStatusObj>();
-        }
-
-        /// <summary>
-        /// 缃戝叧淇℃伅閿欒鍙嶉
-        /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
-        /// </summary>
-        public ErrorResponData errorResponData;
         /// <summary>
         /// 缃戝叧淇℃伅閿欒鍙嶉
         /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
@@ -1146,6 +729,8 @@
             return message;
         }
 
+        #endregion
+
         #region 淇敼璁惧绔彛鍚嶇О
         ///<summary >
         /// 淇敼璁惧绔彛锛堟寜閿級鍚嶇О
@@ -1168,8 +753,7 @@
 
                     if (topic == gatewayID + "/" + "Error_Respon")
                     {
-                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
-                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
+                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
 
                         if (temp == null)
                         {
@@ -1226,10 +810,6 @@
         /// <summary>
         /// 閲嶅懡鍚嶈澶�,缃戝叧鍙嶉鍏蜂綋淇℃伅
         /// </summary>
-        public DeviceRenameAllData renameDeviceAllData;
-        /// <summary>
-        /// 閲嶅懡鍚嶈澶�,缃戝叧鍙嶉鍏蜂綋淇℃伅
-        /// </summary>
         [System.Serializable]
         public class DeviceRenameAllData
         {
@@ -1248,10 +828,6 @@
             public DeviceRenameResponseData deviceRenameData;
         }
 
-        /// <summary>
-        /// 璁惧鍚嶇О淇敼
-        /// </summary>
-        public DeviceRenameResponseData renameDeviceData;
         /// <summary>
         /// 璁惧鍚嶇О淇敼
         /// </summary>
@@ -1291,8 +867,7 @@
 
                     if (topic == gatewayID + "/" + "Error_Respon")
                     {
-                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
-                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
+                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
 
                         if (temp == null)
                         {
@@ -1350,32 +925,15 @@
         /// <summary>
         /// 淇敼璁惧mac鍚嶇О鏁版嵁,缃戝叧鍙嶉鍏蜂綋淇℃伅
         /// </summary>
-        public RenameDeviceMacNameAllData renameDeviceMacNameAllData;
-        /// <summary>
-        /// 淇敼璁惧mac鍚嶇О鏁版嵁,缃戝叧鍙嶉鍏蜂綋淇℃伅
-        /// </summary>
         [System.Serializable]
-        public class RenameDeviceMacNameAllData
+        public class RenameDeviceMacNameAllData : ErrorResponCommon
         {
-            /// <summary>
-            /// 閿欒淇℃伅
-            /// </summary>
-            public string errorMessageBase;
-            /// <summary>
-            /// 缃戝叧淇℃伅閿欒鍙嶉
-            /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
-            /// </summary>
-            public ErrorResponData errorResponData;
             /// <summary>
             /// 淇敼璁惧mac鍚嶇О鏁版嵁
             /// </summary>
             public RenameDeviceMacNameData renameDeviceMacNameData;
         }
 
-        /// <summary>
-        /// 淇敼璁惧mac鍚嶇О鏁版嵁
-        /// </summary>
-        public RenameDeviceMacNameData renameDeviceMacNameData;
         /// <summary>
         /// 淇敼璁惧mac鍚嶇О鏁版嵁
         /// </summary>
@@ -1391,32 +949,6 @@
             /// 淇敼鍚庣殑璁惧鍚嶇О
             /// </summary>
             public string MacName;
-        }
-        #endregion
-
-        #region 璁惧鎭㈠鍑哄巶璁剧疆涓庡嚭缃�
-        ///<summary >
-        /// 浣胯澶囨仮澶嶅嚭鍘傝缃�
-        /// <para>浠呮仮澶嶅嚭鍘傝缃紝涓嶇缃戙�備絾鏈変簺涓嶆爣鍑嗙殑3.0璁惧锛屾仮澶嶅嚭鍘傝缃氨浼氱缃戙�� 瀹㈡埛绔垨浜戠鍒扮綉鍏�</para>
-        /// </summary>
-        public async void ResetDeviceFactoryAsync(string deviceAddr, int deviceEpoint)
-        {
-            if (Gateway == null)
-            {
-                return;
-            }
-            //Action<string, string> action = (topic, message) => { };
-            //Gateway.Actions += action;
-            System.Console.WriteLine("FactoryResete_Actions 鍚姩" + "_" + System.DateTime.Now.ToString());
-            try
-            {
-                var jObject = new JObject { { "DeviceAddr", deviceAddr }, { "Epoint", deviceEpoint }, { "Cluster_ID", 0 }, { "Command", 97 } };
-                Gateway.Send("FactoryReset", jObject.ToString());
-            }
-            catch { }
-
-            //Gateway.Actions -= action;
-            System.Console.WriteLine("FactoryReset_Action閫�鍑�" + System.DateTime.Now.ToString());
         }
         #endregion
 
@@ -1442,8 +974,7 @@
 
                     if (topic == gatewayID + "/" + "Error_Respon")
                     {
-                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
-                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
+                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
 
                         if (temp == null)
                         {
@@ -1457,16 +988,15 @@
 
                     if (topic == gatewayID + "/" + "RemoveDeviceRespon")
                     {
-                        var gatewayTemp = new ZbGateway() { DeviceAddr = jobject.Value<string>("DeviceAddr"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
-                        gatewayTemp.removeDeviceResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.RemoveDeviceResponseData>(jobject["Data"].ToString());
+                        var removeDeviceResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.RemoveDeviceResponseData>(jobject["Data"].ToString());
 
-                        if (gatewayTemp.removeDeviceResponseData == null)
+                        if (removeDeviceResponseData == null)
                         {
                             d = new RemoveDeviceResponseAllData { errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�" };
                         }
                         else
                         {
-                            d = new RemoveDeviceResponseAllData { removeDeviceResponseData = gatewayTemp.removeDeviceResponseData };
+                            d = new RemoveDeviceResponseAllData { removeDeviceResponseData = removeDeviceResponseData };
                             System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
                         }
                     }
@@ -1519,10 +1049,6 @@
         /// <summary>
         /// 闇�瑕佸垹闄よ澶囩殑鏁版嵁
         /// </summary>
-        public RemoveDeviceData removeDeviceData;
-        /// <summary>
-        /// 闇�瑕佸垹闄よ澶囩殑鏁版嵁
-        /// </summary>
         [System.Serializable]
         public class RemoveDeviceData
         {
@@ -1552,10 +1078,6 @@
         /// <summary>
         /// 绉婚櫎璁惧,缃戝叧鍙嶉鍏蜂綋淇℃伅
         /// </summary>
-        public RemoveDeviceResponseAllData removeDeviceResponseAllData;
-        /// <summary>
-        /// 绉婚櫎璁惧,缃戝叧鍙嶉鍏蜂綋淇℃伅
-        /// </summary>
         [System.Serializable]
         public class RemoveDeviceResponseAllData
         {
@@ -1574,10 +1096,6 @@
             public RemoveDeviceResponseData removeDeviceResponseData;
         }
 
-        /// <summary>
-        /// 鍒犻櫎璁惧鍥炲鏁版嵁
-        /// </summary>
-        public RemoveDeviceResponseData removeDeviceResponseData;
         /// <summary>
         /// 鍒犻櫎璁惧鍥炲鏁版嵁
         /// <para>杩斿洖缁撴灉Resul=锛屽垹闄ゆ垚鍔�</para>
@@ -1618,135 +1136,6 @@
             public int Epoint;
 
         }
-        #endregion
-
-        #region 浠庢�昏澶囧垪琛ㄤ腑绉婚櫎涓�涓綉鍏崇殑鎵�鏈夎妭鐐硅澶囷紙鐢ㄤ簬涓荤綉鍏筹級
-        ///<summary >
-        /// 浠庢�昏澶囧垪琛ㄤ腑绉婚櫎涓�涓綉鍏崇殑鎵�鏈夎妭鐐硅澶囷紙鐢ㄤ簬涓荤綉鍏筹級
-        /// <para>GwId:瑕佺Щ闄よ妭鐐硅澶囩殑缃戝叧id</para>
-        /// </summary>
-        public async System.Threading.Tasks.Task<RemoveGatewayDeviceListAllData> RemoveGatewayDeviceListAsync(string gwId)
-        {
-            if (Gateway == null || gwId == null)
-            {
-                return null;
-            }
-            return await System.Threading.Tasks.Task.Run(async () =>
-            {
-                RemoveGatewayDeviceListAllData d = null;
-                Action<string, string> action = (topic, message) =>
-                {
-                    var gatewayID = topic.Split('/')[0];
-                    var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
-                    if (topic == gatewayID + "/" + "Error_Respon")
-                    {
-                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
-                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
-
-                        if (temp == null)
-                        {
-                            d = new RemoveGatewayDeviceListAllData { errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" };
-                        }
-                        else
-                        {
-                            d = new RemoveGatewayDeviceListAllData { errorResponData = temp, errorMessageBase = ErrorMess(temp.Error) };
-                        }
-                    }
-                    if (topic == gatewayID + "/" + "RemoveEqOfGw_Respon")
-                    {
-                        var gatewayTemp = new ZbGateway() { DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
-                        gatewayTemp.removeGatewayDeviceListData = Newtonsoft.Json.JsonConvert.DeserializeObject<RemoveGatewayDeviceListData>(jobject["Data"].ToString());
-
-                        if (gatewayTemp.removeGatewayDeviceListData == null)
-                        {
-                            d = new RemoveGatewayDeviceListAllData { errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�" };
-                        }
-                        else
-                        {
-                            d = new RemoveGatewayDeviceListAllData { removeGatewayDeviceListData = gatewayTemp.removeGatewayDeviceListData };
-                            System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
-                        }
-                    }
-                };
-
-                Gateway.Actions += action;
-                System.Console.WriteLine("RemoveEqOfGw_Actions 鍚姩" + "_" + System.DateTime.Now.ToString());
-
-                try
-                {
-                    var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 81 } };
-                    var data = new JObject { { "GwId", gwId } };
-                    jObject.Add("Data", data);
-                    Gateway.Send(("RemoveEqOfGw"), jObject.ToString());
-                }
-                catch { }
-
-
-                var dateTime = DateTime.Now;
-                while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
-                {
-                    await System.Threading.Tasks.Task.Delay(10);
-                    if (d != null)
-                    {
-                        break;
-                    }
-                }
-                if ((DateTime.Now - dateTime).TotalMilliseconds > WaitReceiveDataTime)
-                {
-                    d = new RemoveGatewayDeviceListAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
-                }
-                Gateway.Actions -= action;
-                System.Console.WriteLine("RemoveEqOfGw_Actions 閫�鍑�" + System.DateTime.Now.ToString());
-
-                return d;
-            });
-        }
-
-        /// <summary>
-        /// 绉婚櫎璁惧,缃戝叧鍙嶉鍏蜂綋淇℃伅
-        /// </summary>
-        public RemoveGatewayDeviceListAllData removeGatewayDeviceListAllData;
-        /// <summary>
-        /// 绉婚櫎璁惧,缃戝叧鍙嶉鍏蜂綋淇℃伅
-        /// </summary>
-        [System.Serializable]
-        public class RemoveGatewayDeviceListAllData
-        {
-            /// <summary>
-            /// 閿欒淇℃伅
-            /// </summary>
-            public string errorMessageBase;
-            /// <summary>
-            /// 缃戝叧淇℃伅閿欒鍙嶉
-            /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
-            /// </summary>
-            public ErrorResponData errorResponData;
-            /// <summary>
-            /// 璁惧鍚嶇О淇敼
-            /// </summary>
-            public RemoveGatewayDeviceListData removeGatewayDeviceListData;
-        }
-
-        /// <summary>
-        /// 浠庢�昏澶囧垪琛ㄤ腑绉婚櫎涓�涓綉鍏崇殑鎵�鏈夎妭鐐硅澶囷紙鐢ㄤ簬涓荤綉鍏筹級
-        /// </summary>
-        public RemoveGatewayDeviceListData removeGatewayDeviceListData;
-        /// <summary>
-        /// 浠庢�昏澶囧垪琛ㄤ腑绉婚櫎涓�涓綉鍏崇殑鎵�鏈夎妭鐐硅澶囷紙鐢ㄤ簬涓荤綉鍏筹級
-        /// </summary>
-        [System.Serializable]
-        public class RemoveGatewayDeviceListData
-        {
-            /// <summary>
-            /// 瑕佺Щ闄よ妭鐐硅澶囩殑缃戝叧id
-            /// </summary>
-            public string GwId;
-            /// <summary>
-            /// 琚垹闄よ澶囩殑鏁伴噺
-            /// </summary>
-            public int RemoveNum;
-        }
-
         #endregion
 
         #region 璇嗗埆璁惧
@@ -1826,7 +1215,8 @@
         /// <summary>
         /// 璁惧灞炴�х姸鎬佷笂鎶�
         /// </summary>
-        public DeviceStatusReportData DeviceStatusReport = new DeviceStatusReportData { };
+        [Newtonsoft.Json.JsonIgnore]
+        public DeviceStatusReportData DeviceStatusReport = new DeviceStatusReportData();
         /// <summary>
         /// 璁惧灞炴�х姸鎬佷笂鎶�
         /// </summary>
@@ -1891,8 +1281,7 @@
 
                     if (topic == gatewayID + "/" + "Error_Respon")
                     {
-                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID };
-                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
+                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
 
                         if (temp == null)
                         {
@@ -1906,7 +1295,6 @@
 
                     if (topic == gatewayID + "/" + "SetWritableValue_Respon")
                     {
-                        var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID };
                         var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<SetWritableValueResponData>(jobject["Data"].ToString());
 
                         if (tempData == null)
@@ -1955,22 +1343,9 @@
         /// <summary>
         /// 缃戝叧鐗堟湰淇℃伅,缃戝叧鍙嶉淇℃伅
         /// </summary>
-        public SetWritableValueResponAllData setWritableValueResponAllData;
-        /// <summary>
-        /// 缃戝叧鐗堟湰淇℃伅,缃戝叧鍙嶉淇℃伅
-        /// </summary>
         [System.Serializable]
-        public class SetWritableValueResponAllData
+        public class SetWritableValueResponAllData : ErrorResponCommon
         {
-            /// <summary>
-            /// 閿欒淇℃伅
-            /// </summary>
-            public string errorMessageBase;
-            /// <summary>
-            /// 缃戝叧淇℃伅閿欒鍙嶉
-            /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
-            /// </summary>
-            public ErrorResponData errorResponData;
             /// <summary>
             /// 缃戝叧鐗堟湰淇℃伅
             /// </summary>
@@ -2001,10 +1376,6 @@
 
         }
 
-        /// <summary>
-        /// 璁剧疆鍙啓灞炴�х殑鍊肩殑鏁版嵁
-        /// </summary>
-        public SetWritableValueData setWritableValueData;
         /// <summary>
         /// 璁剧疆鍙啓灞炴�х殑鍊肩殑鏁版嵁
         /// </summary>
@@ -2081,8 +1452,7 @@
 
                     if (topic == gatewayID + "/" + "Error_Respon")
                     {
-                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID };
-                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
+                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
 
                         if (temp == null)
                         {
@@ -2096,22 +1466,21 @@
 
                     if (topic == gatewayID + "/" + "Cluster/OwnAttributes_Respon")
                     {
-                        var gatewayTemp = new ZbGateway() { DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID };
-                        gatewayTemp.clusterOwnAttributesResponData = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ClusterOwnAttributesResponData>(jobject["Data"].ToString());
+                        var clusterOwnAttributesResponData = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ClusterOwnAttributesResponData>(jobject["Data"].ToString());
                         var tempAttributes = Newtonsoft.Json.Linq.JArray.Parse(jobject["Data"]["Attribute"].ToString());
                         for (int m = 0; tempAttributes != null && m < tempAttributes.Count; m++)
                         {
                             var tempAttribute = tempAttributes[m];
-                            gatewayTemp.clusterOwnAttributesResponData.AttributeList.Add(Newtonsoft.Json.JsonConvert.DeserializeObject<AttributeObj>(tempAttribute.ToString()));
+                            clusterOwnAttributesResponData.AttributeList.Add(Newtonsoft.Json.JsonConvert.DeserializeObject<AttributeObj>(tempAttribute.ToString()));
                         }
 
-                        if (gatewayTemp.clusterOwnAttributesResponData == null)
+                        if (clusterOwnAttributesResponData == null)
                         {
                             d = new ClusterOwnAttributesResponAllData { errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�" };
                         }
                         else
                         {
-                            d = new ClusterOwnAttributesResponAllData { clusterOwnAttributesResponData = gatewayTemp.clusterOwnAttributesResponData };
+                            d = new ClusterOwnAttributesResponAllData { clusterOwnAttributesResponData = clusterOwnAttributesResponData };
                             System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
 
                         }
@@ -2150,32 +1519,15 @@
         /// <summary>
         /// 鍙戠幇灞炴��,缃戝叧鍙嶉淇℃伅
         /// </summary>
-        public ClusterOwnAttributesResponAllData clusterOwnAttributesResponAllData;
-        /// <summary>
-        /// 鍙戠幇灞炴��,缃戝叧鍙嶉淇℃伅
-        /// </summary>
         [System.Serializable]
-        public class ClusterOwnAttributesResponAllData
+        public class ClusterOwnAttributesResponAllData : ErrorResponCommon
         {
-            /// <summary>
-            /// 閿欒淇℃伅
-            /// </summary>
-            public string errorMessageBase;
-            /// <summary>
-            /// 缃戝叧淇℃伅閿欒鍙嶉
-            /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
-            /// </summary>
-            public ErrorResponData errorResponData;
             /// <summary>
             /// 缃戝叧鐗堟湰淇℃伅
             /// </summary>
             public ClusterOwnAttributesResponData clusterOwnAttributesResponData;
         }
 
-        /// <summary>
-        /// 鍙戠幇灞炴�ф暟鎹�
-        /// </summary>
-        public ClusterOwnAttributesResponData clusterOwnAttributesResponData;
         [System.Serializable]
         public class ClusterOwnAttributesResponData
         {
@@ -2214,8 +1566,7 @@
 
                     if (topic == gatewayID + "/" + "Error_Respon")
                     {
-                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID };
-                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
+                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
 
                         if (temp == null)
                         {
@@ -2230,17 +1581,16 @@
 
                     if (topic == gatewayID + "/" + "Cluster/OwnCommand_Respon")
                     {
-                        var gatewayTemp = new ZbGateway() { DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID };
-                        gatewayTemp.clusterOwnCommandResponData = Newtonsoft.Json.JsonConvert.DeserializeObject<ClusterOwnCommandResponData>(jobject["Data"].ToString());
+                        var clusterOwnCommandResponData = Newtonsoft.Json.JsonConvert.DeserializeObject<ClusterOwnCommandResponData>(jobject["Data"].ToString());
 
-                        if (gatewayTemp.clusterOwnCommandResponData == null)
+                        if (clusterOwnCommandResponData == null)
                         {
                             d = new ClusterOwnCommandResponAllData { errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�" };
 
                         }
                         else
                         {
-                            d = new ClusterOwnCommandResponAllData { clusterOwnCommandResponData = gatewayTemp.clusterOwnCommandResponData };
+                            d = new ClusterOwnCommandResponAllData { clusterOwnCommandResponData = clusterOwnCommandResponData };
                             System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
                         }
                     }
@@ -2279,32 +1629,15 @@
         /// <summary>
         /// 璁惧鏌恈luster鎵�鏀寔鐨凜ommand鏁版嵁,缃戝叧鍙嶉淇℃伅
         /// </summary>
-        public ClusterOwnCommandResponAllData clusterOwnCommandResponAllData;
-        /// <summary>
-        /// 璁惧鏌恈luster鎵�鏀寔鐨凜ommand鏁版嵁,缃戝叧鍙嶉淇℃伅
-        /// </summary>
         [System.Serializable]
-        public class ClusterOwnCommandResponAllData
+        public class ClusterOwnCommandResponAllData : ErrorResponCommon
         {
-            /// <summary>
-            /// 閿欒淇℃伅
-            /// </summary>
-            public string errorMessageBase;
-            /// <summary>
-            /// 缃戝叧淇℃伅閿欒鍙嶉
-            /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
-            /// </summary>
-            public ErrorResponData errorResponData;
             /// <summary>
             /// 缃戣澶囨煇cluster鎵�鏀寔鐨凜ommand鏁版嵁
             /// </summary>
             public ClusterOwnCommandResponData clusterOwnCommandResponData;
         }
 
-        /// <summary>
-        /// 璁惧鏌恈luster鎵�鏀寔鐨凜ommand鏁版嵁
-        /// </summary>
-        public ClusterOwnCommandResponData clusterOwnCommandResponData;
         /// <summary>
         /// 璁惧鏌恈luster鎵�鏀寔鐨凜ommand鏁版嵁
         /// </summary>
@@ -2342,8 +1675,7 @@
 
                     if (topic == gatewayID + "/" + "Error_Respon")
                     {
-                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID };
-                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
+                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
 
                         if (temp == null)
                         {
@@ -2358,16 +1690,15 @@
 
                     if (topic == gatewayID + "/" + "OTA/SetImage_Respon")
                     {
-                        var gatewayTemp = new ZbGateway() { DataID = jobject.Value<int>("Data_ID") };
-                        gatewayTemp.oTASetImageData = Newtonsoft.Json.JsonConvert.DeserializeObject<OTASetImageData>(jobject["Data"].ToString());
+                        var oTASetImageData = Newtonsoft.Json.JsonConvert.DeserializeObject<OTASetImageData>(jobject["Data"].ToString());
 
-                        if (gatewayTemp.oTASetImageData == null)
+                        if (oTASetImageData == null)
                         {
                             d = new OTASetImageResponseAllData { errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�" };
                         }
                         else
                         {
-                            d = new OTASetImageResponseAllData { otaSetImageData = gatewayTemp.oTASetImageData };
+                            d = new OTASetImageResponseAllData { otaSetImageData = oTASetImageData };
                             System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
                         }
                     }
@@ -2407,31 +1738,15 @@
         /// <summary>
         /// 璁惧杩涜OTA鍗囩骇,缃戝叧鍙嶉鍏蜂綋淇℃伅
         /// </summary>
-        public OTASetImageResponseAllData otaSetImageResponseAllData;
-        /// <summary>
-        /// 璁惧杩涜OTA鍗囩骇,缃戝叧鍙嶉鍏蜂綋淇℃伅
-        /// </summary>
         [System.Serializable]
-        public class OTASetImageResponseAllData
+        public class OTASetImageResponseAllData : ErrorResponCommon
         {
-            /// <summary>
-            /// 閿欒淇℃伅
-            /// </summary>
-            public string errorMessageBase;
-            /// <summary>
-            /// 缃戝叧淇℃伅閿欒鍙嶉
-            /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
-            /// </summary>
-            public ErrorResponData errorResponData;
             /// <summary>
             /// 淇濆瓨zigbee鍗忚皟鍣ㄧ粍缃戜俊鎭�
             /// </summary>
             public OTASetImageData otaSetImageData;
         }
-        /// <summary>
-        /// 璁惧杩涜OTA鍗囩骇
-        /// </summary>
-        public OTASetImageData oTASetImageData;
+
         [System.Serializable]
         public class OTASetImageData
         {
@@ -2505,8 +1820,7 @@
 
                     if (topic == gatewayID + "/" + "Error_Respon")
                     {
-                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID };
-                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
+                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
 
                         if (temp == null)
                         {
@@ -2521,16 +1835,15 @@
 
                     if (topic == gatewayID + "/" + "OTA/StartUpdate_Respon")
                     {
-                        var gatewayTemp = new ZbGateway() { DataID = jobject.Value<int>("Data_ID") };
-                        gatewayTemp.startUpdateDeviceData = Newtonsoft.Json.JsonConvert.DeserializeObject<StartDeviceUpdateData>(jobject["Data"].ToString());
+                        var startUpdateDeviceData = Newtonsoft.Json.JsonConvert.DeserializeObject<StartDeviceUpdateData>(jobject["Data"].ToString());
 
-                        if (gatewayTemp.startUpdateDeviceData == null)
+                        if (startUpdateDeviceData == null)
                         {
                             d = new StartDeviceUpdateResponseAllData { errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�" };
                         }
                         else
                         {
-                            d = new StartDeviceUpdateResponseAllData { startUpdateDeviceData = gatewayTemp.startUpdateDeviceData };
+                            d = new StartDeviceUpdateResponseAllData { startUpdateDeviceData = startUpdateDeviceData };
                             System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
                         }
                     }
@@ -2583,10 +1896,6 @@
         /// <summary>
         /// 鍚姩鍗囩骇,缃戝叧鍙嶉鍏蜂綋淇℃伅
         /// </summary>
-        public StartDeviceUpdateResponseAllData startUpdateDeviceResponseAllData;
-        /// <summary>
-        /// 鍚姩鍗囩骇,缃戝叧鍙嶉鍏蜂綋淇℃伅
-        /// </summary>
         [System.Serializable]
         public class StartDeviceUpdateResponseAllData
         {
@@ -2604,10 +1913,7 @@
             /// </summary>
             public StartDeviceUpdateData startUpdateDeviceData;
         }
-        /// <summary>
-        /// 鍚姩鍗囩骇
-        /// </summary>
-        public StartDeviceUpdateData startUpdateDeviceData;
+
         [System.Serializable]
         public class StartDeviceUpdateData
         {
@@ -2648,7 +1954,9 @@
         /// <summary>
         /// 鍚姩鍗囩骇
         /// </summary>
+        [Newtonsoft.Json.JsonIgnore]
         public OTAScheduleResponData oTAScheduleResponData;
+
         [System.Serializable]
         public class OTAScheduleResponData
         {
@@ -2669,10 +1977,6 @@
             public int Percent = 999;
         }
 
-        /// <summary>
-        ///  鍚姩鍗囩骇鐨勬暟鎹�
-        /// </summary>
-        public StartUpdateData startUpdateData;
         [System.Serializable]
         public class StartUpdateData
         {
@@ -2702,8 +2006,7 @@
 
                     if (topic == gatewayID + "/" + "Error_Respon")
                     {
-                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID };
-                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
+                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
 
                         if (temp == null)
                         {
@@ -2718,16 +2021,15 @@
 
                     if (topic == gatewayID + "/" + "ZbDataPassthrough")
                     {
-                        var gatewayTemp = new ZbGateway() { DataID = jobject.Value<int>("Data_ID") };
-                        gatewayTemp.clientDataPassthroughResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<ClientDataPassthroughResponseData>(jobject["Data"].ToString());
+                        var clientDataPassthroughResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<ClientDataPassthroughResponseData>(jobject["Data"].ToString());
 
-                        if (gatewayTemp.clientDataPassthroughResponseData == null)
+                        if (clientDataPassthroughResponseData == null)
                         {
                             d = new ClientDataPassthroughResponseAllData { errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�" };
                         }
                         else
                         {
-                            d = new ClientDataPassthroughResponseAllData { clientDataPassthroughResponseData = gatewayTemp.clientDataPassthroughResponseData };
+                            d = new ClientDataPassthroughResponseAllData { clientDataPassthroughResponseData = clientDataPassthroughResponseData };
                             System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
                         }
                     }
@@ -2767,22 +2069,9 @@
         /// <summary>
         /// 瀹㈡埛绔悜鑺傜偣璁惧閫忎紶鏁版嵁,缃戝叧鍙嶉鍏蜂綋淇℃伅
         /// </summary>
-        public ClientDataPassthroughResponseAllData clientDataPassthroughResponseAllData;
-        /// <summary>
-        /// 瀹㈡埛绔悜鑺傜偣璁惧閫忎紶鏁版嵁,缃戝叧鍙嶉鍏蜂綋淇℃伅
-        /// </summary>
         [System.Serializable]
-        public class ClientDataPassthroughResponseAllData
+        public class ClientDataPassthroughResponseAllData : ErrorResponCommon
         {
-            /// <summary>
-            /// 閿欒淇℃伅
-            /// </summary>
-            public string errorMessageBase;
-            /// <summary>
-            /// 缃戝叧淇℃伅閿欒鍙嶉
-            /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
-            /// </summary>
-            public ErrorResponData errorResponData;
             /// <summary>
             /// 瀹㈡埛绔悜鑺傜偣璁惧閫忎紶鏁版嵁
             /// </summary>
@@ -2791,7 +2080,9 @@
         /// <summary>
         /// 瀹㈡埛绔悜鑺傜偣璁惧閫忎紶鏁版嵁
         /// </summary>
-        public ClientDataPassthroughResponseData clientDataPassthroughResponseData = new ClientDataPassthroughResponseData { };
+        [Newtonsoft.Json.JsonIgnore]
+        public ClientDataPassthroughResponseData clientDataPassthroughResponseData = new ClientDataPassthroughResponseData();
+
         [System.Serializable]
         public class ClientDataPassthroughResponseData
         {
@@ -2804,31 +2095,15 @@
         /// <summary>
         /// 鍚敤鎴栧叧闂妭鐐硅澶囬�忎紶鏁版嵁涓婁紶鎺ュ彛,缃戝叧鍙嶉鍏蜂綋淇℃伅
         /// </summary>
-        public OnZbDataPassthroughResponseAllData onZbDataPassthroughResponseAllData;
-        /// <summary>
-        /// 鍚敤鎴栧叧闂妭鐐硅澶囬�忎紶鏁版嵁涓婁紶鎺ュ彛,缃戝叧鍙嶉鍏蜂綋淇℃伅
-        /// </summary>
         [System.Serializable]
-        public class OnZbDataPassthroughResponseAllData
+        public class OnZbDataPassthroughResponseAllData : ErrorResponCommon
         {
-            /// <summary>
-            /// 閿欒淇℃伅
-            /// </summary>
-            public string errorMessageBase;
-            /// <summary>
-            /// 缃戝叧淇℃伅閿欒鍙嶉
-            /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
-            /// </summary>
-            public ErrorResponData errorResponData;
             /// <summary>
             /// 鍚敤鎴栧叧闂妭鐐硅澶囬�忎紶鏁版嵁涓婁紶鎺ュ彛
             /// </summary>
             public OnZbDataPassthroughData onZbDataPassthroughData;
         }
-        /// <summary>
-        /// 鍚敤鎴栧叧闂妭鐐硅澶囬�忎紶鏁版嵁涓婁紶鎺ュ彛
-        /// </summary>
-        public OnZbDataPassthroughData onZbDataPassthroughData;
+
         [System.Serializable]
         public class OnZbDataPassthroughData
         {
@@ -2863,8 +2138,7 @@
 
                     if (topic == gatewayID + "/" + "Error_Respon")
                     {
-                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID };
-                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
+                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
 
                         if (temp == null)
                         {
@@ -2878,16 +2152,15 @@
 
                     if (topic == gatewayID + "/" + "DownloadFile_Respon")
                     {
-                        var gatewayTemp = new ZbGateway() { DataID = jobject.Value<int>("Data_ID") };
-                        gatewayTemp.downloadFileResponData = Newtonsoft.Json.JsonConvert.DeserializeObject<DownloadFileResponData>(jobject["Data"].ToString());
+                        var downloadFileResponData = Newtonsoft.Json.JsonConvert.DeserializeObject<DownloadFileResponData>(jobject["Data"].ToString());
 
-                        if (gatewayTemp.downloadFileResponData == null)
+                        if (downloadFileResponData == null)
                         {
                             d = new DownloadFileResponAllData { errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�" };
                         }
                         else
                         {
-                            d = new DownloadFileResponAllData { downloadFileResponData = gatewayTemp.downloadFileResponData };
+                            d = new DownloadFileResponAllData { downloadFileResponData = downloadFileResponData };
                             System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
                         }
                     }
@@ -2928,35 +2201,19 @@
             });
 
         }
-        /// <summary>
-        /// 缃戝叧绯荤粺鍗囩骇,缃戝叧鍙嶉鍏蜂綋淇℃伅
-        /// </summary>
-        public DownloadFileResponAllData downloadFileResponAllData;
+
         /// <summary>
         /// 缃戝叧绯荤粺鍗囩骇,缃戝叧鍙嶉鍏蜂綋淇℃伅
         /// </summary>
         [System.Serializable]
-        public class DownloadFileResponAllData
+        public class DownloadFileResponAllData : ErrorResponCommon
         {
-            /// <summary>
-            /// 閿欒淇℃伅
-            /// </summary>
-            public string errorMessageBase;
-            /// <summary>
-            /// 缃戝叧淇℃伅閿欒鍙嶉
-            /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
-            /// </summary>
-            public ErrorResponData errorResponData;
             /// <summary>
             /// 涓嬭浇浜戠鍥轰欢
             /// </summary>
             public DownloadFileResponData downloadFileResponData;
         }
 
-        /// <summary>
-        /// 涓嬭浇浜戠鍥轰欢
-        /// </summary>
-        public DownloadFileResponData downloadFileResponData;
         /// <summary>
         /// 涓嬭浇浜戠鍥轰欢
         /// </summary>
@@ -2980,6 +2237,7 @@
         /// <summary>
         /// 涓嬭浇杩涘害
         /// </summary>
+        [Newtonsoft.Json.JsonIgnore]
         public DownloadFileProgressResponData downloadFileProgressResponData;
         /// <summary>
         /// 涓嬭浇杩涘害
@@ -3032,8 +2290,7 @@
 
                     if (topic == gatewayID + "/" + "Error_Respon")
                     {
-                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID };
-                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
+                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
 
                         if (temp == null)
                         {
@@ -3048,16 +2305,15 @@
 
                     if (topic == gatewayID + "/" + "OTA/KillUpdate_Respon")
                     {
-                        var gatewayTemp = new ZbGateway() { DataID = jobject.Value<int>("Data_ID") };
-                        gatewayTemp.killUpdateData = Newtonsoft.Json.JsonConvert.DeserializeObject<KillUpdateData>(jobject["Data"].ToString());
+                        var killUpdateData = Newtonsoft.Json.JsonConvert.DeserializeObject<KillUpdateData>(jobject["Data"].ToString());
 
-                        if (gatewayTemp.killUpdateData == null)
+                        if (killUpdateData == null)
                         {
                             d = new KillUpdateResponseAllData { errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�" };
                         }
                         else
                         {
-                            d = new KillUpdateResponseAllData { killUpdateData = gatewayTemp.killUpdateData };
+                            d = new KillUpdateResponseAllData { killUpdateData = killUpdateData };
                             System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
                         }
                     }
@@ -3095,31 +2351,15 @@
         /// <summary>
         /// 缁堟璁惧鍗囩骇,缃戝叧鍙嶉鍏蜂綋淇℃伅
         /// </summary>
-        public KillUpdateResponseAllData killUpdateResponseAllData;
-        /// <summary>
-        /// 缁堟璁惧鍗囩骇,缃戝叧鍙嶉鍏蜂綋淇℃伅
-        /// </summary>
         [System.Serializable]
-        public class KillUpdateResponseAllData
+        public class KillUpdateResponseAllData : ErrorResponCommon
         {
-            /// <summary>
-            /// 閿欒淇℃伅
-            /// </summary>
-            public string errorMessageBase;
-            /// <summary>
-            /// 缃戝叧淇℃伅閿欒鍙嶉
-            /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
-            /// </summary>
-            public ErrorResponData errorResponData;
             /// <summary>
             /// 缁堟璁惧鍗囩骇
             /// </summary>
             public KillUpdateData killUpdateData;
         }
-        /// <summary>
-        /// 缁堟璁惧鍗囩骇
-        /// </summary>
-        public KillUpdateData killUpdateData;
+
         [System.Serializable]
         public class KillUpdateData
         {
@@ -3132,22 +2372,10 @@
         #endregion
 
         #region 绉佹湁鍗忚缃戝叧鍜岃澶囩殑榛樿鍥炲
-        /// <summary>
-        /// 绉佹湁鍗忚缃戝叧鍜岃澶囩殑榛樿鍥炲
-        /// </summary>
-        public ResponseAllData keyColorDataResponseAllData;
+
         [System.Serializable]
-        public class ResponseAllData
+        public class ResponseAllData : ErrorResponCommon
         {
-            /// <summary>
-            /// 閿欒淇℃伅
-            /// </summary>
-            public string errorMessageBase;
-            /// <summary>
-            /// 缃戝叧淇℃伅閿欒鍙嶉
-            /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
-            /// </summary>
-            public ErrorResponData errorResponData;
             /// <summary>
             /// 鎸夐敭鎸囩ず鐏鑹蹭俊鎭�
             /// </summary>
@@ -3171,5 +2399,27 @@
             public int status = -1;
         }
         #endregion
+
+        #region 鈻� 璋冭瘯鎵撳嵃
+
+        /// <summary>
+        /// 璋冭瘯鏃舵墦寮�鎵撳嵃淇℃伅锛宼rue:鎵撳嵃锛宖alse:涓嶆墦鍗�
+        /// </summary>
+        /// <param name="msg">Message.</param>
+        /// <param name="flage">If set to <c>true</c> flage.</param>
+        public static void DebugPrintLog(string msg, bool flage = true)
+        {
+#if DEBUG
+            if (flage == true)
+            {
+                if (msg.Contains("DeviceStatusReport") == false)
+                {
+                    System.Console.WriteLine(msg + "  " + System.DateTime.Now.ToLongTimeString() + " " + System.DateTime.Now.Millisecond);
+                }
+            }
+#endif
+        }
+
+        #endregion
     }
 }

--
Gitblit v1.8.0