using System;
|
using System.Collections.Generic;
|
|
namespace Shared
|
{
|
/// <summary>
|
/// 美林空调系统
|
/// ACMerrill = 0x0706,
|
/// </summary>
|
[System.Serializable]
|
public class ACMerrill : Common
|
{
|
public ACMerrill ()
|
{
|
Type = DeviceType.ACMerrill;
|
DeviceTextID = 553;
|
}
|
|
/// <summary>
|
/// 开关
|
/// </summary>
|
public byte Power;
|
|
/// <summary>
|
/// 0:回家模式 1:离家模式
|
/// </summary>
|
public byte ScenesMode;
|
|
/// <summary>
|
/// 0制热、1制冷、2通风
|
/// </summary>
|
public byte WorkMode;
|
|
/// <summary>
|
/// 日功耗
|
/// </summary>
|
public float DailyPowerConsumption;
|
|
/// <summary>
|
/// 月功耗
|
/// </summary>
|
public float MonthlyPowerConsumption;
|
|
/// <summary>
|
/// 当前功率
|
/// </summary>
|
public float CurrentPower;
|
|
/// <summary>
|
/// 系统下空调回路总算
|
/// </summary>
|
public List<ACMerrillLoop> mACMerrillLoopList = new List<ACMerrillLoop> ();
|
|
}
|
|
|
/// <summary>
|
/// 各回路空调状态
|
/// </summary>
|
[System.Serializable]
|
public class ACMerrillLoop
|
{
|
//public ACMerrillLoop ()
|
//{
|
//}
|
|
/// <summary>
|
/// 备注
|
/// </summary>
|
public string Name;
|
|
/// <summary>
|
/// 子网号
|
/// </summary>
|
public byte SubnetID;
|
|
/// <summary>
|
/// 设备号
|
/// </summary>
|
public byte DeviceID;
|
|
/// <summary>
|
/// 回路号
|
/// </summary>
|
public byte LoopID;
|
|
|
[Newtonsoft.Json.JsonIgnore]
|
public virtual string CommonLoopID {
|
get {
|
return SubnetID.ToString () + "_" + DeviceID.ToString () + "_" + LoopID.ToString ();
|
}
|
}
|
|
public static readonly int Time = 1;
|
/// <summary>
|
/// 最近更新的时间
|
/// </summary>
|
public DateTime LastUpdateTime = System.DateTime.Now.AddMinutes (-Time);
|
|
/// <summary>
|
/// 温度模式
|
/// </summary>
|
public byte TemperatureMode = 0;
|
|
/// <summary>
|
/// 开关 0关 ,1开
|
/// </summary>
|
public byte Power;
|
/// <summary>
|
/// 室内温度
|
/// </summary>
|
public byte IndoorTemperature;
|
/// <summary>
|
/// 室内湿度
|
/// </summary>
|
public byte IndoorHumidity;
|
/// <summary>
|
/// 设置模式 :0制冷、1制热、2通风
|
/// </summary>
|
public byte SetMode = 0;
|
/// <summary>
|
/// 设置风速
|
/// </summary>
|
public byte SetFanSpeed;
|
/// <summary>
|
/// 设置温度 5到35
|
/// </summary>
|
public byte SetTemperature = 26;
|
|
/// <summary>
|
/// 实际工作模式及风速
|
/// </summary>
|
public byte RealModeAndFanSpeed;
|
|
public byte [] GetACSendBytes () {
|
byte [] sendBytes = new byte [13];
|
sendBytes [0] = this.LoopID;
|
sendBytes [1] = 0;
|
sendBytes [2] = this.IndoorTemperature;
|
sendBytes [3] = this.SetTemperature;
|
sendBytes [4] = this.SetTemperature;
|
sendBytes [5] = this.SetTemperature;
|
sendBytes [6] = this.SetTemperature;
|
sendBytes [7] = this.RealModeAndFanSpeed;
|
sendBytes [8] = this.Power;
|
sendBytes [9] = this.SetMode;
|
sendBytes [10] = this.SetFanSpeed;
|
sendBytes [11] = this.SetTemperature;
|
sendBytes [12] = this.IndoorHumidity;//扫风状态位改为:室内湿度
|
|
return sendBytes;
|
}
|
|
}
|
|
///// <summary>
|
///// 各回路空调状态
|
///// </summary>
|
//[System.Serializable]
|
//public class ACMerrillLoop : AC
|
//{
|
// public ACMerrillLoop ()
|
// {
|
// Type = DeviceType.ACMerrill;
|
// DeviceTextID = 42; //SimpleControl.R.MyInternationalizationString.AC;
|
// SetTemperature = 26;
|
// }
|
|
// /// <summary>
|
// /// 室内湿度
|
// /// </summary>
|
// public byte IndoorHumidity;
|
|
|
|
//}
|
|
|
}
|