From f71e74b5f0d2716fbf05da016cdaa18d64e09f80 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期四, 31 十二月 2020 17:01:18 +0800
Subject: [PATCH] 又换完成最新门锁。空气质量传感器完成数据和基本配置功能。开发图表和自动化的同事可下载此代码

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs |  454 +++++++++++++++++++++++++++++++------------------------
 1 files changed, 255 insertions(+), 199 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
index 6e50ac4..b0b6e8e 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
@@ -1,25 +1,25 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Text;
-using Newtonsoft.Json.Linq;
-using ZigBee.Device;
-
-namespace Shared.Phone.UserCenter
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using Newtonsoft.Json.Linq;
+using ZigBee.Device;
+
+namespace Shared.Phone.UserCenter
 {
-  /// <summary>
-  /// 鍏ㄥ眬鎺ユ敹缃戝叧鎺ㄩ�佺殑鐨勯�昏緫(涓轰簡鎵ц閫熷害,灏藉彲鑳界殑鍒姞鑰楁椂鐨勬搷浣�)
-  /// </summary>
+  /// <summary>
+  /// 鍏ㄥ眬鎺ユ敹缃戝叧鎺ㄩ�佺殑鐨勯�昏緫(涓轰簡鎵ц閫熷害,灏藉彲鑳界殑鍒姞鑰楁椂鐨勬搷浣�)
+  /// </summary>
   public class HdlGatewayReceiveLogic
   {
-    #region 鈻� 鍙橀噺澹版槑___________________________
+    #region 鈻� 鍙橀噺澹版槑___________________________
 
-    /// <summary>
-    /// 鍏ㄥ眬鎺ユ敹缃戝叧鎺ㄩ�佺殑鐨勯�昏緫
-    /// </summary>
+    /// <summary>
+    /// 鍏ㄥ眬鎺ユ敹缃戝叧鎺ㄩ�佺殑鐨勯�昏緫
+    /// </summary>
     private static HdlGatewayReceiveLogic m_Current = null;
-    /// <summary>
-    /// 鍏ㄥ眬鎺ユ敹缃戝叧鎺ㄩ�佺殑鐨勯�昏緫
-    /// </summary>
+    /// <summary>
+    /// 鍏ㄥ眬鎺ユ敹缃戝叧鎺ㄩ�佺殑鐨勯�昏緫
+    /// </summary>
     public static HdlGatewayReceiveLogic Current
     {
       get
@@ -32,36 +32,41 @@
       }
     }
 
-    /// <summary>
-    /// 缃戝叧鎺ユ敹浜嬩欢(鍙傛暟1:涓婚 鍙傛暟2:鎺ㄩ�佹秷鎭�)
-    /// </summary>
+    /// <summary>
+    /// 缃戝叧鎺ユ敹浜嬩欢(鍙傛暟1:涓婚 鍙傛暟2:鎺ㄩ�佹秷鎭�)
+    /// </summary>
     private Action<string, string> GatewayReceiveEvent = null;
-    /// <summary>
-    /// 鎺ユ敹缃戝叧鐨刬d
-    /// </summary>
+    /// <summary>
+    /// 鎺ユ敹缃戝叧鐨刬d
+    /// </summary>
     private string GatewayReceiveId = null;
-    /// <summary>
-    /// 璁惧鎺ㄩ�佷簨浠堕泦鍚�
-    /// </summary>
+    /// <summary>
+    /// 璁惧鎺ㄩ�佷簨浠堕泦鍚�
+    /// </summary>
     private Dictionary<string, Action<CommonDevice>> dicDeviceEvent = new Dictionary<string, Action<CommonDevice>>();
-    /// <summary>
-    /// 鍛戒护鍖哄垎
-    /// </summary>
+    /// <summary>
+    /// 鍛戒护鍖哄垎
+    /// </summary>
     private Dictionary<string, ReceiveComandDiv> dicCommandDiv = new Dictionary<string, ReceiveComandDiv>();
 
-    #endregion
+    #endregion
 
-    #region 鈻� 鍏ㄥ眬鎺ユ敹___________________________
+    #region 鈻� 鍏ㄥ眬鎺ユ敹___________________________
 
-    /// <summary>
-    /// 鍏ㄥ眬鎺ユ敹缃戝叧鎺ㄩ�佺殑鐨勯�昏緫(涓轰簡鎵ц閫熷害,灏藉彲鑳界殑鍒姞鑰楁椂鐨勬搷浣�)
-    /// </summary>
-    /// <param name="gatewayId">缃戝叧ID</param>
-    /// <param name="topic">鏁翠釜涓婚</param>
-    /// <param name="reportTopic">涓婃姤鏁版嵁鐨勪富棰�</param>
-    /// <param name="msgData">鎺ユ敹鐨勬暟鎹�</param>
+    /// <summary>
+    /// 鍏ㄥ眬鎺ユ敹缃戝叧鎺ㄩ�佺殑鐨勯�昏緫(涓轰簡鎵ц閫熷害,灏藉彲鑳界殑鍒姞鑰楁椂鐨勬搷浣�)
+    /// </summary>
+    /// <param name="gatewayId">缃戝叧ID</param>
+    /// <param name="topic">鏁翠釜涓婚</param>
+    /// <param name="reportTopic">涓婃姤鏁版嵁鐨勪富棰�</param>
+    /// <param name="msgData">鎺ユ敹鐨勬暟鎹�</param>
     public void GatewayOverallMsgReceive(string gatewayId, string topic, string reportTopic, string msgData)
     {
+      //濡傛灉瀹冨湪鐧婚檰鐣岄潰,鍒欎笉鍋氫换浣曞鐞�
+      if (Common.Config.Instance.HomeId == string.Empty)
+      {
+        return;
+      }
       if (topic == "AppNoLogin")
       {
         HdlThreadLogic.Current.RunMain(() =>
@@ -149,7 +154,11 @@
       {
         if (HdlGatewayLogic.Current.IsGatewayExist(gatewayId) == false)
         {
-          //涓嶆槸鑷繁缁戝畾鐨勭綉鍏筹紝鍒欎笉澶勭悊
+          //涓嶆槸鑷繁缁戝畾鐨勭綉鍏筹紝鍒欎笉澶勭悊,浣嗘槸涓嬮潰杩欎釜涓滆タ鏈夌偣鐗规畩
+          if (gatewayId == this.GatewayReceiveId)
+          {
+            this.GatewayReceiveEvent?.Invoke(topic, msgData);
+          }
           return;
         }
         //璁惧灞炴�т笂鎶�
@@ -216,14 +225,14 @@
       }
     }
 
-    #endregion
+    #endregion
 
-    #region 鈻� 璁惧灞炴�т笂鎶______________________
+    #region 鈻� 璁惧灞炴�т笂鎶______________________
 
-    /// <summary>
-    /// 璁惧灞炴�т笂鎶�
-    /// </summary>
-    /// <param name="receiveData"></param>
+    /// <summary>
+    /// 璁惧灞炴�т笂鎶�
+    /// </summary>
+    /// <param name="receiveData"></param>
     private void DeviceAttributeReportPush(JObject receiveData)
     {
       if (this.dicDeviceEvent.Count == 0)
@@ -257,7 +266,7 @@
         locadevice.IsOnline = 1;
         locadevice.LastDateTime = DateTime.Now;
 
-        #region 鈻� 寮�鍏冲姛鑳�
+        #region 鈻� 寮�鍏冲姛鑳�
         //鏅捐。鏋跺洖璺�2锛�3锛�4锛�5閮芥槸CluterID鏄�6 ,浣嗘槸鍔熻兘涓嶆槸寮�鍏�
         if (locadevice.Type == DeviceType.Airer)
         {
@@ -350,11 +359,25 @@
               //宸茬粡鎺ユ敹鍒扮姸鎬�
               locadevice.HadReadDeviceStatu = true;
             }
+
+            if (locadevice is TemperatureSensor)
+            {
+              //鑾峰彇璁惧绫诲瀷
+              var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { locadevice });
+              //绌烘皵璐ㄩ噺浼犳劅鍣�
+              if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.AirQualitySensor)
+              {
+                locadevice.DeviceStatusReport = report.DeviceStatusReport;
+                ((TemperatureSensor)locadevice).OnOffStatus = report.DeviceStatusReport.AttriBute[0].AttriButeData;
+                //宸茬粡鎺ユ敹鍒扮姸鎬�
+                locadevice.HadReadDeviceStatu = true;
+              }
+            }
           }
         }
-        #endregion
+        #endregion
 
-        #region 鈻� 鐢甸噺鎺ㄩ��
+        #region 鈻� 鐢甸噺鎺ㄩ��
         //鐢甸噺鎺ㄩ��
         if (report.DeviceStatusReport.CluterID == 1)
         {
@@ -378,9 +401,9 @@
           }
         }
 
-        #endregion
+        #endregion
 
-        #region 鈻� 铚傞福鍣ㄦ帹閫�
+        #region 鈻� 铚傞福鍣ㄦ帹閫�
         //铚傞福鍣ㄦ暟鎹�
         else if (report.DeviceStatusReport.CluterID == 1282)
         {
@@ -397,9 +420,9 @@
             }
           }
         }
-        #endregion
+        #endregion
 
-        #region 鈻� 绐楀笜鏁版嵁
+        #region 鈻� 绐楀笜鏁版嵁
         //绐楀笜鏁版嵁
         else if (report.DeviceStatusReport.CluterID == 258)
         {
@@ -420,9 +443,9 @@
             locadevice.HadReadDeviceStatu = true;
           }
         }
-        #endregion
+        #endregion
 
-        #region 鈻� 绌鸿皟鍜屾柊椋庢暟鎹�
+        #region 鈻� 绌鸿皟鍜屾柊椋庢暟鎹�
         //绌鸿皟鏁版嵁
         else if (report.DeviceStatusReport.CluterID == 513)
         {
@@ -547,9 +570,9 @@
             }
           }
         }
-        #endregion
+        #endregion
 
-        #region 鈻� 浜害鏁版嵁
+        #region 鈻� 浜害鏁版嵁
         //浜害鏁版嵁
         else if (report.DeviceStatusReport.CluterID == 8)
         {
@@ -576,9 +599,9 @@
             //}
           }
         }
-        #endregion
+        #endregion
 
-        #region 鈻� 鑹叉俯鏁版嵁
+        #region 鈻� 鑹叉俯鏁版嵁
         //鑹叉俯鏁版嵁
         else if (report.DeviceStatusReport.CluterID == 768)
         {
@@ -595,9 +618,9 @@
             locadevice.HadReadDeviceStatu = true;
           }
         }
-        #endregion
+        #endregion
 
-        #region 鈻� 娓╁害鏁版嵁
+        #region 鈻� 娓╁害鏁版嵁
         //娓╁害鏁版嵁
         else if (report.DeviceStatusReport.CluterID == 1026)
         {
@@ -659,9 +682,9 @@
             }
           }
         }
-        #endregion
+        #endregion
 
-        #region 鈻� 婀垮害鏁版嵁
+        #region 鈻� 婀垮害鏁版嵁
         //婀垮害鏁版嵁
         else if (report.DeviceStatusReport.CluterID == 1029)
         {
@@ -715,9 +738,9 @@
             }
           }
         }
-        #endregion
+        #endregion
 
-        #region 鈻� PM2.5鏁版嵁
+        #region 鈻� PM2.5鏁版嵁
         //PM2.5鏁版嵁
         else if (report.DeviceStatusReport.CluterID == 1066)
         {
@@ -726,10 +749,19 @@
             //PM2.5
             if (attData.AttributeId == (int)AttriButeId.MeasuredValue)
             {
-
               if (attData.AttriButeDataType == 57)
               {
-                ((PMSensor)locadevice).currentPmData = attData.AttriButeData;
+                //鑾峰彇璁惧绫诲瀷
+                var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { locadevice });
+                //绌烘皵璐ㄩ噺浼犳劅鍣�
+                if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.AirQualitySensor)
+                {
+                  ((TemperatureSensor)locadevice).currentPmData = attData.AttriButeData;
+                }
+                else
+                {
+                  ((PMSensor)locadevice).currentPmData = attData.AttriButeData;
+                }
               }
             }
             //宸茬粡鎺ユ敹鍒扮姸鎬�
@@ -737,9 +769,33 @@
           }
         }
 
-        #endregion
+        #endregion
 
-        #region 鈻� 璁惧鍩虹淇℃伅
+        #region 鈻� CO2鏁版嵁
+        else if (report.DeviceStatusReport.CluterID == 1037)
+        {
+          foreach (var attData in report.DeviceStatusReport.AttriBute)
+          {
+            if (attData.AttributeId == (int)AttriButeId.MeasuredValue)
+            {
+              if (attData.AttriButeDataType == 57)
+              {
+                //鑾峰彇璁惧绫诲瀷
+                var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { locadevice });
+                //绌烘皵璐ㄩ噺浼犳劅鍣�
+                if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.AirQualitySensor)
+                {
+                  ((TemperatureSensor)locadevice).currentCO2 = attData.AttriButeData;
+                }
+              }
+            }
+            //宸茬粡鎺ユ敹鍒扮姸鎬�
+            locadevice.HadReadDeviceStatu = true;
+          }
+        }
+        #endregion
+
+        #region 鈻� 璁惧鍩虹淇℃伅
 
         else if (report.DeviceStatusReport.CluterID == 0)
         {
@@ -833,14 +889,14 @@
           }
         }
 
-        #endregion
+        #endregion
       }
       else if (deviceEpoint == 200)
       {
         var localOta = Common.LocalDevice.Current.GetOTADevice(deviceAddr);
         if (localOta != null)
         {
-          #region 鈻� 鍥轰欢鐗堟湰
+          #region 鈻� 鍥轰欢鐗堟湰
           //鍥轰欢鐗堟湰
           if (report.DeviceStatusReport.CluterID == (int)Cluster_ID.Ota)
           {
@@ -864,20 +920,20 @@
             }
             localOta.ReSave();
           }
-          #endregion
+          #endregion
         }
       }
       this.DeviceReportPush(report, ReceiveComandDiv.A璁惧灞炴�т笂鎶�);
     }
 
-    #endregion
+    #endregion
 
-    #region 鈻� 浼犳劅鍣ㄤ笂鎶________________________
+    #region 鈻� 浼犳劅鍣ㄤ笂鎶________________________
 
-    /// <summary>
-    /// 浼犳劅鍣ㄨ澶囦笂鎶�
-    /// </summary>
-    /// <param name="receiveData"></param>
+    /// <summary>
+    /// 浼犳劅鍣ㄨ澶囦笂鎶�
+    /// </summary>
+    /// <param name="receiveData"></param>
     private void SensorDeviceReportPush(JObject receiveData)
     {
       var ias = new IASZone() { DeviceAddr = receiveData.Value<string>("DeviceAddr"), DeviceEpoint = receiveData.Value<int>("Epoint") };
@@ -907,14 +963,14 @@
       this.ShowHadNewMessageAppeal();
     }
 
-    #endregion
+    #endregion
 
-    #region 鈻� 闂ㄩ攣涓婃姤___________________________
+    #region 鈻� 闂ㄩ攣涓婃姤___________________________
 
-    /// <summary>
-    /// 闂ㄩ攣涓婃姤
-    /// </summary>
-    /// <param name="receiveData"></param>
+    /// <summary>
+    /// 闂ㄩ攣涓婃姤
+    /// </summary>
+    /// <param name="receiveData"></param>
     private void DoorLockDeviceReportPush(JObject receiveData)
     {
       if (UserCenterResourse.UserInfo.AuthorityNo == 1)
@@ -946,14 +1002,14 @@
         this.ShowHadNewMessageAppeal();
       }
     }
-    #endregion
+    #endregion
 
-    #region 鈻� 璁惧鍦ㄧ嚎鐘舵�佹洿鏂板弽棣坃______________
+    #region 鈻� 璁惧鍦ㄧ嚎鐘舵�佹洿鏂板弽棣坃______________
 
-    /// <summary>
-    /// 璁惧鍦ㄧ嚎鐘舵�佹洿鏂板弽棣�
-    /// </summary>
-    /// <param name="receiveData"></param>
+    /// <summary>
+    /// 璁惧鍦ㄧ嚎鐘舵�佹洿鏂板弽棣�
+    /// </summary>
+    /// <param name="receiveData"></param>
     private void DeviceOnlineChangePush(JObject receiveData)
     {
       if (this.dicDeviceEvent.Count == 0)
@@ -982,14 +1038,14 @@
       this.DeviceReportPush(tempDevice, ReceiveComandDiv.A璁惧鍦ㄧ嚎涓婃姤);
     }
 
-    #endregion
+    #endregion
 
-    #region 鈻� 璁惧鎺у埗鐘舵�佸弽棣坃__________________
+    #region 鈻� 璁惧鎺у埗鐘舵�佸弽棣坃__________________
 
-    /// <summary>
-    /// 璁惧鎺у埗鐘舵�佸弽棣�
-    /// </summary>
-    /// <param name="receiveData"></param>
+    /// <summary>
+    /// 璁惧鎺у埗鐘舵�佸弽棣�
+    /// </summary>
+    /// <param name="receiveData"></param>
     private void DeviceControlResponePush(JObject receiveData)
     {
       if (this.dicDeviceEvent.Count == 0)
@@ -1002,14 +1058,14 @@
       this.DeviceReportPush(tempDevice, ReceiveComandDiv.A鑺傜偣鎺у埗鍙嶉);
     }
 
-    #endregion
+    #endregion
 
-    #region 鈻� 甯冮槻_______________________________
+    #region 鈻� 甯冮槻_______________________________
 
-    /// <summary>
-    /// 甯冮槻鎺ㄩ��
-    /// </summary>
-    /// <param name="receiveData"></param>
+    /// <summary>
+    /// 甯冮槻鎺ㄩ��
+    /// </summary>
+    /// <param name="receiveData"></param>
     private void SetSafetyGarrisonPush(JObject receiveData)
     {
       var data = Newtonsoft.Json.JsonConvert.DeserializeObject<Safeguard.EnableModeResponseData>(receiveData["Data"].ToString());
@@ -1035,14 +1091,14 @@
       }
     }
 
-    #endregion
+    #endregion
 
-    #region 鈻� 鎾ら槻_______________________________
+    #region 鈻� 鎾ら槻_______________________________
 
-    /// <summary>
-    /// 鎾ら槻鎺ㄩ��
-    /// </summary>
-    /// <param name="receiveData"></param>
+    /// <summary>
+    /// 鎾ら槻鎺ㄩ��
+    /// </summary>
+    /// <param name="receiveData"></param>
     private void RemoveSafetyGarrisonPush(JObject receiveData)
     {
       var data = Newtonsoft.Json.JsonConvert.DeserializeObject<Safeguard.WithdrawModeResponseData>(receiveData["Data"].ToString());
@@ -1061,14 +1117,14 @@
       }
     }
 
-    #endregion
+    #endregion
 
-    #region 鈻� 閫氳繃澶栭儴鏂瑰紡甯冮槻鎾ら槻_______________
+    #region 鈻� 閫氳繃澶栭儴鏂瑰紡甯冮槻鎾ら槻_______________
 
-    /// <summary>
-    /// 閫氳繃澶栭儴鏂瑰紡甯冮槻鎾ら槻
-    /// </summary>
-    /// <param name="receiveData">鎺ユ敹鐨勬暟鎹�</param>
+    /// <summary>
+    /// 閫氳繃澶栭儴鏂瑰紡甯冮槻鎾ら槻
+    /// </summary>
+    /// <param name="receiveData">鎺ユ敹鐨勬暟鎹�</param>
     private void SecurityEnOrWithdrawSucceedReport(JObject receiveData)
     {
       var data = Newtonsoft.Json.JsonConvert.DeserializeObject<SecurityEnOrWithdrawResult>(receiveData["Data"].ToString());
@@ -1107,33 +1163,33 @@
       this.ShowHadNewMessageAppeal();
     }
 
-    /// <summary>
-    /// 閫氳繃澶栭儴鏂瑰紡甯冮槻鎾ら槻鐨勬帴鏀剁粨鏋�
-    /// </summary>
+    /// <summary>
+    /// 閫氳繃澶栭儴鏂瑰紡甯冮槻鎾ら槻鐨勬帴鏀剁粨鏋�
+    /// </summary>
     private class SecurityEnOrWithdrawResult
     {
-      /// <summary>
-      /// 0锛氬竷闃叉垚鍔�  1锛氭挙闃叉垚鍔�
-      /// </summary>
+      /// <summary>
+      /// 0锛氬竷闃叉垚鍔�  1锛氭挙闃叉垚鍔�
+      /// </summary>
       public int EnOrWithdraw = -1;
-      /// <summary>
-      /// 瀹夐槻妯″紡id
-      /// </summary>
+      /// <summary>
+      /// 瀹夐槻妯″紡id
+      /// </summary>
       public int ModeId = -1;
-      /// <summary>
-      /// 澶栭儴甯冩挙闃叉柟寮�-> 0:鎵ц閫昏緫鍔ㄤ綔  1:鎸夐敭鎿嶄綔
-      /// </summary>
+      /// <summary>
+      /// 澶栭儴甯冩挙闃叉柟寮�-> 0:鎵ц閫昏緫鍔ㄤ綔  1:鎸夐敭鎿嶄綔
+      /// </summary>
       public int OperationWay = -1;
     }
 
-    #endregion
+    #endregion
 
-    #region 鈻� 閫昏緫瑙﹀彂涓婃姤_______________________
+    #region 鈻� 閫昏緫瑙﹀彂涓婃姤_______________________
 
-    /// <summary>
-    /// 閫昏緫瑙﹀彂涓婃姤
-    /// </summary>
-    /// <param name="receiveData"></param>
+    /// <summary>
+    /// 閫昏緫瑙﹀彂涓婃姤
+    /// </summary>
+    /// <param name="receiveData"></param>
     private void LogicExecutePush(JObject receiveData)
     {
       //鏄剧ず鏈夋柊娑堟伅鐨勭壒鏁�
@@ -1173,14 +1229,14 @@
         }
       }
     }
-    #endregion
+    #endregion
 
-    #region 鈻� 鍦烘櫙瑙﹀彂涓婃姤_______________________
+    #region 鈻� 鍦烘櫙瑙﹀彂涓婃姤_______________________
 
-    /// <summary>
-    /// 鍦烘櫙瑙﹀彂涓婃姤
-    /// </summary>
-    /// <param name="receiveData"></param>
+    /// <summary>
+    /// 鍦烘櫙瑙﹀彂涓婃姤
+    /// </summary>
+    /// <param name="receiveData"></param>
     private void SceneExecPush(JObject receiveData)
     {
       //鐩墠涓嶅鐞嗗満鏅笂鎶ュ唴瀹�
@@ -1189,22 +1245,22 @@
       this.ShowHadNewMessageAppeal();
     }
 
-    #endregion
+    #endregion
 
 
 
-    #region 鈻� 娣诲姞璁惧浜嬩欢_______________________
+    #region 鈻� 娣诲姞璁惧浜嬩欢_______________________
 
-    /// <summary>
-    /// 娣诲姞鑾峰彇璁惧灞炴�х殑浜嬩欢(灞炴�т笂鎶ョ殑瀵硅薄锛歞evice.DeviceStatusReport)
-    /// </summary>
-    /// <param name="mainKeys">鏍囪瘑浜嬩欢鐨勪富閿�(鍙互闅忎究濉�,涓昏鏄拡瀵瑰涓晫闈竴璧蜂娇鐢ㄧ殑鎯呭喌)</param>
-    /// <param name="comand">鍛戒护鍖哄垎</param>
-    /// <param name="action">
-    /// <para>褰撴帴鏀跺埌缃戝叧鍥炲涔嬪悗鐨勫洖璋冨嚱鏁�</para>
-    /// <para>璁惧灞炴�т笂鎶ョ殑瀵硅薄锛歞evice.DeviceStatusReport</para>
-    /// <para>浼犳劅鍣ㄤ笂鎶ョ殑瀵硅薄锛歩as.iASInfo</para>
-    /// <para>璁惧鍦ㄧ嚎涓婃姤鐨勫璞★細device.IsOnline</para></param>
+    /// <summary>
+    /// 娣诲姞鑾峰彇璁惧灞炴�х殑浜嬩欢(灞炴�т笂鎶ョ殑瀵硅薄锛歞evice.DeviceStatusReport)
+    /// </summary>
+    /// <param name="mainKeys">鏍囪瘑浜嬩欢鐨勪富閿�(鍙互闅忎究濉�,涓昏鏄拡瀵瑰涓晫闈竴璧蜂娇鐢ㄧ殑鎯呭喌)</param>
+    /// <param name="comand">鍛戒护鍖哄垎</param>
+    /// <param name="action">
+    /// <para>褰撴帴鏀跺埌缃戝叧鍥炲涔嬪悗鐨勫洖璋冨嚱鏁�</para>
+    /// <para>璁惧灞炴�т笂鎶ョ殑瀵硅薄锛歞evice.DeviceStatusReport</para>
+    /// <para>浼犳劅鍣ㄤ笂鎶ョ殑瀵硅薄锛歩as.iASInfo</para>
+    /// <para>璁惧鍦ㄧ嚎涓婃姤鐨勫璞★細device.IsOnline</para></param>
     public void AddAttributeEvent(string mainKeys, ReceiveComandDiv comand, Action<CommonDevice> action)
     {
       lock (this.dicDeviceEvent)
@@ -1218,11 +1274,11 @@
       }
     }
 
-    /// <summary>
-    /// 娣诲姞缃戝叧鎺ユ敹浜嬩欢(action鍙兘瀛樺湪涓�涓�,涓嶢ddAttributeEvent涓嶅叡瀛�,AddAttributeEvent浼樺厛)
-    /// </summary>
-    /// <param name="i_gatewayId">缃戝叧id</param>
-    /// <param name="action">鍙兘瀛樺湪涓�涓猘ction (鍙傛暟1:涓婚 鍙傛暟2:鎺ㄩ�佹秷鎭�)</param>
+    /// <summary>
+    /// 娣诲姞缃戝叧鎺ユ敹浜嬩欢(action鍙兘瀛樺湪涓�涓�,涓嶢ddAttributeEvent涓嶅叡瀛�,AddAttributeEvent浼樺厛)
+    /// </summary>
+    /// <param name="i_gatewayId">缃戝叧id</param>
+    /// <param name="action">鍙兘瀛樺湪涓�涓猘ction (鍙傛暟1:涓婚 鍙傛暟2:鎺ㄩ�佹秷鎭�)</param>
     public void AddGatewayReceiveEvent(string i_gatewayId, Action<string, string> action)
     {
       //娣诲姞浜嬩欢
@@ -1230,14 +1286,14 @@
       this.GatewayReceiveId = i_gatewayId;
     }
 
-    #endregion
+    #endregion
 
-    #region 鈻� 绉婚櫎璁惧鐩戝惉_______________________
+    #region 鈻� 绉婚櫎璁惧鐩戝惉_______________________
 
-    /// <summary>
-    /// 绉婚櫎浜嬩欢
-    /// </summary>
-    /// <param name="mainKeys">鏍囪瘑浜嬩欢鐨勪富閿�(鍙互闅忎究濉�,涓昏鏄拡瀵瑰涓晫闈竴璧蜂娇鐢ㄧ殑鎯呭喌)</param>
+    /// <summary>
+    /// 绉婚櫎浜嬩欢
+    /// </summary>
+    /// <param name="mainKeys">鏍囪瘑浜嬩欢鐨勪富閿�(鍙互闅忎究濉�,涓昏鏄拡瀵瑰涓晫闈竴璧蜂娇鐢ㄧ殑鎯呭喌)</param>
     public void RemoveEvent(string mainKeys)
     {
       lock (this.dicDeviceEvent)
@@ -1253,9 +1309,9 @@
       }
     }
 
-    /// <summary>
-    /// 绉婚櫎鍏ㄩ儴鐨勪簨浠�
-    /// </summary>
+    /// <summary>
+    /// 绉婚櫎鍏ㄩ儴鐨勪簨浠�
+    /// </summary>
     public void RemoveAllEvent()
     {
       lock (this.dicDeviceEvent)
@@ -1273,24 +1329,24 @@
       }
     }
 
-    /// <summary>
-    /// 绉婚櫎缃戝叧鎺ユ敹浜嬩欢(鍙兘瀛樺湪涓�涓簨浠�)
-    /// </summary>
+    /// <summary>
+    /// 绉婚櫎缃戝叧鎺ユ敹浜嬩欢(鍙兘瀛樺湪涓�涓簨浠�)
+    /// </summary>
     public void RemoveGatewayReceiveEvent()
     {
       this.GatewayReceiveEvent = null;
       this.GatewayReceiveId = null;
     }
 
-    #endregion
+    #endregion
 
-    #region 鈻� 涓�鑸柟娉昣__________________________
+    #region 鈻� 涓�鑸柟娉昣__________________________
 
-    /// <summary>
-    /// 璁惧涓婃姤鎺ㄩ��(璋冪敤姝ゆ柟娉�,浠栦細鎺ㄩ�佸埌鍚勮嚜鐨勭晫闈�)
-    /// </summary>
-    /// <param name="common"></param>
-    /// <param name="comand"></param>
+    /// <summary>
+    /// 璁惧涓婃姤鎺ㄩ��(璋冪敤姝ゆ柟娉�,浠栦細鎺ㄩ�佸埌鍚勮嚜鐨勭晫闈�)
+    /// </summary>
+    /// <param name="common"></param>
+    /// <param name="comand"></param>
     public void DeviceReportPush(CommonDevice common, ReceiveComandDiv comand)
     {
       if (this.dicDeviceEvent.Count == 0)
@@ -1332,19 +1388,19 @@
       }
     }
 
-    /// <summary>
-    /// 鏄惁瀛樺湪鎸囧畾鐨勪簨浠�
-    /// </summary>
-    /// <param name="mainkeys"></param>
-    /// <returns></returns>
+    /// <summary>
+    /// 鏄惁瀛樺湪鎸囧畾鐨勪簨浠�
+    /// </summary>
+    /// <param name="mainkeys"></param>
+    /// <returns></returns>
     public bool IsEsixt(string mainkeys)
     {
       return this.dicCommandDiv.ContainsKey(mainkeys);
     }
 
-    /// <summary>
-    /// 鏄剧ず鏈夋柊娑堟伅鐨勭壒鏁�
-    /// </summary>
+    /// <summary>
+    /// 鏄剧ず鏈夋柊娑堟伅鐨勭壒鏁�
+    /// </summary>
     private void ShowHadNewMessageAppeal()
     {
       //鏈夋柊娑堟伅(鐗规晥杩樺湪鏃�,涓嶉渶瑕佸啀澶勭悊)
@@ -1362,29 +1418,29 @@
       }
     }
 
-    #endregion
+    #endregion
   }
 
-  /// <summary>
-  /// 鎺ユ敹鍛戒护鍖哄垎
-  /// </summary>
+  /// <summary>
+  /// 鎺ユ敹鍛戒护鍖哄垎
+  /// </summary>
   public enum ReceiveComandDiv
   {
-    /// <summary>
-    /// 璁惧灞炴�т笂鎶�
-    /// </summary>
+    /// <summary>
+    /// 璁惧灞炴�т笂鎶�
+    /// </summary>
     A璁惧灞炴�т笂鎶� = 1,
-    /// <summary>
-    /// 浼犳劅鍣ㄤ笂鎶�
-    /// </summary>
+    /// <summary>
+    /// 浼犳劅鍣ㄤ笂鎶�
+    /// </summary>
     A浼犳劅鍣ㄤ笂鎶� = 2,
-    /// <summary>
-    /// 璁惧鍦ㄧ嚎涓婃姤
-    /// </summary>
+    /// <summary>
+    /// 璁惧鍦ㄧ嚎涓婃姤
+    /// </summary>
     A璁惧鍦ㄧ嚎涓婃姤 = 3,
-    /// <summary>
-    /// 褰撳鎴风鍙戦�佹帶鍒惰澶囨寚浠わ紝濡傛墦寮�鎴栧叧闂澶囥�佽皟鑺備寒搴︺�侀鑹层�傚鏋滆鎺у埗鐨勮妭鐐硅澶囧湪绾匡紝鑺傜偣璁惧灏嗗弽棣�
-    /// </summary>
+    /// <summary>
+    /// 褰撳鎴风鍙戦�佹帶鍒惰澶囨寚浠わ紝濡傛墦寮�鎴栧叧闂澶囥�佽皟鑺備寒搴︺�侀鑹层�傚鏋滆鎺у埗鐨勮妭鐐硅澶囧湪绾匡紝鑺傜偣璁惧灏嗗弽棣�
+    /// </summary>
     A鑺傜偣鎺у埗鍙嶉 = 4
-  }
-}
+  }
+}

--
Gitblit v1.8.0