58 #include "Mockcan_cbs_tx_debug-response.h"
59 #include "Mockcan_cbs_tx_unsupported-message.h"
60 #include "Mockdatabase.h"
62 #include "Mockfoxmath.h"
66 #include "Mockreset.h"
78 TEST_FILE(
"can_cbs_rx_debug.c")
82 #define MULTIPLEXER_VALUE_VERSION_INFORMATION (0u)
83 #define MULTIPLEXER_VALUE_RTC (1u)
84 #define MULTIPLEXER_VALUE_SOFTWARE_RESET (2u)
85 #define MULTIPLEXER_VALUE_FRAM_INITIALIZATION (3u)
86 #define MULTIPLEXER_VALUE_TIME_INFO (4u)
87 #define INVALID_MULTIPLEXER_VALUE (99u)
208 OS_SendToBackOfQueue_IgnoreAndReturn(
STD_OK);
290 CANTX_DebugResponse_IgnoreAndReturn(
STD_OK);
294 CANTX_DebugResponse_IgnoreAndReturn(
STD_NOT_OK);
300 CANTX_DebugResponse_IgnoreAndReturn(
STD_OK);
304 CANTX_DebugResponse_IgnoreAndReturn(
STD_NOT_OK);
310 CANTX_DebugResponse_IgnoreAndReturn(
STD_OK);
314 CANTX_DebugResponse_IgnoreAndReturn(
STD_NOT_OK);
320 CANTX_DebugResponse_IgnoreAndReturn(
STD_OK);
324 CANTX_DebugResponse_IgnoreAndReturn(
STD_NOT_OK);
330 CANTX_DebugResponse_IgnoreAndReturn(
STD_OK);
334 CANTX_DebugResponse_IgnoreAndReturn(
STD_NOT_OK);
344 uint64_t testMessageData = ((uint64_t)1u) << 48u;
346 TEST_ASSERT_TRUE(isRequested);
354 uint64_t testMessageData = ((uint64_t)1u) << 49u;
356 TEST_ASSERT_TRUE(isRequested);
364 uint64_t testMessageData = ((uint64_t)1u) << 50u;
366 TEST_ASSERT_TRUE(isRequested);
375 uint64_t testMessageData = ((uint64_t)1u) << 51u;
377 TEST_ASSERT_TRUE(isRequested);
385 uint64_t testMessageData = ((uint64_t)1u) << 31u;
387 TEST_ASSERT_TRUE(isRequested);
396 uint64_t testMessageData = ((uint64_t)1u) << 31u;
398 TEST_ASSERT_TRUE(isRequested);
407 uint64_t testMessageData = ((uint64_t)1u) << 48u;
409 TEST_ASSERT_TRUE(isRequested);
418 uint64_t testMessageData = ((uint64_t)1u) << 48u;
422 testMessageData = ((uint64_t)1u) << 49u;
426 testMessageData = ((uint64_t)1u) << 50u;
430 testMessageData = ((uint64_t)1u) << 51u;
442 OS_SendToBackOfQueue_IgnoreAndReturn(
STD_OK);
450 uint64_t testMessageData = ((uint64_t)1u) << 31u;
451 SYS_TriggerSoftwareReset_Expect();
460 uint64_t testMessageData = ((uint64_t)1u) << 35u;
461 FRAM_ReinitializeAllEntries_ExpectAndReturn(
STD_OK);
469 uint64_t testMessageData = ((uint64_t)1u) << 48u;
470 CANTX_DebugResponse_IgnoreAndReturn(
STD_OK);
void TEST_CANRX_ProcessSoftwareResetMux(uint64_t messageData, CAN_ENDIANNESS_e endianness)
uint8_t TEST_CANRX_GetHours(uint64_t messageData, CAN_ENDIANNESS_e endianness)
uint8_t TEST_CANRX_GetMinutes(uint64_t messageData, CAN_ENDIANNESS_e endianness)
bool TEST_CANRX_CheckIfMcuUniqueDieIdIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness)
void TEST_CANRX_TriggerMcuLotNumberMessage(void)
bool TEST_CANRX_CheckIfTimeInfoIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness)
void TEST_CANRX_ProcessFramInitializationMux(uint64_t messageData, CAN_ENDIANNESS_e endianness)
void TEST_CANRX_TriggerTimeInfoMessage(void)
bool TEST_CANRX_CheckIfFramInitializationIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness)
uint8_t TEST_CANRX_GetHundredthOfSeconds(uint64_t messageData, CAN_ENDIANNESS_e endianness)
void TEST_CANRX_TriggerMcuUniqueDieIdMessage(void)
void TEST_CANRX_TriggerMcuWaferInformationMessage(void)
bool TEST_CANRX_CheckIfMcuLotNumberIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness)
uint8_t TEST_CANRX_GetWeekday(uint64_t messageData, CAN_ENDIANNESS_e endianness)
uint32_t CANRX_Debug(CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim)
can rx callback function for debug messages
void TEST_CANRX_ProcessRtcMux(uint64_t messageData, CAN_ENDIANNESS_e endianness)
uint8_t TEST_CANRX_GetYear(uint64_t messageData, CAN_ENDIANNESS_e endianness)
bool TEST_CANRX_CheckIfSoftwareResetIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness)
void TEST_CANRX_ProcessVersionInformationMux(uint64_t messageData, CAN_ENDIANNESS_e endianness)
bool TEST_CANRX_CheckIfMcuWaferInformationIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness)
uint8_t TEST_CANRX_GetDay(uint64_t messageData, CAN_ENDIANNESS_e endianness)
void TEST_CANRX_TriggerBmsSoftwareVersionMessage(void)
bool TEST_CANRX_CheckIfBmsSoftwareVersionIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness)
void TEST_CANRX_ProcessTimeInfoMux(uint64_t messageData, CAN_ENDIANNESS_e endianness)
uint8_t TEST_CANRX_GetSeconds(uint64_t messageData, CAN_ENDIANNESS_e endianness)
uint8_t TEST_CANRX_GetMonth(uint64_t messageData, CAN_ENDIANNESS_e endianness)
@ CANTX_DEBUG_RESPONSE_TRANSMIT_MCU_LOT_NUMBER
@ CANTX_DEBUG_RESPONSE_TRANSMIT_MCU_UNIQUE_DIE_ID
@ CANTX_DEBUG_RESPONSE_TRANSMIT_MCU_WAFER_INFORMATION
@ CANTX_DEBUG_RESPONSE_TRANSMIT_BMS_VERSION_INFO
Header for the driver for the CAN module.
#define CANRX_DEBUG_ID_TYPE
#define CANRX_DEBUG_ENDIANNESS
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
#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
DATA_BLOCK_HEADER_s header
#define TEST_ASSERT_FAIL_ASSERT(_code_under_test)
assert whether assert macro has failed
void testCANRX_ProcessTimeInfoMux(void)
static DATA_BLOCK_CELL_VOLTAGE_s can_tableCellVoltages
void testCANRX_CheckIfSoftwareResetIsRequested(void)
OS_QUEUE ftsk_rtcSetTimeQueue
void testCANRX_GetMonth(void)
static DATA_BLOCK_MSL_FLAG_s can_tableMslFlags
void testCANRX_GetMinutes(void)
void testCANRX_DebugRtcMultiplexerValue(void)
void testCANRX_DebugVersionInformationMultiplexerValue(void)
void testCANRX_DebugInvalidMultiplexerValues(void)
void testCANRX_ProcessVersionInformationMux(void)
void testCANRX_CheckIfBmsSoftwareVersionIsRequested(void)
void testCANRX_TriggerMcuWaferInformationMessage(void)
void testCANRX_ProcessRtcMux(void)
static DATA_BLOCK_MIN_MAX_s can_tableMinimumMaximumValues
static DATA_BLOCK_OPEN_WIRE_s can_tableOpenWire
void testCANRX_GetYear(void)
#define MULTIPLEXER_VALUE_FRAM_INITIALIZATION
void testCANRX_GetHundredthOfSeconds(void)
#define MULTIPLEXER_VALUE_RTC
void testCANRX_CheckIfMcuUniqueDieIdIsRequested(void)
void testCANRX_TriggerMcuUniqueDieIdMessage(void)
void testCANRX_DebugTimeInfoMultiplexerValue(void)
void testCANRX_DebugFramInitializationMultiplexerValue(void)
void testCANRX_DebugAssertionsParamCanData(void)
static DATA_BLOCK_PACK_VALUES_s can_tablePackValues
void testCANRX_DebugSoftwareResetMultiplexerValue(void)
#define MULTIPLEXER_VALUE_SOFTWARE_RESET
void testCANRX_CheckIfMcuLotNumberIsRequested(void)
void testCANRX_CheckIfTimeInfoIsRequested(void)
#define MULTIPLEXER_VALUE_VERSION_INFORMATION
static DATA_BLOCK_MOL_FLAG_s can_tableMolFlags
#define MULTIPLEXER_VALUE_TIME_INFO
void testCANRX_GetSeconds(void)
const CAN_ENDIANNESS_e validEndianness
CAN_MESSAGE_PROPERTIES_s validRxDebugTestMessage
void testCANRX_ProcessSoftwareResetMux(void)
void testCANRX_TriggerTimeInfoMessage(void)
static DATA_BLOCK_ERROR_STATE_s can_tableErrorState
const uint64_t testMessageDataZero
void testCANRX_DebugAssertionsParamDatabaseShim(void)
void testCANRX_DebugAssertionsParamMessage(void)
const uint8_t testCanDataZeroArray[CAN_MAX_DLC]
const CAN_SHIM_s can_kShim
static DATA_BLOCK_CELL_TEMPERATURE_s can_tableTemperatures
void testCANRX_GetWeekday(void)
void testCANRX_TriggerBmsSoftwareVersionMessage(void)
static DATA_BLOCK_SOX_s can_tableSox
void testCANRX_CheckIfMcuWaferInformationIsRequested(void)
static DATA_BLOCK_RSL_FLAG_s can_tableRslFlags
static DATA_BLOCK_STATE_REQUEST_s can_tableStateRequest
void testCANRX_GetDay(void)
void testCANRX_TriggerMcuLotNumberMessage(void)
static DATA_BLOCK_INSULATION_MONITORING_s can_tableInsulation
static DATA_BLOCK_SOF_s can_tableSof
void testCANRX_ProcessFramInitializationMux(void)
void testCANRX_GetHours(void)
void testCANRX_CheckIfFramInitializationIsRequested(void)
const CAN_ENDIANNESS_e invalidEndianness
#define INVALID_MULTIPLEXER_VALUE
static DATA_BLOCK_CURRENT_SENSOR_s can_tableCurrentSensor
OS_QUEUE imd_canDataQueue