From f14dcfd967404e197e7ec995ca8d6f2b090d3b7d Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期五, 11 九月 2020 09:16:59 +0800 Subject: [PATCH] 优化多功能面板:绑定温湿度传感器目标,和设备列表回路显示。优化数据矫正功能温湿度度不设置的情况。优化门锁时间设置最后一天和最后最后一个月的时间显示等 细节 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceHardInfoLogic.cs | 87 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 87 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceHardInfoLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceHardInfoLogic.cs new file mode 100755 index 0000000..ce0fe1a --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceHardInfoLogic.cs @@ -0,0 +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 + } +} -- Gitblit v1.8.0