From 0a8ec482a5ad10bf3cd7010c89630b42ecaca741 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期五, 05 二月 2021 10:19:31 +0800 Subject: [PATCH] Merge branch 'NewFilePath' into CJL --- HDL_ON/Entity/Function/Function.cs | 83 ++++++++++++++++++++++++++++++++--------- 1 files changed, 65 insertions(+), 18 deletions(-) diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs old mode 100755 new mode 100644 index 81bfa9d..772be78 --- a/HDL_ON/Entity/Function/Function.cs +++ b/HDL_ON/Entity/Function/Function.cs @@ -153,6 +153,10 @@ /// attri /// </summary> public List<FunctionAttributes> attributes = new List<FunctionAttributes>(); + /// <summary> + /// 鍔熻兘鐘舵�佸垪琛� + /// </summary> + public List<AttributesStatus> status = new List<AttributesStatus>(); /// <summary> /// 鎴块棿ID鍒楄〃 @@ -520,7 +524,7 @@ acd.sid = sid; foreach (var dic in commandDictionary) { - var aca = new AlinkControlAttributes(); + var aca = new AttributesStatus(); aca.key = dic.Key; aca.value = dic.Value; acd.status.Add(aca); @@ -542,7 +546,7 @@ aaao.bus = this.bus; foreach (var kv in keyValues) { - aaao.attributes.Add(new AlinkControlAttributes() + aaao.attributes.Add(new AttributesStatus() { key = kv.Key, value = kv.Value, @@ -568,7 +572,7 @@ /// </summary> public string spk = ""; - public List<AlinkControlAttributes> attributes = new List<AlinkControlAttributes>(); + public List<AttributesStatus> attributes = new List<AttributesStatus>(); //[Newtonsoft.Json.JsonIgnore] public BusData bus = new BusData(); } @@ -599,12 +603,12 @@ public class AlinkControlData { public string sid = ""; - public List<AlinkControlAttributes> status = new List<AlinkControlAttributes>(); + public List<AttributesStatus> status = new List<AttributesStatus>(); } /// <summary> /// a鍗忚鎺у埗鍔ㄤ綔鏁版嵁 /// </summary> - public class AlinkControlAttributes + public class AttributesStatus { /// <summary> /// 灞炴�у悕 @@ -649,19 +653,19 @@ /// 褰撳墠鍊� /// </summary> public object curValue = new object(); - /// <summary> - /// curValue鐨勭炕璇戝��,鏈�鍧忕殑缁撴灉涔熷彧浼氳繑鍥瀞tring.Empty - /// </summary> - public string realValue - { - get - { - var myValue = curValue.ToString(); - //娌欓洉瀹氫箟鐨刼bject绫诲瀷 - if (myValue.Contains("{") == true) { return string.Empty; } - return myValue; - } - } + ///// <summary> + ///// curValue鐨勭炕璇戝��,鏈�鍧忕殑缁撴灉涔熷彧浼氳繑鍥瀞tring.Empty + ///// </summary> + //public string realValue + //{ + // get + // { + // var myValue = curValue.ToString(); + // //娌欓洉瀹氫箟鐨刼bject绫诲瀷 + // if (myValue.Contains("{") == true) { return string.Empty; } + // return myValue; + // } + //} } /// <summary> /// 鍔熻兘灞炴�ч敭鍚嶅垪琛� @@ -903,6 +907,47 @@ /// 瀹剁數銆佹秱楦︽壂鍦版満鍣ㄤ汉 /// </summary> public const string ElectricTuyaWeepRobot = "electrical.ai6HtccKFIw3dxo3"; + /// <summary> + /// 瀹剁數銆佹秱楦︽按闃� + /// </summary> + public const string ElectricTuyaWaterValve = "electrical.koiGhMKwLf2ZP81g"; + + + /// <summary> + /// 鑾峰彇绗笁鏂硅澶噑pk + /// </summary> + /// <returns></returns> + public static List<string> Get3tySpk(BrandType brandType) + { + var list = new List<string>(); + + switch (brandType) + { + case BrandType.All3tyBrand: + case BrandType.Tuya: + list.Add(ElectricTuyaAirCleaner); + list.Add(ElectricTuyaFan); + list.Add(ElectricTuyaWaterValve); + list.Add(ElectricTuyaWeepRobot); + break; + } + return list; + } + + /// <summary> + /// 绗笁鏂瑰搧鐗屽垪琛� + /// </summary> + public enum BrandType + { + All = 0, + Hdl = 1, + Tuya = 2, + + + All3tyBrand = 999, + } + + } @@ -949,6 +994,8 @@ public const string Electric = "electrical"; //Music = 0x09, + + } -- Gitblit v1.8.0