using BatCharging.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BatCharging.Service
{
///
/// 数据上报解析类
///
public class MsgRemoteData
{
///
/// 解析遥信数据上报
///
///
public MRemoteData BRemoteData(byte[] data)
{
MRemoteData mRemoteData = null;
mRemoteData = new MRemoteData();
mRemoteData.workDev = data[24];
mRemoteData.totalFault = data[25];
mRemoteData.commonAlarm = data[26];
mRemoteData.emergencyStop = data[27];
mRemoteData.malfunction = data[28];
mRemoteData.SmokeFault = data[29];
mRemoteData.CirBreFailureIn = data[30];
mRemoteData.SysSupplyCirBre = data[31];
mRemoteData.PositiveFault = data[32];
mRemoteData.NegativeEleFault = data[33];
mRemoteData.pFuseFaulty = data[34];
mRemoteData.nPositiveFuseFaulty = data[35];
mRemoteData.magneticLockFaulty = data[36];
mRemoteData.FanFailure = data[37];
mRemoteData.arresterFaulty = data[38];
mRemoteData.InsMonAlarm = data[39];
mRemoteData.InsMonFault = data[40];
mRemoteData.BatPReverseConFault = data[41];
mRemoteData.VeConGuidanceFailure = data[42];
mRemoteData.OveCausesBarrier = data[43];
mRemoteData.interfaceOverFaulty = data[44];
mRemoteData.ChaGunNotRetAlarm = data[45];
mRemoteData.BMSComFaulty = data[46];
mRemoteData.ChaPilePnputVolOveFault = data[47];
mRemoteData.InputVoltageUndFault = data[48];
mRemoteData.OvervoltageFault = data[49];
mRemoteData.UndervoltageFault = data[50];
mRemoteData.OvercurrentFault = data[51];
mRemoteData.connectionStatus = data[52];
mRemoteData.ChargingGunHolderStatus = data[53];
mRemoteData.IntEleLockStatus = data[54];
mRemoteData.pCntactorCon = data[55];
mRemoteData.nContactorCon = data[56];
mRemoteData.AccessConFailure = data[57];
mRemoteData.pConA3dhesionFailure = data[58];
mRemoteData.nConadhesionFailure = data[59];
mRemoteData.dischargeLoopFaulty = data[60];
mRemoteData.conActivated = data[61];
mRemoteData.ConAdhesionFailure = data[62];
mRemoteData.outputReverseCon = data[63];
mRemoteData.ModuleOutputRev = data[64];
mRemoteData.AcConStatus = data[65];
mRemoteData.chaGunOvertAlarmGen = data[66];
mRemoteData.ChargingPileOvertAlarm = data[67];
mRemoteData.meterComAbnormal = data[68];
mRemoteData.meterAbnormal = data[69];
mRemoteData.FloodingAlarm = data[70];
mRemoteData.BatPackAuxPowerStatus = data[71];
mRemoteData.ReversePowerAlarm = data[72];
mRemoteData.Module1s1tatus01 = data[73];
mRemoteData.Module1s1tatus02 = data[74];
mRemoteData.Module1s1tatus03 = data[75];
mRemoteData.Module1s1tatus04 = data[76];
mRemoteData.Module1s1tatus05 = data[77];
mRemoteData.Module1s1tatus06 = data[78];
mRemoteData.Module1s1tatus07 = data[79];
mRemoteData.Module1s1tatus08 = data[80];
mRemoteData.Module1s01tatus01 =data[81];
mRemoteData.Module1s01tatus02 =data[82];
mRemoteData.Module1s01tatus03 =data[83];
mRemoteData.Module1s01tatus04 = ByteUtils.ToUInt32(data, 84);
mRemoteData.Module2status01 = data[88];
mRemoteData.Module2status02 = data[89];
mRemoteData.Module2status03 = data[90];
mRemoteData.Module2status04 = data[91];
mRemoteData.Module2status05 = data[92];
mRemoteData.Module2status06 = data[93];
mRemoteData.Module2status07 = data[94];
mRemoteData.Module2status08 = data[95];
mRemoteData.Module02status01 = data[96];
mRemoteData.Module02status02 = data[97];
mRemoteData.Module02status03 = data[98];
mRemoteData.Module02status04 = ByteUtils.ToUInt32(data, 99);
mRemoteData.Module3status01 = data[103];
mRemoteData.Module3status02 = data[104];
mRemoteData.Module3status03 = data[105];
mRemoteData.Module3status04 = data[106];
mRemoteData.Module3status05 = data[107];
mRemoteData.Module3status06 = data[108];
mRemoteData.Module3status07 = data[109];
mRemoteData.Module3status08 = data[120];
mRemoteData.Module03status01 = data[121];
mRemoteData.Module03status02 = data[122];
mRemoteData.Module03status03 = data[123];
mRemoteData.Module03status04 = ByteUtils.ToUInt32(data, 124);
mRemoteData.Module4status01 = data[127];
mRemoteData.Module4status02 = data[128];
mRemoteData.Module4status03 = data[129];
mRemoteData.Module4status04 = data[130];
mRemoteData.Module4status05 = data[131];
mRemoteData.Module4status06 = data[132];
mRemoteData.Module4status07 = data[133];
mRemoteData.Module4status08 = data[134];
mRemoteData.Module04status01 = data[135];
mRemoteData.Module04status02 = data[136];
mRemoteData.Module04status03 = data[137];
mRemoteData.Module04status04 = ByteUtils.ToUInt32(data, 138);
return mRemoteData;
}
}
}