foxBMS  1.2.1
The foxBMS Battery Management System API Documentation
BMS_STATE Struct Reference

#include <bms.h>

Data Fields

uint16_t timer
 
BMS_STATE_REQUEST_e stateRequest
 
BMS_STATEMACH_e state
 
BMS_STATEMACH_SUB_e substate
 
BMS_STATEMACH_e laststate
 
BMS_STATEMACH_SUB_e lastsubstate
 
uint32_t ErrRequestCounter
 
STD_RETURN_TYPE_e initFinished
 
uint8_t triggerentry
 
uint8_t counter
 
BMS_CURRENT_FLOW_STATE_e currentFlowState
 
uint32_t restTimer_10ms
 
uint16_t OscillationTimeout
 
uint8_t PrechargeTryCounter
 
BMS_POWER_PATH_TYPE_e powerPath
 
uint8_t numberOfClosedStrings
 
uint16_t stringOpenTimeout
 
uint32_t nextstringclosedtimer
 
uint16_t stringCloseTimeout
 
BMS_STATEMACH_e nextstate
 
uint8_t firstClosedString
 
uint16_t prechargeOpenTimeout
 
uint16_t prechargeCloseTimeout
 
uint32_t remainingDelay_ms
 
uint32_t minimumActiveDelay_ms
 
bool transitionToErrorState
 
uint8_t closedPrechargeContactors [BS_NR_OF_STRINGS]
 
uint8_t closedStrings [BS_NR_OF_STRINGS]
 
uint8_t deactivatedStrings [BS_NR_OF_STRINGS]
 

Detailed Description

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

Definition at line 183 of file bms.h.

Field Documentation

◆ closedPrechargeContactors

uint8_t BMS_STATE::closedPrechargeContactors[BS_NR_OF_STRINGS]

strings whose precharge contactors are closed

Definition at line 210 of file bms.h.

◆ closedStrings

uint8_t BMS_STATE::closedStrings[BS_NR_OF_STRINGS]

strings whose contactors are closed

Definition at line 211 of file bms.h.

◆ counter

uint8_t BMS_STATE::counter

general purpose counter

Definition at line 193 of file bms.h.

◆ currentFlowState

BMS_CURRENT_FLOW_STATE_e BMS_STATE::currentFlowState

state of battery system

Definition at line 194 of file bms.h.

◆ deactivatedStrings

uint8_t BMS_STATE::deactivatedStrings[BS_NR_OF_STRINGS]

Deactivated strings after error detection, cannot be closed

Definition at line 212 of file bms.h.

◆ ErrRequestCounter

uint32_t BMS_STATE::ErrRequestCounter

counts the number of illegal requests to the LTC state machine

Definition at line 190 of file bms.h.

◆ firstClosedString

uint8_t BMS_STATE::firstClosedString

strings with highest or lowest voltage, that was closed first

Definition at line 204 of file bms.h.

◆ initFinished

STD_RETURN_TYPE_e BMS_STATE::initFinished

STD_OK if the initialization has passed, STD_NOT_OK otherwise

Definition at line 191 of file bms.h.

◆ laststate

BMS_STATEMACH_e BMS_STATE::laststate

previous state of the state machine

Definition at line 188 of file bms.h.

◆ lastsubstate

BMS_STATEMACH_SUB_e BMS_STATE::lastsubstate

previous substate of the state machine

Definition at line 189 of file bms.h.

◆ minimumActiveDelay_ms

uint32_t BMS_STATE::minimumActiveDelay_ms

minimum delay time of all active fatal errors

Definition at line 208 of file bms.h.

◆ nextstate

BMS_STATEMACH_e BMS_STATE::nextstate

next state of the State Machine

Definition at line 203 of file bms.h.

◆ nextstringclosedtimer

uint32_t BMS_STATE::nextstringclosedtimer

timer to wait if the next string was closed

Definition at line 201 of file bms.h.

◆ numberOfClosedStrings

uint8_t BMS_STATE::numberOfClosedStrings

number of closed strings

Definition at line 199 of file bms.h.

◆ OscillationTimeout

uint16_t BMS_STATE::OscillationTimeout

timeout to prevent oscillation of contactors

Definition at line 196 of file bms.h.

◆ powerPath

BMS_POWER_PATH_TYPE_e BMS_STATE::powerPath

power path type (discharge or charge)

Definition at line 198 of file bms.h.

◆ prechargeCloseTimeout

uint16_t BMS_STATE::prechargeCloseTimeout

timeout to abort if a string takes too long to close

Definition at line 206 of file bms.h.

◆ prechargeOpenTimeout

uint16_t BMS_STATE::prechargeOpenTimeout

timeout to abort if string opening takes too long

Definition at line 205 of file bms.h.

◆ PrechargeTryCounter

uint8_t BMS_STATE::PrechargeTryCounter

timeout to prevent oscillation of contactors

Definition at line 197 of file bms.h.

◆ remainingDelay_ms

uint32_t BMS_STATE::remainingDelay_ms

time until statemachine should switch to error state

Definition at line 207 of file bms.h.

◆ restTimer_10ms

uint32_t BMS_STATE::restTimer_10ms

timer until battery system is at rest

Definition at line 195 of file bms.h.

◆ state

BMS_STATEMACH_e BMS_STATE::state

current state of State Machine

Definition at line 186 of file bms.h.

◆ stateRequest

BMS_STATE_REQUEST_e BMS_STATE::stateRequest

current state request made to the state machine

Definition at line 185 of file bms.h.

◆ stringCloseTimeout

uint16_t BMS_STATE::stringCloseTimeout

timeout to abort if a string takes too long to close

Definition at line 202 of file bms.h.

◆ stringOpenTimeout

uint16_t BMS_STATE::stringOpenTimeout

timeout to abort if string opening takes too long

Definition at line 200 of file bms.h.

◆ substate

BMS_STATEMACH_SUB_e BMS_STATE::substate

current substate of the state machine

Definition at line 187 of file bms.h.

◆ timer

uint16_t BMS_STATE::timer

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

Definition at line 184 of file bms.h.

◆ transitionToErrorState

bool BMS_STATE::transitionToErrorState

flag if fatal error has been detected and delay is active

Definition at line 209 of file bms.h.

◆ triggerentry

uint8_t BMS_STATE::triggerentry

counter for re-entrance protection (function running flag)

Definition at line 192 of file bms.h.


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