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.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
using BatCharging.Model ;
using System ;
using System.Collections.Generic ;
using System.Linq ;
using System.Text ;
using System.Threading.Tasks ;
namespace BatCharging.Service
{
/// <summary>
/// 解析BMS监控、维护、诊断数据( 自定义格式)
/// </summary>
public class MsgAnaBmsDecoder
{
public BatCycUpVolExtSta mBatCycUpVolExtSta ( byte [ ] data )
{
BatCycUpVolExtSta mBatCycUpVolExtSta = null ;
if ( data . Count ( ) > = 36 )
{
mBatCycUpVolExtSta = new BatCycUpVolExtSta ( ) ;
mBatCycUpVolExtSta . PNG1 = data [ 25 ] ;
mBatCycUpVolExtSta . PNG2 = data [ 26 ] ;
mBatCycUpVolExtSta . PNG3 = data [ 27 ] ;
mBatCycUpVolExtSta . maxVol = ByteUtils . ToUInt16 ( data , 28 ) ;
mBatCycUpVolExtSta . maxValNo = data [ 30 ] ;
mBatCycUpVolExtSta . minVol = ByteUtils . ToUInt16 ( data , 31 ) ;
mBatCycUpVolExtSta . minValNo = data [ 33 ] ;
mBatCycUpVolExtSta . averageVol = ByteUtils . ToUInt16 ( data , 34 ) ;
}
return mBatCycUpVolExtSta ;
}
}
}