foxBMS  1.4.0
The foxBMS Battery Management System API Documentation
BAL_STATE_s Struct Reference

#include <bal.h>

Data Fields

uint16_t timer
BAL_STATE_REQUEST_e stateRequest
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 129 of file bal.h.

Field Documentation

◆ active

bool BAL_STATE_s::active

indicate if balancing active or not

Definition at line 139 of file bal.h.

◆ balancingAllowed

bool BAL_STATE_s::balancingAllowed

flag to disable balancing

Definition at line 141 of file bal.h.

◆ balancingGlobalAllowed

bool BAL_STATE_s::balancingGlobalAllowed

flag to globally disable balancing

Definition at line 142 of file bal.h.

◆ balancingThreshold

int32_t BAL_STATE_s::balancingThreshold

effective balancing threshold

Definition at line 140 of file bal.h.

◆ errorRequestCounter

uint32_t BAL_STATE_s::errorRequestCounter

counts the number of illegal requests to the BAL state machine

Definition at line 137 of file bal.h.

◆ initializationFinished

STD_RETURN_TYPE_e BAL_STATE_s::initializationFinished

STD_OK if statemachine initialized, otherwise STD_NOT_OK

Definition at line 138 of file bal.h.

◆ lastState


previous state of the state machine

Definition at line 134 of file bal.h.

◆ lastSubstate

uint8_t BAL_STATE_s::lastSubstate

previous substate of the state machine

Definition at line 135 of file bal.h.

◆ state


state of Driver State Machine

Definition at line 132 of file bal.h.

◆ stateRequest


current state request made to the state machine

Definition at line 131 of file bal.h.

◆ substate


current substate of the state machine

Definition at line 133 of file bal.h.

◆ timer

uint16_t BAL_STATE_s::timer

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

Definition at line 130 of file bal.h.

◆ triggerEntry

uint8_t BAL_STATE_s::triggerEntry

counter for re-entrance protection (function running flag)

Definition at line 136 of file bal.h.

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