| | |
| | | |
| | | namespace Shared |
| | | { |
| | | [System.Serializable] |
| | | public class FoolHeat:Common |
| | | { |
| | | public FoolHeat () |
| | | { |
| | | this.Type = DeviceType.FoolHeat;; |
| | | [System.Serializable] |
| | | public class FoolHeat : Common |
| | | { |
| | | public FoolHeat () |
| | | { |
| | | this.Type = DeviceType.FoolHeat; ; |
| | | DeviceTextID = SimpleControl.R.MyInternationalizationString.FoolHeat; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 工作模式 |
| | | /// <summary> |
| | | /// 工作模式 |
| | | /// 0制热,1制冷,2,3 |
| | | /// </summary> |
| | | public byte WorkingMode = 0; |
| | | /// </summary> |
| | | public byte WorkingMode = 0; |
| | | /// <summary> |
| | | /// 温度模式 |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | public byte TemperatureType; |
| | | |
| | | public byte NormalTemperature; |
| | | public byte NormalTemperature; |
| | | |
| | | public byte DayTemperature; |
| | | public byte DayTemperature; |
| | | |
| | | public byte NightTemperature; |
| | | public byte NightTemperature; |
| | | |
| | | public byte AwayTemperature; |
| | | public byte AwayTemperature; |
| | | |
| | | public byte Timer;//0 = Day, 1 = Night |
| | | |
| | |
| | | /// <summary> |
| | | /// 工作温度 |
| | | /// </summary> |
| | | public byte WorkingTemperature =5; |
| | | public byte WorkingTemperature = 5; |
| | | public byte PIDSpeed; |
| | | public byte IndoorTemperature; |
| | | public byte FloorTemperature; |
| | | |
| | | public byte[] FH_Bytes; |
| | | public byte [] FH_Bytes; |
| | | |
| | | public FoolHeat Serverx_FH_CMD (CommandType commandType, byte[] updataBytes = null) |
| | | public FoolHeat Serverx_FH_CMD (CommandType commandType, byte [] updataBytes = null) |
| | | { |
| | | if (updataBytes != null) |
| | | FH_Bytes = updataBytes; |
| | |
| | | } else if (commandType == CommandType.TemperatrueMode) { |
| | | FH_Bytes = Control.ControlBytesSendHasReturn (Command.SetFoolHeat, SubnetID, DeviceID, new byte [] { LoopID, FH_Bytes [1], FH_Bytes [2], TemperatureType, FH_Bytes [4], FH_Bytes [5], FH_Bytes [6], FH_Bytes [7], 0, 0 }); |
| | | return this; |
| | | } |
| | | } |
| | | |
| | | this.WorkingMode = FH_Bytes [1] > 10 ? (byte)1 : (byte)0; |
| | | this.Status = (byte)(FH_Bytes [1] % 2); |
| | |
| | | return this; |
| | | } |
| | | |
| | | public enum CommandType |
| | | public enum CommandType |
| | | { |
| | | Read = 0, |
| | | Switch = 1, |
| | | Temperatrue =3, |
| | | Temperatrue = 3, |
| | | TemperatrueMode = 7, |
| | | WorkMode = 9, |
| | | Null = 999, |