foxBMS - Unit Tests  1.4.0
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-07-28 (date of last update)
47  * @version v1.4.0
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 /*========== Macros and Definitions =========================================*/
64 
65 /** Symbolic names for battery system state */
66 typedef enum {
67  BMS_CHARGING, /*!< battery is charged */
68  BMS_DISCHARGING, /*!< battery is discharged */
69  BMS_RELAXATION, /*!< battery relaxation ongoing */
70  BMS_AT_REST, /*!< battery is resting */
72 
73 /** Symbolic names for busyness of the syscontrol */
74 typedef enum {
75  BMS_CHECK_OK, /*!< syscontrol ok */
76  BMS_CHECK_BUSY, /*!< syscontrol busy */
77  BMS_CHECK_NOT_OK, /*!< syscontrol not ok */
78 } BMS_CHECK_e;
79 
80 /** Symbolic names to take precharge into account or not */
81 typedef enum {
82  BMS_DO_NOT_TAKE_PRECHARGE_INTO_ACCCOUNT, /*!< do not take precharge into account */
83  BMS_TAKE_PRECHARGE_INTO_ACCCOUNT, /*!< do take precharge into account */
85 
86 /** States of the SYS state machine */
87 typedef enum {
88  /* Init-Sequence */
103 
104 /** CAN states of the BMS state machine */
105 typedef enum {
106  /* Init-Sequence */
118 
119 /** Substates of the SYS state machine */
120 typedef enum {
121  BMS_ENTRY, /*!< Substate entry state */
122  BMS_CHECK_ERROR_FLAGS_INTERLOCK, /*!< Substate check measurements after interlock closed */
123  BMS_INTERLOCK_CHECKED, /*!< Substate interlocked checked */
124  BMS_CHECK_STATE_REQUESTS, /*!< Substate check if there is a state request */
125  BMS_CHECK_BALANCING_REQUESTS, /*!< Substate check if there is a balancing request */
126  BMS_CHECK_ERROR_FLAGS, /*!< Substate check if any error flag set */
127  BMS_CHECK_CONTACTOR_NORMAL_STATE, /*!< Substate in precharge, check if there contactors reached normal */
128  BMS_CHECK_CONTACTOR_CHARGE_STATE, /*!< Substate in precharge, check if there contactors reached normal */
152 
153 /** State requests for the BMS statemachine */
154 typedef enum {
155  BMS_STATE_INIT_REQUEST, /*!< request for initialization */
156  BMS_STATE_ERROR_REQUEST, /*!< request for ERROR state */
157  BMS_STATE_NO_REQUEST, /*!< dummy request for no request */
159 
160 /**
161  * Possible return values when state requests are made to the BMS statemachine
162  */
163 typedef enum {
164  BMS_OK, /*!< request was successful */
165  BMS_REQUEST_PENDING, /*!< error: another request is currently processed */
166  BMS_ILLEGAL_REQUEST, /*!< error: request can not be executed */
167  BMS_ALREADY_INITIALIZED, /*!< error: BMS statemachine already initialized */
169 
170 /** Power path type (discharge or charge) */
171 typedef enum {
172  BMS_POWER_PATH_OPEN, /* contactors open */
173  BMS_POWER_PATH_0, /* power path */
174  BMS_POWER_PATH_1, /* second power path */
176 
177 /**
178  * This structure contains all the variables relevant for the CONT state
179  * machine. The user can get the current state of the CONT state machine with
180  * this variable
181  */
182 typedef struct {
183  uint16_t timer; /*!< time in ms before the state machine processes the next state, e.g. in counts of 1ms */
184  BMS_STATE_REQUEST_e stateRequest; /*!< current state request made to the state machine */
185  BMS_STATEMACH_e state; /*!< current state of State Machine */
186  BMS_STATEMACH_SUB_e substate; /*!< current substate of the state machine */
187  BMS_STATEMACH_e laststate; /*!< previous state of the state machine */
188  BMS_STATEMACH_SUB_e lastsubstate; /*!< previous substate of the state machine */
189  uint32_t ErrRequestCounter; /*!< counts the number of illegal requests to the LTC state machine */
190  STD_RETURN_TYPE_e initFinished; /*!< #STD_OK if the initialization has passed, #STD_NOT_OK otherwise */
191  uint8_t triggerentry; /*!< counter for re-entrance protection (function running flag) */
192  uint8_t counter; /*!< general purpose counter */
193  BMS_CURRENT_FLOW_STATE_e currentFlowState; /*!< state of battery system */
194  uint32_t restTimer_10ms; /*!< timer until battery system is at rest */
195  uint16_t OscillationTimeout; /*!< timeout to prevent oscillation of contactors */
196  uint8_t PrechargeTryCounter; /*!< timeout to prevent oscillation of contactors */
197  BMS_POWER_PATH_TYPE_e powerPath; /*!< power path type (discharge or charge) */
198  uint8_t numberOfClosedStrings; /*!< number of closed strings */
199  uint16_t stringOpenTimeout; /*!< timeout to abort if string opening takes too long */
200  uint32_t nextstringclosedtimer; /*!< timer to wait if the next string was closed */
201  uint16_t stringCloseTimeout; /*!< timeout to abort if a string takes too long to close */
202  BMS_STATEMACH_e nextstate; /*!< next state of the State Machine */
203  uint8_t firstClosedString; /*!< strings with highest or lowest voltage, that was closed first */
204  uint16_t prechargeOpenTimeout; /*!< timeout to abort if string opening takes too long */
205  uint16_t prechargeCloseTimeout; /*!< timeout to abort if a string takes too long to close */
206  uint32_t remainingDelay_ms; /*!< time until statemachine should switch to error state */
207  uint32_t minimumActiveDelay_ms; /*!< minimum delay time of all active fatal errors */
208  bool transitionToErrorState; /*!< flag if fatal error has been detected and delay is active */
209  uint8_t closedPrechargeContactors[BS_NR_OF_STRINGS]; /*!< strings whose precharge contactors are closed */
210  uint8_t closedStrings[BS_NR_OF_STRINGS]; /*!< strings whose contactors are closed */
211  uint8_t deactivatedStrings[BS_NR_OF_STRINGS]; /*!< Deactivated strings after error detection, cannot be closed */
212 } BMS_STATE_s;
213 
214 /*========== Extern Constant and Variable Declarations ======================*/
215 
216 /*========== Extern Function Prototypes =====================================*/
217 /**
218  * @brief sets the current state request of the state variable bms_state.
219  * @details This function is used to make a state request to the state machine,
220  * e.g, start voltage measurement, read result of voltage measurement,
221  * re-initialization.
222  * It calls #BMS_CheckStateRequest() to check if the request is valid.
223  * The state request is rejected if is not valid. The result of the
224  * check is returned immediately, so that the requester can act in
225  * case it made a non-valid state request.
226  * @param statereq state request to set
227  * @return current state request
228  */
230 
231 /**
232  * @brief Returns the current state.
233  * @details This function is used in the functioning of the SYS state machine.
234  * @return current state, taken from BMS_STATEMACH_e
235  */
236 extern BMS_STATEMACH_e BMS_GetState(void);
237 
238 /**
239  * @brief Gets the initialization state.
240  * @details This function is used for getting the BMS initialization state.
241  * @return #STD_OK if initialized, otherwise #STD_NOT_OK
242  */
244 
245 /**
246  * @brief trigger function for the SYS driver state machine.
247  * @details This function contains the sequence of events in the SYS state
248  * machine. It must be called time-triggered, every 10 milliseconds.
249  */
250 extern void BMS_Trigger(void);
251 
252 /**
253  * @brief Returns current battery system state (charging/discharging,
254  * resting or in relaxation phase)
255  *
256  * @return #BMS_CURRENT_FLOW_STATE_e
257  */
259 
260 /**
261  * @brief Get current flow direction, current value as function parameter
262  * @param[in] current_mA current that is flowing
263  * @return #BMS_DISCHARGING or #BMS_CHARGING depending on current direction.
264  * Return #BMS_AT_REST. ((type: #BMS_CURRENT_FLOW_STATE_e)
265  */
266 extern BMS_CURRENT_FLOW_STATE_e BMS_GetCurrentFlowDirection(int32_t current_mA);
267 
268 /**
269  * @brief Returns string state (closed or open)
270  * @param[in] stringNumber string addressed
271  * @return false if string is open, true if string is closed
272  */
273 extern bool BMS_IsStringClosed(uint8_t stringNumber);
274 
275 /**
276  * @brief Returns if string is currently precharging or not
277  * @param[in] stringNumber string addressed
278  * @return false if precharge contactor is open, true if closed and string is
279  * precharging
280  */
281 extern bool BMS_IsStringPrecharging(uint8_t stringNumber);
282 
283 /**
284  * @brief Returns number of connected strings
285  * @return Returns number of connected strings
286  */
287 extern uint8_t BMS_GetNumberOfConnectedStrings(void);
288 
289 /**
290  * @brief Check if transition in to error state is active
291  * @return True, if transition into error state is ongoing, otherwise false
292  */
293 extern bool BMS_IsTransitionToErrorStateActive(void);
294 
295 /*========== Externalized Static Functions Prototypes (Unit Test) ===========*/
296 #ifdef UNITY_UNIT_TEST
297 /* database.h is only included in bms.c and there used as function parameter
298  * for static functions. Thus, we need to add the required include here. */
299 #include "database.h"
300 
303 extern uint8_t TEST_BMS_CheckReEntrance(void);
304 extern uint8_t TEST_BMS_CheckCanRequests(void);
306 extern bool TEST_BMS_IsAnyFatalErrorFlagSet(void);
307 extern void TEST_BMS_GetMeasurementValues(void);
308 extern void TEST_BMS_CheckOpenSenseWire(void);
309 extern STD_RETURN_TYPE_e TEST_BMS_CheckPrecharge(uint8_t stringNumber, DATA_BLOCK_PACK_VALUES_s *pPackValues);
310 extern uint8_t TEST_BMS_GetHighestString(BMS_CONSIDER_PRECHARGE_e precharge, DATA_BLOCK_PACK_VALUES_s *pPackValues);
311 extern uint8_t TEST_BMS_GetClosestString(BMS_CONSIDER_PRECHARGE_e precharge, DATA_BLOCK_PACK_VALUES_s *pPackValues);
312 extern uint8_t TEST_BMS_GetLowestString(BMS_CONSIDER_PRECHARGE_e precharge, DATA_BLOCK_PACK_VALUES_s *pPackValues);
313 extern int32_t TEST_BMS_GetStringVoltageDifference(uint8_t string, DATA_BLOCK_PACK_VALUES_s *pPackValues);
315 extern void TEST_BMS_UpdateBatsysState(DATA_BLOCK_PACK_VALUES_s *pPackValues);
316 #endif
317 
318 #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:1365
void TEST_BMS_CheckOpenSenseWire(void)
Definition: bms.c:1352
uint8_t TEST_BMS_GetClosestString(BMS_CONSIDER_PRECHARGE_e precharge, DATA_BLOCK_PACK_VALUES_s *pPackValues)
Definition: bms.c:1361
BMS_CANSTATE_e
Definition: bms.h:105
@ BMS_CANSTATE_UNINITIALIZED
Definition: bms.h:107
@ BMS_CANSTATE_INITIALIZED
Definition: bms.h:109
@ BMS_CANSTATE_NORMAL
Definition: bms.h:114
@ BMS_CANSTATE_CHARGE
Definition: bms.h:115
@ BMS_CANSTATE_STANDBY
Definition: bms.h:112
@ BMS_CANSTATE_ERROR
Definition: bms.h:116
@ BMS_CANSTATE_OPENCONTACTORS
Definition: bms.h:111
@ BMS_CANSTATE_INITIALIZATION
Definition: bms.h:108
@ BMS_CANSTATE_IDLE
Definition: bms.h:110
@ BMS_CANSTATE_PRECHARGE
Definition: bms.h:113
BMS_RETURN_TYPE_e TEST_BMS_CheckStateRequest(BMS_STATE_REQUEST_e statereq)
Definition: bms.c:1331
BMS_CHECK_e
Definition: bms.h:74
@ BMS_CHECK_OK
Definition: bms.h:75
@ BMS_CHECK_NOT_OK
Definition: bms.h:77
@ BMS_CHECK_BUSY
Definition: bms.h:76
bool BMS_IsStringPrecharging(uint8_t stringNumber)
Returns if string is currently precharging or not.
Definition: bms.c:1312
bool BMS_IsTransitionToErrorStateActive(void)
Check if transition in to error state is active.
Definition: bms.c:1325
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:635
BMS_STATE_REQUEST_e TEST_BMS_TransferStateRequest(void)
Definition: bms.c:1334
STD_RETURN_TYPE_e TEST_BMS_CheckPrecharge(uint8_t stringNumber, DATA_BLOCK_PACK_VALUES_s *pPackValues)
Definition: bms.c:1355
int32_t TEST_BMS_GetStringVoltageDifference(uint8_t string, DATA_BLOCK_PACK_VALUES_s *pPackValues)
Definition: bms.c:1368
uint8_t TEST_BMS_CheckCanRequests(void)
Definition: bms.c:1340
BMS_CONSIDER_PRECHARGE_e
Definition: bms.h:81
@ BMS_DO_NOT_TAKE_PRECHARGE_INTO_ACCCOUNT
Definition: bms.h:82
@ BMS_TAKE_PRECHARGE_INTO_ACCCOUNT
Definition: bms.h:83
BMS_STATE_REQUEST_e
Definition: bms.h:154
@ BMS_STATE_NO_REQUEST
Definition: bms.h:157
@ BMS_STATE_INIT_REQUEST
Definition: bms.h:155
@ BMS_STATE_ERROR_REQUEST
Definition: bms.h:156
uint8_t TEST_BMS_CheckReEntrance(void)
Definition: bms.c:1337
void TEST_BMS_GetMeasurementValues(void)
Definition: bms.c:1349
void BMS_Trigger(void)
trigger function for the SYS driver state machine.
Definition: bms.c:649
uint8_t BMS_GetNumberOfConnectedStrings(void)
Returns number of connected strings.
Definition: bms.c:1321
BMS_STATEMACH_SUB_e
Definition: bms.h:120
@ BMS_CHECK_ALL_PRECHARGES_OPEN
Definition: bms.h:146
@ BMS_CHECK_ERROR_FLAGS_PRECHARGE
Definition: bms.h:138
@ BMS_PRECHARGE_OPEN_PRECHARGE
Definition: bms.h:132
@ BMS_CHECK_STRING_OPEN
Definition: bms.h:149
@ BMS_OPEN_STRINGS_EXIT
Definition: bms.h:150
@ BMS_PRECHARGE_CLOSE_PRECHARGE
Definition: bms.h:130
@ BMS_NORMAL_CLOSE_NEXT_STRING
Definition: bms.h:144
@ BMS_CHECK_ERROR_FLAGS_PRECHARGE_CLOSINGSTRINGS
Definition: bms.h:142
@ BMS_ENTRY
Definition: bms.h:121
@ BMS_OPEN_SECOND_CONTACTOR_MINUS
Definition: bms.h:134
@ BMS_INTERLOCK_CHECKED
Definition: bms.h:123
@ BMS_OPEN_STRINGS
Definition: bms.h:148
@ BMS_CHECK_ERROR_FLAGS_PRECHARGE_FIRST_STRING
Definition: bms.h:139
@ BMS_OPEN_STRINGS_ENTRY
Definition: bms.h:147
@ BMS_CHECK_BALANCING_REQUESTS
Definition: bms.h:125
@ BMS_CHECK_ERROR_FLAGS_CLOSINGPRECHARGE
Definition: bms.h:143
@ BMS_PRECHARGE_CHECK_VOLTAGES
Definition: bms.h:131
@ BMS_PRECHARGE_CLOSE_MINUS
Definition: bms.h:129
@ BMS_CHECK_STRING_CLOSED
Definition: bms.h:141
@ BMS_CHECK_ERROR_FLAGS
Definition: bms.h:126
@ BMS_OPEN_ALL_PRECHARGES
Definition: bms.h:145
@ BMS_OPEN_FIRST_CONTACTOR
Definition: bms.h:133
@ BMS_CHECK_CONTACTOR_CHARGE_STATE
Definition: bms.h:128
@ BMS_CHECK_ERROR_FLAGS_INTERLOCK
Definition: bms.h:122
@ BMS_CHECK_STATE_REQUESTS
Definition: bms.h:124
@ BMS_CLOSE_FIRST_STRING_PRECHARGE_STATE
Definition: bms.h:136
@ BMS_CHECK_CONTACTOR_NORMAL_STATE
Definition: bms.h:127
@ BMS_PRECHARGE_CLOSE_NEXT_STRING
Definition: bms.h:140
@ BMS_OPEN_SECOND_CONTACTOR_PLUS
Definition: bms.h:135
@ BMS_CHECK_CLOSE_FIRST_STRING_PRECHARGE_STATE
Definition: bms.h:137
bool BMS_IsStringClosed(uint8_t stringNumber)
Returns string state (closed or open)
Definition: bms.c:1303
BMS_CURRENT_FLOW_STATE_e BMS_GetCurrentFlowDirection(int32_t current_mA)
Get current flow direction, current value as function parameter.
Definition: bms.c:1279
STD_RETURN_TYPE_e TEST_BMS_IsBatterySystemStateOkay(void)
Definition: bms.c:1346
BMS_POWER_PATH_TYPE_e
Definition: bms.h:171
@ BMS_POWER_PATH_1
Definition: bms.h:174
@ BMS_POWER_PATH_OPEN
Definition: bms.h:172
@ BMS_POWER_PATH_0
Definition: bms.h:173
BMS_CURRENT_FLOW_STATE_e BMS_GetBatterySystemState(void)
Returns current battery system state (charging/discharging, resting or in relaxation phase)
Definition: bms.c:1275
int32_t TEST_BMS_GetAverageStringCurrent(DATA_BLOCK_PACK_VALUES_s *pPackValues)
Definition: bms.c:1371
bool TEST_BMS_IsAnyFatalErrorFlagSet(void)
Definition: bms.c:1343
BMS_STATEMACH_e
Definition: bms.h:87
@ BMS_STATEMACH_RESERVED1
Definition: bms.h:101
@ BMS_STATEMACH_PRECHARGE
Definition: bms.h:95
@ BMS_STATEMACH_STANDBY
Definition: bms.h:94
@ BMS_STATEMACH_CHARGE
Definition: bms.h:98
@ BMS_STATEMACH_UNDEFINED
Definition: bms.h:100
@ BMS_STATEMACH_OPENCONTACTORS
Definition: bms.h:93
@ BMS_STATEMACH_UNINITIALIZED
Definition: bms.h:89
@ BMS_STATEMACH_ERROR
Definition: bms.h:99
@ BMS_STATEMACH_NORMAL
Definition: bms.h:96
@ BMS_STATEMACH_INITIALIZATION
Definition: bms.h:90
@ BMS_STATEMACH_DISCHARGE
Definition: bms.h:97
@ BMS_STATEMACH_INITIALIZED
Definition: bms.h:91
@ BMS_STATEMACH_IDLE
Definition: bms.h:92
BMS_CURRENT_FLOW_STATE_e
Definition: bms.h:66
@ BMS_AT_REST
Definition: bms.h:70
@ BMS_DISCHARGING
Definition: bms.h:68
@ BMS_CHARGING
Definition: bms.h:67
@ BMS_RELAXATION
Definition: bms.h:69
void TEST_BMS_UpdateBatsysState(DATA_BLOCK_PACK_VALUES_s *pPackValues)
Definition: bms.c:1374
BMS_RETURN_TYPE_e
Definition: bms.h:163
@ BMS_OK
Definition: bms.h:164
@ BMS_REQUEST_PENDING
Definition: bms.h:165
@ BMS_ALREADY_INITIALIZED
Definition: bms.h:167
@ BMS_ILLEGAL_REQUEST
Definition: bms.h:166
STD_RETURN_TYPE_e BMS_GetInitializationState(void)
Gets the initialization state.
Definition: bms.c:627
BMS_STATEMACH_e BMS_GetState(void)
Returns the current state.
Definition: bms.c:631
uint8_t TEST_BMS_GetHighestString(BMS_CONSIDER_PRECHARGE_e precharge, DATA_BLOCK_PACK_VALUES_s *pPackValues)
Definition: bms.c:1358
bms driver configuration header
Database module header.
STD_RETURN_TYPE_e
Definition: fstd_types.h:81
uint32_t restTimer_10ms
Definition: bms.h:194
uint8_t PrechargeTryCounter
Definition: bms.h:196
uint8_t counter
Definition: bms.h:192
bool transitionToErrorState
Definition: bms.h:208
uint16_t timer
Definition: bms.h:183
uint16_t prechargeOpenTimeout
Definition: bms.h:204
BMS_CURRENT_FLOW_STATE_e currentFlowState
Definition: bms.h:193
BMS_STATEMACH_SUB_e lastsubstate
Definition: bms.h:188
uint8_t triggerentry
Definition: bms.h:191
STD_RETURN_TYPE_e initFinished
Definition: bms.h:190
BMS_STATEMACH_e nextstate
Definition: bms.h:202
uint16_t prechargeCloseTimeout
Definition: bms.h:205
uint8_t firstClosedString
Definition: bms.h:203
uint32_t nextstringclosedtimer
Definition: bms.h:200
BMS_STATEMACH_e laststate
Definition: bms.h:187
BMS_STATE_REQUEST_e stateRequest
Definition: bms.h:184
uint32_t ErrRequestCounter
Definition: bms.h:189
uint32_t minimumActiveDelay_ms
Definition: bms.h:207
uint8_t numberOfClosedStrings
Definition: bms.h:198
BMS_STATEMACH_e state
Definition: bms.h:185
uint16_t stringCloseTimeout
Definition: bms.h:201
BMS_STATEMACH_SUB_e substate
Definition: bms.h:186
uint16_t stringOpenTimeout
Definition: bms.h:199
BMS_POWER_PATH_TYPE_e powerPath
Definition: bms.h:197
uint32_t remainingDelay_ms
Definition: bms.h:206
uint16_t OscillationTimeout
Definition: bms.h:195