using System;
|
namespace Shared
|
{
|
[System.Serializable]
|
public class LightCCT : LightDimming
|
{
|
public LightCCT ()
|
{
|
this.Type = DeviceType.LightCCT;
|
DeviceTextID = 3; //SimpleControl.R.MyInternationalizationString.Lights;
|
}
|
/// <summary>
|
/// DALI是否连接了灯光
|
/// </summary>
|
public byte LinkLightStatus;
|
|
public bool DALIModule = true;
|
|
/// <summary>
|
/// 回路在线(0x00不在,oxff在线)
|
/// </summary>
|
public byte Online;
|
|
/// <summary>
|
/// 回路类型(全部有亮度,另8有色温)
|
/// </summary>
|
public byte LoopType = 8;
|
|
//色温物理最暖H + 最暖L,色温物理最冷H + 最冷L, 4byte
|
|
/// <summary>
|
/// 物理暖色高位
|
/// </summary>
|
public byte WarmTones_High_Modular;
|
/// <summary>
|
/// 物理暖色低位
|
/// </summary>
|
public byte WarmTones_Low_Modular;
|
/// <summary>
|
/// 物理冷色高位
|
/// </summary>
|
public byte CoolTones_High_Modular;
|
/// <summary>
|
/// 物理冷色低位
|
/// </summary>
|
public byte CoolTones_Low_Modular;
|
/// <summary>
|
/// 物理暖色值
|
/// </summary>
|
public int WarmTones_Modular {
|
get { return WarmTones_High_Modular * 256 + WarmTones_Low_Modular; }
|
}
|
/// <summary>
|
/// 物理冷色值
|
/// </summary>
|
public int CoolTones_Modular {
|
get { return CoolTones_High_Modular * 256 + CoolTones_Low_Modular; }
|
}
|
|
//色温最暖H + 最暖L,色温最冷H + 最冷L, 4byte
|
|
/// <summary>
|
/// 逻辑暖色高位
|
/// </summary>
|
public byte WarmTones_High;
|
/// <summary>
|
/// 逻辑暖色低位
|
/// </summary>
|
public byte WarmTones_Low;
|
/// <summary>
|
/// 逻辑冷色高位
|
/// </summary>
|
public byte CoolTones_High;
|
/// <summary>
|
/// 逻辑冷色低位
|
/// </summary>
|
public byte CoolTones_Low;
|
/// <summary>
|
/// 逻辑暖色值
|
/// </summary>
|
public int WarmTones {
|
get { return WarmTones_High * 256 + WarmTones_Low; }
|
}
|
/// <summary>
|
/// 逻辑冷色值
|
/// </summary>
|
public int CoolTones {
|
get { return CoolTones_High * 256 + CoolTones_Low; }
|
}
|
//当前色温H + L, 2byte
|
/// <summary>
|
/// 当前色温高位
|
/// </summary>
|
public byte CurTones_High;
|
/// <summary>
|
/// 当前色温低位
|
/// </summary>
|
public byte CurTones_Low;
|
/// <summary>
|
/// 当前色温值
|
/// </summary>
|
public int CurTone {
|
get { return CurTones_High * 256 + CurTones_Low; }
|
}
|
/// <summary>
|
/// 逻辑色温值域
|
/// </summary>
|
/// <value>The tones range.</value>
|
public int TonesRange {
|
get { return System.Math.Abs (CoolTones - WarmTones); }
|
}
|
/// <summary>
|
/// 物理色温值域
|
/// </summary>
|
/// <value>The tones range modular.</value>
|
public int TonesRange_Modular {
|
get { return System.Math.Abs (CoolTones_Modular - WarmTones_Modular); }
|
}
|
/// <summary>
|
/// 返回色温功能是否正常,当色温值域大于0时,才能正常使用色温功能
|
/// </summary>
|
public bool TonesFunction {
|
get { return TonesRange > 0; }
|
}
|
}
|
}
|