foxBMS  1.0.0
The foxBMS Battery Management System API Documentation
BAL_STATE Struct Reference

#include <bal.h>

Data Fields

uint16_t timer
 
BAL_STATE_REQUEST_e stateRequest
 
BAL_STATEMACH_e state
 
BAL_STATEMACH_SUB_e substate
 
BAL_STATEMACH_e lastState
 
uint8_t lastSubstate
 
uint8_t triggerEntry
 
uint32_t errorRequestCounter
 
STD_RETURN_TYPE_e initializationFinished
 
bool active
 
int32_t balancingThreshold
 
bool balancingAllowed
 
bool balancingGlobalAllowed
 

Detailed Description

This structure contains all the variables relevant for the BAL state machine. The user can get the current state of the BAL state machine with this variable

Definition at line 128 of file bal.h.

Field Documentation

◆ active

bool BAL_STATE::active

indicate if balancing active or not

Definition at line 138 of file bal.h.

◆ balancingAllowed

bool BAL_STATE::balancingAllowed

flag to disable balancing

Definition at line 140 of file bal.h.

◆ balancingGlobalAllowed

bool BAL_STATE::balancingGlobalAllowed

flag to globally disable balancing

Definition at line 141 of file bal.h.

◆ balancingThreshold

int32_t BAL_STATE::balancingThreshold

effective balancing threshold

Definition at line 139 of file bal.h.

◆ errorRequestCounter

uint32_t BAL_STATE::errorRequestCounter

counts the number of illegal requests to the BAL state machine

Definition at line 136 of file bal.h.

◆ initializationFinished

STD_RETURN_TYPE_e BAL_STATE::initializationFinished

E_OK if statemachine initialized, otherwise E_NOT_OK

Definition at line 137 of file bal.h.

◆ lastState

BAL_STATEMACH_e BAL_STATE::lastState

previous state of the state machine

Definition at line 133 of file bal.h.

◆ lastSubstate

uint8_t BAL_STATE::lastSubstate

previous substate of the state machine

Definition at line 134 of file bal.h.

◆ state

BAL_STATEMACH_e BAL_STATE::state

state of Driver State Machine

Definition at line 131 of file bal.h.

◆ stateRequest

BAL_STATE_REQUEST_e BAL_STATE::stateRequest

current state request made to the state machine

Definition at line 130 of file bal.h.

◆ substate

BAL_STATEMACH_SUB_e BAL_STATE::substate

current substate of the state machine

Definition at line 132 of file bal.h.

◆ timer

uint16_t BAL_STATE::timer

time in ms before the state machine processes the next state, e.g. in counts of 1ms

Definition at line 129 of file bal.h.

◆ triggerEntry

uint8_t BAL_STATE::triggerEntry

counter for re-entrance protection (function running flag)

Definition at line 135 of file bal.h.


The documentation for this struct was generated from the following file: