76 #define CANRX_CAN_REQUEST_UPDATE_TIME_ms (3000u)
115 if (signalData == 1u) {
135 switch (signalData) {
168 if (signalData == 0u) {
178 int32_t cappedSignalData = (int32_t)signalData;
179 if (signalData > (uint64_t)UINT16_MAX) {
180 cappedSignalData = (uint64_t)UINT16_MAX;
188 const uint8_t *
const kpkCanData,
197 uint64_t messageData = 0u;
200 uint64_t signalData = 0;
229 #ifdef UNITY_UNIT_TEST
Header for the driver for balancing.
STD_RETURN_TYPE_e BAL_GetInitializationState(void)
gets the initialization state.
@ BAL_STATE_GLOBAL_ENABLE_REQUEST
@ BAL_STATE_GLOBAL_DISABLE_REQUEST
BAL_RETURN_TYPE_e BAL_SetStateRequest(BAL_STATE_REQUEST_e stateRequest)
sets the current state request of the state variable bal_state.
void BAL_SetBalancingThreshold(int32_t threshold_mV)
set balancing threshold
#define BS_NR_OF_STRINGS
Number of parallel strings in the battery pack.
bms driver configuration header
#define BMS_REQ_ID_STANDBY
#define BMS_REQ_ID_CHARGE
#define BMS_REQ_ID_NORMAL
static void CANRX_ClearAllPersistentFlags(uint64_t signalData)
clears the persistent flags
#define CANRX_CAN_REQUEST_UPDATE_TIME_ms
CAN state request update time.
static void CANRX_SetBalancingThreshold(uint64_t signalData)
sets the balancing threshold
uint32_t CANRX_BmsStateRequest(CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim)
can rx callback function for state requests
static void CANRX_HandleBalancingRequest(uint64_t signalData)
handles the balancing request
static void CANRX_HandleModeRequest(uint64_t signalData, const CAN_SHIM_s *const kpkCanShim)
handles the mode request
#define CAN_FOXBMS_MESSAGES_DEFAULT_DLC
Header for the driver for the CAN module.
#define CANRX_BMS_STATE_REQUEST_ID
void CAN_RxGetMessageDataFromCanData(uint64_t *pMessage, const uint8_t *const kpkCanData, CAN_ENDIANNESS_e endianness)
Copy CAN data from 8 bytes to a 64-bit variable.
void CAN_RxGetSignalDataFromMessageData(uint64_t message, uint64_t bitStart, uint8_t bitLength, uint64_t *pCanSignal, CAN_ENDIANNESS_e endianness)
Gets CAN signal data from a 64-bit variable. This function is used to get signal data from a 64-bit C...
Headers for the helper functions for the CAN module.
#define DATA_READ_DATA(...)
#define DATA_WRITE_DATA(...)
DIAG_RETURNTYPE_e DIAG_Handler(DIAG_ID_e diagId, DIAG_EVENT_e event, DIAG_IMPACT_LEVEL_e impact, uint32_t data)
DIAG_Handler provides generic error handling, based on diagnosis group.
@ DIAG_ID_DEEP_DISCHARGE_DETECTED
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
#define NULL_PTR
Null pointer.
bool OS_CheckTimeHasPassed(uint32_t oldTimeStamp_ms, uint32_t timeToPass_ms)
This function checks if timeToPass has passed since the last timestamp to now.
Declaration of the OS wrapper interface.
CAN_ENDIANNESS_e endianness
DATA_BLOCK_STATEREQUEST_s * pTableStateRequest
uint8_t stateRequestViaCan
uint8_t previousStateRequestViaCan
DATA_BLOCK_HEADER_s header
uint8_t stateRequestViaCanPending
void SYSM_ClearAllTimingViolations(void)
Clears all timing violations (both current and recorded)