79 const bool anyTimingViolation =
84 return anyTimingViolation;
98 uint64_t messageData = 0u;
139 signalData = signalData * 0.1f;
140 data = (uint64_t)signalData;
193 uint64_t messageData = 0u;
250 uint64_t messageData = 0u;
253 const uint8_t stringNumber = *pMuxId;
256 if (stringNumber == 0u) {
264 data = (uint64_t)stringNumber;
506 #ifdef UNITY_UNIT_TEST
#define BS_NR_OF_STRINGS
Number of parallel strings in the battery pack.
bool BMS_IsTransitionToErrorStateActive(void)
Check if transition in to error state is active.
uint8_t BMS_GetNumberOfConnectedStrings(void)
Returns number of connected strings.
bool BMS_IsStringClosed(uint8_t stringNumber)
Returns string state (closed or open)
BMS_STATEMACH_e BMS_GetState(void)
Returns the current state.
uint32_t CANTX_BmsState(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for state
static bool CANTX_AnySysMonTimingIssueDetected(const CAN_SHIM_s *const kpkCanShim)
uint32_t CANTX_BmsStateDetails(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for detail state
uint32_t CANTX_StringState(CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for string state values
#define CAN_FOXBMS_MESSAGES_DEFAULT_DLC
Header for the driver for the CAN module.
#define CANTX_STRING_STATE_ID
#define CANTX_BMS_STATE_DETAILS_ID
#define CANTX_BMS_STATE_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...
uint8_t CAN_ConvertBooleanToInteger(bool input)
Transform a bool to a bit (set if true)
Headers for the helper functions for the CAN module.
#define DATA_READ_DATA(...)
bool DIAG_IsAnyFatalErrorSet(void)
Check if any fatal error is set.
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
#define NULL_PTR
Null pointer.
CAN_ENDIANNESS_e endianness
DATA_BLOCK_RSL_FLAG_s * pTableRsl
DATA_BLOCK_ERRORSTATE_s * pTableErrorState
DATA_BLOCK_MSL_FLAG_s * pTableMsl
DATA_BLOCK_MOL_FLAG_s * pTableMol
DATA_BLOCK_INSULATION_MONITORING_s * pTableInsulation
bool timingViolationEngine
uint8_t mcuDieTemperature
uint8_t plausibilityCheckCellVoltage[BS_NR_OF_STRINGS]
uint8_t currentMeasurementError[BS_NR_OF_STRINGS]
uint8_t plausibilityCheckCelltemperature[BS_NR_OF_STRINGS]
uint8_t plausibilityCheckCelltemperatureSpread[BS_NR_OF_STRINGS]
uint8_t plausibilityCheckPackvoltage[BS_NR_OF_STRINGS]
bool timingViolation100ms
bool timingViolation100msAlgo
uint8_t currentSensorTimeoutV1[BS_NR_OF_STRINGS]
uint8_t fuseStateCharge[BS_NR_OF_STRINGS]
uint8_t crcError[BS_NR_OF_STRINGS]
uint8_t currentSensorTimeoutV3[BS_NR_OF_STRINGS]
uint8_t deepDischargeDetected[BS_NR_OF_STRINGS]
uint8_t afeCellTemperatureError[BS_NR_OF_STRINGS]
uint8_t canTimingEc[BS_NR_OF_STRINGS]
uint8_t open_wire[BS_NR_OF_STRINGS]
uint8_t plausibilityCheckCellVoltageSpread[BS_NR_OF_STRINGS]
bool criticalLowInsulationResistance
uint8_t currentMeasurementTimeout[BS_NR_OF_STRINGS]
uint8_t fuseStateNormal[BS_NR_OF_STRINGS]
uint8_t afeCellVoltageError[BS_NR_OF_STRINGS]
uint8_t spiError[BS_NR_OF_STRINGS]
uint8_t canTimingCc[BS_NR_OF_STRINGS]
uint32_t insulationResistance_kOhm
uint8_t cellChargeOvercurrent[BS_NR_OF_STRINGS]
uint8_t underVoltage[BS_NR_OF_STRINGS]
uint8_t cellDischargeOvercurrent[BS_NR_OF_STRINGS]
uint8_t overtemperatureDischarge[BS_NR_OF_STRINGS]
uint8_t overVoltage[BS_NR_OF_STRINGS]
uint8_t overtemperatureCharge[BS_NR_OF_STRINGS]
uint8_t undertemperatureCharge[BS_NR_OF_STRINGS]
uint8_t stringChargeOvercurrent[BS_NR_OF_STRINGS]
uint8_t stringDischargeOvercurrent[BS_NR_OF_STRINGS]
uint8_t packChargeOvercurrent
uint8_t stringChargeOvercurrent[BS_NR_OF_STRINGS]
uint8_t undertemperatureDischarge[BS_NR_OF_STRINGS]
uint8_t cellChargeOvercurrent[BS_NR_OF_STRINGS]
uint8_t overtemperatureCharge[BS_NR_OF_STRINGS]
uint8_t overtemperatureDischarge[BS_NR_OF_STRINGS]
uint8_t stringDischargeOvercurrent[BS_NR_OF_STRINGS]
uint8_t underVoltage[BS_NR_OF_STRINGS]
uint8_t cellDischargeOvercurrent[BS_NR_OF_STRINGS]
uint8_t overVoltage[BS_NR_OF_STRINGS]
uint8_t packDischargeOvercurrent
uint8_t undertemperatureCharge[BS_NR_OF_STRINGS]
uint8_t underVoltage[BS_NR_OF_STRINGS]
uint8_t undertemperatureDischarge[BS_NR_OF_STRINGS]
uint8_t stringChargeOvercurrent[BS_NR_OF_STRINGS]
uint8_t overVoltage[BS_NR_OF_STRINGS]
uint8_t cellChargeOvercurrent[BS_NR_OF_STRINGS]
uint8_t undertemperatureCharge[BS_NR_OF_STRINGS]
uint8_t overtemperatureDischarge[BS_NR_OF_STRINGS]
uint8_t overtemperatureCharge[BS_NR_OF_STRINGS]
bool recordedViolationEngine
bool recordedViolation10ms
bool recordedViolation100ms
bool recordedViolation1ms
bool recordedViolation100msAlgo
bool recordedViolationAny
void SYSM_GetRecordedTimingViolations(SYSM_TIMING_VIOLATION_RESPONSE_s *pAnswer)
Returns the timing violation flags determined from fram state.