58 #include "Mockfassert.h"
59 #include "Mockmpu_prototypes.h"
109 uint32_t timeDifference = 100u;
113 OS_GetTickCount_ExpectAndReturn(100u);
118 OS_GetTickCount_ExpectAndReturn(100u);
123 OS_GetTickCount_ExpectAndReturn(101u);
128 OS_GetTickCount_ExpectAndReturn(5000u);
133 OS_GetTickCount_ExpectAndReturn(50u);
138 OS_GetTickCount_ExpectAndReturn(49u);
143 OS_GetTickCount_ExpectAndReturn(50u);
148 OS_GetTickCount_ExpectAndReturn(UINT32_MAX);
158 uint32_t timeDifference = 100u;
164 OS_GetTickCount_ExpectAndReturn(100u);
170 OS_GetTickCount_ExpectAndReturn(50u);
177 OS_GetTickCount_ExpectAndReturn(180u);
184 OS_GetTickCount_ExpectAndReturn(181);
191 OS_GetTickCount_ExpectAndReturn(200u);
198 OS_GetTickCount_ExpectAndReturn(250u);
205 OS_GetTickCount_ExpectAndReturn(49u);
212 OS_GetTickCount_ExpectAndReturn(50u);
219 OS_GetTickCount_ExpectAndReturn(150u);
226 OS_GetTickCount_ExpectAndReturn(49u);
233 OS_GetTickCount_ExpectAndReturn(150u);
238 OS_GetTickCount_ExpectAndReturn(UINT32_MAX);
#define BS_NR_OF_CELL_BLOCKS_PER_MODULE
number of cells per module
#define BS_NR_OF_STRINGS
Number of parallel strings in the battery pack.
#define BS_NR_OF_TEMP_SENSORS_PER_MODULE
number of temperature sensors per battery module
#define BS_NR_OF_MODULES_PER_STRING
number of modules in a string
Database configuration header.
@ DATA_BLOCK_ID_CELL_VOLTAGE
uint8_t DATA_GetSensorNumberFromTemperatureIndex(uint16_t sensorIndex)
Returns sensor number of passed temperature sensor index.
uint8_t DATA_GetModuleNumberFromVoltageIndex(uint16_t cellIndex)
Returns module number of passed cell index.
uint8_t DATA_GetModuleNumberFromTemperatureIndex(uint16_t sensorIndex)
Returns module number of passed temperature sensor index.
uint8_t DATA_GetStringNumberFromVoltageIndex(uint16_t cellIndex)
Returns string number of passed cell index.
uint8_t DATA_GetStringNumberFromTemperatureIndex(uint16_t sensorIndex)
Returns string number of passed temperature sensor index.
bool DATA_DatabaseEntryUpdatedAtLeastOnce(DATA_BLOCK_HEADER_s dataBlockHeader)
Checks if passed database entry has been updated at least once.
bool DATA_EntryUpdatedPeriodicallyWithinInterval(DATA_BLOCK_HEADER_s dataBlockHeader, uint32_t timeInterval)
Checks if passed database entry has been periodically updated within the time interval.
uint8_t DATA_GetCellNumberFromVoltageIndex(uint16_t cellIndex)
Returns cell number of passed cell index.
bool DATA_EntryUpdatedWithinInterval(DATA_BLOCK_HEADER_s dataBlockHeader, uint32_t timeInterval)
Checks if passed database entry has been updated within the last time interval.
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
void testDATA_GetCellNumberFromVoltageIndex(void)
void testDATA_GetSensorNumberFromTemperatureIndex(void)
void testDATA_GetStringNumberFromTemperatureIndex(void)
void testDATA_GetStringNumberFromVoltageIndex(void)
void testDATA_EntryUpdatedPeriodicallyWithinInterval(void)
void testDATA_DatabaseEntryUpdatedAtLeastOnce(void)
void testDATA_GetModuleNumberFromTemperatureIndex(void)
void testDATA_GetModuleNumberFromVoltageIndex(void)
void testDATA_EntryUpdatedWithinInterval(void)