From ed25f1dd70fb96ee181c8c2e53c7d57a3412afbe Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期一, 01 二月 2021 19:05:16 +0800
Subject: [PATCH] 1

---
 HDL_ON/Entity/Function/Function.cs |   52 +++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 47 insertions(+), 5 deletions(-)

diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 6d99616..639aa6e 100644
--- 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>
         /// 灞炴�у悕
@@ -908,6 +912,42 @@
         /// </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,
+        }
+
+
     }
 
 
@@ -954,6 +994,8 @@
         public const string Electric = "electrical";
 
         //Music = 0x09,
+
+
     }
 
 

--
Gitblit v1.8.0