foxBMS - Unit Tests
1.2.1
The foxBMS Unit Tests API Documentation
|
Headers for the driver for the interlock. More...
#include "interlock_cfg.h"
Go to the source code of this file.
Data Structures | |
struct | ILCK_STATE_s |
Enumerations | |
enum | ILCK_STATEMACH_e { ILCK_STATEMACHINE_UNINITIALIZED , ILCK_STATEMACHINE_INITIALIZED , ILCK_STATEMACHINE_UNDEFINED } |
enum | ILCK_STATEMACH_SUB_e { ILCK_ENTRY } |
enum | ILCK_STATE_REQUEST_e { ILCK_STATE_INITIALIZATION_REQUEST , ILCK_STATE_NO_REQUEST } |
enum | ILCK_RETURN_TYPE_e { ILCK_OK , ILCK_REQUEST_PENDING , ILCK_ALREADY_INITIALIZED , ILCK_ILLEGAL_REQUEST } |
Functions | |
STD_RETURN_TYPE_e | ILCK_Init (void) |
Checks the configuration of the interlock-module. More... | |
ILCK_RETURN_TYPE_e | ILCK_SetStateRequest (ILCK_STATE_REQUEST_e statereq) |
sets the current state request of the state variable ilck_state. More... | |
ILCK_STATEMACH_e | ILCK_GetState (void) |
gets the current state. More... | |
void | ILCK_Trigger (void) |
trigger function for the ILCK driver state machine. More... | |
void | TEST_ILCK_SetStateStruct (ILCK_STATE_s state) |
ILCK_ELECTRICAL_STATE_TYPE_e | TEST_ILCK_GetInterlockFeedback (void) |
Headers for the driver for the interlock.
SPDX-License-Identifier: BSD-3-Clause
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
We kindly request you to use one or more of the following phrases to refer to foxBMS in your hardware, software, documentation or advertising materials:
Definition in file interlock.h.
enum ILCK_RETURN_TYPE_e |
Possible return values when state requests are made to the ILCK statemachine
Enumerator | |
---|---|
ILCK_OK | ILCK --> ok |
ILCK_REQUEST_PENDING | requested to be executed |
ILCK_ALREADY_INITIALIZED | Initialization of ilck already finished |
ILCK_ILLEGAL_REQUEST | Request can not be executed |
Definition at line 90 of file interlock.h.
enum ILCK_STATE_REQUEST_e |
State requests for the ILCK statemachine
Enumerator | |
---|---|
ILCK_STATE_INITIALIZATION_REQUEST | |
ILCK_STATE_NO_REQUEST |
Definition at line 82 of file interlock.h.
enum ILCK_STATEMACH_e |
States of the ILCK state machine
Enumerator | |
---|---|
ILCK_STATEMACHINE_UNINITIALIZED | Uninitialized state |
ILCK_STATEMACHINE_INITIALIZED | statemachine initialized |
ILCK_STATEMACHINE_UNDEFINED | undefined state |
Definition at line 65 of file interlock.h.
enum ILCK_STATEMACH_SUB_e |
Substates of the ILCK state machine
Enumerator | |
---|---|
ILCK_ENTRY | Substate entry state |
Definition at line 75 of file interlock.h.
ILCK_STATEMACH_e ILCK_GetState | ( | void | ) |
gets the current state.
This function is used in the functioning of the ILCK state machine.
Definition at line 246 of file interlock.c.
STD_RETURN_TYPE_e ILCK_Init | ( | void | ) |
Checks the configuration of the interlock-module.
ILCK_RETURN_TYPE_e ILCK_SetStateRequest | ( | ILCK_STATE_REQUEST_e | statereq | ) |
sets the current state request of the state variable ilck_state.
This function is used to make a state request to the state machine,e.g, start voltage measurement, read result of voltage measurement, re-initialization It calls ILCK_CheckStateRequest() to check if the request is valid. The state request is rejected if is not valid. The result of the check is returned immediately, so that the requester can act in case it made a non-valid state request.
statereq | state request to set |
Definition at line 250 of file interlock.c.
void ILCK_Trigger | ( | void | ) |
trigger function for the ILCK driver state machine.
This function contains the sequence of events in the ILCK state machine. It must be called time-triggered, every 1ms.
Definition at line 264 of file interlock.c.
ILCK_ELECTRICAL_STATE_TYPE_e TEST_ILCK_GetInterlockFeedback | ( | void | ) |
void TEST_ILCK_SetStateStruct | ( | ILCK_STATE_s | state | ) |
Definition at line 321 of file interlock.c.