58 #include "Mockbal_cfg.h"
59 #include "Mockbms_cfg.h"
61 #include "Mockdatabase.h"
63 #include "Mockfoxmath.h"
66 #include "Mocksys_mon.h"
78 TEST_FILE(
"can_cbs_rx_state-request.c")
171 DATA_Read1DataBlock_IgnoreAndReturn(
STD_OK);
172 BAL_GetInitializationState_IgnoreAndReturn(
STD_NOT_OK);
173 BAL_SetBalancingThreshold_Ignore();
174 DATA_Write1DataBlock_IgnoreAndReturn(
STD_OK);
204 OS_CheckTimeHasPassed_ExpectAndReturn(0u, 0u,
false);
205 OS_CheckTimeHasPassed_IgnoreArg_oldTimeStamp_ms();
206 OS_CheckTimeHasPassed_IgnoreArg_timeToPass_ms();
213 OS_CheckTimeHasPassed_ExpectAndReturn(0u, 0u,
true);
214 OS_CheckTimeHasPassed_IgnoreArg_oldTimeStamp_ms();
215 OS_CheckTimeHasPassed_IgnoreArg_timeToPass_ms();
232 DATA_Read1DataBlock_IgnoreAndReturn(
STD_OK);
233 DATA_Write1DataBlock_IgnoreAndReturn(
STD_OK);
234 OS_CheckTimeHasPassed_IgnoreAndReturn(
false);
239 BAL_GetInitializationState_ExpectAndReturn(
STD_OK);
241 BAL_SetBalancingThreshold_Expect(0u);
247 BAL_GetInitializationState_ExpectAndReturn(
STD_OK);
249 BAL_SetBalancingThreshold_Expect(0x42u);
255 BAL_GetInitializationState_ExpectAndReturn(
STD_NOT_OK);
256 BAL_SetBalancingThreshold_Expect(0x33u);
271 DATA_Read1DataBlock_IgnoreAndReturn(
STD_OK);
272 DATA_Write1DataBlock_IgnoreAndReturn(
STD_OK);
273 OS_CheckTimeHasPassed_IgnoreAndReturn(
false);
274 BAL_SetBalancingThreshold_Ignore();
275 BAL_GetInitializationState_IgnoreAndReturn(
STD_NOT_OK);
280 DIAG_Handler_ExpectAndReturn(
283 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 CANRX_BmsStateRequest(CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim)
can rx callback function for state requests
#define CAN_FOXBMS_MESSAGES_DEFAULT_DLC
@ CAN_STANDARD_IDENTIFIER_11_BIT
Header for the driver for the CAN module.
#define CANRX_BMS_STATE_REQUEST_ENDIANNESS
#define CANRX_BMS_STATE_REQUEST_ID
#define CANRX_BMS_STATE_REQUEST_ID_TYPE
Headers for the helper functions for the CAN module.
Database configuration header.
@ DATA_BLOCK_ID_ERROR_STATE
@ DATA_BLOCK_ID_INSULATION_MONITORING
@ DATA_BLOCK_ID_STATE_REQUEST
@ DATA_BLOCK_ID_CELL_VOLTAGE
@ DATA_BLOCK_ID_CURRENT_SENSOR
@ DATA_BLOCK_ID_OPEN_WIRE_BASE
@ DATA_BLOCK_ID_PACK_VALUES
@ DATA_BLOCK_ID_CELL_TEMPERATURE
@ 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 stateRequestViaCanPending
DATA_BLOCK_HEADER_s header
uint8_t stateRequestViaCan
uint8_t previousStateRequestViaCan
#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_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)
static DATA_BLOCK_ERROR_STATE_s can_tableErrorState
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_STATE_REQUEST_s can_tableStateRequest
static DATA_BLOCK_INSULATION_MONITORING_s can_tableInsulation
static DATA_BLOCK_SOF_s can_tableSof
static DATA_BLOCK_CURRENT_SENSOR_s can_tableCurrentSensor
OS_QUEUE imd_canDataQueue