From 3272ca5b51e19f7f8a827b0f68400570a547fe60 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 28 四月 2020 15:02:44 +0800
Subject: [PATCH] 2020-04-28-1
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceFixedAttributeLogic.cs | 38 ++++++++++++++++++++------------------
1 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceFixedAttributeLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceFixedAttributeLogic.cs
index 4eeae57..db5cd51 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceFixedAttributeLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceFixedAttributeLogic.cs
@@ -14,11 +14,11 @@
/// <summary>
/// 璁惧鍥哄畾淇℃伅鐨勯�昏緫
- /// </summary>
- private static HdlDeviceFixedAttributeLogic m_Current = null;
+ /// </summary>
+ private static HdlDeviceFixedAttributeLogic m_Current = null;
/// <summary>
/// 璁惧鍥哄畾淇℃伅鐨勯�昏緫
- /// </summary>
+ /// </summary>
public static HdlDeviceFixedAttributeLogic Current
{
get
@@ -52,15 +52,15 @@
lock (this.hsGetHardInfoDevice)
{
//鍏堢Щ闄�
- this.RemoveDeviceHardInfoThread(device);
-
- string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(device);
- this.hsGetHardInfoDevice.Add(mainkeys);
-
- if (HdlDeviceAttributeLogic.Current.IsEsixt("DeviceGetFixedAttribute") == false)
+ string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(device);
+ if (this.hsGetHardInfoDevice.Contains(mainKeys) == true)
+ {
+ this.hsGetHardInfoDevice.Remove(mainKeys);
+ }
+ if (HdlGatewayReceiveLogic.Current.IsEsixt("DeviceGetFixedAttribute") == false)
{
//娣诲姞浜嬩欢
- HdlDeviceAttributeLogic.Current.AddAttributeEvent("DeviceGetFixedAttribute", "DeviceStatusReport", this.SetFixedAttributeByInterfaceResult);
+ HdlGatewayReceiveLogic.Current.AddAttributeEvent("DeviceGetFixedAttribute", ReceiveComandDiv.A璁惧灞炴�т笂鎶�, this.SetFixedAttributeByInterfaceResult);
}
//鍙戦�佸懡浠�
this.SeFixedAttributeComand(device);
@@ -89,6 +89,8 @@
//涓嶉渶瑕佸彂閫�
return;
}
+ string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(device);
+ this.hsGetHardInfoDevice.Add(mainkeys);
//鍙戦��
var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } };
jObject.Add("Data", data);
@@ -108,18 +110,18 @@
private void GetCurtainComand(CommonDevice device, ref Newtonsoft.Json.Linq.JObject jObject, ref Newtonsoft.Json.Linq.JArray attriBute)
{
jObject = new Newtonsoft.Json.Linq.JObject
- {
- { "DeviceAddr",device.DeviceAddr },
- { "Epoint", device.DeviceEpoint },
- { "Cluster_ID", (int)Cluster_ID.WindowCovering },
- { "Command", 108 }
+ {
+ { "DeviceAddr",device.DeviceAddr },
+ { "Epoint", device.DeviceEpoint },
+ { "Cluster_ID", (int)Cluster_ID.WindowCovering },
+ { "Command", 108 }
};
attriBute = new Newtonsoft.Json.Linq.JArray
- {
+ {
new Newtonsoft.Json.Linq.JObject
- {
+ {
{ "AttriButeId", (int)AttriButeId.WindowCoveringType }
- }
+ }
};
}
--
Gitblit v1.8.0