58 #include "Mockdatabase.h"
60 #include "Mockfoxmath.h"
62 #include "Mockmpu_prototypes.h"
70 TEST_FILE(
"can_cbs_tx_state_estimation.c")
121 uint8_t data[8] = {0};
123 for (uint8_t stringNumber = 0u; stringNumber <
BS_NR_OF_STRINGS; stringNumber++) {
131 DATA_Read_1_DataBlock_IgnoreAndReturn(0u);
133 BMS_GetBatterySystemState_IgnoreAndReturn(
BMS_CHARGING);
136 BMS_IsStringClosed_IgnoreAndReturn(
true);
139 BMS_GetBatterySystemState_IgnoreAndReturn(
BMS_CHARGING);
152 TEST_ASSERT_EQUAL(0x73, data[0]);
153 TEST_ASSERT_EQUAL(0xED, data[1]);
154 TEST_ASSERT_EQUAL(0xE8, data[2]);
155 TEST_ASSERT_EQUAL(0x2F, data[3]);
156 TEST_ASSERT_EQUAL(0xA0, data[4]);
157 TEST_ASSERT_EQUAL(0x00, data[5]);
158 TEST_ASSERT_EQUAL(0x07, data[6]);
159 TEST_ASSERT_EQUAL(0x80, data[7]);
163 uint8_t data[8] = {0};
165 for (uint8_t stringNumber = 0u; stringNumber <
BS_NR_OF_STRINGS; stringNumber++) {
173 DATA_Read_1_DataBlock_IgnoreAndReturn(0u);
178 BMS_IsStringClosed_IgnoreAndReturn(
true);
194 TEST_ASSERT_EQUAL(0x73, data[0]);
195 TEST_ASSERT_EQUAL(0xED, data[1]);
196 TEST_ASSERT_EQUAL(0xE8, data[2]);
197 TEST_ASSERT_EQUAL(0x2F, data[3]);
198 TEST_ASSERT_EQUAL(0xA0, data[4]);
199 TEST_ASSERT_EQUAL(0x00, data[5]);
200 TEST_ASSERT_EQUAL(0x07, data[6]);
201 TEST_ASSERT_EQUAL(0x80, data[7]);
uint32_t CAN_TxStateEstimation(uint32_t id, uint8_t dlc, CAN_ENDIANNESS_e endianness, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for state estimation values
#define CAN_ID_TX_PACK_STATE_ESTIMATION
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
#define NULL_PTR
Null pointer.
DATA_BLOCK_SOX_s * pTableSox
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
float maximumSoe_perc[BS_NR_OF_STRINGS]
DATA_BLOCK_HEADER_s header
float minimumSoe_perc[BS_NR_OF_STRINGS]
float minimumSoc_perc[BS_NR_OF_STRINGS]
float maximumSoc_perc[BS_NR_OF_STRINGS]
uint32_t minimumSoe_Wh[BS_NR_OF_STRINGS]
DATA_BLOCK_HEADER_s header
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 testCAN_TxStateEstimationDischarging(void)
static DATA_BLOCK_MOL_FLAG_s can_tableMolFlags
void testCAN_TxStateEstimationCharging(void)
const CAN_SHIM_s can_kShim
static DATA_BLOCK_CELL_TEMPERATURE_s can_tableTemperatures
static DATA_BLOCK_SOX_s can_tableSox
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