58 #include "Mockbal_cfg.h"
59 #include "Mockbms_cfg.h"
61 #include "Mockdatabase.h"
63 #include "Mockfoxmath.h"
65 #include "Mockmpu_prototypes.h"
67 #include "Mocksys_mon.h"
75 TEST_FILE(
"can_cbs_rx_command.c")
149 DATA_Read1DataBlock_IgnoreAndReturn(
STD_OK);
150 BAL_GetInitializationState_IgnoreAndReturn(
STD_NOT_OK);
151 BAL_SetBalancingThreshold_Ignore();
152 DATA_Write1DataBlock_IgnoreAndReturn(
STD_OK);
182 OS_CheckTimeHasPassed_ExpectAndReturn(0u, 0u,
false);
183 OS_CheckTimeHasPassed_IgnoreArg_oldTimeStamp_ms();
184 OS_CheckTimeHasPassed_IgnoreArg_timeToPass_ms();
191 OS_CheckTimeHasPassed_ExpectAndReturn(0u, 0u,
true);
192 OS_CheckTimeHasPassed_IgnoreArg_oldTimeStamp_ms();
193 OS_CheckTimeHasPassed_IgnoreArg_timeToPass_ms();
207 DATA_Read1DataBlock_IgnoreAndReturn(
STD_OK);
208 DATA_Write1DataBlock_IgnoreAndReturn(
STD_OK);
209 OS_CheckTimeHasPassed_IgnoreAndReturn(
false);
214 BAL_GetInitializationState_ExpectAndReturn(
STD_OK);
216 BAL_SetBalancingThreshold_Expect(0u);
222 BAL_GetInitializationState_ExpectAndReturn(
STD_OK);
224 BAL_SetBalancingThreshold_Expect(0x42u);
230 BAL_GetInitializationState_ExpectAndReturn(
STD_NOT_OK);
231 BAL_SetBalancingThreshold_Expect(0x33u);
243 DATA_Read1DataBlock_IgnoreAndReturn(
STD_OK);
244 DATA_Write1DataBlock_IgnoreAndReturn(
STD_OK);
245 OS_CheckTimeHasPassed_IgnoreAndReturn(
false);
246 BAL_SetBalancingThreshold_Ignore();
247 BAL_GetInitializationState_IgnoreAndReturn(
STD_NOT_OK);
252 DIAG_Handler_ExpectAndReturn(
255 SYSM_ClearAllTimingViolations_Expect();
@ BAL_STATE_GLOBAL_ENABLE_REQUEST
@ BAL_STATE_GLOBAL_DISABLE_REQUEST
#define BS_NR_OF_STRINGS
Number of parallel strings in the battery pack.
#define BMS_REQ_ID_STANDBY
#define BMS_REQ_ID_CHARGE
#define BMS_REQ_ID_NORMAL
uint32_t CAN_RxRequest(uint32_t id, uint8_t dlc, CAN_ENDIANNESS_e endianness, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim)
can rx callback function for state requests
Headers for the helper functions for the CAN module.
Database configuration header.
@ DATA_BLOCK_ID_INSULATION_MONITORING
@ DATA_BLOCK_ID_CELL_VOLTAGE
@ DATA_BLOCK_ID_CURRENT_SENSOR
@ DATA_BLOCK_ID_OPEN_WIRE_BASE
@ DATA_BLOCK_ID_ERRORSTATE
@ DATA_BLOCK_ID_PACK_VALUES
@ DATA_BLOCK_ID_CELL_TEMPERATURE
@ DATA_BLOCK_ID_STATEREQUEST
@ DIAG_ID_DEEP_DISCHARGE_DETECTED
#define NULL_PTR
Null pointer.
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
uint8_t stateRequestViaCan
uint8_t previousStateRequestViaCan
DATA_BLOCK_HEADER_s header
uint8_t stateRequestViaCanPending
#define TEST_ASSERT_FAIL_ASSERT(_code_under_test)
assert whether assert macro has failed
static DATA_BLOCK_CELL_VOLTAGE_s can_tableCellVoltages
static DATA_BLOCK_ERRORSTATE_s can_tableErrorState
static DATA_BLOCK_MSL_FLAG_s can_tableMslFlags
static DATA_BLOCK_MIN_MAX_s can_tableMinimumMaximumValues
static DATA_BLOCK_OPEN_WIRE_s can_tableOpenWire
static DATA_BLOCK_PACK_VALUES_s can_tablePackValues
void testRxRequestModeRequest(void)
static DATA_BLOCK_MOL_FLAG_s can_tableMolFlags
void testRxRequestBalancingRequest(void)
const CAN_SHIM_s can_kShim
static DATA_BLOCK_CELL_TEMPERATURE_s can_tableTemperatures
void testRxRequestResetFlags(void)
static DATA_BLOCK_SOX_s can_tableSox
void testRxRequestIllegalInput(void)
static DATA_BLOCK_RSL_FLAG_s can_tableRslFlags
static DATA_BLOCK_INSULATION_MONITORING_s can_tableInsulation
static DATA_BLOCK_SOF_s can_tableSof
QueueHandle_t imd_canDataQueue
static DATA_BLOCK_STATEREQUEST_s can_tableStateRequest
static DATA_BLOCK_CURRENT_SENSOR_s can_tableCurrentSensor