wjc
2022-05-24 7cfcdb7a90f59bf9001c948e166fd9af09752fe1
HDL_ON/Entity/Function/Function.cs
@@ -349,6 +349,26 @@
        public List<string> roomIds = new List<string>();
        /// <summary>
        /// 存储属性配置
        /// 环境传感器的等级
        /// </summary>
        public List<AttrKeyConfig> attrKeyConfigs = new List<AttrKeyConfig>();
        public List<AttrKeyConfig> GetAttrKeyConfigs(string key)
        {
            if (attrKeyConfigs.Count == 0)
            {
                switch (key)
                {
                    case "pm2.5":
                        break;
                }
            }
            return attrKeyConfigs;
        }
        /// <summary>
        /// bus协议数据格式
        /// 使用A协议控制时,改属性为空
        /// </summary>
@@ -361,6 +381,11 @@
        /// 是否在线
        /// </summary>
        public bool online = true;
        /// <summary>
        /// 环境面板 绑定的 设备目标sid列表
        /// </summary>
        public List<string> targetSids = new List<string>();
        /// <summary>
        /// 云端数据创建的时间
        /// </summary>
@@ -1465,10 +1490,11 @@
            spkList.Add(SensorDryContact2);
            spkList.Add(SenesorMegahealth);
            spkList.Add(SenesorMegahealth2);
            spkList.Add(SensorHelp);
            return spkList;
        }
        #endregion
        public const string PanelEnvironment = "screen.panel";
        /// <summary>
        /// 面板spk列表
        /// </summary>
@@ -1477,9 +1503,9 @@
        {
            var spkList = new List<string>();
            spkList.Add(SensorHelp);
            spkList.Add(PanelEnvironment);
            return spkList;
        }
        #endregion
        #region 环境传感器
        /// <summary>
@@ -1845,4 +1871,44 @@
    public string module = "";
    public string version = "";
}
    /// <summary>
    /// 功能属性相关配置信息
    /// 环境传感器等级使用
    /// </summary>
    public class AttrKeyConfig
    {
        public string key = string.Empty;
        /// <summary>
        /// 配置类型
        /// interval 区间
        /// 目前只支持:interval
        /// </summary>
        public string type = string.Empty;
        public string unit = string.Empty;
        public List<AttrKeyInfo> configs = new List<AttrKeyInfo>();
    }
    public class AttrKeyInfo
    {
        /// <summary>
        ///
        /// </summary>
        public string start = string.Empty;
        /// <summary>
        ///
        /// </summary>
        public string end = string.Empty;
        /// <summary>
        ///
        /// </summary>
        public string color = string.Empty;
        /// <summary>
        /// 描述
        /// </summary>
        public string desc = string.Empty;
    }
}