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