|
foxBMS-UnitTests
1.0.1
The foxBMS Unit Tests API Documentation
|
Go to the documentation of this file.
67 #define ILCK_SAVELASTSTATES() \
68 ilck_state.laststate = ilck_state.state; \
69 ilck_state.lastsubstate = ilck_state.substate
72 #define ILCK_CLOSEINTERLOCK() ILCK_SwitchInterlockOn()
74 #define ILCK_OPENINTERLOCK() ILCK_SwitchInterlockOff()
88 .ErrRequestCounter = 0,
235 return interlockSetInformation;
289 uint8_t pinstate = 0U;
293 if (pinstate == 1U) {
295 }
else if (pinstate == 0U) {
299 return measuredInterlockState;
431 #ifdef UNITY_UNIT_TEST
Implementation of the tasks used by the system, headers.
DATA_BLOCK_HEADER_s header
static STD_RETURN_TYPE_e ILCK_SetInterlockState(ILCK_ELECTRICAL_STATE_TYPE_e requestedInterlockState)
Sets the interlock state to its requested state, if the interlock is at that time not in the requeste...
static STD_RETURN_TYPE_e ILCK_SwitchInterlockOn(void)
Switches the interlock on and returns STD_OK on success.
static void ILCK_CheckFeedback(void)
checks interlock feedback
enum STD_RETURN_TYPE STD_RETURN_TYPE_e
static ILCK_RETURN_TYPE_e ILCK_CheckStateRequest(ILCK_STATE_REQUEST_e statereq)
checks the state requests that are made.
uint32_t ErrRequestCounter
ILCK_STATEMACH_SUB_e substate
#define DATA_WRITE_DATA(...)
@ ILCK_STATEMACH_UNINITIALIZED
@ ILCK_STATE_ERROR_REQUEST
ILCK_ELECTRICAL_STATE_TYPE_e feedback
@ ILCK_STATE_INIT_REQUEST
static uint8_t ILCK_CheckReEntrance(void)
re-entrance check of ILCK state machine trigger function
#define ILCK_INTERLOCK_FEEDBACK
static ILCK_ELECTRICAL_STATE_TYPE_e ILCK_GetInterlockSetValue(void)
Gets the latest value (ILCK_SWITCH_ON, ILCK_SWITCH_OFF) the interlock was set to.
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
void OS_ExitTaskCritical(void)
Exit Critical interface function for use in FreeRTOS-Tasks and FreeRTOS-ISR.
#define ILCK_OPENINTERLOCK()
ILCK_STATE_REQUEST_e statereq
static ILCK_STATE_REQUEST_e ILCK_TransferStateRequest(void)
gets the current state request.
@ ILCK_STATEMACH_WAIT_FIRST_REQUEST
static STD_RETURN_TYPE_e ILCK_SwitchInterlockOff(void)
Switches the interlock off and returns STD_NOT_OK on success.
void OS_EnterTaskCritical(void)
Enter Critical interface function for use in FreeRTOS-Tasks and FreeRTOS-ISR.
STD_RETURN_TYPE_e DIAG_CheckEvent(STD_RETURN_TYPE_e cond, DIAG_ID_e diag_id, DIAG_IMPACT_LEVEL_e impact, uint32_t data)
DIAG_CheckEvent provides a simple interface to check an event for STD_OK.
void ILCK_Trigger(void)
trigger function for the ILCK driver state machine.
ILCK_ELECTRICAL_STATE_s ilck_interlock_state
ILCK_ELECTRICAL_STATE_TYPE_e set
enum ILCK_ELECTRICAL_STATE_TYPE ILCK_ELECTRICAL_STATE_TYPE_e
ILCK_STATEMACH_e ILCK_GetState(void)
gets the current state.
ILCK_RETURN_TYPE_e ILCK_SetStateRequest(ILCK_STATE_REQUEST_e statereq)
sets the current state request of the state variable ilck_state.
@ DIAG_ID_INTERLOCK_FEEDBACK
static void ILCK_Init_Pins(void)
uint8_t interlockFeedback
#define ILCK_SAVELASTSTATES()
@ ILCK_STATEMACH_INITIALIZED
#define ILCK_STATEMACH_SHORTTIME_MS
@ DATA_BLOCK_ID_INTERLOCK_FEEDBACK
static ILCK_STATE_s ilck_state
#define ILCK_CLOSEINTERLOCK()
@ ILCK_STATE_CLOSE_REQUEST
#define ILCK_INTERLOCK_CONTROL
ILCK_ELECTRICAL_STATE_TYPE_e ILCK_GetInterlockFeedback(void)
Reads the feedback pin of the interlock and returns its current value (ILCK_SWITCH_OFF/ILCK_SWITCH_ON...
@ ILCK_STATE_OPEN_REQUEST
#define FAS_TRAP
Define that evaluates to essential boolean false thus tripping an assert.
void TEST_ILCK_SetStateStruct(ILCK_STATE_s state)
Headers for the driver for the interlock.
@ ILCK_STATEMACH_INITIALIZATION
@ ILCK_ALREADY_INITIALIZED
ILCK_CONFIG_s ilck_interlock_config