JLChen
2020-06-04 6d55af8792cf8fbef0055e677b900fc352dba9a2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
using System;
namespace Shared
{
    /// <summary>
    /// 逻辑灯
    /// </summary>
    [System.Serializable]
    public class LightLogic : Common
    {
        public LightLogic ()
        {
            this.Type = DeviceType.LightLogic;
            DeviceTextID = 3; //SimpleControl.R.MyInternationalizationString.Lights;
        }
        /// <summary>
        /// 上一次打开的亮度
        /// </summary>
        public byte LastOpenBrightness = 0;
        /// <summary>
        /// 当前亮度值
        /// </summary>
        public byte CurrentBrightness = 0;
 
        /// <summary>
        /// 自定义延迟开时间
        /// </summary>
        public byte CustomDelayTimeOpen = 0;
        /// <summary>
        /// 自定义延迟关时间
        /// </summary>
        public byte CustomDelayTimeClose = 0;
        /// <summary>
        /// 延迟时间高位
        /// </summary>
        public byte DelayTimeHeigh = 0;
        /// <summary>
        /// 延迟时间低位
        /// </summary>
        public byte DelayTimeLow = 0;
        /// <summary>
        /// R颜色值
        /// </summary>
        public byte RStatus = 254;
        /// <summary>
        /// G颜色值
        /// </summary>
        public byte GStatus = 254;
        /// <summary>
        /// B颜色值
        /// </summary>
        public byte BStatus = 254;
        /// <summary>
        /// W颜色值
        /// </summary>
        public byte WStatus = 254;
        /// <summary>
        /// CCT高位
        /// </summary>
        public byte CTHStatus = 0;
        /// <summary>
        /// CCT低位
        /// </summary>
        public byte CTLStatus = 0;
 
        public bool DimmingFunction {
            get {
                return !UserConfig.Instance.UnEnableDimmingLight.Contains (LightDimmingID);
            }
        }
 
        public string LightDimmingID {
            get {
                return this.SubnetID.ToString () + "_" + this.DeviceID.ToString () + "_" + LoopID.ToString ();
            }
        }
 
    }
}