using BatCharging.Model; namespace BatCharging.Service.Decoder.New { public class AuxiliaryPowerControlDecoder { /// /// 解包1 应答结果 BIN 1字节 0: 成功 1:失败 /// 2 失败原因 BIN 1字节 0:正常 1:电池包/或者充电枪未连接 0xFF:其他原因 /// /// 接收到字节数组 /// /returns> public AuxiliaryPowerControlResult GetAuxiliaryPowerControlResult(byte[] msgRecv) { AuxiliaryPowerControlResult msgResult = null; if (msgRecv != null) { int num = msgRecv.Length; if (num >= 27) { msgResult = new AuxiliaryPowerControlResult { ResponseResults = msgRecv[25], FailurReason = msgRecv[26], }; } } return msgResult; } } }