foxBMS - Unit Tests  1.4.0
The foxBMS Unit Tests API Documentation
BMS_STATE_s Struct Reference

#include <bms.h>

Data Fields

uint16_t timer
BMS_STATE_REQUEST_e stateRequest
BMS_STATEMACH_e laststate
BMS_STATEMACH_SUB_e lastsubstate
uint32_t ErrRequestCounter
STD_RETURN_TYPE_e initFinished
uint8_t triggerentry
uint8_t counter
uint32_t restTimer_10ms
uint16_t OscillationTimeout
uint8_t PrechargeTryCounter
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 182 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 209 of file bms.h.

◆ closedStrings

uint8_t BMS_STATE_s::closedStrings[BS_NR_OF_STRINGS]

strings whose contactors are closed

Definition at line 210 of file bms.h.

◆ counter

uint8_t BMS_STATE_s::counter

general purpose counter

Definition at line 192 of file bms.h.

◆ currentFlowState


state of battery system

Definition at line 193 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 211 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 189 of file bms.h.

◆ firstClosedString

uint8_t BMS_STATE_s::firstClosedString

strings with highest or lowest voltage, that was closed first

Definition at line 203 of file bms.h.

◆ initFinished


STD_OK if the initialization has passed, STD_NOT_OK otherwise

Definition at line 190 of file bms.h.

◆ laststate


previous state of the state machine

Definition at line 187 of file bms.h.

◆ lastsubstate


previous substate of the state machine

Definition at line 188 of file bms.h.

◆ minimumActiveDelay_ms

uint32_t BMS_STATE_s::minimumActiveDelay_ms

minimum delay time of all active fatal errors

Definition at line 207 of file bms.h.

◆ nextstate


next state of the State Machine

Definition at line 202 of file bms.h.

◆ nextstringclosedtimer

uint32_t BMS_STATE_s::nextstringclosedtimer

timer to wait if the next string was closed

Definition at line 200 of file bms.h.

◆ numberOfClosedStrings

uint8_t BMS_STATE_s::numberOfClosedStrings

number of closed strings

Definition at line 198 of file bms.h.

◆ OscillationTimeout

uint16_t BMS_STATE_s::OscillationTimeout

timeout to prevent oscillation of contactors

Definition at line 195 of file bms.h.

◆ powerPath


power path type (discharge or charge)

Definition at line 197 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 205 of file bms.h.

◆ prechargeOpenTimeout

uint16_t BMS_STATE_s::prechargeOpenTimeout

timeout to abort if string opening takes too long

Definition at line 204 of file bms.h.

◆ PrechargeTryCounter

uint8_t BMS_STATE_s::PrechargeTryCounter

timeout to prevent oscillation of contactors

Definition at line 196 of file bms.h.

◆ remainingDelay_ms

uint32_t BMS_STATE_s::remainingDelay_ms

time until statemachine should switch to error state

Definition at line 206 of file bms.h.

◆ restTimer_10ms

uint32_t BMS_STATE_s::restTimer_10ms

timer until battery system is at rest

Definition at line 194 of file bms.h.

◆ state


current state of State Machine

Definition at line 185 of file bms.h.

◆ stateRequest


current state request made to the state machine

Definition at line 184 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 201 of file bms.h.

◆ stringOpenTimeout

uint16_t BMS_STATE_s::stringOpenTimeout

timeout to abort if string opening takes too long

Definition at line 199 of file bms.h.

◆ substate


current substate of the state machine

Definition at line 186 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 183 of file bms.h.

◆ transitionToErrorState

bool BMS_STATE_s::transitionToErrorState

flag if fatal error has been detected and delay is active

Definition at line 208 of file bms.h.

◆ triggerentry

uint8_t BMS_STATE_s::triggerentry

counter for re-entrance protection (function running flag)

Definition at line 191 of file bms.h.

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