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.
44 lines
1.1 KiB
44 lines
1.1 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using BatCharging.Model;
|
|
|
|
namespace BatCharging.Service
|
|
{
|
|
/// <summary>
|
|
/// 解包充电机应答远程停止充电消息
|
|
/// </summary>
|
|
public class MsgStopChgResDecoder
|
|
{
|
|
/// <summary>
|
|
/// 解包充电机应答远程停止充电的字节列表
|
|
/// </summary>
|
|
/// <param name="msgRecv">接收到字节数组</param>
|
|
/// <returns>充电机应答远程停止充电消息</returns>
|
|
public RemoteStopChargingRes GetStopChargingResMsg(byte[] msgRecv)
|
|
{
|
|
RemoteStopChargingRes msgResult = null;
|
|
if (msgRecv != null)
|
|
{
|
|
int num = msgRecv.Length;
|
|
if (num >= 25)
|
|
{
|
|
msgResult = new RemoteStopChargingRes
|
|
{
|
|
Result = msgRecv[24]
|
|
};
|
|
}
|
|
}
|
|
else
|
|
{
|
|
return null;
|
|
}
|
|
return msgResult;
|
|
}
|
|
|
|
|
|
}
|
|
}
|