#ifndef BMS_STATISTIC_H_
#define BMS_STATISTIC_H_

#ifdef __cplusplus
extern "C" {
#endif 

#include "kit_macro.h"


typedef enum
{
    kStatisticData_TotalVolt,
   
    kStatisticData_AccVolt,
    kStatisticData_MaxVolt,
    kStatisticData_MaxVoltIdx,
	kStatisticData_MaxVoltBmuIdx,
    kStatisticData_MinVolt,
    kStatisticData_MinVoltIdx,
	kStatisticData_MinVoltBmuIdx,
    kStatisticData_AvgVolt,
    kStatisticData_VoltDiff,

    kStatisticData_AccTemp,
    kStatisticData_MaxTemp,    
    kStatisticData_MaxTempIdx,
	kStatisticData_MaxTempBmuIdx,
    kStatisticData_MinTemp,
    kStatisticData_MinTempIdx,
	kStatisticData_MinTempBmuIdx,
    kStatisticData_AvgTemp,
    kStatisticData_TempDiff,
	
    kStatisticData_MaxBTemp,
    kStatisticData_MaxBTempIdx,
    
    kStatisticData_BalanceMaxTemp,    
    kStatisticData_BalanceMaxTempIdx,
	kStatisticData_BalanceMaxTempBmuIdx,  
    kStatisticData_BalanceMinTemp,    
    kStatisticData_BalanceMinTempIdx,
	kStatisticData_BalanceMinTempBmuIdx,

    kStatisticData_OnlineCellNum,
    kStatisticData_OnlineTempNum,
	
	kStatisticData_EnviTemp,
	kStatisticData_TempRiseValue,
    
    kStatisticData_MaxPoleTemp,    
	kStatisticData_MaxPoleTempBmuIdx,

    kStatisticData_MaxPackVolt,
    kStatisticData_MaxPackVoltBmuIdx,
    kStatisticData_MinPackVolt,
    kStatisticData_MinPackVoltBmuIdx,
    
    kStatisticData_End,
}StatisticData;

extern uint32_t statistic_data[kStatisticData_End];

void     bms_poll_statistic(uint32_t base_time);
uint32_t bms_get_statistic_data(StatisticData idx);

#ifdef __cplusplus
}
#endif

#endif

