385 lines
8.0 KiB
C#
385 lines
8.0 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Text;
|
||
|
||
namespace Domain
|
||
{
|
||
public class HostAir
|
||
{
|
||
#region Private Properties
|
||
|
||
//设置默认值
|
||
|
||
private bool onOff = true;
|
||
private int currentTemp = 0;
|
||
private int settingTemp = 22;
|
||
private int speed = 0;
|
||
|
||
private int keepTemp = 22;
|
||
private int initTemp = 22;
|
||
private int hightTemp = 33;
|
||
private int lowerTemp = 16;
|
||
private int deadTemp = 2;
|
||
private int hotDevition = 2;
|
||
private int coldDevition = 2;
|
||
private int welcomeTime = 30;
|
||
|
||
private bool isLockTemp = false;
|
||
private int lockTemp = 22;
|
||
private int mode = 0;
|
||
private int valve = 0;
|
||
private ControlType controlType = ControlType.Two;
|
||
private float compensatoryTemp = 0;
|
||
private bool relateRoomStatus = true;
|
||
private bool relateDoorContact = false;
|
||
private int coldHotMode = 0;
|
||
private int coldHotSwitchDelayTime = 30;
|
||
private bool fanStop = false;
|
||
private bool disableFanHighSpeed = false;
|
||
|
||
private bool sleepFlag = false;
|
||
private string sleepStartTime = "00:00";
|
||
private string sleepEndTime = "00:00";
|
||
private int sleepDevition = 0;
|
||
|
||
private bool timeFlag = false;
|
||
private string timeStartTime1 = "00:00";
|
||
private string timeEndTime1 = "00:00";
|
||
private string timeStartTime2 = "00:00";
|
||
private string timeEndTime2 = "00:00";
|
||
private string timeStartTime3 = "00:00";
|
||
private string timeEndTime3 = "00:00";
|
||
|
||
#endregion
|
||
|
||
/// <summary>
|
||
/// HostID
|
||
/// </summary>
|
||
public virtual int HostID
|
||
{
|
||
get;
|
||
set;
|
||
}
|
||
/// <summary>
|
||
/// 设备
|
||
/// </summary>
|
||
public virtual RoomTypeAir Modal
|
||
{
|
||
get;
|
||
set;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 空调No
|
||
/// </summary>
|
||
public virtual int No
|
||
{
|
||
get;
|
||
set;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 空调开关状态,0/关,1/开
|
||
/// </summary>
|
||
public virtual bool OnOff
|
||
{
|
||
get { return this.onOff; }
|
||
set { this.onOff = value; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 当前温度
|
||
/// </summary>
|
||
public virtual int CurrentTemp
|
||
{
|
||
get { return this.currentTemp; }
|
||
set { this.currentTemp = value; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 设定温度
|
||
/// </summary>
|
||
public virtual int SettingTemp
|
||
{
|
||
get { return this.settingTemp; }
|
||
set { this.settingTemp = value; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 风速: 1/低速, 2/中速, 3/高速, 0/自动
|
||
/// </summary>
|
||
public virtual int Speed
|
||
{
|
||
get { return this.speed; }
|
||
set { this.speed = value; }
|
||
}
|
||
/// <summary>
|
||
/// 保温温度
|
||
/// </summary>
|
||
public virtual int KeepTemp
|
||
{
|
||
get { return this.keepTemp; }
|
||
set { this.keepTemp = value; }
|
||
}
|
||
/// <summary>
|
||
/// 初始温度
|
||
/// </summary>
|
||
public virtual int InitTemp
|
||
{
|
||
get { return this.initTemp; }
|
||
set { this.initTemp = value; }
|
||
}
|
||
/// <summary>
|
||
/// 最高温度
|
||
/// </summary>
|
||
public virtual int HightTemp
|
||
{
|
||
get { return this.hightTemp; }
|
||
set { this.hightTemp = value; }
|
||
}
|
||
/// <summary>
|
||
/// 最低温度
|
||
/// </summary>
|
||
public virtual int LowerTemp
|
||
{
|
||
get { return this.lowerTemp; }
|
||
set { this.lowerTemp = value; }
|
||
}
|
||
/// <summary>
|
||
/// 死区温度
|
||
/// </summary>
|
||
public virtual int DeadTemp
|
||
{
|
||
get { return this.deadTemp; }
|
||
set { this.deadTemp = value; }
|
||
}
|
||
/// <summary>
|
||
/// 热
|
||
/// </summary>
|
||
public virtual int HotDevition
|
||
{
|
||
get { return this.hotDevition; }
|
||
set { this.hotDevition = value; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 冷偏差
|
||
/// </summary>
|
||
public virtual int ColdDevition
|
||
{
|
||
get { return this.coldDevition; }
|
||
set { this.coldDevition = value; }
|
||
}
|
||
/// <summary>
|
||
/// 欢迎模式时间(分钟)
|
||
/// </summary>
|
||
public virtual int WelcomeTime
|
||
{
|
||
get { return this.welcomeTime; }
|
||
set { this.welcomeTime = value; }
|
||
}
|
||
/// <summary>
|
||
/// 是否锁定温度
|
||
/// </summary>
|
||
public virtual bool IsLockTemp
|
||
{
|
||
get { return this.isLockTemp; }
|
||
set { this.isLockTemp = value; }
|
||
}
|
||
/// <summary>
|
||
/// 锁定温度
|
||
/// </summary>
|
||
public virtual int LockTemp
|
||
{
|
||
get { return this.lockTemp; }
|
||
set { this.lockTemp = value; }
|
||
}
|
||
/// <summary>
|
||
/// 模式: 1/制冷模式,2/制热模式,4/送风模式,0自动
|
||
/// </summary>
|
||
public virtual int Mode
|
||
{
|
||
get { return this.mode; }
|
||
set { this.mode = value; }
|
||
}
|
||
/// <summary>
|
||
/// 阀状态: 1阀开,2阀关
|
||
/// </summary>
|
||
public virtual int Valve
|
||
{
|
||
get { return this.valve; }
|
||
set { this.valve = value; }
|
||
}
|
||
/// <summary>
|
||
/// 空调管制:0/二管制,1/四管制
|
||
/// </summary>
|
||
public virtual ControlType ControlType
|
||
{
|
||
get { return this.controlType; }
|
||
set { this.controlType = value; }
|
||
}
|
||
/// <summary>
|
||
/// 补偿温度
|
||
/// </summary>
|
||
public virtual float CompensatoryTemp
|
||
{
|
||
get { return this.compensatoryTemp; }
|
||
set { this.compensatoryTemp = value; }
|
||
}
|
||
/// <summary>
|
||
/// 是否关联房态
|
||
/// </summary>
|
||
public virtual bool RelateRoomStatus
|
||
{
|
||
get { return this.relateRoomStatus; }
|
||
set { this.relateRoomStatus = value; }
|
||
}
|
||
/// <summary>
|
||
/// 是否关联门磁
|
||
/// </summary>
|
||
public virtual bool RelateDoorContact
|
||
{
|
||
get { return this.relateDoorContact; }
|
||
set { this.relateDoorContact = value; }
|
||
}
|
||
/// <summary>
|
||
/// 手自动模式
|
||
/// </summary>
|
||
public virtual int ColdHotMode
|
||
{
|
||
get { return this.coldHotMode; }
|
||
set { this.coldHotMode = value; }
|
||
}
|
||
/// <summary>
|
||
/// 冷热转换延时,单位:秒
|
||
/// </summary>
|
||
public virtual int ColdHotSwitchDelayTime
|
||
{
|
||
get { return this.coldHotSwitchDelayTime; }
|
||
set { this.coldHotSwitchDelayTime = value; }
|
||
}
|
||
/// <summary>
|
||
/// 温度到达停止风机运行
|
||
/// </summary>
|
||
public virtual bool FanStop
|
||
{
|
||
get { return this.fanStop; }
|
||
set { this.fanStop = value; }
|
||
}
|
||
/// <summary>
|
||
/// 禁止风机高速运行:0/否,1/是
|
||
/// </summary>
|
||
public virtual bool DisableFanHighSpeed
|
||
{
|
||
get { return this.disableFanHighSpeed; }
|
||
set { this.disableFanHighSpeed = value; }
|
||
}
|
||
/// <summary>
|
||
/// 启用睡眠标志
|
||
/// </summary>
|
||
public virtual bool SleepFlag
|
||
{
|
||
get { return this.sleepFlag; }
|
||
set { this.sleepFlag = value; }
|
||
}
|
||
/// <summary>
|
||
/// 睡眠开始时间
|
||
/// </summary>
|
||
public virtual string SleepStartTime
|
||
{
|
||
get { return this.sleepStartTime; }
|
||
set { this.sleepStartTime = value; }
|
||
}
|
||
/// <summary>
|
||
/// 睡眠结束时间
|
||
/// </summary>
|
||
public virtual string SleepEndTime
|
||
{
|
||
get { return this.sleepEndTime; }
|
||
set { this.sleepEndTime = value; }
|
||
}
|
||
/// <summary>
|
||
/// 睡眠模式偏差
|
||
/// </summary>
|
||
public virtual int SleepDevition
|
||
{
|
||
get { return this.sleepDevition; }
|
||
set { this.sleepDevition = value; }
|
||
}
|
||
/// <summary>
|
||
/// 启动定时
|
||
/// </summary>
|
||
public virtual bool TimeFlag
|
||
{
|
||
get { return this.timeFlag; }
|
||
set { this.timeFlag = value; }
|
||
}
|
||
/// <summary>
|
||
/// 定时开始时间1
|
||
/// </summary>
|
||
public virtual string TimeStartTime1
|
||
{
|
||
get { return this.timeStartTime1; }
|
||
set { this.timeStartTime1 = value; }
|
||
}
|
||
/// <summary>
|
||
/// 定时结束时间1
|
||
/// </summary>
|
||
public virtual string TimeEndTime1
|
||
{
|
||
get { return this.timeEndTime1; }
|
||
set { this.timeEndTime1 = value; }
|
||
}
|
||
/// <summary>
|
||
/// 定时开始时间2
|
||
/// </summary>
|
||
public virtual string TimeStartTime2
|
||
{
|
||
get { return this.timeStartTime2; }
|
||
set { this.timeStartTime2 = value; }
|
||
}
|
||
/// <summary>
|
||
/// 定时结束时间2
|
||
/// </summary>
|
||
public virtual string TimeEndTime2
|
||
{
|
||
get { return this.timeEndTime2; }
|
||
set { this.timeEndTime2 = value; }
|
||
}
|
||
/// <summary>
|
||
/// 定时开始时间3
|
||
/// </summary>
|
||
public virtual string TimeStartTime3
|
||
{
|
||
get { return this.timeStartTime3; }
|
||
set { this.timeStartTime3 = value; }
|
||
}
|
||
/// <summary>
|
||
/// 定时结束时间3
|
||
/// </summary>
|
||
public virtual string TimeEndTime3
|
||
{
|
||
get { return this.timeEndTime3; }
|
||
set { this.timeEndTime3 = value; }
|
||
}
|
||
|
||
public override bool Equals(object obj)
|
||
{
|
||
HostModal o = obj as HostModal;
|
||
|
||
if (o == null)
|
||
{
|
||
return false;
|
||
}
|
||
|
||
return this.HostID == o.HostID && this.Modal.ID == o.Modal.ID;
|
||
}
|
||
|
||
public override int GetHashCode()
|
||
{
|
||
return this.HostID.GetHashCode() ^ this.Modal.GetHashCode();
|
||
}
|
||
}
|
||
}
|