foxBMS  1.1.2
The foxBMS Battery Management System API Documentation
bms.h
Go to the documentation of this file.
1 /**
2  *
3  * @copyright © 2010 - 2021, 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 2021-07-29 (date of last update)
47  * @ingroup ENGINE
48  * @prefix BMS
49  *
50  * @brief bms driver header
51  *
52  *
53  */
54 
55 #ifndef FOXBMS__BMS_H_
56 #define FOXBMS__BMS_H_
57 
58 /*========== Includes =======================================================*/
59 #include "battery_system_cfg.h"
60 #include "bms_cfg.h"
61 
62 /*========== Macros and Definitions =========================================*/
63 
64 /** Symbolic names for battery system state */
65 typedef enum BMS_CURRENT_FLOW_STATE {
66  BMS_CHARGING, /*!< battery is charged */
67  BMS_DISCHARGING, /*!< battery is discharged */
68  BMS_RELAXATION, /*!< battery relaxation ongoing */
69  BMS_AT_REST, /*!< battery is resting */
71 
72 /** Symbolic names for busyness of the syscontrol */
73 typedef enum BMS_CHECK {
74  BMS_CHECK_OK, /*!< syscontrol ok */
75  BMS_CHECK_BUSY, /*!< syscontrol busy */
76  BMS_CHECK_NOT_OK, /*!< syscontrol not ok */
78 
79 /** Symbolic names to take precharge into account or not */
80 typedef enum BMS_CONSIDER_PRECHARGE {
81  BMS_DO_NOT_TAKE_PRECHARGE_INTO_ACCCOUNT, /*!< do not take precharge into account */
82  BMS_TAKE_PRECHARGE_INTO_ACCCOUNT, /*!< do take precharge into account */
84 
85 /** States of the SYS state machine */
86 typedef enum BMS_STATEMACH {
87  /* Init-Sequence */
102 
103 /** CAN states of the BMS state machine */
104 typedef enum BMS_CANSTATE {
105  /* Init-Sequence */
117 
118 /** Substates of the SYS state machine */
119 typedef enum BMS_STATEMACH_SUB {
120  BMS_ENTRY, /*!< Substate entry state */
121  BMS_CHECK_ERROR_FLAGS_INTERLOCK, /*!< Substate check measurements after interlock closed */
122  BMS_INTERLOCK_CHECKED, /*!< Substate interlocked checked */
123  BMS_CHECK_STATE_REQUESTS, /*!< Substate check if there is a state request */
124  BMS_CHECK_BALANCING_REQUESTS, /*!< Substate check if there is a balancing request */
125  BMS_CHECK_ERROR_FLAGS, /*!< Substate check if any error flag set */
126  BMS_CHECK_CONTACTOR_NORMAL_STATE, /*!< Substate in precharge, check if there contactors reached normal */
127  BMS_CHECK_CONTACTOR_CHARGE_STATE, /*!< Substate in precharge, check if there contactors reached normal */
128  BMS_OPEN_INTERLOCK, /*!< Substate in error to open interlock after contactors have been opened */
129  BMS_CHECK_INTERLOCK_CLOSE_AFTER_ERROR, /*!< Substate in error to close interlock after all error flags were reset */
153 
154 /** State requests for the BMS statemachine */
155 typedef enum BMS_STATE_REQUEST {
156  BMS_STATE_INIT_REQUEST, /*!< request for initialization */
157  BMS_STATE_ERROR_REQUEST, /*!< request for ERROR state */
158  BMS_STATE_NO_REQUEST, /*!< dummy request for no request */
160 
161 /**
162  * Possible return values when state requests are made to the SYS statemachine
163  */
164 typedef enum BMS_RETURN_TYPE {
165  BMS_OK, /*!< CONT --> ok */
166  BMS_BUSY_OK, /*!< CONT under load --> ok */
167  BMS_REQUEST_PENDING, /*!< requested to be executed */
168  BMS_ILLEGAL_REQUEST, /*!< Request can not be executed */
169  BMS_ALREADY_INITIALIZED, /*!< Initialization of LTC already finished */
170  BMS_ILLEGAL_TASK_TYPE, /*!< Illegal */
172 
173 /** Power path type (discharge or charge) */
174 typedef enum BMS_POWER_PATH_TYPE {
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 BMS_STATE {
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 statemachine should switch to error state */
210  uint32_t minimumActiveDelay_ms; /*!< minimum delay time of all active fatal errors */
211  bool transitionToErrorState; /*!< flag if fatal error has been detected and delay is active */
212  uint8_t closedPrechargeContactors[BS_NR_OF_STRINGS]; /*!< strings whose precharge contactors are closed */
213  uint8_t closedStrings[BS_NR_OF_STRINGS]; /*!< strings whose contactors are closed */
214  uint8_t deactivatedStrings[BS_NR_OF_STRINGS]; /*!< Deactivated strings after error detection, cannot be closed */
216 
217 /*========== Extern Constant and Variable Declarations ======================*/
218 
219 /*========== Extern Function Prototypes =====================================*/
220 /**
221  * @brief sets the current state request of the state variable bms_state.
222  * @details This function is used to make a state request to the state machine,
223  * e.g, start voltage measurement, read result of voltage measurement,
224  * re-initialization.
225  * It calls #BMS_CheckStateRequest() to check if the request is valid.
226  * The state request is rejected if is not valid. The result of the
227  * check is returned immediately, so that the requester can act in
228  * case it made a non-valid state request.
229  * @param statereq state request to set
230  * @return current state request
231  */
233 
234 /**
235  * @brief Returns the current state.
236  * @details This function is used in the functioning of the SYS state machine.
237  * @return current state, taken from BMS_STATEMACH_e
238  */
239 extern BMS_STATEMACH_e BMS_GetState(void);
240 
241 /**
242  * @brief Gets the initialization state.
243  * @details This function is used for getting the BMS initialization state.
244  * @return #STD_OK if initialized, otherwise #STD_NOT_OK
245  */
247 
248 /**
249  * @brief trigger function for the SYS driver state machine.
250  * @details This function contains the sequence of events in the SYS state
251  * machine. It must be called time-triggered, every 10 milliseconds.
252  */
253 extern void BMS_Trigger(void);
254 
255 /**
256  * @brief Returns current battery system state (charging/discharging,
257  * resting or in relaxation phase)
258  *
259  * @return #BMS_CURRENT_FLOW_STATE_e
260  */
262 
263 /**
264  * @brief Get current flow direction, current value as function parameter
265  * @param[in] current_mA current that is flowing
266  * @return #BMS_DISCHARGING or #BMS_CHARGING depending on current direction.
267  * Return #BMS_AT_REST. ((type: #BMS_CURRENT_FLOW_STATE_e)
268  */
269 extern BMS_CURRENT_FLOW_STATE_e BMS_GetCurrentFlowDirection(int32_t current_mA);
270 
271 /**
272  * @brief Returns string state (closed or open)
273  * @param[in] stringNumber string addressed
274  * @return false if string is open, true if string is closed
275  */
276 extern bool BMS_IsStringClosed(uint8_t stringNumber);
277 
278 /**
279  * @brief Returns if string is currently precharging or not
280  * @param[in] stringNumber string addressed
281  * @return false if precharge contactor is open, true if closed and string is
282  * precharging
283  */
284 extern bool BMS_IsStringPrecharging(uint8_t stringNumber);
285 
286 /**
287  * @brief Returns number of connected strings
288  * @return Returns number of connected strings
289  */
290 extern uint8_t BMS_GetNumberOfConnectedStrings(void);
291 
292 /**
293  * @brief Check if transition in to error state is active
294  * @return True, if transition into error state is ongoing, otherwise false
295  */
296 extern bool BMS_IsTransitionToErrorStateActive(void);
297 
298 /*========== Externalized Static Functions Prototypes (Unit Test) ===========*/
299 #ifdef UNITY_UNIT_TEST
300 /* database.h is only included in bms.c and there used as function parameter
301  * for static functions. Thus, we need to add the required include here. */
302 #include "database.h"
303 
304 extern BMS_RETURN_TYPE_e TEST_BMS_CheckStateRequest(BMS_STATE_REQUEST_e statereq);
305 extern BMS_STATE_REQUEST_e TEST_BMS_TransferStateRequest(void);
306 extern uint8_t TEST_BMS_CheckReEntrance(void);
307 extern uint8_t TEST_BMS_CheckCanRequests(void);
308 extern STD_RETURN_TYPE_e TEST_BMS_IsBatterySystemStateOkay(void);
309 extern bool TEST_BMS_IsAnyFatalErrorFlagSet(void);
310 extern void TEST_BMS_GetMeasurementValues(void);
311 extern void TEST_BMS_CheckOpenSenseWire(void);
312 extern STD_RETURN_TYPE_e TEST_BMS_CheckPrecharge(uint8_t stringNumber, DATA_BLOCK_PACK_VALUES_s *pPackValues);
313 extern uint8_t TEST_BMS_GetHighestString(BMS_CONSIDER_PRECHARGE_e precharge, DATA_BLOCK_PACK_VALUES_s *pPackValues);
314 extern uint8_t TEST_BMS_GetClosestString(BMS_CONSIDER_PRECHARGE_e precharge, DATA_BLOCK_PACK_VALUES_s *pPackValues);
315 extern uint8_t TEST_BMS_GetLowestString(BMS_CONSIDER_PRECHARGE_e precharge, DATA_BLOCK_PACK_VALUES_s *pPackValues);
316 extern int32_t TEST_BMS_GetStringVoltageDifference(uint8_t string, DATA_BLOCK_PACK_VALUES_s *pPackValues);
317 extern int32_t TEST_BMS_GetAverageStringCurrent(DATA_BLOCK_PACK_VALUES_s *pPackValues);
318 extern void TEST_BMS_UpdateBatsysState(DATA_BLOCK_PACK_VALUES_s *pPackValues);
319 #endif
320 
321 #endif /* FOXBMS__BMS_H_ */
Configuration of the battery system (e.g., number of battery modules, battery cells,...
#define BS_NR_OF_STRINGS
BMS_CURRENT_FLOW_STATE
Definition: bms.h:65
@ BMS_AT_REST
Definition: bms.h:69
@ BMS_DISCHARGING
Definition: bms.h:67
@ BMS_CHARGING
Definition: bms.h:66
@ BMS_RELAXATION
Definition: bms.h:68
BMS_CANSTATE
Definition: bms.h:104
@ BMS_CANSTATE_UNINITIALIZED
Definition: bms.h:106
@ BMS_CANSTATE_INITIALIZED
Definition: bms.h:108
@ BMS_CANSTATE_NORMAL
Definition: bms.h:113
@ BMS_CANSTATE_CHARGE
Definition: bms.h:114
@ BMS_CANSTATE_STANDBY
Definition: bms.h:111
@ BMS_CANSTATE_ERROR
Definition: bms.h:115
@ BMS_CANSTATE_OPENCONTACTORS
Definition: bms.h:110
@ BMS_CANSTATE_INITIALIZATION
Definition: bms.h:107
@ BMS_CANSTATE_IDLE
Definition: bms.h:109
@ BMS_CANSTATE_PRECHARGE
Definition: bms.h:112
enum BMS_POWER_PATH_TYPE BMS_POWER_PATH_TYPE_e
bool BMS_IsStringPrecharging(uint8_t stringNumber)
Returns if string is currently precharging or not.
Definition: bms.c:1308
enum BMS_CHECK BMS_CHECK_e
bool BMS_IsTransitionToErrorStateActive(void)
Check if transition in to error state is active.
Definition: bms.c:1321
enum BMS_RETURN_TYPE BMS_RETURN_TYPE_e
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:633
BMS_RETURN_TYPE
Definition: bms.h:164
@ BMS_OK
Definition: bms.h:165
@ BMS_REQUEST_PENDING
Definition: bms.h:167
@ BMS_ALREADY_INITIALIZED
Definition: bms.h:169
@ BMS_BUSY_OK
Definition: bms.h:166
@ BMS_ILLEGAL_REQUEST
Definition: bms.h:168
@ BMS_ILLEGAL_TASK_TYPE
Definition: bms.h:170
enum BMS_STATE_REQUEST BMS_STATE_REQUEST_e
enum BMS_STATEMACH BMS_STATEMACH_e
BMS_POWER_PATH_TYPE
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_CHECK
Definition: bms.h:73
@ BMS_CHECK_OK
Definition: bms.h:74
@ BMS_CHECK_NOT_OK
Definition: bms.h:76
@ BMS_CHECK_BUSY
Definition: bms.h:75
enum BMS_CURRENT_FLOW_STATE BMS_CURRENT_FLOW_STATE_e
enum BMS_CANSTATE BMS_CANSTATE_e
struct BMS_STATE BMS_STATE_s
void BMS_Trigger(void)
trigger function for the SYS driver state machine.
Definition: bms.c:647
uint8_t BMS_GetNumberOfConnectedStrings(void)
Returns number of connected strings.
Definition: bms.c:1317
enum BMS_STATEMACH_SUB BMS_STATEMACH_SUB_e
bool BMS_IsStringClosed(uint8_t stringNumber)
Returns string state (closed or open)
Definition: bms.c:1299
BMS_STATE_REQUEST
Definition: bms.h:155
@ BMS_STATE_NO_REQUEST
Definition: bms.h:158
@ BMS_STATE_INIT_REQUEST
Definition: bms.h:156
@ BMS_STATE_ERROR_REQUEST
Definition: bms.h:157
BMS_CURRENT_FLOW_STATE_e BMS_GetCurrentFlowDirection(int32_t current_mA)
Get current flow direction, current value as function parameter.
Definition: bms.c:1276
BMS_CURRENT_FLOW_STATE_e BMS_GetBatterySystemState(void)
Returns current battery system state (charging/discharging, resting or in relaxation phase)
Definition: bms.c:1272
BMS_CONSIDER_PRECHARGE
Definition: bms.h:80
@ BMS_DO_NOT_TAKE_PRECHARGE_INTO_ACCCOUNT
Definition: bms.h:81
@ BMS_TAKE_PRECHARGE_INTO_ACCCOUNT
Definition: bms.h:82
BMS_STATEMACH_SUB
Definition: bms.h:119
@ BMS_CHECK_ALL_PRECHARGES_OPEN
Definition: bms.h:147
@ BMS_CHECK_ERROR_FLAGS_PRECHARGE
Definition: bms.h:139
@ BMS_PRECHARGE_OPEN_PRECHARGE
Definition: bms.h:133
@ BMS_CHECK_STRING_OPEN
Definition: bms.h:150
@ BMS_OPEN_STRINGS_EXIT
Definition: bms.h:151
@ BMS_PRECHARGE_CLOSE_PRECHARGE
Definition: bms.h:131
@ BMS_NORMAL_CLOSE_NEXT_STRING
Definition: bms.h:145
@ BMS_CHECK_ERROR_FLAGS_PRECHARGE_CLOSINGSTRINGS
Definition: bms.h:143
@ BMS_ENTRY
Definition: bms.h:120
@ BMS_OPEN_SECOND_CONTACTOR_MINUS
Definition: bms.h:135
@ BMS_INTERLOCK_CHECKED
Definition: bms.h:122
@ BMS_OPEN_STRINGS
Definition: bms.h:149
@ BMS_CHECK_ERROR_FLAGS_PRECHARGE_FIRST_STRING
Definition: bms.h:140
@ BMS_OPEN_STRINGS_ENTRY
Definition: bms.h:148
@ BMS_CHECK_BALANCING_REQUESTS
Definition: bms.h:124
@ BMS_CHECK_ERROR_FLAGS_CLOSINGPRECHARGE
Definition: bms.h:144
@ BMS_CHECK_INTERLOCK_CLOSE_AFTER_ERROR
Definition: bms.h:129
@ BMS_PRECHARGE_CHECK_VOLTAGES
Definition: bms.h:132
@ BMS_PRECHARGE_CLOSE_MINUS
Definition: bms.h:130
@ BMS_CHECK_STRING_CLOSED
Definition: bms.h:142
@ BMS_CHECK_ERROR_FLAGS
Definition: bms.h:125
@ BMS_OPEN_ALL_PRECHARGES
Definition: bms.h:146
@ BMS_OPEN_FIRST_CONTACTOR
Definition: bms.h:134
@ BMS_CHECK_CONTACTOR_CHARGE_STATE
Definition: bms.h:127
@ BMS_CHECK_ERROR_FLAGS_INTERLOCK
Definition: bms.h:121
@ BMS_OPEN_INTERLOCK
Definition: bms.h:128
@ BMS_CHECK_STATE_REQUESTS
Definition: bms.h:123
@ BMS_CLOSE_FIRST_STRING_PRECHARGE_STATE
Definition: bms.h:137
@ BMS_CHECK_CONTACTOR_NORMAL_STATE
Definition: bms.h:126
@ BMS_PRECHARGE_CLOSE_NEXT_STRING
Definition: bms.h:141
@ BMS_OPEN_SECOND_CONTACTOR_PLUS
Definition: bms.h:136
@ BMS_CHECK_CLOSE_FIRST_STRING_PRECHARGE_STATE
Definition: bms.h:138
enum BMS_CONSIDER_PRECHARGE BMS_CONSIDER_PRECHARGE_e
BMS_STATEMACH
Definition: bms.h:86
@ BMS_STATEMACH_RESERVED1
Definition: bms.h:100
@ BMS_STATEMACH_PRECHARGE
Definition: bms.h:94
@ BMS_STATEMACH_STANDBY
Definition: bms.h:93
@ BMS_STATEMACH_CHARGE
Definition: bms.h:97
@ BMS_STATEMACH_UNDEFINED
Definition: bms.h:99
@ BMS_STATEMACH_OPENCONTACTORS
Definition: bms.h:92
@ BMS_STATEMACH_UNINITIALIZED
Definition: bms.h:88
@ BMS_STATEMACH_ERROR
Definition: bms.h:98
@ BMS_STATEMACH_NORMAL
Definition: bms.h:95
@ BMS_STATEMACH_INITIALIZATION
Definition: bms.h:89
@ BMS_STATEMACH_DISCHARGE
Definition: bms.h:96
@ BMS_STATEMACH_INITIALIZED
Definition: bms.h:90
@ BMS_STATEMACH_IDLE
Definition: bms.h:91
STD_RETURN_TYPE_e BMS_GetInitializationState(void)
Gets the initialization state.
Definition: bms.c:625
BMS_STATEMACH_e BMS_GetState(void)
Returns the current state.
Definition: bms.c:629
bms driver configuration header
Database module header.
enum STD_RETURN_TYPE STD_RETURN_TYPE_e
Definition: bms.h:185
uint8_t deactivatedStrings[BS_NR_OF_STRINGS]
Definition: bms.h:214
BMS_STATEMACH_e nextstate
Definition: bms.h:205
BMS_STATEMACH_e state
Definition: bms.h:188
uint8_t numberOfClosedStrings
Definition: bms.h:201
BMS_STATEMACH_e laststate
Definition: bms.h:190
uint16_t stringCloseTimeout
Definition: bms.h:204
BMS_STATE_REQUEST_e stateRequest
Definition: bms.h:187
uint8_t firstClosedString
Definition: bms.h:206
uint32_t minimumActiveDelay_ms
Definition: bms.h:210
BMS_POWER_PATH_TYPE_e powerPath
Definition: bms.h:200
uint8_t PrechargeTryCounter
Definition: bms.h:199
uint16_t OscillationTimeout
Definition: bms.h:198
uint8_t counter
Definition: bms.h:195
BMS_STATEMACH_SUB_e substate
Definition: bms.h:189
uint8_t triggerentry
Definition: bms.h:194
uint16_t prechargeOpenTimeout
Definition: bms.h:207
uint16_t prechargeCloseTimeout
Definition: bms.h:208
STD_RETURN_TYPE_e initFinished
Definition: bms.h:193
uint16_t timer
Definition: bms.h:186
uint32_t ErrRequestCounter
Definition: bms.h:192
uint32_t nextstringclosedtimer
Definition: bms.h:203
uint8_t closedStrings[BS_NR_OF_STRINGS]
Definition: bms.h:213
BMS_STATEMACH_SUB_e lastsubstate
Definition: bms.h:191
uint16_t stringOpenTimeout
Definition: bms.h:202
uint32_t restTimer_10ms
Definition: bms.h:197
bool transitionToErrorState
Definition: bms.h:211
uint32_t remainingDelay_ms
Definition: bms.h:209
uint8_t closedPrechargeContactors[BS_NR_OF_STRINGS]
Definition: bms.h:212
BMS_CURRENT_FLOW_STATE_e currentFlowState
Definition: bms.h:196