82 const bool anyTimingViolation =
90 return anyTimingViolation;
104 uint64_t messageData = 0u;
145 signalData = signalData * 0.1f;
146 data = (uint64_t)signalData;
225 uint64_t messageData = 0u;
283 uint64_t messageData = 0u;
286 const uint8_t stringNumber = *pMuxId;
289 if (stringNumber == 0u) {
297 data = (uint64_t)stringNumber;
545 #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_TYPE
#define CANTX_BMS_STATE_DETAILS_ID
#define CANTX_STRING_STATE_ID_TYPE
#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_IDENTIFIER_TYPE_e idType
CAN_ENDIANNESS_e endianness
DATA_BLOCK_ERROR_STATE_s * pTableErrorState
DATA_BLOCK_RSL_FLAG_s * pTableRsl
DATA_BLOCK_MSL_FLAG_s * pTableMsl
DATA_BLOCK_MOL_FLAG_s * pTableMol
DATA_BLOCK_INSULATION_MONITORING_s * pTableInsulation
bool openWireDetectedError[BS_NR_OF_STRINGS]
bool deepDischargeDetectedError[BS_NR_OF_STRINGS]
bool currentMeasurementInvalidError[BS_NR_OF_STRINGS]
bool plausibilityCheckCellVoltageError[BS_NR_OF_STRINGS]
bool prechargeAbortedDueToVoltage[BS_NR_OF_STRINGS]
bool afeCommunicationCrcError[BS_NR_OF_STRINGS]
bool currentSensorVoltage2TimeoutError[BS_NR_OF_STRINGS]
bool taskEngineTimingViolationError
bool mcuDieTemperatureViolationError
bool stringFuseError[BS_NR_OF_STRINGS]
bool currentSensorVoltage3TimeoutError[BS_NR_OF_STRINGS]
bool currentSensorCoulombCounterTimeoutError[BS_NR_OF_STRINGS]
bool plausibilityCheckPackVoltageError[BS_NR_OF_STRINGS]
bool contactorInNegativePathOfStringFeedbackError[BS_NR_OF_STRINGS]
bool stateRequestTimingViolationError
bool task100msTimingViolationError
bool task10msTimingViolationError
bool plausibilityCheckCellTemperatureSpreadError[BS_NR_OF_STRINGS]
bool task100msAlgoTimingViolationError
bool currentSensorVoltage1TimeoutError[BS_NR_OF_STRINGS]
bool afeCommunicationSpiError[BS_NR_OF_STRINGS]
bool plausibilityCheckCellVoltageSpreadError[BS_NR_OF_STRINGS]
bool contactorInPositivePathOfStringFeedbackError[BS_NR_OF_STRINGS]
bool prechargeAbortedDueToCurrent[BS_NR_OF_STRINGS]
bool currentMeasurementTimeoutError[BS_NR_OF_STRINGS]
bool afeCellVoltageInvalidError[BS_NR_OF_STRINGS]
bool interlockOpenedError
bool criticalLowInsulationResistanceError
bool afeCellTemperatureInvalidError[BS_NR_OF_STRINGS]
bool task1msTimingViolationError
bool plausibilityCheckCellTemperatureError[BS_NR_OF_STRINGS]
bool currentSensorEnergyCounterTimeoutError[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.