|
|
using HybirdFrameworkCore.Autofac.Attribute;
|
|
|
|
|
|
namespace Service.WaterCool.Msg.Host;
|
|
|
|
|
|
/// <summary>
|
|
|
/// 站控向水冷发送模式设定指令
|
|
|
/// 消息id 18FF45A7
|
|
|
/// </summary>
|
|
|
public class ModeMsg : BaseMsg
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// BMS 请求设定模式
|
|
|
/// 0关机模式,1制冷模式,2制热模式,3自循环模式
|
|
|
/// </summary>
|
|
|
[Property(32, 2)]
|
|
|
public byte Mode { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 高压请求
|
|
|
/// 0 上高压请求,1 下高压请求,2~3 无效
|
|
|
/// </summary>
|
|
|
[Property(34, 2)]
|
|
|
public byte HighTension { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 充电状态
|
|
|
/// 0 非充电模式,1 充电模式,2~3 无效
|
|
|
/// </summary>
|
|
|
[Property(36, 2)]
|
|
|
public byte ChargState { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// BMS 高压继电器状态
|
|
|
/// 0 断开状态,1 闭合状态,2~3 无效
|
|
|
/// </summary>
|
|
|
[Property(38, 2)]
|
|
|
public byte BMSState { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// BMS 当前电压高字节
|
|
|
/// 分辨率:1V /bit 偏移量:0 范围:0V~1000V 类型:测量 65535:无效
|
|
|
/// </summary>
|
|
|
[Property(40, 8)]
|
|
|
public byte BMSHighByte { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// BMS 当前电压低字节
|
|
|
/// 分辨率:1V /bit 偏移量:0 范围:0V~1000V 类型:测量 65535:无效
|
|
|
/// </summary>
|
|
|
[Property(48, 8)]
|
|
|
public byte BMSLowByte { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 保留
|
|
|
/// </summary>
|
|
|
[Property(56, 8)]
|
|
|
public byte ReserveOne { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 设定温度
|
|
|
/// 分辨率:1℃\bit 偏移量:-40℃ 单位:℃
|
|
|
/// </summary>
|
|
|
[Property(64, 8, PropertyReadConstant.Bit, 1, 0, 40)]
|
|
|
public sbyte SetTemperature { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 保留
|
|
|
/// </summary>
|
|
|
[Property(72, 8)]
|
|
|
public byte ReserveTwo { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 生命帧
|
|
|
/// </summary>
|
|
|
[Property(80, 8)]
|
|
|
public byte HP { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// CRC 效验值
|
|
|
/// </summary>
|
|
|
[Property(88, 8)]
|
|
|
public byte CrcCheckValue { get; set; }
|
|
|
|
|
|
|
|
|
public ModeMsg(byte mode,byte highTension,byte chargState,byte bmsState,sbyte setTemperature,byte hp,byte crcCheckValue)
|
|
|
{
|
|
|
Id = 0x18FF45A7;
|
|
|
Mode = mode;
|
|
|
HighTension = highTension;
|
|
|
ChargState= chargState;
|
|
|
BMSState= bmsState;
|
|
|
SetTemperature = setTemperature;
|
|
|
HP = hp;
|
|
|
CrcCheckValue = crcCheckValue;
|
|
|
}
|
|
|
public ModeMsg()
|
|
|
{
|
|
|
Id = 0x18FF45A7;
|
|
|
Mode = 0;
|
|
|
HighTension = 3;
|
|
|
ChargState= 0;
|
|
|
BMSState= 0;
|
|
|
SetTemperature = 0;
|
|
|
BMSHighByte = 255;
|
|
|
BMSLowByte = 255;
|
|
|
HP = 0;
|
|
|
CrcCheckValue = 0;
|
|
|
}
|
|
|
|
|
|
} |