foxBMS  1.6.0
The foxBMS Battery Management System API Documentation
BMS_STATE_s 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
 
uint32_t timeAboveContactorBreakCurrent_ms
 
uint8_t stringToBeOpened
 
CONT_TYPE_e contactorToBeOpened
 
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 189 of file bms.h.

Field Documentation

◆ closedPrechargeContactors

uint8_t BMS_STATE_s::closedPrechargeContactors[BS_NR_OF_STRINGS]

strings whose precharge contactors are closed

Definition at line 219 of file bms.h.

◆ closedStrings

uint8_t BMS_STATE_s::closedStrings[BS_NR_OF_STRINGS]

strings whose contactors are closed

Definition at line 220 of file bms.h.

◆ contactorToBeOpened

CONT_TYPE_e BMS_STATE_s::contactorToBeOpened

contactor that is currently opened

Definition at line 217 of file bms.h.

◆ counter

uint8_t BMS_STATE_s::counter

general purpose counter

Definition at line 199 of file bms.h.

◆ currentFlowState

BMS_CURRENT_FLOW_STATE_e BMS_STATE_s::currentFlowState

state of battery system

Definition at line 200 of file bms.h.

◆ deactivatedStrings

uint8_t BMS_STATE_s::deactivatedStrings[BS_NR_OF_STRINGS]

Deactivated strings after error detection, cannot be closed

Definition at line 221 of file bms.h.

◆ ErrRequestCounter

uint32_t BMS_STATE_s::ErrRequestCounter

counts the number of illegal requests to the LTC state machine

Definition at line 196 of file bms.h.

◆ firstClosedString

uint8_t BMS_STATE_s::firstClosedString

strings with highest or lowest voltage, that was closed first

Definition at line 210 of file bms.h.

◆ initFinished

STD_RETURN_TYPE_e BMS_STATE_s::initFinished

STD_OK if the initialization has passed, STD_NOT_OK otherwise

Definition at line 197 of file bms.h.

◆ laststate

BMS_STATEMACH_e BMS_STATE_s::laststate

previous state of the state machine

Definition at line 194 of file bms.h.

◆ lastsubstate

BMS_STATEMACH_SUB_e BMS_STATE_s::lastsubstate

previous substate of the state machine

Definition at line 195 of file bms.h.

◆ minimumActiveDelay_ms

uint32_t BMS_STATE_s::minimumActiveDelay_ms

minimum delay time of all active fatal errors

Definition at line 214 of file bms.h.

◆ nextstate

BMS_STATEMACH_e BMS_STATE_s::nextstate

next state of the State Machine

Definition at line 209 of file bms.h.

◆ nextstringclosedtimer

uint32_t BMS_STATE_s::nextstringclosedtimer

timer to wait if the next string was closed

Definition at line 207 of file bms.h.

◆ numberOfClosedStrings

uint8_t BMS_STATE_s::numberOfClosedStrings

number of closed strings

Definition at line 205 of file bms.h.

◆ OscillationTimeout

uint16_t BMS_STATE_s::OscillationTimeout

timeout to prevent oscillation of contactors

Definition at line 202 of file bms.h.

◆ powerPath

BMS_POWER_PATH_TYPE_e BMS_STATE_s::powerPath

power path type (discharge or charge)

Definition at line 204 of file bms.h.

◆ prechargeCloseTimeout

uint16_t BMS_STATE_s::prechargeCloseTimeout

timeout to abort if a string takes too long to close

Definition at line 212 of file bms.h.

◆ prechargeOpenTimeout

uint16_t BMS_STATE_s::prechargeOpenTimeout

timeout to abort if string opening takes too long

Definition at line 211 of file bms.h.

◆ prechargeTryCounter

uint8_t BMS_STATE_s::prechargeTryCounter

timeout to prevent oscillation of contactors

Definition at line 203 of file bms.h.

◆ remainingDelay_ms

uint32_t BMS_STATE_s::remainingDelay_ms

time until state machine should switch to error state

Definition at line 213 of file bms.h.

◆ restTimer_10ms

uint32_t BMS_STATE_s::restTimer_10ms

timer until battery system is at rest

Definition at line 201 of file bms.h.

◆ state

BMS_STATEMACH_e BMS_STATE_s::state

current state of State Machine

Definition at line 192 of file bms.h.

◆ stateRequest

BMS_STATE_REQUEST_e BMS_STATE_s::stateRequest

current state request made to the state machine

Definition at line 191 of file bms.h.

◆ stringCloseTimeout

uint16_t BMS_STATE_s::stringCloseTimeout

timeout to abort if a string takes too long to close

Definition at line 208 of file bms.h.

◆ stringOpenTimeout

uint16_t BMS_STATE_s::stringOpenTimeout

timeout to abort if string opening takes too long

Definition at line 206 of file bms.h.

◆ stringToBeOpened

uint8_t BMS_STATE_s::stringToBeOpened

string that is currently opened

Definition at line 216 of file bms.h.

◆ substate

BMS_STATEMACH_SUB_e BMS_STATE_s::substate

current substate of the state machine

Definition at line 193 of file bms.h.

◆ timeAboveContactorBreakCurrent_ms

uint32_t BMS_STATE_s::timeAboveContactorBreakCurrent_ms

duration of current flow above maximum contactor break current

Definition at line 215 of file bms.h.

◆ timer

uint16_t BMS_STATE_s::timer

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

Definition at line 190 of file bms.h.

◆ transitionToErrorState

bool BMS_STATE_s::transitionToErrorState

flag if fatal error has been detected and delay is active

Definition at line 218 of file bms.h.

◆ triggerentry

uint8_t BMS_STATE_s::triggerentry

counter for re-entrance protection (function running flag)

Definition at line 198 of file bms.h.


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