wxr
2020-12-17 1a13c963a5fb8cad92bf03667e411f46d6a6a843
HDL_ON/Entity/Function/Function.cs
@@ -119,7 +119,7 @@
        /// bus协议数据格式
        /// 使用A协议控制时,改属性为空
        /// </summary>
        public BusData bus_Data;
        public BusData bus;
        /// <summary>
        /// 是否收藏
        /// </summary>
@@ -206,9 +206,9 @@
        public string GetBusId()
        {
            string busId = "";
            if (bus_Data != null)
            if (bus != null)
            {
                busId = bus_Data.SubnetID + "_" + bus_Data.DeviceID + "_" + bus_Data.loopId;
                busId = bus.SubnetID + "_" + bus.DeviceID + "_" + bus.LoopId;
            }
            return busId;
        }
@@ -286,9 +286,14 @@
            var sFunc = new SceneFunction();
            foreach (var attr in attributes)
            {
                if (attr.curValue.ToString() == "{}")
                {
                    attr.curValue = "0";
                }
                if (attr.key == FunctionAttributeKey.SetTemp)
                {
                    var vv = Convert.ToDouble(attr.value);
                    double vv = 16;
                    Double.TryParse(attr.curValue.ToString(),out vv);
                    sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = Convert.ToInt32(vv).ToString() });
                }
                else
@@ -317,9 +322,9 @@
            var acd = new AlinkControlData();
            acd.sid = sid;
            var aca = new AlinkControlAttributes();
            foreach (var dic in commandDictionary)
            {
                var aca = new AlinkControlAttributes();
                aca.key = dic.Key;
                aca.value = dic.Value;
                acd.status.Add(aca);
@@ -420,6 +425,7 @@
    /// 功能属性
    /// 属性字段解析:attri :属性内容,value 属性的值,max 最大值 min 最小值
    /// </summary>
    [System.Serializable]
    public class FunctionAttributes
    {
        /// <summary>
@@ -533,7 +539,15 @@
                return Convert.ToByte(addresses.Substring(2, 2), 16);
            }
        }
        public byte loopId;
        public byte LoopId
        {
            get
            {
                return Convert.ToByte(loopId, 16);
            }
        }
        public string loopId;
    }
    public static class SPK