From 25429f085093d89d543a0b90e30d0d62d1b7dac9 Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期二, 30 八月 2022 09:37:38 +0800
Subject: [PATCH] 合并了IOS的代码
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceHardInfoLogic.cs | 174 +++++++++++++++++++++++++++++-----------------------------
1 files changed, 87 insertions(+), 87 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceHardInfoLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceHardInfoLogic.cs
old mode 100755
new mode 100644
index ce0fe1a..b34358e
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceHardInfoLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceHardInfoLogic.cs
@@ -1,87 +1,87 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Text;
-using ZigBee.Device;
-
-namespace Shared.Phone.UserCenter
-{
- /// <summary>
- /// 璁惧纭欢淇℃伅鐨勯�昏緫
- /// </summary>
- public class HdlDeviceHardInfoLogic
- {
- #region 鈻� 鍙橀噺澹版槑___________________________
-
- /// <summary>
- /// 璁惧纭欢淇℃伅鐨勯�昏緫
- /// </summary>
- private static HdlDeviceHardInfoLogic m_Current = null;
- /// <summary>
- /// 璁惧纭欢淇℃伅鐨勯�昏緫
- /// </summary>
- public static HdlDeviceHardInfoLogic Current
- {
- get
- {
- if (m_Current == null)
- {
- m_Current = new HdlDeviceHardInfoLogic();
- }
- return m_Current;
- }
- }
-
- #endregion
-
- #region 鈻� 涓诲叆鍙e嚱鏁癬________________________
-
- /// <summary>
- /// 璇诲彇浠ュ強璁剧疆璁惧纭欢淇℃伅
- /// </summary>
- /// <param name="device">璁惧鍥炶矾</param>
- /// <param name="backAction">鍥炶皟鍑芥暟</param>
- public void SetAllHardFirmwareInfoToDevice(CommonDevice device)
- {
- if (device == null)
- {
- return;
- }
-
- var jObject = new Newtonsoft.Json.Linq.JObject
- {
- { "DeviceAddr",device.DeviceAddr },
- { "Epoint", device.DeviceEpoint },
- { "Cluster_ID", (int)Cluster_ID.Basic },
- { "Command", 108 }
- };
- var attriBute = new Newtonsoft.Json.Linq.JArray
- {
- new Newtonsoft.Json.Linq.JObject
- {
- { "AttriButeId", 4}//鐢熶骇鍟嗗悕瀛�
- },
- new Newtonsoft.Json.Linq.JObject
- {
- { "AttriButeId", 5}//鍨嬪彿鐮�(涔熷彨妯″潡ID)
- },
- new Newtonsoft.Json.Linq.JObject
- {
- { "AttriButeId", 6}//鐢熶骇鏃ユ湡
- },
- new Newtonsoft.Json.Linq.JObject
- {
- { "AttriButeId", 7}//鐢垫簮
- },
- new Newtonsoft.Json.Linq.JObject
- {
- { "AttriButeId", 13}//搴忓垪鍙�
- }
- };
- var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } };
- jObject.Add("Data", data);
- device.Gateway?.Send(("GetDeviceStatus"), jObject.ToString());
- }
-
- #endregion
- }
-}
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using ZigBee.Device;
+
+namespace Shared.Phone.UserCenter
+{
+ /// <summary>
+ /// 璁惧纭欢淇℃伅鐨勯�昏緫
+ /// </summary>
+ public class HdlDeviceHardInfoLogic
+ {
+ #region 鈻� 鍙橀噺澹版槑___________________________
+
+ /// <summary>
+ /// 璁惧纭欢淇℃伅鐨勯�昏緫
+ /// </summary>
+ private static HdlDeviceHardInfoLogic m_Current = null;
+ /// <summary>
+ /// 璁惧纭欢淇℃伅鐨勯�昏緫
+ /// </summary>
+ public static HdlDeviceHardInfoLogic Current
+ {
+ get
+ {
+ if (m_Current == null)
+ {
+ m_Current = new HdlDeviceHardInfoLogic();
+ }
+ return m_Current;
+ }
+ }
+
+ #endregion
+
+ #region 鈻� 涓诲叆鍙e嚱鏁癬________________________
+
+ /// <summary>
+ /// 璇诲彇浠ュ強璁剧疆璁惧纭欢淇℃伅
+ /// </summary>
+ /// <param name="device">璁惧鍥炶矾</param>
+ /// <param name="backAction">鍥炶皟鍑芥暟</param>
+ public void SetAllHardFirmwareInfoToDevice(CommonDevice device)
+ {
+ if (device == null)
+ {
+ return;
+ }
+
+ var jObject = new Newtonsoft.Json.Linq.JObject
+ {
+ { "DeviceAddr",device.DeviceAddr },
+ { "Epoint", device.DeviceEpoint },
+ { "Cluster_ID", (int)Cluster_ID.Basic },
+ { "Command", 108 }
+ };
+ var attriBute = new Newtonsoft.Json.Linq.JArray
+ {
+ new Newtonsoft.Json.Linq.JObject
+ {
+ { "AttriButeId", 4}//鐢熶骇鍟嗗悕瀛�
+ },
+ new Newtonsoft.Json.Linq.JObject
+ {
+ { "AttriButeId", 5}//鍨嬪彿鐮�(涔熷彨妯″潡ID)
+ },
+ new Newtonsoft.Json.Linq.JObject
+ {
+ { "AttriButeId", 6}//鐢熶骇鏃ユ湡
+ },
+ new Newtonsoft.Json.Linq.JObject
+ {
+ { "AttriButeId", 7}//鐢垫簮
+ },
+ new Newtonsoft.Json.Linq.JObject
+ {
+ { "AttriButeId", 13}//搴忓垪鍙�
+ }
+ };
+ var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } };
+ jObject.Add("Data", data);
+ device.Gateway?.Send(("GetDeviceStatus"), jObject.ToString());
+ }
+
+ #endregion
+ }
+}
--
Gitblit v1.8.0