62 #define NUMBER_OF_MUX_VOLTAGES_PER_MESSAGE (4u)
120 uint32_t signalData_valid = 0u;
124 signalData_valid = 0u;
126 signalData_valid = 1u;
131 cellVoltageInvalidFlagSignal.
bitStart,
137 float signalData_mV =
144 pMessage, cellVoltageSignal.
bitStart, cellVoltageSignal.
bitLength, (uint32_t)signalData_mV, endianness);
161 uint64_t message = 0;
198 #ifdef UNITY_UNIT_TEST
#define BS_NR_OF_CELLS_PER_MODULE
number of battery cells per battery module (parallel cells are counted as one)
#define BS_NR_OF_BAT_CELLS
static const CAN_SIGNAL_TYPE_s cellVoltage1_mV
static const CAN_SIGNAL_TYPE_s cellVoltage3_mV
static void CAN_TxVoltageSetData(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 CAN_TxVoltage()
static const CAN_SIGNAL_TYPE_s cellVoltage3InvalidFlag
static const CAN_SIGNAL_TYPE_s cellVoltage0_mV
uint32_t CAN_TxVoltage(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 cell voltages
static const CAN_SIGNAL_TYPE_s cellVoltage2InvalidFlag
#define NUMBER_OF_MUX_VOLTAGES_PER_MESSAGE
static const CAN_SIGNAL_TYPE_s cellVoltage2_mV
static const CAN_SIGNAL_TYPE_s cellVoltage1InvalidFlag
static const CAN_SIGNAL_TYPE_s cellVoltageMultiplexer
static const CAN_SIGNAL_TYPE_s cellVoltage0InvalidFlag
enum CAN_ENDIANNESS CAN_ENDIANNESS_e
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 *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.
DATA_BLOCK_CELL_VOLTAGE_s * pTableCellVoltage
int16_t cellVoltage_mV[BS_NR_OF_STRINGS][BS_NR_OF_BAT_CELLS]
uint64_t invalidCellVoltage[BS_NR_OF_STRINGS][BS_NR_OF_MODULES]