78 const bool anyTimingViolation =
83 return anyTimingViolation;
101 uint64_t message = 0;
142 signalData = signalData * 0.1f;
143 data = (uint64_t)signalData;
200 uint64_t message = 0;
259 uint64_t message = 0;
262 const uint8_t stringNumber = *pMuxId;
265 if (stringNumber == 0u) {
273 data = (uint64_t)stringNumber;
515 #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 CAN_TxDetailState(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 detail state
uint32_t CAN_TxStringState(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 string state values
static bool CAN_AnySysMonTimingIssueDetected(const CAN_SHIM_s *const kpkCanShim)
uint32_t CAN_TxState(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 state
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.
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 currentMeasurementError[BS_NR_OF_STRINGS]
uint8_t plausibilityCheckCelltemperature[BS_NR_OF_STRINGS]
uint8_t plausibilityCheckCellvoltageSpread[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 afeCellvoltageError[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]
bool criticalLowInsulationResistance
uint8_t plausibilityCheckCellvoltage[BS_NR_OF_STRINGS]
uint8_t currentMeasurementTimeout[BS_NR_OF_STRINGS]
uint8_t fuseStateNormal[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.