using BatCharging.Model; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BatCharging.Service { /// /// 解析监控平台下发电池仓的状态 /// public class MsgBatStatusDecoder { /// /// 解析监控平台下发电池仓的状态 /// /// /// public BatStatus GetMsgBatStatus(byte[] data) { BatStatus batStatus = null; if (data.Count() > 28) { batStatus = new BatStatus(); batStatus.WhetherBat = data[25]; batStatus.EleConStatus = data[26]; batStatus.WaterCondition = data[27]; } return batStatus; } } }