87 uint64_t messageData = 0u;
95 float_t offset = 0.0f;
96 float_t factor = 0.01f;
97 signalData = (signalData + offset) * factor;
98 uint64_t data = (uint64_t)signalData;
106 signalData = (signalData + offset) * factor;
107 data = (uint64_t)signalData;
115 signalData = (signalData + offset) * factor;
116 data = (int64_t)signalData;
124 signalData = (signalData + offset) * factor;
125 data = (int64_t)signalData;
148 uint64_t messageData = 0u;
150 float_t signalData = 0.0f;
151 float_t offset = 0.0f;
152 float_t factor = 0.0f;
154 const uint8_t stringNumber = *pMuxId;
157 if (stringNumber == 0u) {
164 data = (uint64_t)stringNumber;
173 signalData = (signalData + offset) * factor;
174 data = (int64_t)signalData;
182 signalData = (signalData + offset) * factor;
183 data = (int64_t)signalData;
191 signalData = (signalData + offset) * factor;
192 data = (int64_t)signalData;
223 uint64_t messageData = 0u;
224 uint64_t signalData = 0u;
226 const uint8_t stringNumber = *pMuxId;
229 if (stringNumber == 0u) {
236 signalData = (uint64_t)stringNumber;
264 #ifdef UNITY_UNIT_TEST
#define BS_NR_OF_STRINGS
Number of parallel strings in the battery pack.
uint32_t CANTX_StringValuesP0(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for string values
uint32_t CANTX_PackValues(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for pack values values
uint32_t CANTX_StringValuesP1(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for string values 2
#define CAN_FOXBMS_MESSAGES_DEFAULT_DLC
Header for the driver for the CAN module.
#define CANTX_PACK_VALUES_ID
#define CANTX_PACK_VALUES_ID_TYPE
#define CANTX_STRING_VALUES_P0_ID_TYPE
#define CANTX_STRING_VALUES_P1_ID
#define CANTX_STRING_VALUES_P1_ID_TYPE
#define CANTX_STRING_VALUES_P0_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...
Headers for the helper functions for the CAN module.
#define DATA_READ_DATA(...)
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
#define NULL_PTR
Null pointer.
void OS_ExitTaskCritical(void)
Exit Critical interface function for use in FreeRTOS-Tasks and FreeRTOS-ISR.
void OS_EnterTaskCritical(void)
Enter Critical interface function for use in FreeRTOS-Tasks and FreeRTOS-ISR.
CAN_IDENTIFIER_TYPE_e idType
CAN_ENDIANNESS_e endianness
DATA_BLOCK_PACK_VALUES_s * pTablePackValues
DATA_BLOCK_CURRENT_SENSOR_s * pTableCurrentSensor
int32_t energyCounter_Wh[BS_NR_OF_STRINGS]
int32_t stringVoltage_mV[BS_NR_OF_STRINGS]
int32_t highVoltageBusVoltage_mV
int32_t stringPower_W[BS_NR_OF_STRINGS]
int32_t batteryVoltage_mV
int32_t stringCurrent_mA[BS_NR_OF_STRINGS]