85 lines
1.8 KiB
C#
85 lines
1.8 KiB
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Runtime.InteropServices;
|
|||
|
|
using System.Text;
|
|||
|
|
|
|||
|
|
namespace RCUHost.Protocols
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// 节能模式下发 Packet 服务器 -> RCU
|
|||
|
|
/// </summary>
|
|||
|
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
|||
|
|
public struct EnergySavingModePacket
|
|||
|
|
{
|
|||
|
|
/// 温度修正值
|
|||
|
|
public byte CorrectedTemp;
|
|||
|
|
|
|||
|
|
/// 到达温度后风机是否保持低速运行
|
|||
|
|
public byte FanRunStatus;
|
|||
|
|
|
|||
|
|
//排风扇状态
|
|||
|
|
|
|||
|
|
/// 0:关,1:开,2:定时
|
|||
|
|
public byte ExhaustFanStatus;
|
|||
|
|
|
|||
|
|
/// 定时时长(分钟/每小时)
|
|||
|
|
public byte ExhaustFanTime;
|
|||
|
|
|
|||
|
|
|
|||
|
|
/// 红外延时断电时间(分)
|
|||
|
|
public byte InfraredDelayPO;
|
|||
|
|
|
|||
|
|
/// 门磁延时断电时间(秒)
|
|||
|
|
public ushort DoorDelayPO;
|
|||
|
|
|
|||
|
|
/// 拔卡延时断电时间(秒)
|
|||
|
|
public ushort PullCardDelayPO;
|
|||
|
|
|
|||
|
|
/// 风机状态
|
|||
|
|
/// fengji_status[0]; 插卡时状态
|
|||
|
|
/// fengji_status[1]; 拔卡时状态
|
|||
|
|
/// fengji_status[2]; 待租时状态
|
|||
|
|
/// fengji_status[3]; 停租时状态
|
|||
|
|
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.Struct)]
|
|||
|
|
public FengJiStatus[] FengJiStatus;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// CRC16
|
|||
|
|
/// </summary>
|
|||
|
|
public ushort CRC;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 风机状态
|
|||
|
|
/// </summary>
|
|||
|
|
[StructLayoutAttribute(LayoutKind.Sequential)]
|
|||
|
|
public struct FengJiStatus
|
|||
|
|
{
|
|||
|
|
/// 0:关,1:开
|
|||
|
|
public byte OnOff;
|
|||
|
|
|
|||
|
|
/// 0:手动,1:自动
|
|||
|
|
public byte Type;
|
|||
|
|
|
|||
|
|
/// 0:停止,1:低速,2:中速,3:高速
|
|||
|
|
public byte Speed;
|
|||
|
|
|
|||
|
|
/// 夏季温度
|
|||
|
|
public byte SummerTemp;
|
|||
|
|
|
|||
|
|
/// 冬季温度
|
|||
|
|
public byte WinterTemp;
|
|||
|
|
|
|||
|
|
/// 定时控制,0:否,1:是
|
|||
|
|
public byte TimingControl;
|
|||
|
|
|
|||
|
|
/// 定时时长(分钟/每小时)
|
|||
|
|
public byte Timer;
|
|||
|
|
|
|||
|
|
/// 允许用电,0:否,1:是
|
|||
|
|
public byte AllowElectric;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|