using BatCharging.Model; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BatCharging.Service { /// /// 解析充放电机上传温度检测点极值数据 /// public class MsgBatCycUpTestDecoder { public BatteryCycleUpTest GetMsgBatteryCycleUpTest(byte[] data) { BatteryCycleUpTest batteryCycleUpTest = null; if (data.Length >= 36) { batteryCycleUpTest = new BatteryCycleUpTest(); batteryCycleUpTest.PNG1 = data[25]; batteryCycleUpTest.PNG2 = data[26]; batteryCycleUpTest.PNG3 = data[27]; batteryCycleUpTest.maxTem = data[28]; batteryCycleUpTest.maxTemTestNo = data[29]; batteryCycleUpTest.minTem = data[30]; batteryCycleUpTest.minTemTestNo = data[31]; batteryCycleUpTest.PosColTem = data[32]; batteryCycleUpTest.NegColTem = data[33]; batteryCycleUpTest.aveTem = data[34]; batteryCycleUpTest.retain = data[35]; } return batteryCycleUpTest; } } }