67 #define CANTX_NUMBER_OF_MUX_VOLTAGES_PER_MESSAGE (4u)
132 uint32_t signalData_valid = 0u;
135 (0x01u << cellBlockNumber)) == 0u) {
136 signalData_valid = 0u;
138 signalData_valid = 1u;
143 cellVoltageInvalidFlagSignal.
bitStart,
149 float_t signalData_mV =
155 pMessage, cellVoltageSignal.
bitStart, cellVoltageSignal.
bitLength, (uint32_t)signalData_mV, endianness);
172 uint64_t messageData = 0u;
189 (uint32_t)signalData,
217 #ifdef UNITY_UNIT_TEST
#define BS_NR_OF_STRINGS
Number of parallel strings in the battery pack.
#define BS_NR_OF_CELL_BLOCKS_PER_STRING
static const CAN_SIGNAL_TYPE_s cantx_cellVoltage0InvalidFlag
static const CAN_SIGNAL_TYPE_s cantx_cellVoltage1_mV
uint32_t CANTX_CellVoltages(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for cell voltages
static const CAN_SIGNAL_TYPE_s cantx_cellVoltage3_mV
static const CAN_SIGNAL_TYPE_s cantx_cellVoltage2_mV
static const CAN_SIGNAL_TYPE_s cantx_cellVoltageMultiplexer
#define CANTX_NUMBER_OF_MUX_VOLTAGES_PER_MESSAGE
static const CAN_SIGNAL_TYPE_s cantx_cellVoltage1InvalidFlag
static const CAN_SIGNAL_TYPE_s cantx_cellVoltage0_mV
static const CAN_SIGNAL_TYPE_s cantx_cellVoltage3InvalidFlag
static const CAN_SIGNAL_TYPE_s cantx_cellVoltage2InvalidFlag
static void CANTX_VoltageSetData(uint8_t muxId, uint64_t *pMessage, CAN_SIGNAL_TYPE_s cellVoltageSignal, CAN_SIGNAL_TYPE_s cellVoltageInvalidFlagSignal, CAN_ENDIANNESS_e endianness, const CAN_SHIM_s *const kpkCanShim)
Helper function for CANTX_CellVoltages()
#define CAN_FOXBMS_MESSAGES_DEFAULT_DLC
Header for the driver for the CAN module.
#define CANTX_CELL_VOLTAGES_ID_TYPE
#define CANTX_CELL_VOLTAGES_ID
void CAN_TxSetMessageDataWithSignalData(uint64_t *pMessage, uint64_t bitStart, uint8_t bitLength, uint64_t canSignal, CAN_ENDIANNESS_e endianness)
Puts CAN signal data in a 64-bit variable. This function is used to compose a 64-bit CAN message....
void CAN_TxSetCanDataWithMessageData(uint64_t message, uint8_t *pCanData, CAN_ENDIANNESS_e endianness)
Copy CAN data from a 64-bit variable to 8 bytes. This function is used to copy a 64-bit CAN message t...
void CAN_TxPrepareSignalData(float_t *pSignal, CAN_SIGNAL_TYPE_s signalProperties)
Prepare signal data. This function takes the signal data and applies factor, applies offset and compa...
Headers for the helper functions for the CAN module.
#define DATA_READ_DATA(...)
uint8_t DATA_GetModuleNumberFromVoltageIndex(uint16_t cellIndex)
Returns module number of passed cell index.
uint8_t DATA_GetStringNumberFromVoltageIndex(uint16_t cellIndex)
Returns string number of passed cell index.
uint8_t DATA_GetCellNumberFromVoltageIndex(uint16_t cellIndex)
Returns cell number of passed cell index.
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
#define NULL_PTR
Null pointer.
CAN_IDENTIFIER_TYPE_e idType
CAN_ENDIANNESS_e endianness
DATA_BLOCK_CELL_VOLTAGE_s * pTableCellVoltage
int16_t cellVoltage_mV[BS_NR_OF_STRINGS][BS_NR_OF_MODULES_PER_STRING][BS_NR_OF_CELL_BLOCKS_PER_MODULE]
uint64_t invalidCellVoltage[BS_NR_OF_STRINGS][BS_NR_OF_MODULES_PER_STRING]