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.
34 lines
894 B
34 lines
894 B
using BatCharging.Model;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BatCharging.Service
|
|
{
|
|
/// <summary>
|
|
/// 解析监控平台下发电池仓的状态
|
|
/// </summary>
|
|
public class MsgBatStatusDecoder
|
|
{
|
|
/// <summary>
|
|
/// 解析监控平台下发电池仓的状态
|
|
/// </summary>
|
|
/// <param name="data"></param>
|
|
/// <returns></returns>
|
|
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;
|
|
}
|
|
}
|
|
}
|