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