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/HDLbutton.cs | 1002 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 1,002 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/HDLbutton.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/HDLbutton.cs new file mode 100755 index 0000000..de03a9c --- /dev/null +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/HDLbutton.cs @@ -0,0 +1,1002 @@ +锘縰sing System; +using System.Collections.Generic; +using Newtonsoft.Json.Linq; + +namespace ZigBee.Device +{ + [System.Serializable] + public class HDLbutton : LightBase + { + public HDLbutton() + { + this.Type = DeviceType.OnOffSwitch; + } + + //#region 璇诲彇鎸夐敭淇℃伅 + /////// <summary> + /////// 璇诲彇鎸夐敭淇℃伅 + /////// <para> gateway锛氬綋鍓嶇綉鍏�</para> + /////// </summary> + ////public static async System.Threading.Tasks.Task<HdlKeyAllData> GetHdlKeyDataAsync(ZigBee.Device.ZbGateway gateway) + ////{ + //// if (gateway == null) + //// { + //// return null; + //// } + //// return await System.Threading.Tasks.Task.Run(async () => + //// { + //// var d = new HdlKeyAllData { }; + //// Action<string, string> action = (topic, message) => + //// { + //// var gatewayID = topic.Split('/')[0]; + //// var jobject = Newtonsoft.Json.Linq.JObject.Parse(message); + + //// if (topic == gatewayID + "/" + "Error_Respon") + //// { + //// var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID }; + //// var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString()); + + //// if (temp == null) + //// { + //// d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖"; + //// } + //// else + //// { + //// d.errorResponData = temp; + //// d.errorMessageBase = ErrorMess(temp.Error); + //// } + //// } + + //// if (topic == gatewayID + "/" + "hdlButton/GetInfo_Respon") + //// { + //// var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID }; + //// var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<HdlKeyInfo>(jobject["Data"].ToString()); + + //// if (tempData == null) + //// { + //// d.errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�"; + //// } + //// else + //// { + //// d.hdlKeyInfo = tempData; + //// } + //// } + //// }; + //// gateway.Actions += action; + //// System.Console.WriteLine("hdlButton/GetInfo_Actions 鍚姩" + "_" + gateway.getGatewayBaseInfo.gwID + System.DateTime.Now.ToString()); + + //// var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 92 } }; + //// gateway.Send("GetZbGwVersion", Common.SecuritySet.Encryption(jObject.ToString())); + //// var dateTime = DateTime.Now; + //// while ((DateTime.Now - dateTime).TotalMilliseconds < 1000) + //// { + //// await System.Threading.Tasks.Task.Delay(10); + //// if (d.hdlKeyInfo != null) + //// { + //// break; + //// } + //// } + //// if ((DateTime.Now - dateTime).TotalMilliseconds > 10000) + //// { + //// d.errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔"; + //// } + //// gateway.Actions -= action; + //// System.Console.WriteLine("hdlButton/GetInfo_Actions 閫�鍑�" + System.DateTime.Now.ToString()); + + //// return d; + //// }); + ////} + + /////// <summary> + /////// 璇诲彇鎸夐敭淇℃伅,缃戝叧鍙嶉淇℃伅 + /////// </summary> + ////public HdlKeyAllData hdlKeyAllData; + ////[System.Serializable] + ////public class HdlKeyAllData + ////{ + //// /// <summary> + //// /// 閿欒淇℃伅 + //// /// </summary> + //// public string errorMessageBase; + //// /// <summary> + //// /// 缃戝叧淇℃伅閿欒鍙嶉 + //// /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para> + //// /// </summary> + //// public ErrorResponData errorResponData; + //// /// <summary> + //// /// 缃戝叧鐗堟湰淇℃伅 + //// /// </summary> + //// public HdlKeyInfo hdlKeyInfo; + ////} + + /////// <summary> + /////// 璇诲彇鎸夐敭淇℃伅 + /////// </summary> + ////public HdlKeyInfo hdlButtonGetInfoData; + ////[System.Serializable] + ////public class HdlKeyInfo + ////{ + //// /// <summary> + //// /// 鎸夐敭鍙峰搴旂浉搴旂殑绔偣鍙凤紝鐢ㄦ潵鍖归厤婧愮鐐� + //// /// </summary> + //// public int Endpoint; + //// /// <summary> + //// ///鎸夐敭鍙风被鍨� + //// ///<para>Bit0-瑙︽懜寮�鍏筹紝鍙綅鎴�</para> + //// ///<para>Bit1-鏈烘寮�鍏筹紝鍙綅鎴�</para> + //// ///<para>Bit2-寮规�у紑鍏筹紝鍙綅鎴�</para> + //// /// </summary> + //// public int ButtonType; + //// /// <summary> + //// ///鎸夐敭鍙峰姛鑳界被鍨� + //// ///<para>Bit0-缁戝畾鍔熻兘锛屽彲浣嶆垨</para> + //// ///<para>Bit1-鏉′欢閫昏緫鍔熻兘锛屽彲浣嶆垨</para> + //// /// </summary> + //// public int Function; + //// /// <summary> + //// ///鎸夐敭鍙锋ā寮� + //// ///<para>Bit0-浠呭崟鍑伙紝鍙綅鎴�</para> + //// ///<para>Bit1-鍓嶅崟鍑伙紝鍙綅鎴�</para> + //// ///<para>Bit2-鍚庡崟鍑伙紝鍙綅鎴�</para> + //// ///<para>Bit3-浠呭弻鍑伙紝鍙綅鎴�</para> + //// ///<para>Bit4-鍓嶅弻鍑伙紝鍙綅鎴�</para> + //// ///<para>Bit5-鍚庡弻鍑伙紝鍙綅鎴�</para> + //// ///<para>Bit6-浠呴暱鎸夛紝鍙綅鎴�</para> + //// ///<para>Bit7-鍓嶉暱鎸夛紝鍙綅鎴�</para> + //// ///<para>Bit8-鍚庨暱鎸夛紝鍙綅鎴�</para> + //// ///<para>Bit9-闀挎寜閲婃斁锛屽彲浣嶆垨</para> + //// /// </summary> + //// public int ButtonMode; + //// /// <summary> + //// ///鎸夐敭鐗╃悊搴旂敤鍔熻兘 + //// ///Bit0-鏄惁鏀寔閿侀敭锛�0锛氬惁锛�1锛氭槸锛夛紝鍙綅鎴� + //// ///Bit1-鏄惁鏀寔鏈湴浜掓枼锛�0锛氬惁锛�1锛氭槸锛夛紝鍙綅鎴� + //// /// </summary> + //// public int PhyFunction; + ////} + //#endregion + + ///// <summary> + ///// 缁戝畾鐨勫満鏅垪琛� + ///// </summary> + //[Newtonsoft.Json.JsonIgnore] + //public System.Collections.Generic.Dictionary<string, List<CommonDevice>> BindedDeviceFilePathList = new Dictionary<string, List<CommonDevice>>(); + + ///// <summary> + ///// 鑾峰彇鎵�鏈夌粦瀹氾紙鐢ㄤ簬涓荤綉鍏筹級 + ///// </summary> + //public hdlButtonGetAllBind hdlButtonGetAllBindData; + //[System.Serializable] + //public class hdlButtonGetAllBind + //{ + // /// <summary> + // ///缁戝畾淇℃伅鎬婚噺 + // /// 褰揃indSum澶т簬0鏃� 锛屼笅闈㈠瓧娈垫墠瀛樺湪 + // /// </summary> + // public int BindSum; + // /// <summary> + // ///褰撳墠鍙戦�佺殑缁戝畾淇℃伅搴忓彿銆侭indNum浠�1寮�濮嬶紝姣忓彂閫佷竴鏉$粦瀹氫俊鎭皢鑷姞1锛岀洿鍒癇indNum绛変簬BindSum琛ㄧず鎵�鏈夌粦瀹氫俊鎭彂閫佸畬姣曘�� + // /// </summary> + // public int BindNum; + // /// <summary> + // ///缁戝畾鍚嶇О + // /// </summary> + // public string BindName; + // /// <summary> + // ///鎸夐敭璁惧Mac鍦板潃 + // /// </summary> + // public string ButtonMacAddr; + // /// <summary> + // ///鎸夐敭鍙凤紝瀵瑰簲鐩稿簲鐨勭鐐瑰彿锛� + // ///鐢ㄦ潵鍖归厤婧愮鐐� + // /// </summary> + // public int ButtonEpoint; + // /// <summary> + // ///鎸夐敭鍙锋ā寮� + // ///1锛氱偣鍑� 2锛氬墠鐐瑰嚮 4锛氬悗鍗曞嚮 8锛氫粎鍙屽嚮 + // ///16锛氬墠鍙屽嚮 32锛氬悗鍙屽嚮 64锛氫粎闀挎寜 + // ///128锛氬墠闀挎寜 256锛氬悗闀挎寜 512锛氶暱鎸夐噴鏀� + // /// </summary> + // public int ButtonMode; + // /// <summary> + // ///鎸夐敭鍙风被鍨嬶細 + // ///Bit0-瑙︽懜寮�鍏筹紝涓嶅彲浣嶆垨 + // ///Bit1-鏈烘寮�鍏筹紝涓嶅彲浣嶆垨 + // ///Bit2-寮规�у紑鍏筹紝涓嶅彲浣嶆垨 + // /// </summary> + // public int ButtonType; + // /// <summary> + // ///缁戝畾鐨勭皣id + // /// </summary> + // public int BindClusterId; + // /// <summary> + // ///缁戝畾璁惧鐨勫懡浠d + // /// </summary> + // public int BindCmdId; + // /// <summary> + // ///鍙傛暟鍒楄〃 + // /// </summary> + // public List<ParameterObj> ParameterList = new List<ParameterObj>(); + // /// <summary> + // ///缁戝畾鍒楄〃 锛屽綋Status=0鏃跺瓨鍦� + // /// </summary> + // public List<GetAllBindListObj> ButtonList = new List<GetAllBindListObj>(); + //} + + ///// <summary> + ///// 鍙傛暟鍒楄〃鍙傛暟 + ///// </summary> + //public class ParameterObj//鍗忚鏍煎紡椤哄簭鏈夐敊 + //{ + // /// <summary> + // /// 鍙傛暟闀垮害锛屽崰鐢ㄧ殑瀛楄妭鏁般�� + // /// </summary> + // public int Length { get; set; } + // /// <summary> + // ///鍙傛暟鍊� + // /// </summary> + // public int Value { get; set; } + + //} + + ///// <summary> + ///// hdl鎸夐敭缁戝畾鍒楄〃鍙傛暟 + ///// </summary> + //public class GetAllBindListObj:CommonDevice + //{ + // /// <summary> + // /// 缁戝畾绫诲瀷 + // ///0锛氱粦瀹氳澶囷紝鍚岀綉鍏宠澶囬棿鐨勭粦瀹� + // ///1锛氱粦瀹氳澶囷紝璺ㄧ綉鍏宠澶囬棿鐨勭粦瀹� + // ///2锛氱粦瀹氬満鏅� + // /// </summary> + // public int BindType { get; set; } + // /// <summary> + // ///缁戝畾璁惧Mac鍦板潃锛� 褰揃indType=0鎴�1鏃跺瓨鍦� + // /// </summary> + // public string BindMacAddr { get; set; } + // /// <summary> + // /// 缁戝畾璁惧鐨勭鍙e彿锛屽綋BindType=0鎴�1鏃跺瓨鍦� + // /// </summary> + // public int BindEpoint { get; set; } + // /// <summary> + // /// 缁戝畾鍦烘櫙锛屽綋BindType=2鏃跺瓨鍦� + // /// </summary> + // public int BindScenesId { get; set; } + // /// <summary> + // ///缁戝畾鐨勮澶囨垨鍦烘櫙鍚嶇О + // /// </summary> + // public string ESName{ get; set; } + //} + + ///// <summary> + ///// 璇诲彇鎸夐敭淇℃伅 + ///// </summary> + //public hdlButtonGetInfo hdlButtonGetInfoData; + //[System.Serializable] + //public class hdlButtonGetInfo + //{ + // public int ButtonMode; + // /// <summary> + // ///鎸夐敭鐗╃悊搴旂敤鍔熻兘 + // ///Bit0-鏄惁鏀寔閿侀敭锛�0锛氬惁锛�1锛氭槸锛夛紝鍙綅鎴� + // ///Bit1-鏄惁鏀寔鏈湴浜掓枼锛�0锛氬惁锛�1锛氭槸锛夛紝鍙綅鎴� + // /// </summary> + // public int PhyFunction; + // /// <summary> + // ///鎸夐敭鍙峰搴旂浉搴旂殑绔偣鍙凤紝 + // ///鐢ㄦ潵鍖归厤婧愮鐐� + // /// </summary> + // public int Endpoint; + // /// <summary> + // ///鎸夐敭鍙风被鍨� + // //Bit0-瑙︽懜寮�鍏筹紝鍙綅鎴� + // ///Bit1-鏈烘寮�鍏筹紝鍙綅鎴� + // ///Bit2-寮规�у紑鍏筹紝鍙綅鎴� + // /// </summary> + // public int ButtonType; + // /// <summary> + // ///鎸夐敭鍙峰姛鑳界被鍨� + // /// Bit0-缁戝畾鍔熻兘锛屽彲浣嶆垨 + // ///Bit1-鏉′欢閫昏緫鍔熻兘锛屽彲浣嶆垨 + // /// </summary> + // public int Function; + // /// <summary> + // ///鎸夐敭鍙锋ā寮� + // ///Bit0-浠呭崟鍑伙紝鍙綅鎴� + // ///Bit1-鍓嶅崟鍑伙紝鍙綅鎴� + // ///Bit2-鍚庡崟鍑伙紝鍙綅鎴� + // ///Bit3-浠呭弻鍑伙紝鍙綅鎴� + // ///Bit4-鍓嶅弻鍑伙紝鍙綅鎴� + // ///Bit5-鍚庡弻鍑伙紝鍙綅鎴� + // ///Bit6-浠呴暱鎸夛紝鍙綅鎴� + // ///Bit7-鍓嶉暱鎸夛紝鍙綅鎴� + // ///Bit8-鍚庨暱鎸夛紝鍙綅鎴� + // ///Bit9-闀挎寜閲婃斁锛屽彲浣嶆垨 + // /// </summary> + //} + + ///// <summary> + ///// 閰嶇疆缁戝畾灞炴�э紙鐢ㄤ簬涓荤綉鍏筹級 + ///// </summary> + //public hdlButtonSetBindAttribute hdlButtonSetBindAttributeData; + //[System.Serializable] + //public class hdlButtonSetBindAttribute + //{ + // /// <summary> + // ///鎸夐敭鍙凤紝瀵瑰簲鐩稿簲鐨勭鐐瑰彿锛� + // ///鐢ㄦ潵鍖归厤婧愮鐐� + // /// </summary> + // public int ButtonEpoint; + // /// <summary> + // ///鎸夐敭鍙风被鍨� + // //鎸夐敭鍙锋ā寮� + // ///1锛氱偣鍑� 2锛氬墠鐐瑰嚮 4锛氬悗鍗曞嚮 8锛氫粎鍙屽嚮 + // ///16锛氬墠鍙屽嚮 32锛氬悗鍙屽嚮 64锛氫粎闀挎寜 + // ///128锛氬墠闀挎寜 256锛氬悗闀挎寜 512锛氶暱鎸夐噴鏀� + // /// </summary> + // public int ButtonMode; + // /// <summary> + // ///鎸夐敭鍙风被鍨嬶細 + // /// Bit0-瑙︽懜寮�鍏筹紝涓嶅彲浣嶆垨 + // ///Bit1-鏈烘寮�鍏筹紝涓嶅彲浣嶆垨 + // ///Bit2-寮规�у紑鍏筹紝涓嶅彲浣嶆垨 + + // /// </summary> + // public int ButtonType; + // /// <summary> + // ///缁戝畾鍚嶇О,鏈�澶�32涓瓧绗� + // /// </summary> + // public string BindName; + // /// <summary> + // ///0锛氭湭鐭ワ紝闇�瑕佹寜閿澶囧淇敼缁撴灉杩涜纭銆� + // ///1:澶辫触锛屽綋鍓嶇綉鍏充笉鏄富缃戝叧锛屾棤娉曡繘琛屽睘鎬ч厤缃�� + // /// </summary> + // public int Result; + //} + + ///// <summary> + ///// 鎸夐敭璁惧閰嶇疆缁戝畾灞炴�т笂鎶� + ///// </summary> + //public hdlButtonBindAttributeConfig hdlButtonBindAttributeConfigData; + //[System.Serializable] + //public class hdlButtonBindAttributeConfig + //{ + // /// <summary> + // ///0锛氭湭鐭ワ紝闇�瑕佹寜閿澶囧淇敼缁撴灉杩涜纭銆� + // ///1:澶辫触锛屽綋鍓嶇綉鍏充笉鏄富缃戝叧锛屾棤娉曡繘琛屽睘鎬ч厤缃�� + // /// </summary> + // public int Result; + // /// <summary> + // ///鎸夐敭鍙凤紝瀵瑰簲鐩稿簲鐨勭鐐瑰彿锛� + // ///鐢ㄦ潵鍖归厤婧愮鐐� + // /// </summary> + // public int ButtonEpoint; + // /// <summary> + // ///鎸夐敭鍙风被鍨� + // //鎸夐敭鍙锋ā寮� + // ///1锛氱偣鍑� 2锛氬墠鐐瑰嚮 4锛氬悗鍗曞嚮 8锛氫粎鍙屽嚮 + // ///16锛氬墠鍙屽嚮 32锛氬悗鍙屽嚮 64锛氫粎闀挎寜 + // ///128锛氬墠闀挎寜 256锛氬悗闀挎寜 512锛氶暱鎸夐噴鏀� + // /// </summary> + // public int ButtonMode; + // /// <summary> + // ///鎸夐敭鍙风被鍨嬶細 + // /// Bit0-瑙︽懜寮�鍏筹紝涓嶅彲浣嶆垨 + // ///Bit1-鏈烘寮�鍏筹紝涓嶅彲浣嶆垨 + // ///Bit2-寮规�у紑鍏筹紝涓嶅彲浣嶆垨 + // /// </summary> + // public int ButtonType; + // /// <summary> + // ///缁戝畾鍚嶇О,鏈�澶�32涓瓧绗� + // /// </summary> + // public string BindName; + // /// <summary> + // ///缁戝畾鐨勭皣id + // /// </summary> + // public int BindClusterId; + // /// <summary> + // ///鎸夐敭鍙风被鍨� + // ///缁戝畾璁惧鐨勫懡浠d + // /// </summary> + // public int BindCmdId; + // /// <summary> + // ///鍙傛暟鍒楄〃 + // /// </summary> + // public List<ParameterObj> ParameterList = new List<ParameterObj>(); + //} + + ///// <summary> + ///// 璁惧缁戝畾锛岋紙鐢ㄤ簬涓荤綉鍏筹級 + ///// 缁戝畾澶辫触銆佽法缃戝叧璁惧闂寸殑缁戝畾锛屽満鏅粦瀹氱殑缁撴灉灏嗙洿鎺ョ敱缃戝叧鍙嶉 + ///// </summary> + //public hdlButtonSetBind hdlButtonSetBindData; + //[System.Serializable] + //public class hdlButtonSetBind + //{ + // /// <summary> + // ///鎸夐敭鍙凤紝瀵瑰簲鐩稿簲鐨勭鐐瑰彿锛� + // ///鐢ㄦ潵鍖归厤婧愮鐐� + // /// </summary> + // public int ButtonEpoint; + // /// <summary> + // ///鎸夐敭鍙锋ā寮� + // ///1锛氱偣鍑� 2锛氬墠鐐瑰嚮 4锛氬悗鍗曞嚮 8锛氫粎鍙屽嚮 + // /// /// 16锛氬墠鍙屽嚮 32锛氬悗鍙屽嚮 64锛氫粎闀挎寜 + // ///128锛氬墠闀挎寜 256锛氬悗闀挎寜 512锛氶暱鎸夐噴鏀� + // /// </summary> + // public int ButtonMode; + // /// <summary> + // ///鎸夐敭鍙风被鍨嬶細 + // /// 鎸夐敭鍙风被鍨嬶細 + // /// Bit0-瑙︽懜寮�鍏筹紝涓嶅彲浣嶆垨 + // ///Bit1-鏈烘寮�鍏筹紝涓嶅彲浣嶆垨 + // ///Bit2-寮规�у紑鍏筹紝涓嶅彲浣嶆垨 + // /// </summary> + // public int ButtonType; + // /// <summary> + // /// Status + // ///0锛氭甯� + // ///1锛氫笉鍙粦瀹氾紝闇�鍏堝鎸夐敭鍦ㄦ寚瀹氭寜閿ā寮忎笅閰嶇疆缁戝畾灞炴�ф柟鍙垱寤虹粦瀹氥�� + // ///2锛氬綋鍓嶇綉鍏充笉鏄富缃戝叧銆備笉鑳藉垱寤虹粦瀹氥�� + // /// </summary> + // public int Status; + // /// <summary> + // ///缁戝畾鍒楄〃 锛屽綋Status=0鏃跺瓨鍦� + // /// </summary> + // public List<BindListObj> BindList = new List<BindListObj>(); + //} + + ///// <summary> + ///// hdl鎸夐敭缁戝畾鍒楄〃鍙傛暟 + ///// </summary> + //public class BindListObj//鍗忚鏍煎紡椤哄簭鏈夐敊 + //{ + // /// <summary> + // ///缁戝畾璁惧Mac鍦板潃锛� 褰揃indType=0鎴�1鏃跺瓨鍦� + // /// </summary> + // public string BindMacAddr { get; set; } + // /// <summary> + // /// 缁戝畾璁惧鐨勭鍙e彿锛屽綋BindType=0鎴�1鏃跺瓨鍦� + // /// </summary> + // public int BindEpoint { get; set; } + // /// <summary> + // /// 缁戝畾绫诲瀷 + // ///0锛氱粦瀹氳澶囷紝鍚岀綉鍏宠澶囬棿鐨勭粦瀹� + // ///1锛氱粦瀹氳澶囷紝璺ㄧ綉鍏宠澶囬棿鐨勭粦瀹� + // ///2锛氱粦瀹氬満鏅� + // /// </summary> + // public int BindType { get; set; } + // /// <summary> + // /// 0锛氬姞鍏ユ垚鍔燂紙璇ョ姸鎬佸彧閫傜敤鐢ㄤ簬璺ㄧ綉鍏崇粦瀹氬拰缁戝畾鍦烘櫙銆傚悓缃戝叧璁惧闂寸殑缁戝畾闇�瑕佽妭鐐硅澶囩殑纭鎴愬姛淇℃伅锛屼笉浼氱洿鎺ュ弽棣堟垚鍔熴�傦級 + // ///1锛氬け璐ワ紝璁惧宸插湪缁戝畾鍒楄〃涓� + // ///2锛氬け璐ワ紝鑺傜偣璁惧鎴栧満鏅笉瀛樺湪銆� + // ///3锛氬け璐ワ紝鍦ㄧ瓑寰呰妭鐐硅澶囩‘璁ゆ槸鍚︾粦瀹氭垚鍔燂紙褰撶綉鍏宠繕鍦ㄧ瓑寰呮煇鑺傜偣璁惧纭鏄惁缁戝畾鎴愬姛鐨勫弽棣堜俊鎭椂锛屽鎴风鍐嶆鍙戦�佺粦瀹氳鑺傜偣璁惧鐨勬寚浠わ紝灏嗗弽棣堣鐘舵�併�傦級 + // ///4锛氭湭鐭ワ紝鐢辫妭鐐硅澶囧弽棣堝彂閫佲�渉dlButton/BindResult鈥濅富棰樻秷鎭‘瀹氭槸鍚︽垚鍔熴�� + // /// </summary> + // public int Result { get; set; } + + // /// <summary> + // /// 缁戝畾鍦烘櫙锛屽綋BindType=1鏃跺瓨鍦� + // /// </summary> + // public int BindScenesId { get; set; } + + // /// <summary> + // ///缁戝畾鐨勮澶囨垨鍦烘櫙鐨勫悕绉� + // /// </summary> + // public string ESName { get; set; } + //} + + ///// <summary> + ///// 璁惧缁戝畾锛岀敤浜庝富缃戝叧锛� + ///// 鏈湴璁惧闂寸殑缁戝畾 锛屾槸鍚︽垚鍔熼渶瑕佺瓑寰卙dl鎸夐敭璁惧鐨勭‘璁� + ///// </summary> + //public hdlButtonBindResult hdlButtonBindResultData; + //[System.Serializable] + //public class hdlButtonBindResult + + //{ + // /// <summary> + // ///鎸夐敭鍙凤紝瀵瑰簲鐩稿簲鐨勭鐐瑰彿锛� + // ///鐢ㄦ潵鍖归厤婧愮鐐� + // /// </summary> + // public int ButtonEpoint; + // /// <summary> + // ///鎸夐敭鍙锋ā寮� + // ///1锛氱偣鍑� 2锛氬墠鐐瑰嚮 4锛氬悗鍗曞嚮 8锛氫粎鍙屽嚮 + // /// 16锛氬墠鍙屽嚮 32锛氬悗鍙屽嚮 64锛氫粎闀挎寜 + // ///128锛氬墠闀挎寜 256锛氬悗闀挎寜 512锛氶暱鎸夐噴鏀� + // /// </summary> + // public int ButtonMode; + // /// <summary> + // ///缁戝畾缁撴灉 + // ///0锛氭垚鍔� + // ///1锛氬け璐� + // ///2锛氭棤鏁� + // /// </summary> + // public int Result; + // /// <summary> + // ///缁戝畾璁惧Mac鍦板潃 + // /// </summary> + // public string BindMacAddr; + // /// <summary> + // /// 缁戝畾璁惧鐨勭鍙e彿 + // /// </summary> + // public int BindEpoint; + //} + + ///// <summary> + ///// 绉婚櫎缁戝畾锛堢敤浜庝富缃戝叧锛� + ///// </summary> + //public hdlButtonRemoveBind hdlButtonRemoveBindData; + //[System.Serializable] + //public class hdlButtonRemoveBind + //{ + // /// <summary> + // ///0锛氭甯� + // ///1锛氱粦瀹氫笉瀛樺湪 + // ///2锛氬綋鍓嶇綉鍏充笉鏄富缃戝叧銆備笉鑳借В闄ょ粦瀹氥�� + // /// </summary> + // public int Status; + // /// <summary> + // ///鎸夐敭鍙凤紝瀵瑰簲鐩稿簲鐨勭鐐瑰彿锛� + // ///鐢ㄦ潵鍖归厤婧愮鐐� + // /// </summary> + // public int ButtonEpoint; + // /// <summary> + // ///鎸夐敭鍙锋ā寮� + // ///1锛氱偣鍑� 2锛氬墠鐐瑰嚮 4锛氬悗鍗曞嚮 8锛氫粎鍙屽嚮 + // /// /// 16锛氬墠鍙屽嚮 32锛氬悗鍙屽嚮 64锛氫粎闀挎寜 + // ///128锛氬墠闀挎寜 256锛氬悗闀挎寜 512锛氶暱鎸夐噴鏀� + // /// </summary> + // public int ButtonMode; + // /// <summary> + // ///鎸夐敭鍙风被鍨嬶細 + // /// 鎸夐敭鍙风被鍨嬶細 + // /// Bit0-瑙︽懜寮�鍏筹紝涓嶅彲浣嶆垨 + // ///Bit1-鏈烘寮�鍏筹紝涓嶅彲浣嶆垨 + // ///Bit2-寮规�у紑鍏筹紝涓嶅彲浣嶆垨 + // /// </summary> + // public int ButtonType; + + // /// <summary> + // ///缁戝畾鍒楄〃 锛屽綋Status=0鏃跺瓨鍦ㄣ�� + // /// </summary> + // public List<RemoveBindListObj> RemoveBindList = new List<RemoveBindListObj>(); + //} + + ///// <summary> + ///// 绉婚櫎缁戝畾锛堢敤浜庝富缃戝叧锛� + ///// </summary> + //public hdlButtonRemoveBindResult hdlButtonRemoveBindResultData; + //[System.Serializable] + //public class hdlButtonRemoveBindResult + //{ + // /// <summary> + // ///鎸夐敭鍙凤紝瀵瑰簲鐩稿簲鐨勭鐐瑰彿锛� + // ///鐢ㄦ潵鍖归厤婧愮鐐� + // /// </summary> + // public int ButtonEpoint; + // /// <summary> + // ///鎸夐敭鍙锋ā寮� + // ///1锛氱偣鍑� 2锛氬墠鐐瑰嚮 4锛氬悗鍗曞嚮 8锛氫粎鍙屽嚮 + // /// /// 16锛氬墠鍙屽嚮 32锛氬悗鍙屽嚮 64锛氫粎闀挎寜 + // ///128锛氬墠闀挎寜 256锛氬悗闀挎寜 512锛氶暱鎸夐噴鏀� + // /// </summary> + // public int ButtonMode; + // /// <summary> + // ///鎸夐敭鍙风被鍨嬶細 + // /// 鎸夐敭鍙风被鍨嬶細 + // /// Bit0-瑙︽懜寮�鍏筹紝涓嶅彲浣嶆垨 + // ///Bit1-鏈烘寮�鍏筹紝涓嶅彲浣嶆垨 + // ///Bit2-寮规�у紑鍏筹紝涓嶅彲浣嶆垨 + // /// </summary> + // public int ButtonType; + // /// <summary> + // ///0锛氭垚鍔� + // ///1锛氬け璐� + // ///2锛氭棤鏁� + // /// </summary> + // public int Result; + // /// <summary> + // ///缁戝畾璁惧Mac鍦板潃 + // /// </summary> + // public string BindMacAddr; + // /// <summary> + // /// 缁戝畾璁惧鐨勭鍙e彿 + // /// </summary> + // public int BindEpoint; + // } + + ///// <summary> + ///// hdl鎸夐敭缁戝畾鍒楄〃鍙傛暟 + ///// </summary> + //public class RemoveBindListObj//鍗忚鏍煎紡椤哄簭鏈夐敊 + //{ + // /// <summary> + // ///0锛氱Щ闄ゆ垚鍔燂紙璇ョ姸鎬佸彧閫傜敤鐢ㄤ簬璺ㄧ綉鍏崇粦瀹氥�佺粦瀹氬満鏅�佸け鏁堣澶囷紙璁惧宸茬粡浠庣綉鍏崇殑璁惧鍒楄〃涓垹闄わ級銆傚悓缃戝叧璁惧闂寸殑瑙i櫎缁戝畾闇�瑕佽妭鐐硅澶囩殑纭鎴愬姛淇℃伅锛屼笉浼氱洿鎺ュ弽棣堟垚鍔熴�傦級 + // ///1锛氬け璐ワ紝璁惧涓嶅湪缁戝畾鍒楄〃涓� + // ///3锛氬け璐ワ紝鍦ㄧ瓑寰呰妭鐐硅澶囩‘璁ゆ槸鍚﹁В闄ょ粦瀹氭垚鍔燂紙褰撶綉鍏宠繕鍦ㄧ瓑寰呮煇鑺傜偣璁惧纭鏄惁瑙i櫎缁戝畾鎴愬姛鐨勫弽棣堜俊鎭椂锛屽鎴风鍐嶆鍙戦�佽В闄ょ粦瀹氳鑺傜偣璁惧鐨勬寚浠わ紝灏嗗弽棣堣鐘舵�併�傦級 + // ///4锛氭湭鐭ワ紝鐢辫妭鐐硅澶囧弽棣堝彂閫佲�渉dlButton/RemoveBindResult鈥濅富棰樻秷鎭‘瀹氭槸鍚︽垚鍔熴�� + // /// </summary> + // public int Result { get; set; } + // /// <summary> + // /// 缁戝畾绫诲瀷 + // ///0锛氱Щ闄よ澶囷紝鍚岀綉鍏宠澶囬棿鐨勭Щ闄� + // ///1锛氱Щ闄よ澶囷紝璺ㄧ綉鍏宠澶囬棿鐨勭Щ闄� + // ///2锛氱Щ闄ょ粦瀹氬満鏅� + // /// </summary> + // public int BindType { get; set; } + // /// <summary> + // ///缁戝畾璁惧Mac鍦板潃锛� 褰揃indType=0鎴�1鏃跺瓨鍦� + // /// </summary> + // public string BindMacAddr { get; set; } + // /// <summary> + // /// 缁戝畾璁惧鐨勭鍙e彿锛屽綋BindType=0鎴�1鏃跺瓨鍦� + // /// </summary> + // public int BindEpoint { get; set; } + + // /// <summary> + // /// 缁戝畾鍦烘櫙锛屽綋BindType=1鏃跺瓨鍦� + // /// </summary> + // public int BindScenesId { get; set; } + // /// <summary> + // ///缁戝畾鐨勮澶囨垨鍦烘櫙鍚嶇О + // /// </summary> + // public string ESName; + //} + + ///// <summary> + ///// 鍒犻櫎鎸夐敭鍔熻兘锛堢敤浜庝富缃戝叧锛� + ///// </summary> + //public hdlButtonDelButtonFunction hdlButtonDelButtonFunctionData; + //[System.Serializable] + //public class hdlButtonDelButtonFunction + //{ + // /// <summary> + // ///鎸夐敭鍙凤紝瀵瑰簲鐩稿簲鐨勭鐐瑰彿锛� + // ///鐢ㄦ潵鍖归厤婧愮鐐� + // /// </summary> + // public int ButtonEpoint; + // /// <summary> + // ///鎸夐敭鍙锋ā寮� + // ///1锛氱偣鍑� 2锛氬墠鐐瑰嚮 4锛氬悗鍗曞嚮 8锛氫粎鍙屽嚮 + // /// /// 16锛氬墠鍙屽嚮 32锛氬悗鍙屽嚮 64锛氫粎闀挎寜 + // ///128锛氬墠闀挎寜 256锛氬悗闀挎寜 512锛氶暱鎸夐噴鏀� + // /// </summary> + // public int ButtonMode; + // /// <summary> + // ///缁撴灉锛� + // ///0锛氭垚鍔燂紝褰撹鎸夐敭璁惧宸茬粡澶辨晥锛堟寜閿澶囧凡缁忎粠缃戝叧鐨勮澶囧垪琛ㄥ垹闄わ級灏嗙洿鎺ュ垹闄よ鎸夐敭鍔熻兘銆� + // ///1锛氬け璐ワ紝褰撳墠缃戝叧涓嶆槸涓荤綉鍏充笉鑳借繘琛屾鎿嶄綔銆� + // ///2: 鏈煡锛岄渶鐢辨寜閿澶囧鍒犻櫎缁撴灉杩涜纭 + // /// </summary> + // public int Result; + //} + + ///// <summary> + ///// 鎸夐敭璁惧鍒犻櫎鍔熻兘纭淇℃伅涓婃姤 + ///// </summary> + //public hdlButtonDelButtonFunctionResult hdlButtonDelButtonFunctionResultData; + //[System.Serializable] + //public class hdlButtonDelButtonFunctionResult + //{ + // /// <summary> + // ///鎸夐敭鍙凤紝瀵瑰簲鐩稿簲鐨勭鐐瑰彿锛� + // ///鐢ㄦ潵鍖归厤婧愮鐐� + // /// </summary> + // public int ButtonEpoint; + // /// <summary> + // ///鎸夐敭鍙锋ā寮� + // ///1锛氱偣鍑� 2锛氬墠鐐瑰嚮 4锛氬悗鍗曞嚮 8锛氫粎鍙屽嚮 + // /// /// 16锛氬墠鍙屽嚮 32锛氬悗鍙屽嚮 64锛氫粎闀挎寜 + // ///128锛氬墠闀挎寜 256锛氬悗闀挎寜 512锛氶暱鎸夐噴鏀� + // /// </summary> + // public int ButtonMode; + // /// <summary> + // ///缁撴灉锛� + // ///0锛氭垚鍔熴�� + // ///1锛氬け璐� + // /// </summary> + // public int Result; + //} + + ///// <summary> + ///// 淇敼缁戝畾鍚嶇О锛堢敤浜庝富缃戝叧锛� + ///// </summary> + //public hdlButtonBindRename hdlButtonBindRenameData; + //[System.Serializable] + //public class hdlButtonBindRename + //{ + // /// <summary> + // ///0锛氭垚鍔熴�� + // ///1:澶辫触锛屽綋鍓嶇綉鍏充笉鏄富缃戝叧锛屾棤娉曡繘琛屽睘鎬ч厤缃�� + // ///2锛氬け璐ワ紝缁戝畾涓嶅瓨鍦ㄣ�� + // /// </summary> + // public int Result; + // /// <summary> + // ///缁戝畾璁惧Mac鍦板潃 + // /// </summary> + // public string ButtonMacAddr; + // /// <summary> + // /// 鎸夐敭鍙凤紝瀵瑰簲鐩稿簲鐨勭鐐瑰彿锛� + // ///鐢ㄦ潵鍖归厤婧愮鐐� + // /// </summary> + // public int ButtonEpoint; + // /// <summary> + // ///鎸夐敭鍙锋ā寮� + // ///1锛氱偣鍑� 2锛氬墠鐐瑰嚮 4锛氬悗鍗曞嚮 8锛氫粎鍙屽嚮 + // ///16锛氬墠鍙屽嚮 32锛氬悗鍙屽嚮 64锛氫粎闀挎寜 + // ///128锛氬墠闀挎寜 256锛氬悗闀挎寜 512锛氶暱鎸夐噴鏀� + + // /// </summary> + // public int ButtonMode; + // /// <summary> + // ///鎸夐敭鍙风被鍨嬶細 + // ///Bit0-瑙︽懜寮�鍏筹紝涓嶅彲浣嶆垨 + // ///Bit1-鏈烘寮�鍏筹紝涓嶅彲浣嶆垨 + // ///Bit2-寮规�у紑鍏筹紝涓嶅彲浣嶆垨 + // /// </summary> + // public int ButtonType; + // /// <summary> + // ///缁戝畾鍚嶇О,鏈�澶�32涓瓧绗� + // /// </summary> + // public string BindName; + //} + + ///// <summary> + ///// hdl鎸夐敭缁戝畾鍒楄〃鍙傛暟 + ///// </summary> + //public class BindListDeviceInfo//鍗忚鏍煎紡椤哄簭鏈夐敊 + //{ + // /// <summary> + // /// 缁戝畾绫诲瀷 + // ///0锛氱粦瀹氳澶囷紝鍚岀綉鍏宠澶囬棿鐨勭粦瀹� + // ///1锛氱粦瀹氳澶囷紝璺ㄧ綉鍏宠澶囬棿鐨勭粦瀹� + // ///2锛氱粦瀹氬満鏅� + // /// </summary> + // public int BindType { get; set; } + // /// <summary> + // ///缁戝畾璁惧Mac鍦板潃锛� 褰揃indType=0鎴�1鏃跺瓨鍦� + // /// </summary> + // public string BindMacAddr { get; set; } + // /// <summary> + // /// 缁戝畾璁惧鐨勭鍙e彿锛屽綋BindType=0鎴�1鏃跺瓨鍦� + // /// </summary> + // public int BindEpoint { get; set; } + + //} + + ///// <summary> + ///// hdl鎸夐敭缁戝畾鍒楄〃鍙傛暟 + ///// </summary> + //public class BindSceneInfo//鍗忚鏍煎紡椤哄簭鏈夐敊 + //{ + // /// <summary> + // /// 缁戝畾绫诲瀷 + // ///0锛氱粦瀹氳澶囷紝鍚岀綉鍏宠澶囬棿鐨勭粦瀹� + // ///1锛氱粦瀹氳澶囷紝璺ㄧ綉鍏宠澶囬棿鐨勭粦瀹� + // ///2锛氱粦瀹氬満鏅� + // /// </summary> + // public int BindType { get; set; } + // /// <summary> + // /// 缁戝畾鍦烘櫙锛屽綋BindType=1鏃跺瓨鍦� + // /// </summary> + // public int BindScenesId { get; set; } + //} + + ///// <summary> + ///// hdl鎸夐敭缁戝畾鍒楄〃鍙傛暟 + ///// </summary> + //public class RemoveBindListInfo + //{ + // /// <summary> + // /// 缁戝畾绫诲瀷 + // ///0锛氱Щ闄よ澶囷紝鍚岀綉鍏宠澶囬棿鐨勭Щ闄� + // ///1锛氱Щ闄よ澶囷紝璺ㄧ綉鍏宠澶囬棿鐨勭Щ闄� + // ///2锛氱Щ闄ょ粦瀹氬満鏅� + // /// </summary> + // public int BindType { get; set; } + // /// <summary> + // ///缁戝畾璁惧Mac鍦板潃锛� 褰揃indType=0鎴�1鏃跺瓨鍦� + // /// </summary> + // public string BindMacAddr { get; set; } + // /// <summary> + // /// 缁戝畾璁惧鐨勭鍙e彿锛屽綋BindType=0鎴�1鏃跺瓨鍦� + // /// </summary> + // public int BindEpoint { get; set; } + + //} + + ///// <summary> + ///// hdl鎸夐敭缁戝畾鍒楄〃鍙傛暟 + ///// </summary> + //public class RemoveSceneBindListInfo + //{ + // /// <summary> + // /// 缁戝畾绫诲瀷 + // ///0锛氱Щ闄よ澶囷紝鍚岀綉鍏宠澶囬棿鐨勭Щ闄� + // ///1锛氱Щ闄よ澶囷紝璺ㄧ綉鍏宠澶囬棿鐨勭Щ闄� + // ///2锛氱Щ闄ょ粦瀹氬満鏅� + // /// </summary> + // public int BindType { get; set; } + // /// <summary> + // ///缁戝畾鍦烘櫙锛屽綋BindType=1鏃跺瓨鍦� + // /// </summary> + // public int BindScenesId { get; set; } + + //} + + //#region Hdl鎸夐敭 + /////<summary> + /////鑾峰彇鎵�鏈夌粦瀹氾紙鐢ㄤ簬涓荤綉鍏筹級 + ///// </summary> + //public void GetAllBindPublish() + //{ + // var jobject = new JObject { { "Cluster_ID", 64528 }, { "Command", 10 } }; + // CurrentGateWayId = Gateway?.CurrentGateWayId; + // Gateway?.Send(("hdlButton/BindInfo"), Common.SecuritySet.Encryption((jobject.ToString()))); + //} + + /////<summary> + /////璇诲彇鎸夐敭淇℃伅 + ///// </summary> + //public void GetInfoPublish(ZigBee.Device.ZbGateway gateway, string buttonMacAddr, int epoint, int endpoint) + //{ + // var jobject = new JObject { { "DeviceAddr", DeviceAddr }, { "Epoint", epoint }, { "Cluster_ID", 64528 }, { "Command", 3 } }; + // var data = new JObject { { "Endpoint", endpoint } }; + // jobject.Add("Data", data); + // Gateway?.Send(("hdlButton/GetInfo"), Common.SecuritySet.Encryption((jobject.ToString()))); + //} + + /////<summary> + /////閰嶇疆閿侀敭 + ///// IsLock + ///// 0锛氫笉閿� + /////1锛氶攣 + ///// </summary> + //public void LockPublish(int endpoint, int isLock) + //{ + // var jobject = new JObject { { "DeviceAddr", DeviceAddr }, { "Epoint", DeviceEpoint }, { "Cluster_ID", 64528 }, { "Command", 5 } }; + // var data = new JObject { { "Endpoint", endpoint }, { "IsLock", isLock } }; + // jobject.Add("Data", data); + // Gateway?.Send(("hdlButton/Lock"), Common.SecuritySet.Encryption((jobject.ToString()))); + //} + + /////<summary> + /////閰嶇疆缁戝畾灞炴�э紙鐢ㄤ簬涓荤綉鍏筹級 + ///// IsLock + ///// 0锛氫笉閿� + /////1锛氶攣 + ///// </summary> + //public void SetBindAttributePublish(int buttonMode, int buttonType, string bindName, int bindClusterId, int bindCmdId) + //{ + // var jobject = new JObject { { "DeviceAddr", DeviceAddr }, { "Epoint", DeviceEpoint }, { "Cluster_ID", 64528 }, { "Command", 4 } }; + + // var ParameterList = new JArray{ + // new JObject {} + // }; + + // var data = new JObject { { "ButtonEpoint", DeviceEpoint }, + // { "ButtonMode", buttonMode },{ "ButtonType", buttonType }, + // { "BindName", bindName }, + // { "BindClusterId", bindClusterId },{ "BindCmdId", bindCmdId }, + // { "ParameterList", ParameterList }, + // }; + // jobject.Add("Data", data); + // Gateway?.Send(("hdlButton/SetBindAttribute"), Common.SecuritySet.Encryption((jobject.ToString()))); + //} + + /////<summary> + /////璁惧缁戝畾锛堢敤浜庝富缃戝叧锛� + ///// 缁戝畾璁惧 + ///// </summary> + //public void SetBindPublish(BindListDeviceInfo bindListObj,int buttonMode, int buttonType) + //{ + // var jobject = new JObject { { "DeviceAddr", DeviceAddr }, { "Epoint", DeviceEpoint }, { "Cluster_ID", 64528 }, { "Command", 6 } }; + + // var bindList = new JArray{ + // new JObject {{ "BindType", bindListObj.BindType},{ "BindMacAddr", bindListObj.BindMacAddr},{ "BindEpoint", bindListObj.BindEpoint }} + // }; + // var data = new JObject { { "ButtonEpoint", DeviceEpoint }, + // { "ButtonMode", buttonMode },{ "ButtonType", buttonType }, + // { "BindList", bindList } + // }; + + // jobject.Add("Data", data); + // Gateway?.Send(("hdlButton/SetBind"), Common.SecuritySet.Encryption((jobject.ToString()))); + //} + + /////<summary> + /////璁惧缁戝畾锛堢敤浜庝富缃戝叧锛� + ///// 缁戝畾鍦烘櫙锛屽綋BindType=1鏃跺瓨鍦� + ///// </summary> + //public void SetSceneBindPublish(BindSceneInfo bindListObj,int buttonMode, int buttonType) + //{ + // var jobject = new JObject { { "DeviceAddr", DeviceAddr }, { "Epoint", DeviceEpoint }, { "Cluster_ID", 64528 }, { "Command", 6 } }; + + // var bindList = new JArray{ + // new JObject {{ "BindType", bindListObj.BindType},{ "BindScenesId", bindListObj.BindScenesId}} + // }; + // var data = new JObject { { "ButtonEpoint", DeviceEpoint }, + // { "ButtonMode", buttonMode },{ "ButtonType", buttonType }, + // { "BindList", bindList } + // }; + + // jobject.Add("Data", data); + // Gateway?.Send(("hdlButton/SetBind"), Common.SecuritySet.Encryption((jobject.ToString()))); + //} + + /////<summary> + /////绉婚櫎缁戝畾锛堢敤浜庝富缃戝叧锛� + ///// /// BindScenesId,缁戝畾鍦烘櫙锛屽綋BindType=1鏃跺瓨鍦� + ///// </summary> + //public void RemoveBindPublish(RemoveBindListInfo removeListObj,int buttonMode, int buttonType) + //{ + // var jobject = new JObject { { "DeviceAddr", DeviceAddr }, { "Epoint", DeviceEpoint }, { "Cluster_ID", 64528 }, { "Command", 7 } }; + + // var removeBindList = new JArray{ + // new JObject {{ "BindType", removeListObj.BindType},{ "BindMacAddr", removeListObj.BindMacAddr},{ "BindEpoint", removeListObj.BindEpoint}} + // }; + // var data = new JObject { { "ButtonEpoint", DeviceEpoint }, + // { "ButtonMode", buttonMode },{ "ButtonType", buttonType }, + // { "RemoveBindList", removeBindList } + // }; + + // jobject.Add("Data", data); + // Gateway?.Send(("hdlButton/RemoveBind"), Common.SecuritySet.Encryption((jobject.ToString()))); + //} + + + /////<summary> + /////绉婚櫎缁戝畾锛堢敤浜庝富缃戝叧锛� + ///// /// BindScenesId,缁戝畾鍦烘櫙锛屽綋BindType=1鏃跺瓨鍦� + ///// </summary> + //public void RemoveSceneBindPublish(RemoveSceneBindListInfo removeListObj,int buttonMode, int buttonType) + //{ + // var jobject = new JObject { { "DeviceAddr", DeviceAddr }, { "Epoint", DeviceEpoint }, { "Cluster_ID", 64528 }, { "Command", 7 } }; + + // var removeBindList = new JArray{ + // new JObject {{ "BindType", removeListObj.BindType},{ "BindScenesId", removeListObj.BindScenesId}} + // }; + // var data = new JObject { { "ButtonEpoint", DeviceEpoint }, + // { "ButtonMode", buttonMode },{ "ButtonType", buttonType }, + // { "RemoveBindList", removeBindList } + // }; + + // jobject.Add("Data", data); + // Gateway?.Send(("hdlButton/RemoveBind"), Common.SecuritySet.Encryption((jobject.ToString()))); + //} + + /////<summary> + /////鍒犻櫎鎸夐敭鍔熻兘锛堢敤浜庝富缃戝叧锛� + ///// buttonMode璁句负0xffff 65536 锛岀洿鎺ユ竻闄ゆ寜閿彿涓嬫墍鏈夋寜閿ā寮忕殑缁戝畾 + ///// </summary> + //public void DelButtonFunctionPublish(int buttonMode) + //{ + // var jobject = new JObject { { "DeviceAddr", DeviceAddr }, { "Epoint", DeviceEpoint }, { "Cluster_ID", 64528 }, { "Command", 8 } }; + // var data = new JObject { { "ButtonEpoint", DeviceEpoint}, + // { "ButtonMode", buttonMode } + // }; + // jobject.Add("Data", data); + // Gateway?.Send(("hdlButton/DelButtonFunction"), Common.SecuritySet.Encryption((jobject.ToString()))); + //} + + /////<summary> + /////淇敼缁戝畾鍚嶇О锛堢敤浜庝富缃戝叧锛� + ///// </summary> + //public void BindRenamePublish(int buttonMode, int buttonType, string bindName) + //{ + // var jobject = new JObject { { "Cluster_ID", 64528 }, { "Command", 9 } }; + // var data = new JObject { { "ButtonMacAddr", DeviceAddr }, + // { "ButtonEpoint", DeviceEpoint },{ "ButtonMode", buttonMode }, + // { "ButtonType", buttonType }, + // { "BindName", bindName } + // }; + // jobject.Add("Data", data); + // Gateway?.Send(("hdlButton/BindRename"), Common.SecuritySet.Encryption((jobject.ToString()))); + //} + //#endregion + + } +} \ No newline at end of file -- Gitblit v1.8.0