57 #include "Mockdatabase.h"
58 #include "Mockdatabase_helper.h"
61 #include "Mockplausibility.h"
77 DATA_Read_4_DataBlocks_ExpectAndReturn(
83 DATA_Read_4_DataBlocks_IgnoreArg_pDataToReceiver0();
84 DATA_Read_4_DataBlocks_IgnoreArg_pDataToReceiver1();
85 DATA_Read_4_DataBlocks_IgnoreArg_pDataToReceiver2();
86 DATA_Read_4_DataBlocks_IgnoreArg_pDataToReceiver3();
109 uint32_t timestamp = 10u;
110 uint32_t previousTimestamp = 0u;
115 previousTimestamp = 10u;
120 previousTimestamp = 60u;
125 previousTimestamp = 0u;
131 uint32_t timeDifference = 100u;
134 uint32_t timestamp = 50u;
135 uint32_t previousTimestamp = 0u;
136 OS_GetTickCount_ExpectAndReturn(100u);
141 OS_GetTickCount_ExpectAndReturn(100u);
146 OS_GetTickCount_ExpectAndReturn(101u);
151 OS_GetTickCount_ExpectAndReturn(5000u);
155 timestamp = UINT32_MAX;
156 OS_GetTickCount_ExpectAndReturn(50u);
160 timestamp = UINT32_MAX - 50u;
161 OS_GetTickCount_ExpectAndReturn(49u);
165 timestamp = UINT32_MAX - 50u;
166 OS_GetTickCount_ExpectAndReturn(50u);
171 OS_GetTickCount_ExpectAndReturn(UINT32_MAX);
221 DATA_EntryUpdatedWithinInterval_IgnoreAndReturn(
false);
222 DATA_DatabaseEntryUpdatedAtLeastOnce_IgnoreAndReturn(
false);
225 OS_GetTickCount_IgnoreAndReturn(0);
227 DIAG_Handler_IgnoreAndReturn(
STD_OK);
@ DATA_BLOCK_ID_CELL_VOLTAGE_REDUNDANCY0
@ DATA_BLOCK_ID_CELL_VOLTAGE
@ DATA_BLOCK_ID_CELL_TEMPERATURE_REDUNDANCY0
@ DATA_BLOCK_ID_CELL_TEMPERATURE_BASE
@ DATA_BLOCK_ID_CELL_VOLTAGE_BASE
@ DATA_BLOCK_ID_CELL_TEMPERATURE
math library for often used math functions
#define NULL_PTR
Null pointer.
STD_RETURN_TYPE_e TEST_MRC_CalculateCellTemperatureMinMaxAverage(DATA_BLOCK_CELL_TEMPERATURE_s *pValidatedTemperatures, DATA_BLOCK_MIN_MAX_s *pMinMaxAverageValues)
STD_RETURN_TYPE_e TEST_MRC_CalculateCellVoltageMinMaxAverage(DATA_BLOCK_CELL_VOLTAGE_s *pValidatedVoltages, DATA_BLOCK_MIN_MAX_s *pMinMaxAverageValues)
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)
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_UpdateCellVoltageValidation(DATA_BLOCK_CELL_VOLTAGE_s *pCellvoltage, DATA_BLOCK_CELL_VOLTAGE_s *pValidatedVoltages)
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)
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)
STD_RETURN_TYPE_e TEST_MRC_MeasurementUpdatedRecently(uint32_t timestamp, uint32_t previousTimestamp, uint32_t timeInterval)
Header fileS for handling redundancy between redundant cell voltage and cell temperature measurements...
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
#define TEST_ASSERT_PASS_ASSERT(_code_under_test)
assert whether assert macro has passed
#define TEST_ASSERT_FAIL_ASSERT(_code_under_test)
assert whether assert macro has failed
DATA_BLOCK_CELL_VOLTAGE_s testCellvoltageBase
void testMRC_UpdateCellVoltageValidationNullPointer(void)
void testMRC_CalculateCellVoltageMinMaxAverageNullPointer(void)
DATA_BLOCK_CELL_VOLTAGE_s testCellvoltageRedundancy0
DATA_BLOCK_CELL_TEMPERATURE_s testCelltemperatureBase
void testMRC_CalculateCellTemperatureMinMaxAverageNullPointer(void)
DATA_BLOCK_CELL_TEMPERATURE_s testCelltemperatureRedundancy0
void testMRC_ValidateCellVoltageNullPointer(void)
void testMRC_ValidateCellTemperatureNullPointer(void)
void testMRC_MeasurementUpdatedAtLeastOnce(void)
void testMRC_MeasurementUpdatedRecently(void)
void testMRC_AfeMeasurementValidationTickZeroNothingToDo(void)
void testMRC_UpdateCellTemperatureValidationNullPointer(void)
static void injectDatabaseEntries(void)