From d87400af518ebc9274f4447f06476959c3aa5102 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期二, 14 七月 2020 16:29:42 +0800
Subject: [PATCH] Merge branch 'dev-tzy' into dev-2020xm

---
 ZigbeeApp/Shared/Phone/ZigBee/Device/IASZone.cs |   33 +++++++++++++++++++++++++++++++--
 1 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/IASZone.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/IASZone.cs
index 38aaeca..2db5d41 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/IASZone.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/IASZone.cs
@@ -13,12 +13,41 @@
         }
 
         #region IAS瀹夐槻淇℃伅涓婃姤.
+        /// <summary>
+        /// 涓婁竴娆¤闂甶ASInfo鐨勬椂闂�
+        /// </summary>
+        [Newtonsoft.Json.JsonIgnore]
+        private DateTime oldiASInfoTime = DateTime.Now;
+        /// <summary>
+        /// IAS瀹夐槻淇℃伅涓婃姤
+        /// </summary>
+        [Newtonsoft.Json.JsonIgnore]
+        private IASInfoData m_iASInfo = null;
         /// <summary>
-        /// IAS瀹夐槻淇℃伅涓婃姤
+        /// IAS瀹夐槻淇℃伅涓婃姤(杩欎釜涓滆タ30绉掍箣鍚庡氨娓呮帀)
         /// <para>褰撳畨闃茶澶囧睘鎬х姸鎬佹敼鍙樻椂鍊欙紙渚嬪涓�姘у寲纰充紶鎰熷櫒妫�娴嬪埌涓�姘у寲纰虫皵浣擄級锛岃澶囧皢涓婃姤灞炴�х姸鎬佸彉鍖栨暟鎹��</para>
         /// </summary>
         [Newtonsoft.Json.JsonIgnore]
-        public IASInfoData iASInfo;
+        public IASInfoData iASInfo
+        {
+            get
+            {
+                if (m_iASInfo != null && (DateTime.Now - oldiASInfoTime).TotalMilliseconds > 30 * 1000)
+                {
+                    //杩欎釜涓滆タ30绉掍箣鍚庡氨娓呮帀
+                    m_iASInfo = null;
+                    return null;
+                }
+                return m_iASInfo;
+            }
+            set
+            {
+                //璁板綍璧锋洿鏂版椂闂�
+                this.oldiASInfoTime = DateTime.Now;
+                m_iASInfo = value;
+            }
+        }
+
         /// <summary>
         /// IAS瀹夐槻淇℃伅涓婃姤
         /// <para>褰撳畨闃茶澶囧睘鎬х姸鎬佹敼鍙樻椂鍊欙紙渚嬪涓�姘у寲纰充紶鎰熷櫒妫�娴嬪埌涓�姘у寲纰虫皵浣擄級锛岃澶囧皢涓婃姤灞炴�х姸鎬佸彉鍖栨暟鎹��</para>

--
Gitblit v1.8.0