From d6fb0646531172f23648441c224cdcccd721b894 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期一, 14 十二月 2020 09:59:01 +0800 Subject: [PATCH] 请合并代码,完成晾衣架最终功能。 --- ZigbeeApp/Shared/Phone/ZigBee/Device/LigthtBase.cs | 37 +++++++++++++++++++++++++++++++++++++ 1 files changed, 37 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/LigthtBase.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/LigthtBase.cs new file mode 100755 index 0000000..3a26cac --- /dev/null +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/LigthtBase.cs @@ -0,0 +1,37 @@ +锘縰sing System; +using Newtonsoft.Json.Linq; + +namespace ZigBee.Device +{ + [System.Serializable] + public class LightBase : CommonDevice + { + /// <summary> + /// 寮�鍏夌姸鎬�:0=鍏�,1=寮�, + /// </summary> + [Newtonsoft.Json.JsonIgnore] + public int OnOffStatus = 0; + + #region 寮�鍏� + ///<summary > + ///鐏厜寮�鍏虫帶鍒� + /// <para>command鐨勫��</para> + ///<para>0 : 鍏抽棴</para> + ///<para>1: 鎵撳紑</para> + ///<para>2锛氬彇鍙�</para> + /// </summary> + public void LightOpenOFFControl(int command) + { + SwitchControl(command); + } + #endregion + + /// <summary> + /// 璇诲彇寮�鍏崇姸鎬� + /// </summary> + public void ReadOnOffStatus() + { + ReadAttri(Device.Cluster_ID.Switch, AttriButeId.Switch); + } + } +} -- Gitblit v1.8.0