56 #ifndef FOXBMS__REDUNDANCY_H_
57 #define FOXBMS__REDUNDANCY_H_
75 #define MRC_CURRENT_MEASUREMENT_PERIOD_TIMEOUT_ms (250u)
89 #define MRC_AFE_MEASUREMENT_PERIOD_TIMEOUT_ms (250u)
102 #define MRC_CURRENT_SENSOR_MEASUREMENT_TIMEOUT_ms (300u)
112 #define MRC_ALLOWED_NUMBER_OF_INVALID_CELL_VOLTAGES (5u)
154 #ifdef UNITY_UNIT_TEST
158 uint32_t previousTimestamp,
159 uint32_t timeInterval);
#define BS_NR_OF_STRINGS
Number of parallel strings in the battery pack.
bool TEST_MRC_ValidateCellVoltageMeasurement(DATA_BLOCK_CELL_VOLTAGE_s *pCellVoltageBase, DATA_BLOCK_CELL_VOLTAGE_s *pCellVoltageRedundancy0)
STD_RETURN_TYPE_e TEST_MRC_CalculateCellTemperatureMinMaxAverage(DATA_BLOCK_CELL_TEMPERATURE_s *pValidatedTemperatures, DATA_BLOCK_MIN_MAX_s *pMinMaxAverageValues)
STD_RETURN_TYPE_e MRC_Initialize(void)
Function to initalize redundancy module.
bool TEST_MRC_ValidateCellTemperatureMeasurement(DATA_BLOCK_CELL_TEMPERATURE_s *pCellTemperatureBase, DATA_BLOCK_CELL_TEMPERATURE_s *pCellTemperatureRedundancy0)
STD_RETURN_TYPE_e TEST_MRC_CalculateCellVoltageMinMaxAverage(DATA_BLOCK_CELL_VOLTAGE_s *pValidatedVoltages, DATA_BLOCK_MIN_MAX_s *pMinMaxAverageValues)
void TEST_MRC_ValidateBatteryVoltageMeasurement(void)
void TEST_MRC_ValidatePowerMeasurement(DATA_BLOCK_CURRENT_SENSOR_s *pTableCurrentSensor)
STD_RETURN_TYPE_e TEST_MRC_UpdateCellTemperatureValidation(DATA_BLOCK_CELL_TEMPERATURE_s *pCellTemperature, DATA_BLOCK_CELL_TEMPERATURE_s *pValidatedTemperature)
bool TEST_MRC_MeasurementUpdatedAtLeastOnce(uint32_t timestamp, uint32_t previousTimestamp)
void TEST_MRC_ValidateStringVoltageMeasurement(DATA_BLOCK_CURRENT_SENSOR_s *pTableCurrentSensor, DATA_BLOCK_CELL_VOLTAGE_s *pTableCellVoltage)
STD_RETURN_TYPE_e MRC_ValidateAfeMeasurement(void)
Function to validate the measurement between redundant measurement values for cell voltage and cell t...
STD_RETURN_TYPE_e TEST_MRC_ValidateCellTemperature(DATA_BLOCK_CELL_TEMPERATURE_s *pCelltemperatureBase, DATA_BLOCK_CELL_TEMPERATURE_s *pCelltemperatureRedundancy0, DATA_BLOCK_CELL_TEMPERATURE_s *pValidatedTemperatures)
void TEST_MRC_ValidateCurrentMeasurement(DATA_BLOCK_CURRENT_SENSOR_s *pTableCurrentSensor)
STD_RETURN_TYPE_e MRC_ValidatePackMeasurement(void)
Function to validate the measurements of pack values (string values, pack values)
STD_RETURN_TYPE_e TEST_MRC_UpdateCellVoltageValidation(DATA_BLOCK_CELL_VOLTAGE_s *pCellVoltage, DATA_BLOCK_CELL_VOLTAGE_s *pValidatedVoltages)
STD_RETURN_TYPE_e TEST_MRC_MeasurementUpdatedRecently(uint32_t timestamp, uint32_t previousTimestamp, uint32_t timeInterval)
STD_RETURN_TYPE_e TEST_MRC_ValidateCellVoltage(DATA_BLOCK_CELL_VOLTAGE_s *pCellVoltageBase, DATA_BLOCK_CELL_VOLTAGE_s *pCellVoltageRedundancy0, DATA_BLOCK_CELL_VOLTAGE_s *pValidatedVoltages)
void TEST_MRC_ValidateHighVoltageMeasurement(DATA_BLOCK_CURRENT_SENSOR_s *pTableCurrentSensor)
uint32_t lastBaseCelltemperatureTimestamp
uint32_t lastRedundancy0CelltemperatureTimestamp
uint32_t lastRedundancy0CellVoltageTimestamp
uint32_t lastBaseCellVoltageTimestamp