You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
2.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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;
}
}