86 uint64_t messageData = 0u;
90 int16_t packMaximumVoltage_mV = INT16_MIN;
91 int16_t packMinimumVoltage_mV = INT16_MAX;
92 int16_t packMaximumTemperature_ddegC = INT16_MIN;
93 int16_t packMinimumTemperature_ddegC = INT16_MAX;
133 float_t signalData = (float_t)packMinimumVoltage_mV;
134 float_t offset = 0.0f;
135 float_t factor = 1.0f;
136 signalData = (signalData + offset) * factor;
137 uint64_t data = (int64_t)signalData;
142 signalData = (float_t)packMaximumVoltage_mV;
145 signalData = (signalData + offset) * factor;
146 data = (int64_t)signalData;
151 signalData = (float_t)packMinimumTemperature_ddegC;
154 signalData = (signalData + offset) * factor;
155 data = (int64_t)signalData;
160 signalData = (float_t)packMaximumTemperature_ddegC;
163 signalData = (signalData + offset) * factor;
164 data = (int64_t)signalData;
187 uint64_t messageData = 0u;
192 const uint8_t stringNumber = *pMuxId;
197 float_t offset = 0.0f;
198 float_t factor = 1.0f;
199 signalData = (signalData + offset) * factor;
200 uint64_t data = (int64_t)signalData;
208 signalData = (signalData + offset) * factor;
209 data = (int64_t)signalData;
217 signalData = (signalData + offset) * factor;
218 data = (int64_t)signalData;
226 signalData = (signalData + offset) * factor;
227 data = (int64_t)signalData;
247 #ifdef UNITY_UNIT_TEST
#define BS_NR_OF_STRINGS
Number of parallel strings in the battery pack.
uint8_t BMS_GetNumberOfConnectedStrings(void)
Returns number of connected strings.
bool BMS_IsStringClosed(uint8_t stringNumber)
Returns string state (closed or open)
uint32_t CANTX_MinimumMaximumValues(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for min/max values
uint32_t CANTX_StringMinimumMaximumValues(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for string minimum and maximum values
#define CAN_FOXBMS_MESSAGES_DEFAULT_DLC
Header for the driver for the CAN module.
#define CANTX_STRING_MIN_MAX_VALUES_ID_TYPE
#define CANTX_STRING_MIN_MAX_VALUES_ID
#define CANTX_MINIMUM_MAXIMUM_VALUES_ID
#define CANTX_MINIMUM_MAXIMUM_VALUES_ID_TYPE
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.
CAN_IDENTIFIER_TYPE_e idType
CAN_ENDIANNESS_e endianness
DATA_BLOCK_MIN_MAX_s * pTableMinMax
int16_t minimumTemperature_ddegC[BS_NR_OF_STRINGS]
int16_t maximumTemperature_ddegC[BS_NR_OF_STRINGS]
int16_t maximumCellVoltage_mV[BS_NR_OF_STRINGS]
int16_t minimumCellVoltage_mV[BS_NR_OF_STRINGS]