57 #include "MockHL_can.h"
58 #include "Mockcan_cfg.h"
59 #include "Mockdatabase.h"
61 #include "Mockfoxmath.h"
62 #include "Mockftask.h"
68 #include "Mockqueue.h"
69 #include "Mocktest_can_mpu_prototype_queue_create_stub.h"
84 .distanceFromLastRelease = 42,
85 .commitHash =
"deadbeef",
86 .gitRemote =
"onTheDarkSideOfTheMoon.git",
154 canIsTxMessagePending_IgnoreAndReturn(0u);
155 canUpdateID_Ignore();
156 canTransmit_IgnoreAndReturn(0u);
161 canBASE_t node = {0};
162 canIsTxMessagePending_IgnoreAndReturn(0u);
163 canUpdateID_Ignore();
164 canTransmit_IgnoreAndReturn(0u);
172 canIsTxMessagePending_IgnoreAndReturn(1u);
174 for (uint8_t i = 0u; i < 32; i++) {
184 canIsTxMessagePending_ExpectAndReturn(pNode, 1, 0u);
185 canUpdateID_Expect(pNode, 1, 0x20040000u);
186 canTransmit_ExpectAndReturn(pNode, 1, &data, 0u);
191 canIsTxMessagePending_ExpectAndReturn(pNode, messageBox, 1u);
#define BS_NR_OF_STRINGS
Number of parallel strings in the battery pack.
bool CAN_IsCurrentSensorCcPresent(uint8_t stringNumber)
get flag if CC message from current sensor is received.
CAN_STATE_s * TEST_CAN_GetCANState(void)
STD_RETURN_TYPE_e CAN_DataSend(canBASE_t *pNode, uint32_t id, uint8 *pData)
Sends over CAN the data passed in parameters. This function goes over the messageboxes and marks the ...
bool CAN_IsCurrentSensorPresent(uint8_t stringNumber)
set flag for presence of current sensor.
void CAN_EnablePeriodic(bool command)
enable/disable the periodic transmit/receive.
Header for the driver for the CAN module.
#define CAN_NR_OF_TX_MESSAGE_BOX
@ DATA_BLOCK_ID_CELL_VOLTAGE
@ DATA_BLOCK_ID_CURRENT_SENSOR
@ DATA_BLOCK_ID_OPEN_WIRE_BASE
@ DATA_BLOCK_ID_CELL_TEMPERATURE
@ DATA_BLOCK_ID_STATEREQUEST
#define NULL_PTR
Null pointer.
bool currentSensorCCPresent[BS_NR_OF_STRINGS]
bool currentSensorPresent[BS_NR_OF_STRINGS]
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
const bool underVersionControl
#define TEST_ASSERT_FAIL_ASSERT(_code_under_test)
assert whether assert macro has failed
static DATA_BLOCK_CELL_VOLTAGE_s can_tableCellVoltages
void testDataSendNoMessagePending(void)
const CAN_MSG_RX_TYPE_s can_rxMessages[]
const VERSION_s foxbmsVersionInfo
static DATA_BLOCK_MIN_MAX_s can_tableMinimumMaximumValues
static DATA_BLOCK_OPEN_WIRE_s can_tableOpenWire
CAN_STATE_s * canTestState
static uint32_t can_dummy(uint32_t id, uint8_t dlc, CAN_ENDIANNESS_e endianness, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s const *kpkCanShim)
volatile bool ftsk_allQueuesCreated
const uint8_t can_txLength
void testDataSendMessagePending(void)
const CAN_MSG_TX_TYPE_s can_txMessages[]
void testIsCurrentSensorCcPresent(void)
void testCAN_TransmitDieId(void)
test CAN_TransmitDieId()
const CAN_SHIM_s can_kShim
static DATA_BLOCK_CELL_TEMPERATURE_s can_tableTemperatures
QueueHandle_t ftsk_dataQueue
void testEnablePeriodic(void)
const uint8_t can_rxLength
void testDataSendNullPointerAsData(void)
void testIsCurrentSensorPresent(void)
QueueHandle_t imd_canDataQueue
void testDataSendNullPointerAsNode(void)
static DATA_BLOCK_STATEREQUEST_s can_tableStateRequest
void testCAN_TransmitBootMessage(void)
QueueHandle_t ftsk_canRxQueue
QueueHandle_t ftsk_imdCanDataQueue
static DATA_BLOCK_CURRENT_SENSOR_s can_tableCurrentSensor
Header file for the version information that is generated by the toolchain.