59 #include "Mockdatabase.h"
61 #include "Mockfoxmath.h"
74 TEST_SOURCE_FILE(
"can_cbs_tx_pack-state-estimation.c")
76 TEST_INCLUDE_PATH("../../src/app/application/bms")
77 TEST_INCLUDE_PATH("../../src/app/driver/can")
78 TEST_INCLUDE_PATH("../../src/app/driver/can/cbs")
79 TEST_INCLUDE_PATH("../../src/app/driver/can/cbs/tx")
80 TEST_INCLUDE_PATH("../../src/app/driver/config")
81 TEST_INCLUDE_PATH("../../src/app/driver/contactor")
82 TEST_INCLUDE_PATH("../../src/app/driver/foxmath")
83 TEST_INCLUDE_PATH("../../src/app/driver/imd")
84 TEST_INCLUDE_PATH("../../src/app/driver/sps")
85 TEST_INCLUDE_PATH("../../src/app/engine/
diag")
86 TEST_INCLUDE_PATH("../../src/app/task/config")
145 uint8_t data[8] = {0};
155 DATA_Read2DataBlocks_IgnoreAndReturn(0u);
157 BMS_GetBatterySystemState_IgnoreAndReturn(
BMS_CHARGING);
160 BMS_IsStringClosed_IgnoreAndReturn(
true);
163 BMS_GetBatterySystemState_IgnoreAndReturn(
BMS_CHARGING);
176 TEST_ASSERT_EQUAL(0x73, data[0]);
177 TEST_ASSERT_EQUAL(0xED, data[1]);
178 TEST_ASSERT_EQUAL(0xE8, data[2]);
179 TEST_ASSERT_EQUAL(0x2F, data[3]);
180 TEST_ASSERT_EQUAL(0xA0, data[4]);
181 TEST_ASSERT_EQUAL(0x00, data[5]);
182 TEST_ASSERT_EQUAL(0x07, data[6]);
183 TEST_ASSERT_EQUAL(0x80, data[7]);
194 uint8_t data[8] = {0};
204 DATA_Read2DataBlocks_IgnoreAndReturn(0u);
209 BMS_IsStringClosed_IgnoreAndReturn(
true);
225 TEST_ASSERT_EQUAL(0x73, data[0]);
226 TEST_ASSERT_EQUAL(0xED, data[1]);
227 TEST_ASSERT_EQUAL(0xE8, data[2]);
228 TEST_ASSERT_EQUAL(0x2F, data[3]);
229 TEST_ASSERT_EQUAL(0xA0, data[4]);
230 TEST_ASSERT_EQUAL(0x00, data[5]);
231 TEST_ASSERT_EQUAL(0x07, data[6]);
232 TEST_ASSERT_EQUAL(0x80, data[7]);
#define BS_NR_OF_STRINGS
Number of parallel strings in the battery pack.
uint32_t CANTX_PackStateEstimation(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for state estimation values
Header for the driver for the CAN module.
#define CANTX_PACK_STATE_ESTIMATION_ID_TYPE
#define CANTX_PACK_STATE_ESTIMATION_ENDIANNESS
#define CANTX_PACK_STATE_ESTIMATION_ID
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
@ DATA_BLOCK_ID_AEROSOL_SENSOR
static DIAG_DIAGNOSIS_STATE_s diag
#define NULL_PTR
Null pointer.
DATA_BLOCK_SOE_s * pTableSoe
DATA_BLOCK_SOC_s * pTableSoc
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
float_t minimumSoc_perc[BS_NR_OF_STRINGS]
float_t maximumSoc_perc[BS_NR_OF_STRINGS]
uint32_t minimumSoe_Wh[BS_NR_OF_STRINGS]
DATA_BLOCK_HEADER_s header
float_t maximumSoe_perc[BS_NR_OF_STRINGS]
float_t minimumSoe_perc[BS_NR_OF_STRINGS]
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
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 testCAN_TxStateEstimationDischarging(void)
static DATA_BLOCK_MOL_FLAG_s can_tableMolFlags
static DATA_BLOCK_AEROSOL_SENSOR_s can_tableAerosolSensor
static DATA_BLOCK_ERROR_STATE_s can_tableErrorState
void testCAN_TxStateEstimationCharging(void)
const CAN_SHIM_s can_kShim
static DATA_BLOCK_CELL_TEMPERATURE_s can_tableTemperatures
static DATA_BLOCK_SOE_s can_tableSoe
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_SOC_s can_tableSoc
static DATA_BLOCK_CURRENT_SENSOR_s can_tableCurrentSensor
OS_QUEUE imd_canDataQueue