using BatCharging.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BatCharging.Service
{
///
/// 解析充放电机上传基本状态
///
public class MsgBatCycUpDecoder
{
///
/// 解析充放电机上传基本状态
///
///
///
public BatteryCycleUpBasic GetMsgbatteryCycleUp(byte[] data)
{
BatteryCycleUpBasic batteryCycleUp = null;
if (data.Count() >= 43)
{
batteryCycleUp = new BatteryCycleUpBasic();
batteryCycleUp.PNG1 = data[25];
batteryCycleUp.PNG1 = data[26];
batteryCycleUp.PNG1 = data[27];
batteryCycleUp.AlarmLevel = data[28];
batteryCycleUp.batteryBoxNo = data[29];
batteryCycleUp.maxCurOutBatBox = ByteUtils.ToUInt16(data, 30);
batteryCycleUp.maxCanCurOutBatBox = ByteUtils.ToUInt16(data, 32);
batteryCycleUp.BatBoxFanStatus = ByteUtils.ToUInt16(data, 34);
batteryCycleUp.HeaterCondition = ByteUtils.ToUInt16(data, 36);
batteryCycleUp.stateEqu = ByteUtils.ToUInt16(data, 38);
batteryCycleUp.HighVolIntlockState = ByteUtils.ToUInt16(data, 40);
batteryCycleUp.retain = data[42];
}
return batteryCycleUp;
}
}
}