using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BatCharging.Model;
namespace BatCharging.Service
{
///
/// 解包充电机应答远程启动充电消息
///
internal class MsgStartChgResDecoder
{
///
/// 解包充电机应答远程启动充电的字节列表
///
/// 接收到字节数组
/// 充电机应答远程启动充电消息
public RemoteStartChargingRes GetStartChargingResMsg(byte[] msgRecv)
{
RemoteStartChargingRes msgResult = null;
if (msgRecv != null)
{
int num = msgRecv.Length;
if (num >= 26)
{
msgResult = new RemoteStartChargingRes
{
Result = msgRecv[24],
FailReason = msgRecv[25]
};
}
}
else
{
return null;
}
return msgResult;
}
}
}