foxBMS - Unit Tests  1.4.1
The foxBMS Unit Tests API Documentation
bms.h
Go to the documentation of this file.
1 /**
2  *
3  * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V.
4  * All rights reserved.
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are met:
10  *
11  * 1. Redistributions of source code must retain the above copyright notice, this
12  * list of conditions and the following disclaimer.
13  *
14  * 2. Redistributions in binary form must reproduce the above copyright notice,
15  * this list of conditions and the following disclaimer in the documentation
16  * and/or other materials provided with the distribution.
17  *
18  * 3. Neither the name of the copyright holder nor the names of its
19  * contributors may be used to endorse or promote products derived from
20  * this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  *
33  * We kindly request you to use one or more of the following phrases to refer to
34  * foxBMS in your hardware, software, documentation or advertising materials:
35  *
36  * - ″This product uses parts of foxBMS®″
37  * - ″This product includes parts of foxBMS®″
38  * - ″This product is derived from foxBMS®″
39  *
40  */
41 
42 /**
43  * @file bms.h
44  * @author foxBMS Team
45  * @date 2020-02-24 (date of creation)
46  * @updated 2022-10-27 (date of last update)
47  * @version v1.4.1
48  * @ingroup ENGINE
49  * @prefix BMS
50  *
51  * @brief bms driver header
52  *
53  *
54  */
55 
56 #ifndef FOXBMS__BMS_H_
57 #define FOXBMS__BMS_H_
58 
59 /*========== Includes =======================================================*/
60 #include "battery_system_cfg.h"
61 #include "bms_cfg.h"
62 
63 #include "contactor.h"
64 
65 /*========== Macros and Definitions =========================================*/
66 
67 /** Symbolic names for battery system state */
68 typedef enum {
69  BMS_CHARGING, /*!< battery is charged */
70  BMS_DISCHARGING, /*!< battery is discharged */
71  BMS_RELAXATION, /*!< battery relaxation ongoing */
72  BMS_AT_REST, /*!< battery is resting */
74 
75 /** Symbolic names for busyness of the syscontrol */
76 typedef enum {
77  BMS_CHECK_OK, /*!< syscontrol ok */
78  BMS_CHECK_BUSY, /*!< syscontrol busy */
79  BMS_CHECK_NOT_OK, /*!< syscontrol not ok */
80 } BMS_CHECK_e;
81 
82 /** Symbolic names to take precharge into account or not */
83 typedef enum {
84  BMS_DO_NOT_TAKE_PRECHARGE_INTO_ACCCOUNT, /*!< do not take precharge into account */
85  BMS_TAKE_PRECHARGE_INTO_ACCCOUNT, /*!< do take precharge into account */
87 
88 /** States of the SYS state machine */
89 typedef enum {
90  /* Init-Sequence */
105 
106 /** CAN states of the BMS state machine */
107 typedef enum {
108  /* Init-Sequence */
120 
121 /** Substates of the SYS state machine */
122 typedef enum {
123  BMS_ENTRY, /*!< Substate entry state */
124  BMS_CHECK_ERROR_FLAGS_INTERLOCK, /*!< Substate check measurements after interlock closed */
125  BMS_INTERLOCK_CHECKED, /*!< Substate interlocked checked */
126  BMS_CHECK_STATE_REQUESTS, /*!< Substate check if there is a state request */
127  BMS_CHECK_BALANCING_REQUESTS, /*!< Substate check if there is a balancing request */
128  BMS_CHECK_ERROR_FLAGS, /*!< Substate check if any error flag set */
129  BMS_CHECK_CONTACTOR_NORMAL_STATE, /*!< Substate in precharge, check if there contactors reached normal */
130  BMS_CHECK_CONTACTOR_CHARGE_STATE, /*!< Substate in precharge, check if there contactors reached normal */
157 
158 /** State requests for the BMS state machine */
159 typedef enum {
160  BMS_STATE_INIT_REQUEST, /*!< request for initialization */
161  BMS_STATE_ERROR_REQUEST, /*!< request for ERROR state */
162  BMS_STATE_NO_REQUEST, /*!< dummy request for no request */
164 
165 /** Possible return values when state requests are made to the BMS state machine */
166 typedef enum {
167  BMS_OK, /*!< request was successful */
168  BMS_REQUEST_PENDING, /*!< error: another request is currently processed */
169  BMS_ILLEGAL_REQUEST, /*!< error: request can not be executed */
170  BMS_ALREADY_INITIALIZED, /*!< error: BMS state machine already initialized */
172 
173 /** Power path type (discharge or charge) */
174 typedef enum {
175  BMS_POWER_PATH_OPEN, /* contactors open */
176  BMS_POWER_PATH_0, /* power path */
177  BMS_POWER_PATH_1, /* second power path */
179 
180 /**
181  * This structure contains all the variables relevant for the CONT state
182  * machine. The user can get the current state of the CONT state machine with
183  * this variable
184  */
185 typedef struct {
186  uint16_t timer; /*!< time in ms before the state machine processes the next state, e.g. in counts of 1ms */
187  BMS_STATE_REQUEST_e stateRequest; /*!< current state request made to the state machine */
188  BMS_STATEMACH_e state; /*!< current state of State Machine */
189  BMS_STATEMACH_SUB_e substate; /*!< current substate of the state machine */
190  BMS_STATEMACH_e laststate; /*!< previous state of the state machine */
191  BMS_STATEMACH_SUB_e lastsubstate; /*!< previous substate of the state machine */
192  uint32_t ErrRequestCounter; /*!< counts the number of illegal requests to the LTC state machine */
193  STD_RETURN_TYPE_e initFinished; /*!< #STD_OK if the initialization has passed, #STD_NOT_OK otherwise */
194  uint8_t triggerentry; /*!< counter for re-entrance protection (function running flag) */
195  uint8_t counter; /*!< general purpose counter */
196  BMS_CURRENT_FLOW_STATE_e currentFlowState; /*!< state of battery system */
197  uint32_t restTimer_10ms; /*!< timer until battery system is at rest */
198  uint16_t OscillationTimeout; /*!< timeout to prevent oscillation of contactors */
199  uint8_t PrechargeTryCounter; /*!< timeout to prevent oscillation of contactors */
200  BMS_POWER_PATH_TYPE_e powerPath; /*!< power path type (discharge or charge) */
201  uint8_t numberOfClosedStrings; /*!< number of closed strings */
202  uint16_t stringOpenTimeout; /*!< timeout to abort if string opening takes too long */
203  uint32_t nextstringclosedtimer; /*!< timer to wait if the next string was closed */
204  uint16_t stringCloseTimeout; /*!< timeout to abort if a string takes too long to close */
205  BMS_STATEMACH_e nextstate; /*!< next state of the State Machine */
206  uint8_t firstClosedString; /*!< strings with highest or lowest voltage, that was closed first */
207  uint16_t prechargeOpenTimeout; /*!< timeout to abort if string opening takes too long */
208  uint16_t prechargeCloseTimeout; /*!< timeout to abort if a string takes too long to close */
209  uint32_t remainingDelay_ms; /*!< time until state machine should switch to error state */
210  uint32_t minimumActiveDelay_ms; /*!< minimum delay time of all active fatal errors */
211  uint32_t timeAboveContactorBreakCurrent_ms; /*!< duration of current flow above maximum contactor break current */
212  uint8_t stringToBeOpened; /*!< string that is currently opened */
213  CONT_TYPE_e contactorToBeOpened; /*!< contactor that is currently opened */
214  bool transitionToErrorState; /*!< flag if fatal error has been detected and delay is active */
215  uint8_t closedPrechargeContactors[BS_NR_OF_STRINGS]; /*!< strings whose precharge contactors are closed */
216  uint8_t closedStrings[BS_NR_OF_STRINGS]; /*!< strings whose contactors are closed */
217  uint8_t deactivatedStrings[BS_NR_OF_STRINGS]; /*!< Deactivated strings after error detection, cannot be closed */
218 } BMS_STATE_s;
219 
220 /*========== Extern Constant and Variable Declarations ======================*/
221 
222 /*========== Extern Function Prototypes =====================================*/
223 /**
224  * @brief sets the current state request of the state variable bms_state.
225  * @details This function is used to make a state request to the state machine,
226  * e.g, start voltage measurement, read result of voltage measurement,
227  * re-initialization.
228  * It calls #BMS_CheckStateRequest() to check if the request is valid.
229  * The state request is rejected if is not valid. The result of the
230  * check is returned immediately, so that the requester can act in
231  * case it made a non-valid state request.
232  * @param statereq state request to set
233  * @return current state request
234  */
236 
237 /**
238  * @brief Returns the current state.
239  * @details This function is used in the functioning of the SYS state machine.
240  * @return current state, taken from BMS_STATEMACH_e
241  */
242 extern BMS_STATEMACH_e BMS_GetState(void);
243 
244 /**
245  * @brief Gets the initialization state.
246  * @details This function is used for getting the BMS initialization state.
247  * @return #STD_OK if initialized, otherwise #STD_NOT_OK
248  */
250 
251 /**
252  * @brief trigger function for the SYS driver state machine.
253  * @details This function contains the sequence of events in the SYS state
254  * machine. It must be called time-triggered, every 10 milliseconds.
255  */
256 extern void BMS_Trigger(void);
257 
258 /**
259  * @brief Returns current battery system state (charging/discharging,
260  * resting or in relaxation phase)
261  *
262  * @return #BMS_CURRENT_FLOW_STATE_e
263  */
265 
266 /**
267  * @brief Get current flow direction, current value as function parameter
268  * @param[in] current_mA current that is flowing
269  * @return #BMS_DISCHARGING or #BMS_CHARGING depending on current direction.
270  * Return #BMS_AT_REST. ((type: #BMS_CURRENT_FLOW_STATE_e)
271  */
272 extern BMS_CURRENT_FLOW_STATE_e BMS_GetCurrentFlowDirection(int32_t current_mA);
273 
274 /**
275  * @brief Returns string state (closed or open)
276  * @param[in] stringNumber string addressed
277  * @return false if string is open, true if string is closed
278  */
279 extern bool BMS_IsStringClosed(uint8_t stringNumber);
280 
281 /**
282  * @brief Returns if string is currently precharging or not
283  * @param[in] stringNumber string addressed
284  * @return false if precharge contactor is open, true if closed and string is
285  * precharging
286  */
287 extern bool BMS_IsStringPrecharging(uint8_t stringNumber);
288 
289 /**
290  * @brief Returns number of connected strings
291  * @return Returns number of connected strings
292  */
293 extern uint8_t BMS_GetNumberOfConnectedStrings(void);
294 
295 /**
296  * @brief Check if transition in to error state is active
297  * @return True, if transition into error state is ongoing, otherwise false
298  */
299 extern bool BMS_IsTransitionToErrorStateActive(void);
300 
301 /*========== Externalized Static Functions Prototypes (Unit Test) ===========*/
302 #ifdef UNITY_UNIT_TEST
303 /* database.h is only included in bms.c and there used as function parameter
304  * for static functions. Thus, we need to add the required include here. */
305 #include "database.h"
306 
309 extern uint8_t TEST_BMS_CheckReEntrance(void);
310 extern uint8_t TEST_BMS_CheckCanRequests(void);
312 extern bool TEST_BMS_IsAnyFatalErrorFlagSet(void);
313 extern void TEST_BMS_GetMeasurementValues(void);
314 extern void TEST_BMS_CheckOpenSenseWire(void);
315 extern STD_RETURN_TYPE_e TEST_BMS_CheckPrecharge(uint8_t stringNumber, DATA_BLOCK_PACK_VALUES_s *pPackValues);
316 extern uint8_t TEST_BMS_GetHighestString(BMS_CONSIDER_PRECHARGE_e precharge, DATA_BLOCK_PACK_VALUES_s *pPackValues);
317 extern uint8_t TEST_BMS_GetClosestString(BMS_CONSIDER_PRECHARGE_e precharge, DATA_BLOCK_PACK_VALUES_s *pPackValues);
318 extern uint8_t TEST_BMS_GetLowestString(BMS_CONSIDER_PRECHARGE_e precharge, DATA_BLOCK_PACK_VALUES_s *pPackValues);
319 extern int32_t TEST_BMS_GetStringVoltageDifference(uint8_t string, DATA_BLOCK_PACK_VALUES_s *pPackValues);
321 extern void TEST_BMS_UpdateBatsysState(DATA_BLOCK_PACK_VALUES_s *pPackValues);
322 #endif
323 
324 #endif /* FOXBMS__BMS_H_ */
Configuration of the battery system (e.g., number of battery modules, battery cells,...
#define BS_NR_OF_STRINGS
Number of parallel strings in the battery pack.
uint8_t TEST_BMS_GetLowestString(BMS_CONSIDER_PRECHARGE_e precharge, DATA_BLOCK_PACK_VALUES_s *pPackValues)
Definition: bms.c:1659
void TEST_BMS_CheckOpenSenseWire(void)
Definition: bms.c:1646
uint8_t TEST_BMS_GetClosestString(BMS_CONSIDER_PRECHARGE_e precharge, DATA_BLOCK_PACK_VALUES_s *pPackValues)
Definition: bms.c:1655
BMS_CANSTATE_e
Definition: bms.h:107
@ BMS_CANSTATE_UNINITIALIZED
Definition: bms.h:109
@ BMS_CANSTATE_INITIALIZED
Definition: bms.h:111
@ BMS_CANSTATE_NORMAL
Definition: bms.h:116
@ BMS_CANSTATE_CHARGE
Definition: bms.h:117
@ BMS_CANSTATE_STANDBY
Definition: bms.h:114
@ BMS_CANSTATE_ERROR
Definition: bms.h:118
@ BMS_CANSTATE_OPENCONTACTORS
Definition: bms.h:113
@ BMS_CANSTATE_INITIALIZATION
Definition: bms.h:110
@ BMS_CANSTATE_IDLE
Definition: bms.h:112
@ BMS_CANSTATE_PRECHARGE
Definition: bms.h:115
BMS_RETURN_TYPE_e TEST_BMS_CheckStateRequest(BMS_STATE_REQUEST_e statereq)
Definition: bms.c:1625
BMS_CHECK_e
Definition: bms.h:76
@ BMS_CHECK_OK
Definition: bms.h:77
@ BMS_CHECK_NOT_OK
Definition: bms.h:79
@ BMS_CHECK_BUSY
Definition: bms.h:78
bool BMS_IsStringPrecharging(uint8_t stringNumber)
Returns if string is currently precharging or not.
Definition: bms.c:1606
bool BMS_IsTransitionToErrorStateActive(void)
Check if transition in to error state is active.
Definition: bms.c:1619
BMS_RETURN_TYPE_e BMS_SetStateRequest(BMS_STATE_REQUEST_e statereq)
sets the current state request of the state variable bms_state.
Definition: bms.c:794
BMS_STATE_REQUEST_e TEST_BMS_TransferStateRequest(void)
Definition: bms.c:1628
STD_RETURN_TYPE_e TEST_BMS_CheckPrecharge(uint8_t stringNumber, DATA_BLOCK_PACK_VALUES_s *pPackValues)
Definition: bms.c:1649
int32_t TEST_BMS_GetStringVoltageDifference(uint8_t string, DATA_BLOCK_PACK_VALUES_s *pPackValues)
Definition: bms.c:1662
uint8_t TEST_BMS_CheckCanRequests(void)
Definition: bms.c:1634
BMS_CONSIDER_PRECHARGE_e
Definition: bms.h:83
@ BMS_DO_NOT_TAKE_PRECHARGE_INTO_ACCCOUNT
Definition: bms.h:84
@ BMS_TAKE_PRECHARGE_INTO_ACCCOUNT
Definition: bms.h:85
BMS_STATE_REQUEST_e
Definition: bms.h:159
@ BMS_STATE_NO_REQUEST
Definition: bms.h:162
@ BMS_STATE_INIT_REQUEST
Definition: bms.h:160
@ BMS_STATE_ERROR_REQUEST
Definition: bms.h:161
uint8_t TEST_BMS_CheckReEntrance(void)
Definition: bms.c:1631
void TEST_BMS_GetMeasurementValues(void)
Definition: bms.c:1643
void BMS_Trigger(void)
trigger function for the SYS driver state machine.
Definition: bms.c:808
uint8_t BMS_GetNumberOfConnectedStrings(void)
Returns number of connected strings.
Definition: bms.c:1615
BMS_STATEMACH_SUB_e
Definition: bms.h:122
@ BMS_NORMAL_CLOSE_SECOND_STRING_CONTACTOR
Definition: bms.h:148
@ BMS_CHECK_ALL_PRECHARGES_OPEN
Definition: bms.h:150
@ BMS_CHECK_ERROR_FLAGS_PRECHARGE
Definition: bms.h:140
@ BMS_PRECHARGE_OPEN_PRECHARGE
Definition: bms.h:134
@ BMS_OPEN_SECOND_STRING_CONTACTOR
Definition: bms.h:153
@ BMS_OPEN_STRINGS_EXIT
Definition: bms.h:155
@ BMS_PRECHARGE_CLOSE_PRECHARGE
Definition: bms.h:132
@ BMS_NORMAL_CLOSE_NEXT_STRING
Definition: bms.h:147
@ BMS_CHECK_CLOSE_SECOND_STRING_CONTACTOR_PRECHARGE_STATE
Definition: bms.h:139
@ BMS_CHECK_ERROR_FLAGS_PRECHARGE_CLOSINGSTRINGS
Definition: bms.h:145
@ BMS_ENTRY
Definition: bms.h:123
@ BMS_OPEN_SECOND_CONTACTOR_MINUS
Definition: bms.h:137
@ BMS_INTERLOCK_CHECKED
Definition: bms.h:125
@ BMS_CHECK_ERROR_FLAGS_PRECHARGE_FIRST_STRING
Definition: bms.h:141
@ BMS_OPEN_STRINGS_ENTRY
Definition: bms.h:151
@ BMS_CHECK_BALANCING_REQUESTS
Definition: bms.h:127
@ BMS_CHECK_ERROR_FLAGS_CLOSINGPRECHARGE
Definition: bms.h:146
@ BMS_CLOSE_SECOND_CONTACTOR_PLUS
Definition: bms.h:143
@ BMS_PRECHARGE_CHECK_VOLTAGES
Definition: bms.h:133
@ BMS_PRECHARGE_CLOSE_MINUS
Definition: bms.h:131
@ BMS_CHECK_STRING_CLOSED
Definition: bms.h:144
@ BMS_PRECHARGE_CHECK_OPEN_PRECHARGE
Definition: bms.h:135
@ BMS_CHECK_ERROR_FLAGS
Definition: bms.h:128
@ BMS_OPEN_ALL_PRECHARGES
Definition: bms.h:149
@ BMS_OPEN_FIRST_CONTACTOR
Definition: bms.h:136
@ BMS_CHECK_CONTACTOR_CHARGE_STATE
Definition: bms.h:130
@ BMS_CHECK_ERROR_FLAGS_INTERLOCK
Definition: bms.h:124
@ BMS_CHECK_STATE_REQUESTS
Definition: bms.h:126
@ BMS_CHECK_CONTACTOR_NORMAL_STATE
Definition: bms.h:129
@ BMS_PRECHARGE_CLOSE_NEXT_STRING
Definition: bms.h:142
@ BMS_OPEN_SECOND_CONTACTOR_PLUS
Definition: bms.h:138
@ BMS_OPEN_FIRST_STRING_CONTACTOR
Definition: bms.h:152
@ BMS_CHECK_SECOND_STRING_CONTACTOR
Definition: bms.h:154
bool BMS_IsStringClosed(uint8_t stringNumber)
Returns string state (closed or open)
Definition: bms.c:1597
BMS_CURRENT_FLOW_STATE_e BMS_GetCurrentFlowDirection(int32_t current_mA)
Get current flow direction, current value as function parameter.
Definition: bms.c:1573
STD_RETURN_TYPE_e TEST_BMS_IsBatterySystemStateOkay(void)
Definition: bms.c:1640
BMS_POWER_PATH_TYPE_e
Definition: bms.h:174
@ BMS_POWER_PATH_1
Definition: bms.h:177
@ BMS_POWER_PATH_OPEN
Definition: bms.h:175
@ BMS_POWER_PATH_0
Definition: bms.h:176
BMS_CURRENT_FLOW_STATE_e BMS_GetBatterySystemState(void)
Returns current battery system state (charging/discharging, resting or in relaxation phase)
Definition: bms.c:1569
int32_t TEST_BMS_GetAverageStringCurrent(DATA_BLOCK_PACK_VALUES_s *pPackValues)
Definition: bms.c:1665
bool TEST_BMS_IsAnyFatalErrorFlagSet(void)
Definition: bms.c:1637
BMS_STATEMACH_e
Definition: bms.h:89
@ BMS_STATEMACH_RESERVED1
Definition: bms.h:103
@ BMS_STATEMACH_PRECHARGE
Definition: bms.h:97
@ BMS_STATEMACH_STANDBY
Definition: bms.h:96
@ BMS_STATEMACH_CHARGE
Definition: bms.h:100
@ BMS_STATEMACH_UNDEFINED
Definition: bms.h:102
@ BMS_STATEMACH_UNINITIALIZED
Definition: bms.h:91
@ BMS_STATEMACH_ERROR
Definition: bms.h:101
@ BMS_STATEMACH_NORMAL
Definition: bms.h:98
@ BMS_STATEMACH_INITIALIZATION
Definition: bms.h:92
@ BMS_STATEMACH_DISCHARGE
Definition: bms.h:99
@ BMS_STATEMACH_OPEN_CONTACTORS
Definition: bms.h:95
@ BMS_STATEMACH_INITIALIZED
Definition: bms.h:93
@ BMS_STATEMACH_IDLE
Definition: bms.h:94
BMS_CURRENT_FLOW_STATE_e
Definition: bms.h:68
@ BMS_AT_REST
Definition: bms.h:72
@ BMS_DISCHARGING
Definition: bms.h:70
@ BMS_CHARGING
Definition: bms.h:69
@ BMS_RELAXATION
Definition: bms.h:71
void TEST_BMS_UpdateBatsysState(DATA_BLOCK_PACK_VALUES_s *pPackValues)
Definition: bms.c:1668
BMS_RETURN_TYPE_e
Definition: bms.h:166
@ BMS_OK
Definition: bms.h:167
@ BMS_REQUEST_PENDING
Definition: bms.h:168
@ BMS_ALREADY_INITIALIZED
Definition: bms.h:170
@ BMS_ILLEGAL_REQUEST
Definition: bms.h:169
STD_RETURN_TYPE_e BMS_GetInitializationState(void)
Gets the initialization state.
Definition: bms.c:786
BMS_STATEMACH_e BMS_GetState(void)
Returns the current state.
Definition: bms.c:790
uint8_t TEST_BMS_GetHighestString(BMS_CONSIDER_PRECHARGE_e precharge, DATA_BLOCK_PACK_VALUES_s *pPackValues)
Definition: bms.c:1652
bms driver configuration header
Headers for the driver for the contactors.
CONT_TYPE_e
Definition: contactor_cfg.h:84
Database module header.
STD_RETURN_TYPE_e
Definition: fstd_types.h:81
uint32_t restTimer_10ms
Definition: bms.h:197
uint8_t PrechargeTryCounter
Definition: bms.h:199
uint8_t counter
Definition: bms.h:195
bool transitionToErrorState
Definition: bms.h:214
uint16_t timer
Definition: bms.h:186
uint16_t prechargeOpenTimeout
Definition: bms.h:207
BMS_CURRENT_FLOW_STATE_e currentFlowState
Definition: bms.h:196
BMS_STATEMACH_SUB_e lastsubstate
Definition: bms.h:191
uint8_t triggerentry
Definition: bms.h:194
STD_RETURN_TYPE_e initFinished
Definition: bms.h:193
BMS_STATEMACH_e nextstate
Definition: bms.h:205
uint16_t prechargeCloseTimeout
Definition: bms.h:208
uint8_t firstClosedString
Definition: bms.h:206
CONT_TYPE_e contactorToBeOpened
Definition: bms.h:213
uint32_t nextstringclosedtimer
Definition: bms.h:203
BMS_STATEMACH_e laststate
Definition: bms.h:190
BMS_STATE_REQUEST_e stateRequest
Definition: bms.h:187
uint8_t stringToBeOpened
Definition: bms.h:212
uint32_t ErrRequestCounter
Definition: bms.h:192
uint32_t minimumActiveDelay_ms
Definition: bms.h:210
uint8_t numberOfClosedStrings
Definition: bms.h:201
BMS_STATEMACH_e state
Definition: bms.h:188
uint16_t stringCloseTimeout
Definition: bms.h:204
BMS_STATEMACH_SUB_e substate
Definition: bms.h:189
uint16_t stringOpenTimeout
Definition: bms.h:202
uint32_t timeAboveContactorBreakCurrent_ms
Definition: bms.h:211
BMS_POWER_PATH_TYPE_e powerPath
Definition: bms.h:200
uint32_t remainingDelay_ms
Definition: bms.h:209
uint16_t OscillationTimeout
Definition: bms.h:198