foxBMS-UnitTests  1.0.0
The foxBMS Unit Tests API Documentation
database_cfg.h
Go to the documentation of this file.
1 /**
2  *
3  * @copyright © 2010 - 2021, Fraunhofer-Gesellschaft zur Foerderung der
4  * angewandten Forschung e.V. All rights reserved.
5  *
6  * BSD 3-Clause License
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are met:
9  * 1. Redistributions of source code must retain the above copyright notice,
10  * this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the distribution.
14  * 3. Neither the name of the copyright holder nor the names of its
15  * contributors may be used to endorse or promote products derived from
16  * this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28  * POSSIBILITY OF SUCH DAMAGE.
29  *
30  * We kindly request you to use one or more of the following phrases to refer
31  * to foxBMS in your hardware, software, documentation or advertising
32  * materials:
33  *
34  * ″This product uses parts of foxBMS®″
35  *
36  * ″This product includes parts of foxBMS®″
37  *
38  * ″This product is derived from foxBMS®″
39  *
40  */
41 
42 /**
43  * @file database_cfg.h
44  * @author foxBMS Team
45  * @date 2015-08-18 (date of creation)
46  * @updated 2019-11-12 (date of last update)
47  * @ingroup ENGINE_CONFIGURATION
48  * @prefix DATA
49  *
50  * @brief Database configuration header
51  *
52  * Provides interfaces to database configuration
53  *
54  */
55 
56 #ifndef FOXBMS__DATABASE_CFG_H_
57 #define FOXBMS__DATABASE_CFG_H_
58 
59 /*========== Includes =======================================================*/
60 #include "general.h"
61 
62 #include "battery_system_cfg.h"
63 
64 /*========== Macros and Definitions =========================================*/
65 /** configuration struct of database channel (data block) */
66 typedef struct DATA_BASE {
67  void *pDatabaseEntry; /*!< pointer to the database entry */
68  uint16_t datalength; /*!< length of the entry */
70 
71 /** data block identification numbers */
72 typedef enum DATA_BLOCK_ID {
104  DATA_BLOCK_ID_MAX, /**< DO NOT CHANGE, MUST BE THE LAST ENTRY */
106 
107 /** data block header */
108 typedef struct DATA_BLOCKHEADER {
109  DATA_BLOCK_ID_e uniqueId; /*!< uniqueId of database entry */
110  uint32_t timestamp; /*!< timestamp of last database update */
111  uint32_t previousTimestamp; /*!< timestamp of previous database update */
113 
114 /** data block struct of cell voltage */
115 typedef struct DATA_BLOCK_CELL_VOLTAGE {
116  /* This struct needs to be at the beginning of every database entry. During
117  * the initialization of a database struct, uniqueId must be set to the
118  * respective database entry representation in enum DATA_BLOCK_ID_e. */
119  DATA_BLOCK_HEADER_s header; /*!< Data block header */
120  uint8_t state; /*!< for future use */
121  int32_t packVoltage_mV[BS_NR_OF_STRINGS]; /*!< uint: mV */
124  [BS_NR_OF_MODULES]; /*!< bitmask if voltages are valid. 0->valid, 1->invalid */
125  uint16_t nrValidCellVoltages[BS_NR_OF_STRINGS]; /*!< number of valid voltages */
127  bool validModuleVoltage[BS_NR_OF_STRINGS][BS_NR_OF_MODULES]; /*!< 0 -> if PEC okay; 1 -> PEC error */
129 
130 /** data block struct of cell temperatures */
132  /* This struct needs to be at the beginning of every database entry. During
133  * the initialization of a database struct, uniqueId must be set to the
134  * respective database entry representation in enum DATA_BLOCK_ID_e. */
135  DATA_BLOCK_HEADER_s header; /*!< Data block header */
136  uint8_t state; /*!< for future use */
137  int16_t cellTemperature_ddegC[BS_NR_OF_STRINGS][BS_NR_OF_TEMP_SENSORS]; /*!< unit: deci &deg;C */
139  [BS_NR_OF_MODULES]; /*!< bitmask if temperatures are valid. 0->valid, 1->invalid */
140  uint16_t nrValidTemperatures[BS_NR_OF_STRINGS]; /*!< number of valid temperatures in each string */
142 
143 /** data block struct of cell temperatures */
145  /* This struct needs to be at the beginning of every database entry. During
146  * the initialization of a database struct, uniqueId must be set to the
147  * respective database entry representation in enum DATA_BLOCK_ID_e. */
148  DATA_BLOCK_HEADER_s header; /*!< Data block header */
149  int16_t temperatureAdc0_ddegC[BS_NR_OF_TEMP_SENSORS_ON_ADC0]; /*!< unit: deci degree celsius */
150  int16_t temperatureAdc1_ddegC[BS_NR_OF_TEMP_SENSORS_ON_ADC1]; /*!< unit: deci degree Celsius */
152  [BS_NR_OF_TEMP_SENSORS_ON_ADC0]; /*!< bitmask if temperatures are valid. 0->valid, 1->invalid */
154  [BS_NR_OF_TEMP_SENSORS_ON_ADC1]; /*!< bitmask if temperatures are valid. 0->valid, 1->invalid */
156 
157 /** data block struct of LTC minimum and maximum values */
158 typedef struct DATA_BLOCK_MIN_MAX {
159  /* This struct needs to be at the beginning of every database entry. During
160  * the initialization of a database struct, uniqueId must be set to the
161  * respective database entry representation in enum DATA_BLOCK_ID_e. */
162  DATA_BLOCK_HEADER_s header; /*!< Data block header */
163 
164  int16_t averageCellVoltage_mV[BS_NR_OF_STRINGS]; /*!< average cell voltages, unit: mV */
165  int16_t minimumCellVoltage_mV[BS_NR_OF_STRINGS]; /*!< minimum cell voltages, unit: mV */
166  int16_t previousMinimumCellVoltage_mV[BS_NR_OF_STRINGS]; /*!< previous minimum cell voltages, unit: mV */
167  int16_t maximumCellVoltage_mV[BS_NR_OF_STRINGS]; /*!< maximum cell voltages, unit: mV */
168  int16_t previousMaximumCellVoltage_mV[BS_NR_OF_STRINGS]; /*!< previous maximum cell voltages, unit: mV */
169 
170  uint16_t nrModuleMinimumCellVoltage[BS_NR_OF_STRINGS]; /*!< number of the module with minimum cell voltage */
171  uint16_t nrCellMinimumCellVoltage[BS_NR_OF_STRINGS]; /*!< number of the cell with minimum cell voltage */
172  uint16_t nrModuleMaximumCellVoltage[BS_NR_OF_STRINGS]; /*!< number of the module with maximum cell voltage */
173  uint16_t nrCellMaximumCellVoltage[BS_NR_OF_STRINGS]; /*!< number of the cell with maximum cell voltage */
174  float averageTemperature_ddegC[BS_NR_OF_STRINGS]; /*!< unit: deci &deg;C */
175  int16_t minimumTemperature_ddegC[BS_NR_OF_STRINGS]; /*!< unit: deci &deg;C */
176  uint16_t nrModuleMinimumTemperature[BS_NR_OF_STRINGS]; /*!< number of the module with minimum temperature */
177  uint16_t nrSensorMinimumTemperature[BS_NR_OF_STRINGS]; /*!< number of the sensor with minimum temperature */
178  int16_t maximumTemperature_ddegC[BS_NR_OF_STRINGS]; /*!< unit: deci &deg;C */
179  uint16_t nrModuleMaximumTemperature[BS_NR_OF_STRINGS]; /*!< number of the module with maximum temperature */
180  uint16_t nrSensorMaximumTemperature[BS_NR_OF_STRINGS]; /*!< number of the sensor with maximum temperature */
181  uint8_t state; /*!< state of the min max module */
183 
184 /** data block struct of pack measurement values */
185 typedef struct DATA_BLOCK_PACK_VALUES {
186  /* This struct needs to be at the beginning of every database entry. During
187  * the initialization of a database struct, uniqueId must be set to the
188  * respective database entry representation in enum DATA_BLOCK_ID_e. */
189  DATA_BLOCK_HEADER_s header; /*!< Data block header */
190 
191  int32_t packCurrent_mA; /*!< current in the whole battery pack, unit: mA */
192  uint8_t invalidPackCurrent; /*!< bitmask if current is valid. 0->valid, 1->invalid */
193  int32_t batteryVoltage_mV; /*!< voltage between negative and positive battery pole, unit: mV */
194  uint8_t invalidBatteryVoltage; /*!< bitmask if voltage is valid. 0->valid, 1->invalid */
195  int32_t
196  highVoltageBusVoltage_mV; /*!< voltage between negative battery pole and after positive main contactor, unit: mV */
197  uint8_t invalidHvBusVoltage; /*!< bitmask if voltage is valid. 0->valid, 1->invalid */
198  int32_t packPower_W; /*!< power provided by respectively supplied to the battery pack, unit: W */
199  uint8_t invalidPackPower; /*!< bitmask if power is valid. 0->valid, 1->invalid */
200  int32_t stringVoltage_mV[BS_NR_OF_STRINGS]; /*!< voltage of each string, unit: mV */
201  uint8_t invalidStringVoltage[BS_NR_OF_STRINGS]; /*!< bitmask if voltages are valid. 0->valid, 1->invalid */
202  int32_t stringCurrent_mA[BS_NR_OF_STRINGS]; /*!< current in each string, unit: mA */
203  uint8_t invalidStringCurrent[BS_NR_OF_STRINGS]; /*!< bitmask if currents are valid. 0->valid, 1->invalid */
204  int32_t stringPower_W[BS_NR_OF_STRINGS]; /*!< power of each string, unit: W */
205  uint8_t invalidStringPower[BS_NR_OF_STRINGS]; /*!< bitmask if power values are valid. 0->valid, 1->invalid */
207 
208 /** data block struct of current measurement */
210  /* This struct needs to be at the beginning of every database entry. During
211  * the initialization of a database struct, uniqueId must be set to the
212  * respective database entry representation in enum DATA_BLOCK_ID_e. */
213  DATA_BLOCK_HEADER_s header; /*!< Data block header */
214  int32_t current_mA[BS_NR_OF_STRINGS]; /*!< unit: mA */
215  uint8_t invalidCurrentMeasurement[BS_NR_OF_STRINGS]; /*!< 0: measurement valid, 1: measurement invalid */
216  uint8_t newCurrent; /*!< 0: measurement valid, 1: measurement invalid */
217  uint32_t previousTimestampCurrent[BS_NR_OF_STRINGS]; /*!< timestamp of current measurement */
218  uint32_t timestampCurrent[BS_NR_OF_STRINGS]; /*!< timestamp of current measurement */
219  int32_t sensorTemperature_ddegC[BS_NR_OF_STRINGS]; /*!< unit: 0.1&deg;C */
220  uint8_t invalidSensorTemperatureMeasurement[BS_NR_OF_STRINGS]; /*!< 0: measurement valid, 1: measurement invalid */
221  int32_t power_W[BS_NR_OF_STRINGS]; /*!< unit: W */
222  uint8_t invalidPowerMeasurement[BS_NR_OF_STRINGS]; /*!< 0: measurement valid, 1: measurement invalid */
223  uint8_t newPower; /*!< counter that indicates a new power measurement */
224  uint32_t previousTimestampPower[BS_NR_OF_STRINGS]; /*!< previous timestamp of power measurement */
225  uint32_t timestampPower[BS_NR_OF_STRINGS]; /*!< timestamp of power measurement */
226  int32_t currentCounter_As[BS_NR_OF_STRINGS]; /*!< unit: A.s */
227  uint8_t invalidCurrentCountingMeasurement[BS_NR_OF_STRINGS]; /*!< 0: measurement valid, 1: measurement invalid */
228  uint32_t previousTimestampCurrentCounting[BS_NR_OF_STRINGS]; /*!< previous timestamp of CC measurement */
229  uint32_t timestampCurrentCounting[BS_NR_OF_STRINGS]; /*!< timestamp of CC measurement */
230  int32_t energyCounter_Wh[BS_NR_OF_STRINGS]; /*!< unit: Wh */
231  uint8_t invalidEnergyCountingMeasurement[BS_NR_OF_STRINGS]; /*!< 0: measurement valid, 1: measurement invalid */
232  uint32_t previousTimestampEnergyCounting[BS_NR_OF_STRINGS]; /*!< previous timestamp of EC measurement */
233  uint32_t timestampEnergyCounting[BS_NR_OF_STRINGS]; /*!< timestamp of EC measurement */
235  [BS_NR_OF_STRINGS][BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR]; /*!< 0: measurement valid, 1: measurement invalid */
239  [BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR]; /*!< previous timestamp of high voltage measurement */
241  [BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR]; /*!< timestamp of high voltage measurement */
243 
244 /** data structure declaration of DATA_BLOCK_BALANCING_CONTROL */
246  /* This struct needs to be at the beginning of every database entry. During
247  * the initialization of a database struct, uniqueId must be set to the
248  * respective database entry representation in enum DATA_BLOCK_ID_e. */
249  DATA_BLOCK_HEADER_s header; /*!< Data block header */
250  uint8_t enableBalancing; /*!< Switch for enabling/disabling balancing */
251  uint8_t threshold_mV; /*!< balancing threshold in mV */
252  uint8_t request; /*!< balancing request per CAN */
253  uint8_t balancingState[BS_NR_OF_STRINGS][BS_NR_OF_BAT_CELLS]; /*!< 0: no balancing, 1: balancing active */
254  uint32_t deltaCharge_mAs[BS_NR_OF_STRINGS][BS_NR_OF_BAT_CELLS]; /*!< Difference in Depth-of-Discharge in mAs */
256 
257 /** data structure declaration of DATA_BLOCK_USER_IO_CONTROL */
258 typedef struct DATA_BLOCK_SLAVE_CONTROL {
259  /* This struct needs to be at the beginning of every database entry. During
260  * the initialization of a database struct, uniqueId must be set to the
261  * respective database entry representation in enum DATA_BLOCK_ID_e. */
262  DATA_BLOCK_HEADER_s header; /*!< Data block header */
263  uint8_t state; /*!< for future use */
264  uint32_t eepromReadAddressToUse; /*!< address to read from for slave EEPROM */
265  uint32_t eepromReadAddressLastUsed; /*!< last address used to read fromfor slave EEPROM */
266  uint32_t eepromWriteAddressToUse; /*!< address to write to for slave EEPROM */
267  uint32_t eepromWriteAddressLastUsed; /*!< last address used to write to for slave EEPROM */
268  uint8_t ioValueOut[BS_NR_OF_MODULES]; /*!< data to be written to the port expander */
269  uint8_t ioValueIn[BS_NR_OF_MODULES]; /*!< data read from to the port expander */
270  uint8_t eepromValueWrite[BS_NR_OF_MODULES]; /*!< data to be written to the slave EEPROM */
271  uint8_t eepromValueRead[BS_NR_OF_MODULES]; /*!< data read from to the slave EEPROM */
272  uint8_t externalTemperatureSensor[BS_NR_OF_MODULES]; /*!< temperature from the external sensor on slave */
274 
275 /** data block struct of cell balancing feedback */
277  /* This struct needs to be at the beginning of every database entry. During
278  * the initialization of a database struct, uniqueId must be set to the
279  * respective database entry representation in enum DATA_BLOCK_ID_e. */
280  DATA_BLOCK_HEADER_s header; /*!< Data block header */
281  uint8_t state; /*!< for future use */
282  uint16_t value[BS_NR_OF_STRINGS][BS_NR_OF_MODULES]; /*!< unit: mV (optocoupler output) */
284 
285 /** data block struct of user multiplexer values */
286 typedef struct DATA_BLOCK_USER_MUX {
287  /* This struct needs to be at the beginning of every database entry. During
288  * the initialization of a database struct, uniqueId must be set to the
289  * respective database entry representation in enum DATA_BLOCK_ID_e. */
290  DATA_BLOCK_HEADER_s header; /*!< Data block header */
291  uint8_t state; /*!< for future use */
292  uint16_t value[BS_NR_OF_STRINGS][8 * 2 * BS_NR_OF_MODULES]; /*!< unit: mV (mux voltage input) */
294 
295 /** data block struct of cell open wire */
296 typedef struct DATA_BLOCK_OPENWIRE {
297  /* This struct needs to be at the beginning of every database entry. During
298  * the initialization of a database struct, uniqueId must be set to the
299  * respective database entry representation in enum DATA_BLOCK_ID_e. */
300  DATA_BLOCK_HEADER_s header; /*!< Data block header */
301  uint8_t state; /*!< for future use */
302  uint16_t nrOpenWires[BS_NR_OF_STRINGS]; /*!< number of open wires */
304  [BS_NR_OF_MODULES * (BS_NR_OF_CELLS_PER_MODULE + 1)]; /*!< 1 -> open wire, 0 -> everything ok */
306 
307 /** data block struct of GPIO voltage */
309  /* This struct needs to be at the beginning of every database entry. During
310  * the initialization of a database struct, uniqueId must be set to the
311  * respective database entry representation in enum DATA_BLOCK_ID_e. */
312  DATA_BLOCK_HEADER_s header; /*!< Data block header */
313  uint8_t state; /*!< for future use */
316  [BS_NR_OF_MODULES]; /*!< bitmask if voltages are valid. 0->valid, 1->invalid */
318 
319 /** data block struct of error flags */
320 typedef struct DATA_BLOCK_ERRORSTATE {
321  /* This struct needs to be at the beginning of every database entry. During
322  * the initialization of a database struct, uniqueId must be set to the
323  * respective database entry representation in enum DATA_BLOCK_ID_e. */
324  DATA_BLOCK_HEADER_s header; /*!< Data block header */
325  uint8_t currentSensor[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error, not responding */
326  uint8_t stringContactor[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error, not responding */
327  uint8_t prechargeContactor[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error, not responding */
328  uint8_t interlock; /*!< 0 -> no error, 1 -> error */
329  uint8_t crcError[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error */
330  uint8_t muxError[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error */
331  uint8_t spiError[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error */
332  uint8_t micConfigurationError[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error */
333  uint8_t micCellvoltageError[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error */
334  uint8_t micCellTemperatureError[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error */
335  uint8_t baseCellVoltageMeasurementTimeout; /*!< 0 -> no error, 1 -> error */
336  uint8_t redundancy0CellVoltageMeasurementTimeout; /*!< 0 -> no error, 1 -> error */
337  uint8_t baseCellTemperatureMeasurementTimeout; /*!< 0 -> no error, 1 -> error */
338  uint8_t redundancy0CellTemperatureMeasurementTimeout; /*!< 0 -> no error, 1 -> error */
339  uint8_t currentMeasurementTimeout[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error */
340  uint8_t currentMeasurementError[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error */
341  uint8_t currentSensorTimeoutV1[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error */
342  uint8_t currentSensorTimeoutV3[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error */
343  uint8_t currentSensorPowerTimeout[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error */
344  uint8_t powerMeasurementError[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error */
345  uint8_t insulationError; /*!< 0 -> no error, 1 -> error */
346  uint8_t fuseStateNormal[BS_NR_OF_STRINGS]; /*!< 0 -> fuse ok, 1 -> fuse tripped */
347  uint8_t fuseStateCharge[BS_NR_OF_STRINGS]; /*!< 0 -> fuse ok, 1 -> fuse tripped */
348  uint8_t open_wire[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error */
349  uint8_t canTiming; /*!< 0 -> no error, 1 -> error */
350  uint8_t canTimingCc[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error */
351  uint8_t canTimingEc[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error */
352  uint8_t mcuDieTemperature; /*!< 0 -> no error, 1 -> error */
353  uint8_t coinCellVoltage; /*!< 0 -> no error, 1 -> error */
354  uint8_t plausibilityCheckPackvoltage[BS_NR_OF_STRINGS]; /*!< 0 -> no error, else: error */
355  uint8_t plausibilityCheckCellvoltage[BS_NR_OF_STRINGS]; /*!< 0 -> no error, else: error */
356  uint8_t plausibilityCheckCellvoltageSpread[BS_NR_OF_STRINGS]; /*!< 0 -> no error, else: error */
357  uint8_t plausibilityCheckCelltemperatureSpread[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error */
358  uint8_t plausibilityCheckCelltemperature[BS_NR_OF_STRINGS]; /*!< 0 -> no error, else: error */
359  uint8_t deepDischargeDetected[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error */
360  uint8_t currentOnOpenString[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error */
361  uint8_t sbcFinState; /*!< 0 -> okay, 1 -> error: short-circuit to RSTB */
362  uint8_t sbcRstbState; /*!< 0 -> okay, 1 -> error: RSTB not working */
364 
365 /** data block struct of contactor feedback */
366 typedef struct DATA_BLOCK_CONTFEEDBACK {
367  /* This struct needs to be at the beginning of every database entry. During
368  * the initialization of a database struct, uniqueId must be set to the
369  * respective database entry representation in enum DATA_BLOCK_ID_e. */
370  DATA_BLOCK_HEADER_s header; /*!< Data block header */
371  uint32_t contactorFeedback; /*!< feedback of all contactors, without interlock */
373 
374 /** data block struct of interlock feedback */
376  /* This struct needs to be at the beginning of every database entry. During
377  * the initialization of a database struct, uniqueId must be set to the
378  * respective database entry representation in enum DATA_BLOCK_ID_e. */
379  DATA_BLOCK_HEADER_s header; /*!< Data block header */
380  uint8_t interlockFeedback; /*!< feedback of interlock, without contactors */
382 
383 /** data block struct of sof limits */
384 typedef struct DATA_BLOCK_SOF {
385  /* This struct needs to be at the beginning of every database entry. During
386  * the initialization of a database struct, uniqueId must be set to the
387  * respective database entry representation in enum DATA_BLOCK_ID_e. */
388  DATA_BLOCK_HEADER_s header; /*!< Data block header */
389  float recommendedContinuousPackChargeCurrent_mA; /*!< recommended continuous operating pack charge current */
390  float recommendedContinuousPackDischargeCurrent_mA; /*!< recommended continuous operating pack discharge current */
391  float recommendedPeakPackChargeCurrent_mA; /*!< recommended peak operating pack charge current */
392  float recommendedPeakPackDischargeCurrent_mA; /*!< recommended peak operating pack discharge current */
394  [BS_NR_OF_STRINGS]; /*!< recommended continuous operating charge current */
396  [BS_NR_OF_STRINGS]; /*!< recommended continuous operating discharge current */
397  float recommendedPeakChargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< recommended peak operating charge current */
398  float recommendedPeakDischargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< recommended peak operating discharge current */
399  float continuousMolChargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< charge current maximum operating level */
400  float continuousMolDischargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< discharge current maximum operating level */
401  float peakMolChargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< charge current maximum operating level */
402  float peakMolDischargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< discharge current maximum operating level */
403  float continuousRslChargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< charge current recommended safety level */
404  float continuousRslDischargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< discharge current recommended safety level */
405  float peakRslChargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< charge current recommended safety level */
406  float peakRslDischargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< discharge current recommended safety level */
407  float continuousMslChargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< charge current maximum safety level */
408  float continuousMslDischargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< discharge current maximum safety level */
409  float peakMslChargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< charge current maximum safety level */
410  float peakMslDischargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< discharge current maximum safety level */
412 
413 /** data block struct of system state */
414 typedef struct {
415  /* This struct needs to be at the beginning of every database entry. During
416  * the initialization of a database struct, uniqueId must be set to the
417  * respective database entry representation in enum DATA_BLOCK_ID_e. */
418  DATA_BLOCK_HEADER_s header; /*!< Data block header */
419  int32_t bmsCanState; /*!< system state for CAN messages (e.g., standby, normal) */
421 
422 /** data block struct of the maximum safe limits */
423 typedef struct DATA_BLOCK_MSL_FLAG {
424  /* This struct needs to be at the beginning of every database entry. During
425  * the initialization of a database struct, uniqueId must be set to the
426  * respective database entry representation in enum DATA_BLOCK_ID_e. */
427  DATA_BLOCK_HEADER_s header; /*!< Data block header */
428  uint8_t packChargeOvercurrent; /*!< 0 -> MSL NOT violated, 1 -> MSL violated */
429  uint8_t packDischargeOvercurrent; /*!< 0 -> MSL NOT violated, 1 -> MSL violated */
430  uint8_t overVoltage[BS_NR_OF_STRINGS]; /*!< 0 -> MSL NOT violated, 1 -> MSL violated */
431  uint8_t underVoltage[BS_NR_OF_STRINGS]; /*!< 0 -> MSL NOT violated, 1 -> MSL violated */
432  uint8_t overtemperatureCharge[BS_NR_OF_STRINGS]; /*!< 0 -> MSL NOT violated, 1 -> MSL violated */
433  uint8_t overtemperatureDischarge[BS_NR_OF_STRINGS]; /*!< 0 -> MSL NOT violated, 1 -> MSL violated */
434  uint8_t undertemperatureCharge[BS_NR_OF_STRINGS]; /*!< 0 -> MSL NOT violated, 1 -> MSL violated */
435  uint8_t undertemperatureDischarge[BS_NR_OF_STRINGS]; /*!< 0 -> MSL NOT violated, 1 -> MSL violated */
436  uint8_t cellChargeOvercurrent[BS_NR_OF_STRINGS]; /*!< 0 -> MSL NOT violated, 1 -> MSL violated */
437  uint8_t stringChargeOvercurrent[BS_NR_OF_STRINGS]; /*!< 0 -> MSL NOT violated, 1 -> MSL violated */
438  uint8_t cellDischargeOvercurrent[BS_NR_OF_STRINGS]; /*!< 0 -> MSL NOT violated, 1 -> MSL violated */
439  uint8_t stringDischargeOvercurrent[BS_NR_OF_STRINGS]; /*!< 0 -> MSL NOT violated, 1 -> MSL violated */
440  uint8_t pcbOvertemperature[BS_NR_OF_STRINGS]; /*!< 0 -> MSL NOT violated, 1 -> MSL violated */
441  uint8_t pcbUndertemperature[BS_NR_OF_STRINGS]; /*!< 0 -> MSL NOT violated, 1 -> MSL violated */
443 
444 /** data block struct of the recommended safety limit */
445 typedef struct DATA_BLOCK_RSL_FLAG {
446  /* This struct needs to be at the beginning of every database entry. During
447  * the initialization of a database struct, uniqueId must be set to the
448  * respective database entry representation in enum DATA_BLOCK_ID_e. */
449  DATA_BLOCK_HEADER_s header; /*!< Data block header */
450  uint8_t overVoltage[BS_NR_OF_STRINGS]; /*!< 0 -> RSL NOT violated, 1 -> RSL violated */
451  uint8_t underVoltage[BS_NR_OF_STRINGS]; /*!< 0 -> RSL NOT violated, 1 -> RSL violated */
452  uint8_t overtemperatureCharge[BS_NR_OF_STRINGS]; /*!< 0 -> RSL NOT violated, 1 -> RSL violated */
453  uint8_t overtemperatureDischarge[BS_NR_OF_STRINGS]; /*!< 0 -> RSL NOT violated, 1 -> RSL violated */
454  uint8_t undertemperatureCharge[BS_NR_OF_STRINGS]; /*!< 0 -> RSL NOT violated, 1 -> RSL violated */
455  uint8_t undertemperatureDischarge[BS_NR_OF_STRINGS]; /*!< 0 -> RSL NOT violated, 1 -> RSL violated */
456  uint8_t cellChargeOvercurrent[BS_NR_OF_STRINGS]; /*!< 0 -> RSL NOT violated, 1 -> RSL violated */
457  uint8_t stringChargeOvercurrent[BS_NR_OF_STRINGS]; /*!< 0 -> RSL NOT violated, 1 -> RSL violated */
458  uint8_t cellDischargeOvercurrent[BS_NR_OF_STRINGS]; /*!< 0 -> RSL NOT violated, 1 -> RSL violated */
459  uint8_t stringDischargeOvercurrent[BS_NR_OF_STRINGS]; /*!< 0 -> RSL NOT violated, 1 -> RSL violated */
460  uint8_t pcbOvertemperature[BS_NR_OF_STRINGS]; /*!< 0 -> RSL NOT violated, 1 -> RSL violated */
461  uint8_t pcbUndertemperature[BS_NR_OF_STRINGS]; /*!< 0 -> RSL NOT violated, 1 -> RSL violated */
463 
464 /** data block struct of the maximum operating limit */
465 typedef struct DATA_BLOCK_MOL_FLAG {
466  /* This struct needs to be at the beginning of every database entry. During
467  * the initialization of a database struct, uniqueId must be set to the
468  * respective database entry representation in enum DATA_BLOCK_ID_e. */
469  DATA_BLOCK_HEADER_s header; /*!< Data block header */
470  uint8_t overVoltage[BS_NR_OF_STRINGS]; /*!< 0 -> MOL NOT violated, 1 -> MOL violated */
471  uint8_t underVoltage[BS_NR_OF_STRINGS]; /*!< 0 -> MOL NOT violated, 1 -> MOL violated */
472  uint8_t overtemperatureCharge[BS_NR_OF_STRINGS]; /*!< 0 -> MOL NOT violated, 1 -> MOL violated */
473  uint8_t overtemperatureDischarge[BS_NR_OF_STRINGS]; /*!< 0 -> MOL NOT violated, 1 -> MOL violated */
474  uint8_t undertemperatureCharge[BS_NR_OF_STRINGS]; /*!< 0 -> MOL NOT violated, 1 -> MOL violated */
475  uint8_t undertemperatureDischarge[BS_NR_OF_STRINGS]; /*!< 0 -> MOL NOT violated, 1 -> MOL violated */
476  uint8_t cellChargeOvercurrent[BS_NR_OF_STRINGS]; /*!< 0 -> MOL NOT violated, 1 -> MOL violated */
477  uint8_t stringChargeOvercurrent[BS_NR_OF_STRINGS]; /*!< 0 -> MOL NOT violated, 1 -> MOL violated */
478  uint8_t cellDischargeOvercurrent[BS_NR_OF_STRINGS]; /*!< 0 -> MOL NOT violated, 1 -> MOL violated */
479  uint8_t stringDischargeOvercurrent[BS_NR_OF_STRINGS]; /*!< 0 -> MOL NOT violated, 1 -> MOL violated */
480  uint8_t pcbOvertemperature[BS_NR_OF_STRINGS]; /*!< 0 -> MOL NOT violated, 1 -> MOL violated */
481  uint8_t pcbUndertemperature[BS_NR_OF_STRINGS]; /*!< 0 -> MOL NOT violated, 1 -> MOL violated */
483 
484 /** data block struct of sox */
485 typedef struct DATA_BLOCK_SOX {
486  /* This struct needs to be at the beginning of every database entry. During
487  * the initialization of a database struct, uniqueId must be set to the
488  * respective database entry representation in enum DATA_BLOCK_ID_e. */
489  DATA_BLOCK_HEADER_s header; /*!< Data block header */
490  float averageSoc_perc[BS_NR_OF_STRINGS]; /*!< 0.0 <= averageSoc <= 100.0 */
491  float minimumSoc_perc[BS_NR_OF_STRINGS]; /*!< 0.0 <= minSoc <= 100.0 */
492  float maximumSoc_perc[BS_NR_OF_STRINGS]; /*!< 0.0 <= maxSoc <= 100.0 */
493  float averageSoe_perc[BS_NR_OF_STRINGS]; /*!< 0.0 <= averageSoe <= 100.0 */
494  float minimumSoe_perc[BS_NR_OF_STRINGS]; /*!< 0.0 <= minimumSoe <= 100.0 */
495  float maximumSoe_perc[BS_NR_OF_STRINGS]; /*!< 0.0 <= maximumSoe <= 100.0 */
496  uint32_t maximumSoe_Wh[BS_NR_OF_STRINGS]; /*!< maximum string energy in Wh */
497  uint32_t averageSoe_Wh[BS_NR_OF_STRINGS]; /*!< average string energy in Wh */
498  uint32_t minimumSoe_Wh[BS_NR_OF_STRINGS]; /*!< minimum string energy in Wh */
500 
501 /** data block struct of can state request */
502 typedef struct DATA_BLOCK_STATEREQUEST {
503  /* This struct needs to be at the beginning of every database entry. During
504  * the initialization of a database struct, uniqueId must be set to the
505  * respective database entry representation in enum DATA_BLOCK_ID_e. */
506  DATA_BLOCK_HEADER_s header; /*!< Data block header */
507  uint8_t stateRequestViaCan; /*!< state request */
508  uint8_t previousStateRequestViaCan; /*!< previous state request */
509  uint8_t stateRequestViaCanPending; /*!< pending state request */
510  uint8_t state; /*!< state */
512 
513 /** data block struct of the moving average algorithm */
514 typedef struct {
515  /* This struct needs to be at the beginning of every database entry. During
516  * the initialization of a database struct, uniqueId must be set to the
517  * respective database entry representation in enum DATA_BLOCK_ID_e. */
518  DATA_BLOCK_HEADER_s header; /*!< Data block header */
519  float movingAverageCurrent1sInterval_mA; /*!< current moving average over the last 1s */
520  float movingAverageCurrent5sInterval_mA; /*!< current moving average over the last 5s */
521  float movingAverageCurrent10sInterval_mA; /*!< current moving average over the last 10s */
522  float movingAverageCurrent30sInterval_mA; /*!< current moving average over the last 30s */
523  float movingAverageCurrent60sInterval_mA; /*!< current moving average over the last 60s */
524  float movingAverageCurrentConfigurableInterval_mA; /*!< current moving average over the last configured time */
525  float movingAveragePower1sInterval_mA; /*!< power moving average over the last 1s */
526  float movingAveragePower5sInterval_mA; /*!< power moving average over the last 5s */
527  float movingAveragePower10sInterval_mA; /*!< power moving average over the last 10s */
528  float movingAveragePower30sInterval_mA; /*!< power moving average over the last 30s */
529  float movingAveragePower60sInterval_mA; /*!< power moving average over the last 60s */
530  float movingAveragePowerConfigurableInterval_mA; /*!< power moving average over the last configured time */
532 
533 /** data block struct of insulation monitoring device measurement */
535  /* This struct needs to be at the beginning of every database entry. During
536  * the initialization of a database struct, uniqueId must be set to the
537  * respective database entry representation in enum DATA_BLOCK_ID_e. */
538  DATA_BLOCK_HEADER_s header; /*!< Data block header */
539  uint8_t valid; /*!< 0 -> valid, 1 -> resistance unreliable */
540  uint8_t state; /*!< 0 -> ok , 1 -> resistance too low/error */
541  uint32_t insulationResistance_kOhm; /*!< insulation resistance measured in kOhm */
542  uint8_t insulationFault; /*!< 0 = no error, 1 = error */
543  uint8_t insulationWarning; /*!< 0 = no warning, 1 = warning */
544  uint8_t chassisFault; /*!< 0 = no error, 1 = error */
545  uint8_t systemFailure; /*!< 0 = no error, 1 = error */
546  uint8_t calibrationRunning; /*!< 0 = not running, 1 = running */
547  uint8_t selfTestRunning; /*!< 0 = not running, 1 = running */
548  uint8_t insulationMeasurements; /*!< 0 = Active, 1 = Inactive */
549  uint8_t aliveStatusDetection; /*!< 0 = Ok, 1 = Failure */
550  uint8_t outdatedInsulationResistanceValue; /*!< 0 = Valid, 1 = Outdated */
551  uint8_t testImcOverAll; /*!< 0 = NotRunning, 1 = Running */
552  uint8_t testImcParameterConfiguration; /*!< 0 = NotWarning, 1 = Warning */
554 
555 /** array for the database */
557 
558 /*========== Extern Constant and Variable Declarations ======================*/
559 
560 /*========== Extern Function Prototypes =====================================*/
561 
562 /*========== Externalized Static Functions Prototypes (Unit Test) ===========*/
563 
564 #endif /* FOXBMS__DATABASE_CFG_H_ */
DATA_BLOCK_ADC_TEMPERATURE::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:148
DATA_BLOCK_MIN_MAX::nrModuleMinimumTemperature
uint16_t nrModuleMinimumTemperature[BS_NR_OF_STRINGS]
Definition: database_cfg.h:176
DATA_BLOCK_MSL_FLAG_s
struct DATA_BLOCK_MSL_FLAG DATA_BLOCK_MSL_FLAG_s
DATA_BLOCK_MOVING_AVERAGE_s::movingAveragePower10sInterval_mA
float movingAveragePower10sInterval_mA
Definition: database_cfg.h:527
DATA_BLOCK_CONTFEEDBACK::contactorFeedback
uint32_t contactorFeedback
Definition: database_cfg.h:371
DATA_BLOCK_MOL_FLAG
Definition: database_cfg.h:465
DATA_BLOCK_INSULATION_MONITORING_s
struct DATA_BLOCK_INSULATION_MONITORING DATA_BLOCK_INSULATION_MONITORING_s
DATA_BLOCK_SOF::recommendedContinuousPackDischargeCurrent_mA
float recommendedContinuousPackDischargeCurrent_mA
Definition: database_cfg.h:390
DATA_BLOCK_ID_BALANCING_FEEDBACK_REDUNDANCY0
@ DATA_BLOCK_ID_BALANCING_FEEDBACK_REDUNDANCY0
Definition: database_cfg.h:98
DATA_BLOCK_CELL_TEMPERATURE::nrValidTemperatures
uint16_t nrValidTemperatures[BS_NR_OF_STRINGS]
Definition: database_cfg.h:140
DATA_BLOCK_PACK_VALUES::highVoltageBusVoltage_mV
int32_t highVoltageBusVoltage_mV
Definition: database_cfg.h:196
DATA_BLOCK_INTERLOCK_FEEDBACK::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:379
DATA_BLOCK_ERRORSTATE::crcError
uint8_t crcError[BS_NR_OF_STRINGS]
Definition: database_cfg.h:329
DATA_BLOCK_ERRORSTATE::sbcFinState
uint8_t sbcFinState
Definition: database_cfg.h:361
DATA_BLOCK_MSL_FLAG::pcbOvertemperature
uint8_t pcbOvertemperature[BS_NR_OF_STRINGS]
Definition: database_cfg.h:440
BS_NR_OF_BAT_CELLS
#define BS_NR_OF_BAT_CELLS
Definition: battery_system_cfg.h:156
DATA_BLOCK_CURRENT_SENSOR
Definition: database_cfg.h:209
DATA_BLOCK_ERRORSTATE::plausibilityCheckPackvoltage
uint8_t plausibilityCheckPackvoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:354
DATA_BLOCK_ERRORSTATE::insulationError
uint8_t insulationError
Definition: database_cfg.h:345
DATA_BLOCK_ID_PACK_VALUES
@ DATA_BLOCK_ID_PACK_VALUES
Definition: database_cfg.h:103
BS_NR_OF_TEMP_SENSORS_ON_ADC0
#define BS_NR_OF_TEMP_SENSORS_ON_ADC0
Definition: battery_system_cfg.h:161
DATA_BLOCK_MSL_FLAG::packDischargeOvercurrent
uint8_t packDischargeOvercurrent
Definition: database_cfg.h:429
general.h
TODO.
DATA_BLOCK_MSL_FLAG::stringDischargeOvercurrent
uint8_t stringDischargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:439
DATA_BLOCK_RSL_FLAG::pcbUndertemperature
uint8_t pcbUndertemperature[BS_NR_OF_STRINGS]
Definition: database_cfg.h:461
DATA_BLOCK_OPENWIRE
Definition: database_cfg.h:296
DATA_BLOCK_MOL_FLAG::underVoltage
uint8_t underVoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:471
DATA_BLOCK_MIN_MAX::nrSensorMinimumTemperature
uint16_t nrSensorMinimumTemperature[BS_NR_OF_STRINGS]
Definition: database_cfg.h:177
DATA_BLOCK_INTERLOCK_FEEDBACK_s
struct DATA_BLOCK_INTERLOCK_FEEDBACK DATA_BLOCK_INTERLOCK_FEEDBACK_s
DATA_BLOCK_MOVING_AVERAGE_s
Definition: database_cfg.h:514
DATA_BLOCK_MOVING_AVERAGE_s::movingAveragePowerConfigurableInterval_mA
float movingAveragePowerConfigurableInterval_mA
Definition: database_cfg.h:530
DATA_BLOCK_ID_OPEN_WIRE_REDUNDANCY0
@ DATA_BLOCK_ID_OPEN_WIRE_REDUNDANCY0
Definition: database_cfg.h:100
BS_NR_OF_TEMP_SENSORS
#define BS_NR_OF_TEMP_SENSORS
Definition: battery_system_cfg.h:158
DATA_BLOCK_SLAVE_CONTROL::ioValueIn
uint8_t ioValueIn[BS_NR_OF_MODULES]
Definition: database_cfg.h:269
DATA_BLOCK_SLAVE_CONTROL::eepromValueWrite
uint8_t eepromValueWrite[BS_NR_OF_MODULES]
Definition: database_cfg.h:270
DATA_BLOCK_MIN_MAX::maximumTemperature_ddegC
int16_t maximumTemperature_ddegC[BS_NR_OF_STRINGS]
Definition: database_cfg.h:178
DATA_BLOCK_ERRORSTATE::plausibilityCheckCelltemperature
uint8_t plausibilityCheckCelltemperature[BS_NR_OF_STRINGS]
Definition: database_cfg.h:358
DATA_BLOCK_ERRORSTATE::baseCellVoltageMeasurementTimeout
uint8_t baseCellVoltageMeasurementTimeout
Definition: database_cfg.h:335
DATA_BLOCK_ID_MOL_FLAG
@ DATA_BLOCK_ID_MOL_FLAG
Definition: database_cfg.h:90
DATA_BLOCK_MIN_MAX::nrModuleMaximumTemperature
uint16_t nrModuleMaximumTemperature[BS_NR_OF_STRINGS]
Definition: database_cfg.h:179
DATA_BASE
Definition: database_cfg.h:66
BS_NR_OF_MODULES
#define BS_NR_OF_MODULES
number of modules in battery pack
Definition: battery_system_cfg.h:96
DATA_BLOCK_ID_BALANCING_FEEDBACK_BASE
@ DATA_BLOCK_ID_BALANCING_FEEDBACK_BASE
Definition: database_cfg.h:79
DATA_BLOCK_INSULATION_MONITORING::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:538
DATA_BLOCK_BALANCING_CONTROL::enableBalancing
uint8_t enableBalancing
Definition: database_cfg.h:250
DATA_BLOCK_ID_CELL_TEMPERATURE_BASE
@ DATA_BLOCK_ID_CELL_TEMPERATURE_BASE
Definition: database_cfg.h:95
DATA_BLOCK_SOF::continuousRslChargeCurrent_mA
float continuousRslChargeCurrent_mA[BS_NR_OF_STRINGS]
Definition: database_cfg.h:403
DATA_BLOCK_STATEREQUEST::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:506
DATA_BLOCK_MIN_MAX::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:162
DATA_BLOCK_MIN_MAX::nrModuleMinimumCellVoltage
uint16_t nrModuleMinimumCellVoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:170
DATA_BLOCK_ID_OPEN_WIRE_BASE
@ DATA_BLOCK_ID_OPEN_WIRE_BASE
Definition: database_cfg.h:81
DATA_BLOCK_SOF::continuousMolChargeCurrent_mA
float continuousMolChargeCurrent_mA[BS_NR_OF_STRINGS]
Definition: database_cfg.h:399
DATA_BLOCK_SLAVE_CONTROL::eepromWriteAddressToUse
uint32_t eepromWriteAddressToUse
Definition: database_cfg.h:266
DATA_BLOCK_MIN_MAX::nrSensorMaximumTemperature
uint16_t nrSensorMaximumTemperature[BS_NR_OF_STRINGS]
Definition: database_cfg.h:180
DATA_BLOCK_ID_MSL_FLAG
@ DATA_BLOCK_ID_MSL_FLAG
Definition: database_cfg.h:88
DATA_BLOCK_CURRENT_SENSOR::invalidCurrentCountingMeasurement
uint8_t invalidCurrentCountingMeasurement[BS_NR_OF_STRINGS]
Definition: database_cfg.h:227
DATA_BLOCK_PACK_VALUES::batteryVoltage_mV
int32_t batteryVoltage_mV
Definition: database_cfg.h:193
DATA_BLOCK_MIN_MAX::state
uint8_t state
Definition: database_cfg.h:181
DATA_BLOCK_ADC_TEMPERATURE::temperatureAdc0_ddegC
int16_t temperatureAdc0_ddegC[BS_NR_OF_TEMP_SENSORS_ON_ADC0]
Definition: database_cfg.h:149
DATA_BLOCK_SLAVE_CONTROL::state
uint8_t state
Definition: database_cfg.h:263
DATA_BLOCK_CELL_VOLTAGE::moduleVoltage_mV
uint32_t moduleVoltage_mV[BS_NR_OF_STRINGS][BS_NR_OF_MODULES]
Definition: database_cfg.h:126
DATA_BLOCK_USER_MUX::state
uint8_t state
Definition: database_cfg.h:291
DATA_BLOCK_USER_MUX_s
struct DATA_BLOCK_USER_MUX DATA_BLOCK_USER_MUX_s
DATA_BLOCK_RSL_FLAG::pcbOvertemperature
uint8_t pcbOvertemperature[BS_NR_OF_STRINGS]
Definition: database_cfg.h:460
DATA_BLOCK_SOF::continuousMolDischargeCurrent_mA
float continuousMolDischargeCurrent_mA[BS_NR_OF_STRINGS]
Definition: database_cfg.h:400
DATA_BLOCK_ERRORSTATE::currentMeasurementError
uint8_t currentMeasurementError[BS_NR_OF_STRINGS]
Definition: database_cfg.h:340
DATA_BLOCK_CURRENT_SENSOR::invalidPowerMeasurement
uint8_t invalidPowerMeasurement[BS_NR_OF_STRINGS]
Definition: database_cfg.h:222
DATA_BLOCK_ERRORSTATE::micCellvoltageError
uint8_t micCellvoltageError[BS_NR_OF_STRINGS]
Definition: database_cfg.h:333
DATA_BLOCK_ID_MOVING_AVERAGE
@ DATA_BLOCK_ID_MOVING_AVERAGE
Definition: database_cfg.h:93
DATA_BLOCK_PACK_VALUES::invalidStringCurrent
uint8_t invalidStringCurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:203
DATA_BLOCK_ERRORSTATE::micCellTemperatureError
uint8_t micCellTemperatureError[BS_NR_OF_STRINGS]
Definition: database_cfg.h:334
DATA_BLOCK_MIN_MAX::nrCellMinimumCellVoltage
uint16_t nrCellMinimumCellVoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:171
DATA_BLOCK_PACK_VALUES::invalidStringVoltage
uint8_t invalidStringVoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:201
DATA_BLOCK_SOF::recommendedContinuousPackChargeCurrent_mA
float recommendedContinuousPackChargeCurrent_mA
Definition: database_cfg.h:389
DATA_BLOCK_SOF::continuousRslDischargeCurrent_mA
float continuousRslDischargeCurrent_mA[BS_NR_OF_STRINGS]
Definition: database_cfg.h:404
DATA_BLOCK_ERRORSTATE::currentSensor
uint8_t currentSensor[BS_NR_OF_STRINGS]
Definition: database_cfg.h:325
DATA_BLOCK_SLAVE_CONTROL::eepromValueRead
uint8_t eepromValueRead[BS_NR_OF_MODULES]
Definition: database_cfg.h:271
DATA_BLOCK_ALL_GPIO_VOLTAGES::gpioVoltages_mV
uint16_t gpioVoltages_mV[BS_NR_OF_STRINGS][BS_NR_OF_MODULES *BS_NR_OF_GPIOS_PER_MODULE]
Definition: database_cfg.h:314
DATA_BLOCK_STATEREQUEST::stateRequestViaCan
uint8_t stateRequestViaCan
Definition: database_cfg.h:507
DATA_BLOCK_PACK_VALUES::invalidBatteryVoltage
uint8_t invalidBatteryVoltage
Definition: database_cfg.h:194
DATA_BLOCK_SLAVE_CONTROL
Definition: database_cfg.h:258
DATA_BLOCK_CURRENT_SENSOR::previousTimestampEnergyCounting
uint32_t previousTimestampEnergyCounting[BS_NR_OF_STRINGS]
Definition: database_cfg.h:232
DATA_BLOCK_SOF_s
struct DATA_BLOCK_SOF DATA_BLOCK_SOF_s
DATA_BLOCK_RSL_FLAG::stringChargeOvercurrent
uint8_t stringChargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:457
DATA_BLOCK_MOL_FLAG::pcbUndertemperature
uint8_t pcbUndertemperature[BS_NR_OF_STRINGS]
Definition: database_cfg.h:481
DATA_BLOCK_CONTFEEDBACK::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:370
DATA_BLOCK_ADC_TEMPERATURE
Definition: database_cfg.h:144
DATA_BLOCK_ERRORSTATE::currentMeasurementTimeout
uint8_t currentMeasurementTimeout[BS_NR_OF_STRINGS]
Definition: database_cfg.h:339
DATA_BLOCK_ERRORSTATE::fuseStateCharge
uint8_t fuseStateCharge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:347
DATA_BLOCK_CELL_VOLTAGE::packVoltage_mV
int32_t packVoltage_mV[BS_NR_OF_STRINGS]
Definition: database_cfg.h:121
DATA_BLOCK_PACK_VALUES::invalidPackCurrent
uint8_t invalidPackCurrent
Definition: database_cfg.h:192
DATA_BLOCK_CELL_TEMPERATURE::state
uint8_t state
Definition: database_cfg.h:136
DATA_BLOCK_MOL_FLAG::overtemperatureDischarge
uint8_t overtemperatureDischarge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:473
DATA_BLOCK_MOL_FLAG::cellChargeOvercurrent
uint8_t cellChargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:476
DATA_BLOCK_MOVING_AVERAGE_s::movingAverageCurrent30sInterval_mA
float movingAverageCurrent30sInterval_mA
Definition: database_cfg.h:522
DATA_BLOCK_ERRORSTATE::prechargeContactor
uint8_t prechargeContactor[BS_NR_OF_STRINGS]
Definition: database_cfg.h:327
DATA_BLOCK_SLAVE_CONTROL::eepromWriteAddressLastUsed
uint32_t eepromWriteAddressLastUsed
Definition: database_cfg.h:267
DATA_BLOCK_CURRENT_SENSOR::previousTimestampCurrentCounting
uint32_t previousTimestampCurrentCounting[BS_NR_OF_STRINGS]
Definition: database_cfg.h:228
DATA_BLOCK_SOX::maximumSoe_perc
float maximumSoe_perc[BS_NR_OF_STRINGS]
Definition: database_cfg.h:495
battery_system_cfg.h
Configuration of the battery system (e.g., number of battery modules, battery cells,...
DATA_BLOCK_CURRENT_SENSOR::invalidEnergyCountingMeasurement
uint8_t invalidEnergyCountingMeasurement[BS_NR_OF_STRINGS]
Definition: database_cfg.h:231
DATA_BLOCK_CURRENT_SENSOR::invalidSensorTemperatureMeasurement
uint8_t invalidSensorTemperatureMeasurement[BS_NR_OF_STRINGS]
Definition: database_cfg.h:220
DATA_BLOCK_MSL_FLAG::stringChargeOvercurrent
uint8_t stringChargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:437
DATA_BLOCK_CURRENT_SENSOR::previousTimestampHighVoltage
uint32_t previousTimestampHighVoltage[BS_NR_OF_STRINGS][BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR]
Definition: database_cfg.h:239
DATA_BLOCK_ID_SLAVE_CONTROL
@ DATA_BLOCK_ID_SLAVE_CONTROL
Definition: database_cfg.h:78
DATA_BLOCK_ERRORSTATE::currentOnOpenString
uint8_t currentOnOpenString[BS_NR_OF_STRINGS]
Definition: database_cfg.h:360
BS_NR_OF_CELLS_PER_MODULE
#define BS_NR_OF_CELLS_PER_MODULE
number of battery cells per battery module (parallel cells are counted as one)
Definition: battery_system_cfg.h:104
DATA_BLOCK_SYSTEMSTATE_s
Definition: database_cfg.h:414
DATA_BLOCK_ID_RSL_FLAG
@ DATA_BLOCK_ID_RSL_FLAG
Definition: database_cfg.h:89
DATA_BLOCK_SOF::peakMslChargeCurrent_mA
float peakMslChargeCurrent_mA[BS_NR_OF_STRINGS]
Definition: database_cfg.h:409
DATA_BLOCK_INSULATION_MONITORING::aliveStatusDetection
uint8_t aliveStatusDetection
Definition: database_cfg.h:549
DATA_BLOCK_USER_MUX::value
uint16_t value[BS_NR_OF_STRINGS][8 *2 *BS_NR_OF_MODULES]
Definition: database_cfg.h:292
DATA_BASE::datalength
uint16_t datalength
Definition: database_cfg.h:68
DATA_BLOCK_MIN_MAX::averageCellVoltage_mV
int16_t averageCellVoltage_mV[BS_NR_OF_STRINGS]
Definition: database_cfg.h:164
DATA_BLOCK_STATEREQUEST::state
uint8_t state
Definition: database_cfg.h:510
DATA_BLOCK_USER_MUX
Definition: database_cfg.h:286
DATA_BLOCK_MOVING_AVERAGE_s::movingAveragePower60sInterval_mA
float movingAveragePower60sInterval_mA
Definition: database_cfg.h:529
DATA_BLOCK_MSL_FLAG::undertemperatureCharge
uint8_t undertemperatureCharge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:434
DATA_BLOCK_SOF::peakMolChargeCurrent_mA
float peakMolChargeCurrent_mA[BS_NR_OF_STRINGS]
Definition: database_cfg.h:401
DATA_BLOCK_ERRORSTATE::plausibilityCheckCellvoltage
uint8_t plausibilityCheckCellvoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:355
DATA_BLOCK_MOVING_AVERAGE_s::movingAveragePower5sInterval_mA
float movingAveragePower5sInterval_mA
Definition: database_cfg.h:526
DATA_BLOCK_ALL_GPIO_VOLTAGES::invalidGpioVoltages
uint16_t invalidGpioVoltages[BS_NR_OF_STRINGS][BS_NR_OF_MODULES]
Definition: database_cfg.h:316
DATA_BLOCK_SLAVE_CONTROL::eepromReadAddressLastUsed
uint32_t eepromReadAddressLastUsed
Definition: database_cfg.h:265
DATA_BLOCK_CONTFEEDBACK
Definition: database_cfg.h:366
DATA_BLOCK_ERRORSTATE::fuseStateNormal
uint8_t fuseStateNormal[BS_NR_OF_STRINGS]
Definition: database_cfg.h:346
DATA_BLOCK_RSL_FLAG::underVoltage
uint8_t underVoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:451
DATA_BLOCK_MOVING_AVERAGE_s::movingAveragePower30sInterval_mA
float movingAveragePower30sInterval_mA
Definition: database_cfg.h:528
DATA_BLOCK_MOVING_AVERAGE_s::movingAverageCurrent60sInterval_mA
float movingAverageCurrent60sInterval_mA
Definition: database_cfg.h:523
DATA_BLOCK_PACK_VALUES::invalidStringPower
uint8_t invalidStringPower[BS_NR_OF_STRINGS]
Definition: database_cfg.h:205
DATA_BLOCK_CURRENT_SENSOR::energyCounter_Wh
int32_t energyCounter_Wh[BS_NR_OF_STRINGS]
Definition: database_cfg.h:230
DATA_BLOCK_SOX::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:489
DATA_BLOCK_MOL_FLAG::cellDischargeOvercurrent
uint8_t cellDischargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:478
DATA_BLOCK_SOX::averageSoe_Wh
uint32_t averageSoe_Wh[BS_NR_OF_STRINGS]
Definition: database_cfg.h:497
DATA_BLOCK_CURRENT_SENSOR::current_mA
int32_t current_mA[BS_NR_OF_STRINGS]
Definition: database_cfg.h:214
DATA_BLOCK_BALANCING_CONTROL::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:249
DATA_BLOCK_MIN_MAX::averageTemperature_ddegC
float averageTemperature_ddegC[BS_NR_OF_STRINGS]
Definition: database_cfg.h:174
DATA_BLOCK_ERRORSTATE::canTimingCc
uint8_t canTimingCc[BS_NR_OF_STRINGS]
Definition: database_cfg.h:350
DATA_BLOCK_MSL_FLAG::overtemperatureDischarge
uint8_t overtemperatureDischarge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:433
DATA_BLOCK_BALANCING_FEEDBACK
Definition: database_cfg.h:276
DATA_BLOCK_RSL_FLAG::cellChargeOvercurrent
uint8_t cellChargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:456
DATA_BLOCK_PACK_VALUES_s
struct DATA_BLOCK_PACK_VALUES DATA_BLOCK_PACK_VALUES_s
DATA_BLOCK_ERRORSTATE::interlock
uint8_t interlock
Definition: database_cfg.h:328
DATA_BLOCK_CURRENT_SENSOR::invalidCurrentMeasurement
uint8_t invalidCurrentMeasurement[BS_NR_OF_STRINGS]
Definition: database_cfg.h:215
DATA_BLOCK_MOVING_AVERAGE_s::movingAverageCurrent5sInterval_mA
float movingAverageCurrent5sInterval_mA
Definition: database_cfg.h:520
DATA_BLOCK_SOF::continuousMslChargeCurrent_mA
float continuousMslChargeCurrent_mA[BS_NR_OF_STRINGS]
Definition: database_cfg.h:407
DATA_BLOCK_PACK_VALUES::stringPower_W
int32_t stringPower_W[BS_NR_OF_STRINGS]
Definition: database_cfg.h:204
DATA_BLOCK_SOF::recommendedContinuousChargeCurrent_mA
float recommendedContinuousChargeCurrent_mA[BS_NR_OF_STRINGS]
Definition: database_cfg.h:394
DATA_BLOCK_MSL_FLAG::overtemperatureCharge
uint8_t overtemperatureCharge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:432
DATA_BLOCK_SOF::peakMolDischargeCurrent_mA
float peakMolDischargeCurrent_mA[BS_NR_OF_STRINGS]
Definition: database_cfg.h:402
DATA_BLOCK_CELL_TEMPERATURE::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:135
DATA_BLOCK_ERRORSTATE::powerMeasurementError
uint8_t powerMeasurementError[BS_NR_OF_STRINGS]
Definition: database_cfg.h:344
DATA_BLOCK_ID
DATA_BLOCK_ID
Definition: database_cfg.h:72
DATA_BLOCK_CURRENT_SENSOR::timestampEnergyCounting
uint32_t timestampEnergyCounting[BS_NR_OF_STRINGS]
Definition: database_cfg.h:233
DATA_BLOCK_MIN_MAX::previousMinimumCellVoltage_mV
int16_t previousMinimumCellVoltage_mV[BS_NR_OF_STRINGS]
Definition: database_cfg.h:166
DATA_BLOCK_SOX_s
struct DATA_BLOCK_SOX DATA_BLOCK_SOX_s
DATA_BLOCK_SOF::recommendedPeakPackChargeCurrent_mA
float recommendedPeakPackChargeCurrent_mA
Definition: database_cfg.h:391
DATA_BLOCK_ID_SOF
@ DATA_BLOCK_ID_SOF
Definition: database_cfg.h:86
DATA_BLOCK_ID_MIN_MAX
@ DATA_BLOCK_ID_MIN_MAX
Definition: database_cfg.h:75
DATA_BLOCK_ID_CELL_VOLTAGE_REDUNDANCY0
@ DATA_BLOCK_ID_CELL_VOLTAGE_REDUNDANCY0
Definition: database_cfg.h:96
DATA_BLOCK_ID_CELL_VOLTAGE_BASE
@ DATA_BLOCK_ID_CELL_VOLTAGE_BASE
Definition: database_cfg.h:94
DATA_BLOCK_INSULATION_MONITORING::state
uint8_t state
Definition: database_cfg.h:540
DATA_BLOCK_INSULATION_MONITORING::insulationMeasurements
uint8_t insulationMeasurements
Definition: database_cfg.h:548
DATA_BLOCK_INSULATION_MONITORING::insulationFault
uint8_t insulationFault
Definition: database_cfg.h:542
DATA_BLOCK_MOVING_AVERAGE_s::movingAverageCurrent10sInterval_mA
float movingAverageCurrent10sInterval_mA
Definition: database_cfg.h:521
DATA_BLOCK_BALANCING_CONTROL::request
uint8_t request
Definition: database_cfg.h:252
DATA_BLOCK_INSULATION_MONITORING::insulationWarning
uint8_t insulationWarning
Definition: database_cfg.h:543
DATA_BLOCK_BALANCING_CONTROL::deltaCharge_mAs
uint32_t deltaCharge_mAs[BS_NR_OF_STRINGS][BS_NR_OF_BAT_CELLS]
Definition: database_cfg.h:254
DATA_BLOCK_ERRORSTATE::sbcRstbState
uint8_t sbcRstbState
Definition: database_cfg.h:362
DATA_BLOCK_SOX::maximumSoe_Wh
uint32_t maximumSoe_Wh[BS_NR_OF_STRINGS]
Definition: database_cfg.h:496
DATA_BLOCK_ID_ADC_TEMPERATURE
@ DATA_BLOCK_ID_ADC_TEMPERATURE
Definition: database_cfg.h:101
DATA_BLOCK_SOF::recommendedPeakChargeCurrent_mA
float recommendedPeakChargeCurrent_mA[BS_NR_OF_STRINGS]
Definition: database_cfg.h:397
DATA_BLOCK_RSL_FLAG::overtemperatureCharge
uint8_t overtemperatureCharge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:452
DATA_BLOCK_MOL_FLAG::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:469
DATA_BLOCK_MSL_FLAG::packChargeOvercurrent
uint8_t packChargeOvercurrent
Definition: database_cfg.h:428
DATA_BLOCK_ERRORSTATE::micConfigurationError
uint8_t micConfigurationError[BS_NR_OF_STRINGS]
Definition: database_cfg.h:332
DATA_BLOCK_RSL_FLAG::undertemperatureDischarge
uint8_t undertemperatureDischarge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:455
DATA_BLOCK_SOX::minimumSoe_perc
float minimumSoe_perc[BS_NR_OF_STRINGS]
Definition: database_cfg.h:494
DATA_BLOCK_ID_ALL_GPIO_VOLTAGES_BASE
@ DATA_BLOCK_ID_ALL_GPIO_VOLTAGES_BASE
Definition: database_cfg.h:82
DATA_BLOCK_INSULATION_MONITORING::outdatedInsulationResistanceValue
uint8_t outdatedInsulationResistanceValue
Definition: database_cfg.h:550
DATA_BLOCK_ADC_TEMPERATURE::valid_temperature_ADC0
uint16_t valid_temperature_ADC0[BS_NR_OF_TEMP_SENSORS_ON_ADC0]
Definition: database_cfg.h:152
DATA_BLOCK_HEADER_s
struct DATA_BLOCKHEADER DATA_BLOCK_HEADER_s
DATA_BLOCK_CURRENT_SENSOR::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:213
DATA_BLOCK_SOF
Definition: database_cfg.h:384
DATA_BLOCK_MSL_FLAG::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:427
DATA_BLOCK_CURRENT_SENSOR::sensorTemperature_ddegC
int32_t sensorTemperature_ddegC[BS_NR_OF_STRINGS]
Definition: database_cfg.h:219
BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR
#define BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR
number of high voltage inputs measured by current sensors (like IVT-MOD)
Definition: battery_system_cfg.h:253
DATA_BLOCK_SYSTEMSTATE_s::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:418
DATA_BLOCK_INSULATION_MONITORING::testImcParameterConfiguration
uint8_t testImcParameterConfiguration
Definition: database_cfg.h:552
DATA_BLOCK_MIN_MAX_s
struct DATA_BLOCK_MIN_MAX DATA_BLOCK_MIN_MAX_s
DATA_BLOCK_RSL_FLAG::undertemperatureCharge
uint8_t undertemperatureCharge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:454
DATA_BLOCK_MOL_FLAG::stringDischargeOvercurrent
uint8_t stringDischargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:479
DATA_BLOCK_ERRORSTATE::stringContactor
uint8_t stringContactor[BS_NR_OF_STRINGS]
Definition: database_cfg.h:326
DATA_BLOCK_ALL_GPIO_VOLTAGES::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:312
DATA_BLOCK_MOVING_AVERAGE_s::movingAverageCurrent1sInterval_mA
float movingAverageCurrent1sInterval_mA
Definition: database_cfg.h:519
DATA_BLOCK_BALANCING_FEEDBACK::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:280
DATA_BLOCK_SOF::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:388
DATA_BLOCK_CELL_VOLTAGE::cellVoltage_mV
int16_t cellVoltage_mV[BS_NR_OF_STRINGS][BS_NR_OF_BAT_CELLS]
Definition: database_cfg.h:122
DATA_BLOCK_OPENWIRE::nrOpenWires
uint16_t nrOpenWires[BS_NR_OF_STRINGS]
Definition: database_cfg.h:302
DATA_BLOCK_CELL_TEMPERATURE_s
struct DATA_BLOCK_CELL_TEMPERATURE DATA_BLOCK_CELL_TEMPERATURE_s
DATA_BLOCK_SOF::recommendedPeakDischargeCurrent_mA
float recommendedPeakDischargeCurrent_mA[BS_NR_OF_STRINGS]
Definition: database_cfg.h:398
DATA_BLOCK_STATEREQUEST::previousStateRequestViaCan
uint8_t previousStateRequestViaCan
Definition: database_cfg.h:508
DATA_BLOCK_INSULATION_MONITORING
Definition: database_cfg.h:534
DATA_BLOCK_ERRORSTATE::currentSensorPowerTimeout
uint8_t currentSensorPowerTimeout[BS_NR_OF_STRINGS]
Definition: database_cfg.h:343
DATA_BLOCK_CURRENT_SENSOR::timestampHighVoltage
uint32_t timestampHighVoltage[BS_NR_OF_STRINGS][BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR]
Definition: database_cfg.h:241
DATA_BLOCKHEADER::previousTimestamp
uint32_t previousTimestamp
Definition: database_cfg.h:111
DATA_BLOCK_ID_CELL_TEMPERATURE_REDUNDANCY0
@ DATA_BLOCK_ID_CELL_TEMPERATURE_REDUNDANCY0
Definition: database_cfg.h:97
DATA_BLOCK_SLAVE_CONTROL::eepromReadAddressToUse
uint32_t eepromReadAddressToUse
Definition: database_cfg.h:264
DATA_BLOCK_CELL_TEMPERATURE::invalidCellTemperature
uint16_t invalidCellTemperature[BS_NR_OF_STRINGS][BS_NR_OF_MODULES]
Definition: database_cfg.h:139
DATA_BLOCK_ERRORSTATE::baseCellTemperatureMeasurementTimeout
uint8_t baseCellTemperatureMeasurementTimeout
Definition: database_cfg.h:337
DATA_BLOCK_CURRENT_SENSOR::timestampCurrent
uint32_t timestampCurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:218
DATA_BLOCK_CELL_VOLTAGE::invalidCellVoltage
uint64_t invalidCellVoltage[BS_NR_OF_STRINGS][BS_NR_OF_MODULES]
Definition: database_cfg.h:124
DATA_BLOCK_PACK_VALUES::invalidPackPower
uint8_t invalidPackPower
Definition: database_cfg.h:199
DATA_BLOCK_CURRENT_SENSOR_s
struct DATA_BLOCK_CURRENT_SENSOR DATA_BLOCK_CURRENT_SENSOR_s
DATA_BLOCK_MSL_FLAG::pcbUndertemperature
uint8_t pcbUndertemperature[BS_NR_OF_STRINGS]
Definition: database_cfg.h:441
DATA_BLOCK_STATEREQUEST::stateRequestViaCanPending
uint8_t stateRequestViaCanPending
Definition: database_cfg.h:509
DATA_BLOCK_RSL_FLAG::stringDischargeOvercurrent
uint8_t stringDischargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:459
DATA_BLOCK_PACK_VALUES::stringCurrent_mA
int32_t stringCurrent_mA[BS_NR_OF_STRINGS]
Definition: database_cfg.h:202
DATA_BLOCK_MOL_FLAG::overtemperatureCharge
uint8_t overtemperatureCharge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:472
DATA_BLOCK_PACK_VALUES
Definition: database_cfg.h:185
DATA_BLOCK_CELL_TEMPERATURE
Definition: database_cfg.h:131
DATA_BLOCK_ERRORSTATE::muxError
uint8_t muxError[BS_NR_OF_STRINGS]
Definition: database_cfg.h:330
DATA_BASE_s
struct DATA_BASE DATA_BASE_s
DATA_BLOCK_ID_USER_MUX
@ DATA_BLOCK_ID_USER_MUX
Definition: database_cfg.h:80
DATA_BLOCK_MIN_MAX::nrModuleMaximumCellVoltage
uint16_t nrModuleMaximumCellVoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:172
DATA_BLOCK_ID_BALANCING_CONTROL
@ DATA_BLOCK_ID_BALANCING_CONTROL
Definition: database_cfg.h:77
DATA_BLOCK_BALANCING_CONTROL::balancingState
uint8_t balancingState[BS_NR_OF_STRINGS][BS_NR_OF_BAT_CELLS]
Definition: database_cfg.h:253
DATA_BLOCK_ID_INSULATION_MONITORING
@ DATA_BLOCK_ID_INSULATION_MONITORING
Definition: database_cfg.h:102
DATA_BLOCK_MIN_MAX::maximumCellVoltage_mV
int16_t maximumCellVoltage_mV[BS_NR_OF_STRINGS]
Definition: database_cfg.h:167
DATA_BLOCK_RSL_FLAG::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:449
DATA_BLOCK_ERRORSTATE::redundancy0CellTemperatureMeasurementTimeout
uint8_t redundancy0CellTemperatureMeasurementTimeout
Definition: database_cfg.h:338
DATA_BLOCK_INSULATION_MONITORING::selfTestRunning
uint8_t selfTestRunning
Definition: database_cfg.h:547
DATA_BLOCK_SOX::maximumSoc_perc
float maximumSoc_perc[BS_NR_OF_STRINGS]
Definition: database_cfg.h:492
DATA_BLOCK_ERRORSTATE_s
struct DATA_BLOCK_ERRORSTATE DATA_BLOCK_ERRORSTATE_s
DATA_BLOCK_ID_STATEREQUEST
@ DATA_BLOCK_ID_STATEREQUEST
Definition: database_cfg.h:92
DATA_BLOCK_ADC_TEMPERATURE::valid_temperature_ADC1
uint16_t valid_temperature_ADC1[BS_NR_OF_TEMP_SENSORS_ON_ADC1]
Definition: database_cfg.h:154
DATA_BLOCK_INTERLOCK_FEEDBACK::interlockFeedback
uint8_t interlockFeedback
Definition: database_cfg.h:380
DATA_BLOCK_MSL_FLAG::overVoltage
uint8_t overVoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:430
DATA_BLOCK_CELL_VOLTAGE
Definition: database_cfg.h:115
DATA_BLOCK_MOL_FLAG_s
struct DATA_BLOCK_MOL_FLAG DATA_BLOCK_MOL_FLAG_s
DATA_BLOCK_BALANCING_CONTROL_s
struct DATA_BLOCK_BALANCING_CONTROL DATA_BLOCK_BALANCING_CONTROL_s
DATA_BLOCK_ERRORSTATE::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:324
DATA_BLOCK_MIN_MAX
Definition: database_cfg.h:158
DATA_BLOCK_SOF::recommendedContinuousDischargeCurrent_mA
float recommendedContinuousDischargeCurrent_mA[BS_NR_OF_STRINGS]
Definition: database_cfg.h:396
DATA_BLOCK_ID_CONTACTOR_FEEDBACK
@ DATA_BLOCK_ID_CONTACTOR_FEEDBACK
Definition: database_cfg.h:84
DATA_BLOCK_MSL_FLAG
Definition: database_cfg.h:423
DATA_BLOCK_OPENWIRE::openwire
uint8_t openwire[BS_NR_OF_STRINGS][BS_NR_OF_MODULES *(BS_NR_OF_CELLS_PER_MODULE+1)]
Definition: database_cfg.h:304
DATA_BLOCK_CURRENT_SENSOR::previousTimestampCurrent
uint32_t previousTimestampCurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:217
DATA_BLOCK_MSL_FLAG::undertemperatureDischarge
uint8_t undertemperatureDischarge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:435
DATA_BLOCK_BALANCING_CONTROL::threshold_mV
uint8_t threshold_mV
Definition: database_cfg.h:251
DATA_BLOCK_ID_ERRORSTATE
@ DATA_BLOCK_ID_ERRORSTATE
Definition: database_cfg.h:83
DATA_BLOCK_INSULATION_MONITORING::insulationResistance_kOhm
uint32_t insulationResistance_kOhm
Definition: database_cfg.h:541
DATA_BLOCK_CURRENT_SENSOR::highVoltage_mV
int32_t highVoltage_mV[BS_NR_OF_STRINGS][BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR]
Definition: database_cfg.h:236
DATA_BLOCK_SOF::peakMslDischargeCurrent_mA
float peakMslDischargeCurrent_mA[BS_NR_OF_STRINGS]
Definition: database_cfg.h:410
DATA_BLOCK_BALANCING_FEEDBACK_s
struct DATA_BLOCK_BALANCING_FEEDBACK DATA_BLOCK_BALANCING_FEEDBACK_s
DATA_BLOCK_ALL_GPIO_VOLTAGES::state
uint8_t state
Definition: database_cfg.h:313
DATA_BLOCK_CELL_VOLTAGE::validModuleVoltage
bool validModuleVoltage[BS_NR_OF_STRINGS][BS_NR_OF_MODULES]
Definition: database_cfg.h:127
DATA_BLOCK_BALANCING_FEEDBACK::value
uint16_t value[BS_NR_OF_STRINGS][BS_NR_OF_MODULES]
Definition: database_cfg.h:282
DATA_BLOCK_CURRENT_SENSOR::newCurrent
uint8_t newCurrent
Definition: database_cfg.h:216
DATA_BLOCK_CURRENT_SENSOR::currentCounter_As
int32_t currentCounter_As[BS_NR_OF_STRINGS]
Definition: database_cfg.h:226
DATA_BLOCK_ERRORSTATE::open_wire
uint8_t open_wire[BS_NR_OF_STRINGS]
Definition: database_cfg.h:348
DATA_BLOCK_ERRORSTATE
Definition: database_cfg.h:320
DATA_BLOCK_INTERLOCK_FEEDBACK
Definition: database_cfg.h:375
DATA_BLOCK_ERRORSTATE::deepDischargeDetected
uint8_t deepDischargeDetected[BS_NR_OF_STRINGS]
Definition: database_cfg.h:359
DATA_BLOCK_ERRORSTATE::spiError
uint8_t spiError[BS_NR_OF_STRINGS]
Definition: database_cfg.h:331
DATA_BLOCK_PACK_VALUES::invalidHvBusVoltage
uint8_t invalidHvBusVoltage
Definition: database_cfg.h:197
DATA_BLOCK_RSL_FLAG
Definition: database_cfg.h:445
DATA_BLOCK_ID_INTERLOCK_FEEDBACK
@ DATA_BLOCK_ID_INTERLOCK_FEEDBACK
Definition: database_cfg.h:85
DATA_BLOCK_SOF::peakRslDischargeCurrent_mA
float peakRslDischargeCurrent_mA[BS_NR_OF_STRINGS]
Definition: database_cfg.h:406
DATA_BLOCK_MOL_FLAG::overVoltage
uint8_t overVoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:470
DATA_BLOCK_BALANCING_FEEDBACK::state
uint8_t state
Definition: database_cfg.h:281
DATA_BLOCK_MIN_MAX::minimumTemperature_ddegC
int16_t minimumTemperature_ddegC[BS_NR_OF_STRINGS]
Definition: database_cfg.h:175
DATA_BLOCK_MSL_FLAG::underVoltage
uint8_t underVoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:431
DATA_BLOCK_ERRORSTATE::plausibilityCheckCellvoltageSpread
uint8_t plausibilityCheckCellvoltageSpread[BS_NR_OF_STRINGS]
Definition: database_cfg.h:356
DATA_BLOCK_RSL_FLAG::cellDischargeOvercurrent
uint8_t cellDischargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:458
DATA_BLOCK_OPEN_WIRE_s
struct DATA_BLOCK_OPENWIRE DATA_BLOCK_OPEN_WIRE_s
DATA_BLOCK_MOL_FLAG::undertemperatureCharge
uint8_t undertemperatureCharge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:474
DATA_BLOCK_CURRENT_SENSOR::previousTimestampPower
uint32_t previousTimestampPower[BS_NR_OF_STRINGS]
Definition: database_cfg.h:224
DATA_BLOCK_CURRENT_SENSOR::invalidHighVoltageMeasurement
uint8_t invalidHighVoltageMeasurement[BS_NR_OF_STRINGS][BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR]
Definition: database_cfg.h:235
DATA_BLOCK_MOL_FLAG::stringChargeOvercurrent
uint8_t stringChargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:477
DATA_BLOCK_SOF::recommendedPeakPackDischargeCurrent_mA
float recommendedPeakPackDischargeCurrent_mA
Definition: database_cfg.h:392
DATA_BLOCK_ID_e
enum DATA_BLOCK_ID DATA_BLOCK_ID_e
DATA_BLOCK_RSL_FLAG_s
struct DATA_BLOCK_RSL_FLAG DATA_BLOCK_RSL_FLAG_s
DATA_BLOCK_ERRORSTATE::redundancy0CellVoltageMeasurementTimeout
uint8_t redundancy0CellVoltageMeasurementTimeout
Definition: database_cfg.h:336
BS_NR_OF_TEMP_SENSORS_ON_ADC1
#define BS_NR_OF_TEMP_SENSORS_ON_ADC1
Definition: battery_system_cfg.h:163
DATA_BLOCK_ALL_GPIO_VOLTAGES_s
struct DATA_BLOCK_ALL_GPIO_VOLTAGES DATA_BLOCK_ALL_GPIO_VOLTAGES_s
DATA_BLOCK_MOVING_AVERAGE_s::movingAveragePower1sInterval_mA
float movingAveragePower1sInterval_mA
Definition: database_cfg.h:525
DATA_BLOCK_INSULATION_MONITORING::valid
uint8_t valid
Definition: database_cfg.h:539
DATA_BLOCK_CURRENT_SENSOR::timestampCurrentCounting
uint32_t timestampCurrentCounting[BS_NR_OF_STRINGS]
Definition: database_cfg.h:229
DATA_BLOCK_MOL_FLAG::undertemperatureDischarge
uint8_t undertemperatureDischarge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:475
DATA_BLOCK_ID_CELL_VOLTAGE
@ DATA_BLOCK_ID_CELL_VOLTAGE
Definition: database_cfg.h:73
DATA_BLOCK_CURRENT_SENSOR::power_W
int32_t power_W[BS_NR_OF_STRINGS]
Definition: database_cfg.h:221
DATA_BLOCK_PACK_VALUES::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:189
DATA_BLOCK_SOX::minimumSoe_Wh
uint32_t minimumSoe_Wh[BS_NR_OF_STRINGS]
Definition: database_cfg.h:498
DATA_BLOCK_ALL_GPIO_VOLTAGES
Definition: database_cfg.h:308
DATA_BLOCK_INSULATION_MONITORING::chassisFault
uint8_t chassisFault
Definition: database_cfg.h:544
DATA_BLOCK_INSULATION_MONITORING::calibrationRunning
uint8_t calibrationRunning
Definition: database_cfg.h:546
DATA_BLOCK_ID_SYSTEMSTATE
@ DATA_BLOCK_ID_SYSTEMSTATE
Definition: database_cfg.h:87
BS_NR_OF_GPIOS_PER_MODULE
#define BS_NR_OF_GPIOS_PER_MODULE
Number of GPIOs on the LTC IC.
Definition: battery_system_cfg.h:145
DATA_BLOCK_RSL_FLAG::overtemperatureDischarge
uint8_t overtemperatureDischarge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:453
DATA_BLOCK_STATEREQUEST
Definition: database_cfg.h:502
DATA_BLOCK_ERRORSTATE::canTimingEc
uint8_t canTimingEc[BS_NR_OF_STRINGS]
Definition: database_cfg.h:351
DATA_BLOCK_MIN_MAX::nrCellMaximumCellVoltage
uint16_t nrCellMaximumCellVoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:173
DATA_BLOCK_MOL_FLAG::pcbOvertemperature
uint8_t pcbOvertemperature[BS_NR_OF_STRINGS]
Definition: database_cfg.h:480
DATA_BLOCK_MIN_MAX::minimumCellVoltage_mV
int16_t minimumCellVoltage_mV[BS_NR_OF_STRINGS]
Definition: database_cfg.h:165
DATA_BLOCK_ERRORSTATE::currentSensorTimeoutV1
uint8_t currentSensorTimeoutV1[BS_NR_OF_STRINGS]
Definition: database_cfg.h:341
DATA_BLOCK_PACK_VALUES::stringVoltage_mV
int32_t stringVoltage_mV[BS_NR_OF_STRINGS]
Definition: database_cfg.h:200
DATA_BLOCK_ADC_TEMPERATURE::temperatureAdc1_ddegC
int16_t temperatureAdc1_ddegC[BS_NR_OF_TEMP_SENSORS_ON_ADC1]
Definition: database_cfg.h:150
DATA_BLOCK_SLAVE_CONTROL::ioValueOut
uint8_t ioValueOut[BS_NR_OF_MODULES]
Definition: database_cfg.h:268
DATA_BLOCK_ERRORSTATE::currentSensorTimeoutV3
uint8_t currentSensorTimeoutV3[BS_NR_OF_STRINGS]
Definition: database_cfg.h:342
DATA_BLOCK_MSL_FLAG::cellChargeOvercurrent
uint8_t cellChargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:436
DATA_BLOCK_SOX::minimumSoc_perc
float minimumSoc_perc[BS_NR_OF_STRINGS]
Definition: database_cfg.h:491
DATA_BLOCK_ID_CURRENT_SENSOR
@ DATA_BLOCK_ID_CURRENT_SENSOR
Definition: database_cfg.h:76
DATA_BLOCK_ID_CELL_TEMPERATURE
@ DATA_BLOCK_ID_CELL_TEMPERATURE
Definition: database_cfg.h:74
DATA_BLOCK_MOVING_AVERAGE_s::movingAverageCurrentConfigurableInterval_mA
float movingAverageCurrentConfigurableInterval_mA
Definition: database_cfg.h:524
DATA_BLOCK_INSULATION_MONITORING::systemFailure
uint8_t systemFailure
Definition: database_cfg.h:545
DATA_BLOCK_USER_MUX::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:290
DATA_BLOCK_CONTACTOR_FEEDBACK_s
struct DATA_BLOCK_CONTFEEDBACK DATA_BLOCK_CONTACTOR_FEEDBACK_s
DATA_BLOCK_MOVING_AVERAGE_s::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:518
DATA_BLOCK_MIN_MAX::previousMaximumCellVoltage_mV
int16_t previousMaximumCellVoltage_mV[BS_NR_OF_STRINGS]
Definition: database_cfg.h:168
DATA_BLOCK_OPENWIRE::state
uint8_t state
Definition: database_cfg.h:301
DATA_BLOCK_SOF::peakRslChargeCurrent_mA
float peakRslChargeCurrent_mA[BS_NR_OF_STRINGS]
Definition: database_cfg.h:405
DATA_BLOCK_RSL_FLAG::overVoltage
uint8_t overVoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:450
DATA_BLOCK_ERRORSTATE::canTiming
uint8_t canTiming
Definition: database_cfg.h:349
DATA_BLOCK_ERRORSTATE::mcuDieTemperature
uint8_t mcuDieTemperature
Definition: database_cfg.h:352
DATA_BLOCK_CELL_VOLTAGE::nrValidCellVoltages
uint16_t nrValidCellVoltages[BS_NR_OF_STRINGS]
Definition: database_cfg.h:125
DATA_BLOCK_OPENWIRE::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:300
DATA_BLOCK_SOX::averageSoe_perc
float averageSoe_perc[BS_NR_OF_STRINGS]
Definition: database_cfg.h:493
DATA_BLOCK_ID_ALL_GPIO_VOLTAGES_REDUNDANCY0
@ DATA_BLOCK_ID_ALL_GPIO_VOLTAGES_REDUNDANCY0
Definition: database_cfg.h:99
data_database
DATA_BASE_s data_database[DATA_BLOCK_ID_MAX]
channel configuration of database (data blocks)
Definition: database_cfg.c:169
DATA_BLOCK_SLAVE_CONTROL::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:262
DATA_BLOCK_CELL_VOLTAGE_s
struct DATA_BLOCK_CELL_VOLTAGE DATA_BLOCK_CELL_VOLTAGE_s
DATA_BLOCK_BALANCING_CONTROL
Definition: database_cfg.h:245
DATA_BLOCK_CELL_VOLTAGE::state
uint8_t state
Definition: database_cfg.h:120
DATA_BLOCK_MSL_FLAG::cellDischargeOvercurrent
uint8_t cellDischargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:438
DATA_BLOCK_CELL_VOLTAGE::header
DATA_BLOCK_HEADER_s header
Definition: database_cfg.h:119
DATA_BLOCK_SYSTEMSTATE_s::bmsCanState
int32_t bmsCanState
Definition: database_cfg.h:419
DATA_BLOCK_INSULATION_MONITORING::testImcOverAll
uint8_t testImcOverAll
Definition: database_cfg.h:551
DATA_BLOCK_PACK_VALUES::packPower_W
int32_t packPower_W
Definition: database_cfg.h:198
DATA_BLOCK_SOX::averageSoc_perc
float averageSoc_perc[BS_NR_OF_STRINGS]
Definition: database_cfg.h:490
DATA_BLOCK_PACK_VALUES::packCurrent_mA
int32_t packCurrent_mA
Definition: database_cfg.h:191
DATA_BLOCK_SLAVE_CONTROL_s
struct DATA_BLOCK_SLAVE_CONTROL DATA_BLOCK_SLAVE_CONTROL_s
BS_NR_OF_STRINGS
#define BS_NR_OF_STRINGS
Definition: battery_system_cfg.h:89
DATA_BLOCK_ADC_TEMPERATURE_s
struct DATA_BLOCK_ADC_TEMPERATURE DATA_BLOCK_ADC_TEMPERATURE_s
DATA_BLOCK_ERRORSTATE::coinCellVoltage
uint8_t coinCellVoltage
Definition: database_cfg.h:353
DATA_BLOCK_ID_MAX
@ DATA_BLOCK_ID_MAX
Definition: database_cfg.h:104
DATA_BASE::pDatabaseEntry
void * pDatabaseEntry
Definition: database_cfg.h:67
DATA_BLOCK_CELL_TEMPERATURE::cellTemperature_ddegC
int16_t cellTemperature_ddegC[BS_NR_OF_STRINGS][BS_NR_OF_TEMP_SENSORS]
Definition: database_cfg.h:137
DATA_BLOCK_SOX
Definition: database_cfg.h:485
DATA_BLOCKHEADER::timestamp
uint32_t timestamp
Definition: database_cfg.h:110
DATA_BLOCK_CURRENT_SENSOR::newPower
uint8_t newPower
Definition: database_cfg.h:223
DATA_BLOCK_ID_SOX
@ DATA_BLOCK_ID_SOX
Definition: database_cfg.h:91
DATA_BLOCK_SLAVE_CONTROL::externalTemperatureSensor
uint8_t externalTemperatureSensor[BS_NR_OF_MODULES]
Definition: database_cfg.h:272
DATA_BLOCK_STATEREQUEST_s
struct DATA_BLOCK_STATEREQUEST DATA_BLOCK_STATEREQUEST_s
DATA_BLOCK_SOF::continuousMslDischargeCurrent_mA
float continuousMslDischargeCurrent_mA[BS_NR_OF_STRINGS]
Definition: database_cfg.h:408
DATA_BLOCKHEADER::uniqueId
DATA_BLOCK_ID_e uniqueId
Definition: database_cfg.h:109
DATA_BLOCKHEADER
Definition: database_cfg.h:108
DATA_BLOCK_CURRENT_SENSOR::timestampPower
uint32_t timestampPower[BS_NR_OF_STRINGS]
Definition: database_cfg.h:225
DATA_BLOCK_ERRORSTATE::plausibilityCheckCelltemperatureSpread
uint8_t plausibilityCheckCelltemperatureSpread[BS_NR_OF_STRINGS]
Definition: database_cfg.h:357