foxBMS - Unit Tests  1.1.0
The foxBMS Unit Tests API Documentation
can_cbs_tx_state.c
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 can_cbs_tx_state.c
44  * @author foxBMS Team
45  * @date 2021-07-21 (date of creation)
46  * @updated 2021-07-21 (date of last update)
47  * @ingroup DRIVER
48  * @prefix CAN
49  *
50  * @brief CAN driver Tx callback implementation
51  * @details CAN Tx callback for state messages
52  */
53 
54 /*========== Includes =======================================================*/
55 #include "bms.h"
56 #include "can_cbs.h"
57 #include "can_helper.h"
58 #include "diag.h"
59 
60 /*========== Macros and Definitions =========================================*/
61 
62 /*========== Static Constant and Variable Definitions =======================*/
63 
64 /*========== Extern Constant and Variable Definitions =======================*/
65 
66 /*========== Static Function Prototypes =====================================*/
67 
68 /*========== Static Function Implementations ================================*/
69 
70 /*========== Extern Function Implementations ================================*/
71 extern uint32_t CAN_TxState(
72  uint32_t id,
73  uint8_t dlc,
74  CAN_ENDIANNESS_e endianness,
75  uint8_t *pCanData,
76  uint8_t *pMuxId,
77  const CAN_SHIM_s *const kpkCanShim) {
78  /* pMuxId is not used here, therefore has to be NULL_PTR */
79  FAS_ASSERT(pMuxId == NULL_PTR);
80 
81  FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */
82  FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */
83  FAS_ASSERT(pCanData != NULL_PTR);
84  FAS_ASSERT(kpkCanShim != NULL_PTR);
85  uint64_t message = 0;
86  float signalData = 0.0f;
87  uint64_t data = 0;
88 
89  DATA_READ_DATA(kpkCanShim->pTableErrorState, kpkCanShim->pTableInsulation, kpkCanShim->pTableMsl);
90 
91  /* AXIVION Disable Style Generic-NoMagicNumbers: Signal data defined in .dbc file. */
92  /* State */
93  data = (uint64_t)BMS_GetState();
94  /* set data in CAN frame */
95  CAN_TxSetMessageDataWithSignalData(&message, 3u, 4u, data, endianness);
96 
97  /* Connected strings */
98  data = (uint64_t)BMS_GetNumberOfConnectedStrings();
99  /* set data in CAN frame */
100  CAN_TxSetMessageDataWithSignalData(&message, 7u, 4u, data, endianness);
101 
102  /* General error - implement now */
103  if (true == DIAG_IsAnyFatalErrorSet()) {
104  data = 1u;
105  } else {
106  data = 0u;
107  }
108  CAN_TxSetMessageDataWithSignalData(&message, 11u, 1u, data, endianness);
109 
110  /* General warning: TODO */
111 
112  /* Emergency shutoff */
113  if (true == BMS_IsTransitionToErrorStateActive()) {
114  data = 1u;
115  } else {
116  data = 0u;
117  }
118  CAN_TxSetMessageDataWithSignalData(&message, 10u, 1u, data, endianness);
119 
120  /* Number of deactivated strings: TODO */
121 
122  /* Error: insulation */
123  data = kpkCanShim->pTableErrorState->insulationError;
124  CAN_TxSetMessageDataWithSignalData(&message, 23u, 1u, data, endianness);
125 
126  /* Insulation resistance */
127  signalData = (float)kpkCanShim->pTableInsulation->insulationResistance_kOhm;
128  signalData = signalData * 0.1f; /* convert kOhm to 10kOhm */
129  data = (uint64_t)signalData;
130  CAN_TxSetMessageDataWithSignalData(&message, 63u, 8u, data, endianness);
131 
132  /* Charging complete: TODO */
133 
134  /* Insulation monitoring active */
135  data = kpkCanShim->pTableInsulation->insulationMeasurements;
136  CAN_TxSetMessageDataWithSignalData(&message, 13u, 1u, data, endianness);
137 
138  /* Heater state: TODO */
139  /* Cooling state: TODO */
140 
141  /* Error: Precharge voltage: TODO */
142  /* Error: Precharge current: TODO */
143 
144  /* Error: MCU die temperature */
145  data = kpkCanShim->pTableErrorState->mcuDieTemperature;
146  CAN_TxSetMessageDataWithSignalData(&message, 18u, 1u, data, endianness);
147 
148  /* Error: master overtemperature: TODO */
149  /* Error: master undertemperature: TODO */
150 
151  /* Error: interlock */
152  data = kpkCanShim->pTableErrorState->interlock;
153  CAN_TxSetMessageDataWithSignalData(&message, 22u, 1u, data, endianness);
154 
155  /* Main fuse state: TODO */
156 
157  /* Error: Can timing */
158  data = kpkCanShim->pTableErrorState->canTiming;
159  CAN_TxSetMessageDataWithSignalData(&message, 24u, 1u, data, endianness);
160 
161  /* Error: Overcurrent pack charge */
162  data = kpkCanShim->pTableMsl->packChargeOvercurrent;
163  CAN_TxSetMessageDataWithSignalData(&message, 25u, 1u, data, endianness);
164 
165  /* Error: Overcurrent pack discharge */
166  data = kpkCanShim->pTableMsl->packDischargeOvercurrent;
167  CAN_TxSetMessageDataWithSignalData(&message, 26u, 1u, data, endianness);
168  /* AXIVION Enable Style Generic-NoMagicNumbers: */
169 
170  /* now copy data in the buffer that will be use to send data */
171  CAN_TxSetCanDataWithMessageData(message, pCanData, endianness);
172 
173  return 0;
174 }
175 extern uint32_t CAN_TxStringState(
176  uint32_t id,
177  uint8_t dlc,
178  CAN_ENDIANNESS_e endianness,
179  uint8_t *pCanData,
180  uint8_t *pMuxId,
181  const CAN_SHIM_s *const kpkCanShim) {
182  FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */
183  FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */
184  FAS_ASSERT(pCanData != NULL_PTR);
185  FAS_ASSERT(pMuxId != NULL_PTR);
186  FAS_ASSERT(*pMuxId < BS_NR_OF_STRINGS);
187  FAS_ASSERT(kpkCanShim != NULL_PTR);
188  uint64_t message = 0;
189  uint64_t data = 0;
190 
191  const uint8_t stringNumber = *pMuxId;
192 
193  /* First signal to transmit cell voltages: get database values */
194  if (stringNumber == 0u) {
195  /* Do not read pTableMsl and pTableErrorState as they already are read
196  * with a higher frequency from CAN_TxState callback */
197  DATA_READ_DATA(kpkCanShim->pTableRsl, kpkCanShim->pTableMol);
198  }
199 
200  /* AXIVION Disable Style Generic-NoMagicNumbers: Signal data defined in .dbc file. */
201  /* mux value */
202  data = (uint64_t)stringNumber;
203  /* set data in CAN frame */
204  CAN_TxSetMessageDataWithSignalData(&message, 3u, 4u, data, endianness);
205 
206  /* String connected */
207  if (true == BMS_IsStringClosed(stringNumber)) {
208  data = 1u;
209  } else {
210  data = 0u;
211  }
212  CAN_TxSetMessageDataWithSignalData(&message, 4u, 1u, data, endianness);
213 
214  /* Balancing active: TODO */
215 
216  /* String fuse blown */
217  if ((1u == kpkCanShim->pTableErrorState->fuseStateCharge[stringNumber]) ||
218  (1u == kpkCanShim->pTableErrorState->fuseStateNormal[stringNumber])) {
219  data = 1u;
220  } else {
221  data = 0u;
222  }
223  CAN_TxSetMessageDataWithSignalData(&message, 6u, 1u, data, endianness);
224 
225  /* Error: Deep-discharge */
226  data = kpkCanShim->pTableErrorState->deepDischargeDetected[stringNumber];
227  CAN_TxSetMessageDataWithSignalData(&message, 7u, 1u, data, endianness);
228 
229  /* Error: Overtemperature charge */
230  data = kpkCanShim->pTableMsl->overtemperatureCharge[stringNumber];
231  CAN_TxSetMessageDataWithSignalData(&message, 8u, 1u, data, endianness);
232 
233  /* Error: Undertemperature charge */
234  data = kpkCanShim->pTableMsl->undertemperatureCharge[stringNumber];
235  CAN_TxSetMessageDataWithSignalData(&message, 9u, 1u, data, endianness);
236 
237  /* Error: Overtemperature discharge */
238  data = kpkCanShim->pTableMsl->overtemperatureDischarge[stringNumber];
239  CAN_TxSetMessageDataWithSignalData(&message, 10u, 1u, data, endianness);
240 
241  /* Error: Undertemperature discharge */
242  data = kpkCanShim->pTableMsl->undertemperatureDischarge[stringNumber];
243  CAN_TxSetMessageDataWithSignalData(&message, 11u, 1u, data, endianness);
244 
245  /* Error: Overcurrent charge */
246  if ((1u == kpkCanShim->pTableMsl->cellChargeOvercurrent[stringNumber]) ||
247  (1u == kpkCanShim->pTableMsl->stringChargeOvercurrent[stringNumber])) {
248  data = 1u;
249  } else {
250  data = 0u;
251  }
252  CAN_TxSetMessageDataWithSignalData(&message, 12u, 1u, data, endianness);
253 
254  /* Error: Overcurrent discharge */
255  if ((1u == kpkCanShim->pTableMsl->cellDischargeOvercurrent[stringNumber]) ||
256  (1u == kpkCanShim->pTableMsl->stringDischargeOvercurrent[stringNumber])) {
257  data = 1u;
258  } else {
259  data = 0u;
260  }
261  CAN_TxSetMessageDataWithSignalData(&message, 13u, 1u, data, endianness);
262 
263  /* Error: Overvoltage */
264  data = kpkCanShim->pTableMsl->overVoltage[stringNumber];
265  CAN_TxSetMessageDataWithSignalData(&message, 14u, 1u, data, endianness);
266 
267  /* Error: Undervoltage */
268  data = kpkCanShim->pTableMsl->underVoltage[stringNumber];
269  CAN_TxSetMessageDataWithSignalData(&message, 15u, 1u, data, endianness);
270 
271  /* Info: Overtemperature charge - MOL */
272  data = kpkCanShim->pTableMol->overtemperatureCharge[stringNumber];
273  CAN_TxSetMessageDataWithSignalData(&message, 16u, 1u, data, endianness);
274 
275  /* Info: Undertemperature charge - MOL */
276  data = kpkCanShim->pTableMol->undertemperatureCharge[stringNumber];
277  CAN_TxSetMessageDataWithSignalData(&message, 17u, 1u, data, endianness);
278 
279  /* Info: Overtemperature discharge - MOL */
280  data = kpkCanShim->pTableMol->overtemperatureDischarge[stringNumber];
281  CAN_TxSetMessageDataWithSignalData(&message, 18u, 1u, data, endianness);
282 
283  /* Info: Undertemperature discharge - MOL */
284  data = kpkCanShim->pTableMol->undertemperatureCharge[stringNumber];
285  CAN_TxSetMessageDataWithSignalData(&message, 19u, 1u, data, endianness);
286 
287  /* Info: Overcurrent charge - MOL */
288  if ((1u == kpkCanShim->pTableMol->cellChargeOvercurrent[stringNumber]) ||
289  (1u == kpkCanShim->pTableMol->stringChargeOvercurrent[stringNumber])) {
290  data = 1u;
291  } else {
292  data = 0u;
293  }
294  CAN_TxSetMessageDataWithSignalData(&message, 20u, 1u, data, endianness);
295 
296  /* Info: Overcurrent discharge - MOL */
297  if ((1u == kpkCanShim->pTableMol->cellDischargeOvercurrent[stringNumber]) ||
298  (1u == kpkCanShim->pTableMol->stringDischargeOvercurrent[stringNumber])) {
299  data = 1u;
300  } else {
301  data = 0u;
302  }
303  CAN_TxSetMessageDataWithSignalData(&message, 21u, 1u, data, endianness);
304 
305  /* Info: Overvoltage - MOL */
306  data = kpkCanShim->pTableMol->overVoltage[stringNumber];
307  CAN_TxSetMessageDataWithSignalData(&message, 22u, 1u, data, endianness);
308 
309  /* Info: Undervoltage - MOL */
310  data = kpkCanShim->pTableMol->underVoltage[stringNumber];
311  CAN_TxSetMessageDataWithSignalData(&message, 23u, 1u, data, endianness);
312 
313  /* Warning: Overtemperature charge - RSL */
314  data = kpkCanShim->pTableRsl->overtemperatureCharge[stringNumber];
315  CAN_TxSetMessageDataWithSignalData(&message, 24u, 1u, data, endianness);
316 
317  /* Warning: Undertemperature charge - RSL */
318  data = kpkCanShim->pTableRsl->undertemperatureCharge[stringNumber];
319  CAN_TxSetMessageDataWithSignalData(&message, 25u, 1u, data, endianness);
320 
321  /* Warning: Overtemperature discharge - RSL */
322  data = kpkCanShim->pTableRsl->overtemperatureDischarge[stringNumber];
323  CAN_TxSetMessageDataWithSignalData(&message, 26u, 1u, data, endianness);
324 
325  /* Warning: Undertemperature discharge - RSL */
326  data = kpkCanShim->pTableRsl->undertemperatureDischarge[stringNumber];
327  CAN_TxSetMessageDataWithSignalData(&message, 27u, 1u, data, endianness);
328 
329  /* Warning: Overcurrent charge - RSL */
330  if ((1u == kpkCanShim->pTableRsl->cellChargeOvercurrent[stringNumber]) ||
331  (1u == kpkCanShim->pTableRsl->stringChargeOvercurrent[stringNumber])) {
332  data = 1u;
333  } else {
334  data = 0u;
335  }
336  CAN_TxSetMessageDataWithSignalData(&message, 28u, 1u, data, endianness);
337 
338  /* Warning: Overcurrent discharge - RSL */
339  if ((1u == kpkCanShim->pTableMol->cellDischargeOvercurrent[stringNumber]) ||
340  (1u == kpkCanShim->pTableMol->stringDischargeOvercurrent[stringNumber])) {
341  data = 1u;
342  } else {
343  data = 0u;
344  }
345  CAN_TxSetMessageDataWithSignalData(&message, 29u, 1u, data, endianness);
346 
347  /* Warning: Overvoltage - RSL */
348  data = kpkCanShim->pTableRsl->overVoltage[stringNumber];
349  CAN_TxSetMessageDataWithSignalData(&message, 30u, 1u, data, endianness);
350 
351  /* Warning: Undervoltage - RSL */
352  data = kpkCanShim->pTableRsl->underVoltage[stringNumber];
353  CAN_TxSetMessageDataWithSignalData(&message, 31u, 1u, data, endianness);
354 
355  /* Error: Positive string contactor: TODO */
356  /* Error: Negative string contactor: TODO */
357  /* Error: Slave hardware: TODO */
358 
359  /* Error: Daisy-chain base: communication */
360  data = kpkCanShim->pTableErrorState->spiError[stringNumber];
361  CAN_TxSetMessageDataWithSignalData(&message, 35u, 1u, data, endianness);
362 
363  /* Error: Daisy-chain redundancy: communication: TODO */
364  /* Error: Daisy-chain base: CRC */
365  data = kpkCanShim->pTableErrorState->crcError[stringNumber];
366  CAN_TxSetMessageDataWithSignalData(&message, 37u, 1u, data, endianness);
367 
368  /* Error: Daisy-chain redundancy: CRC: TODO */
369  /* Error: Daisy-chain base: Voltage out of operating range */
370  data = kpkCanShim->pTableErrorState->micCellvoltageError[stringNumber];
371  CAN_TxSetMessageDataWithSignalData(&message, 39u, 1u, data, endianness);
372 
373  /* Error: Daisy-chain redundancy: Voltage out of operating range: TODO */
374  /* Error: Daisy-chain base: Temperature out of operating range */
375  data = kpkCanShim->pTableErrorState->micCellTemperatureError[stringNumber];
376  CAN_TxSetMessageDataWithSignalData(&message, 41u, 1u, data, endianness);
377 
378  /* Error: Daisy-chain redundancy: Voltage out of operating range: TODO */
379 
380  /* Error: current measurement */
381  if ((1u == kpkCanShim->pTableErrorState->currentMeasurementError[stringNumber]) ||
382  (1u == kpkCanShim->pTableErrorState->currentMeasurementTimeout[stringNumber])) {
383  data = 1u;
384  } else {
385  data = 0u;
386  }
387  CAN_TxSetMessageDataWithSignalData(&message, 43u, 1u, data, endianness);
388 
389  /* Error: Coulomb counting measurement */
390  data = kpkCanShim->pTableErrorState->canTimingCc[stringNumber];
391  CAN_TxSetMessageDataWithSignalData(&message, 44u, 1u, data, endianness);
392 
393  /* Error: Energy counting measurement */
394  data = kpkCanShim->pTableErrorState->canTimingEc[stringNumber];
395  CAN_TxSetMessageDataWithSignalData(&message, 45u, 1u, data, endianness);
396 
397  /* Error: Current sensor V1 measurement */
398  data = kpkCanShim->pTableErrorState->currentSensorTimeoutV1[stringNumber];
399  CAN_TxSetMessageDataWithSignalData(&message, 46u, 1u, data, endianness);
400 
401  /* Error: Current sensor V2 measurement: TODO */
402  /* Error: Current sensor V3 measurement */
403  data = kpkCanShim->pTableErrorState->currentSensorTimeoutV3[stringNumber];
404  CAN_TxSetMessageDataWithSignalData(&message, 48u, 1u, data, endianness);
405 
406  /* Error: Open wire */
407  data = kpkCanShim->pTableErrorState->open_wire[stringNumber];
408  CAN_TxSetMessageDataWithSignalData(&message, 49u, 1u, data, endianness);
409 
410  /* Error: Plausibility: Cell temperature */
411  data = kpkCanShim->pTableErrorState->plausibilityCheckCelltemperature[stringNumber];
412  CAN_TxSetMessageDataWithSignalData(&message, 51u, 1u, data, endianness);
413 
414  /* Error: Plausibility: Cell voltage */
415  data = kpkCanShim->pTableErrorState->plausibilityCheckCellvoltage[stringNumber];
416  CAN_TxSetMessageDataWithSignalData(&message, 52u, 1u, data, endianness);
417 
418  /* Error: Plausibility: String voltage */
419  data = kpkCanShim->pTableErrorState->plausibilityCheckPackvoltage[stringNumber];
420  CAN_TxSetMessageDataWithSignalData(&message, 53u, 1u, data, endianness);
421 
422  /* Error: Plausibility: Cell temperature spread */
423  data = kpkCanShim->pTableErrorState->plausibilityCheckCelltemperatureSpread[stringNumber];
424  CAN_TxSetMessageDataWithSignalData(&message, 54u, 1u, data, endianness);
425 
426  /* Error: Plausibility: Cell voltage spread */
427  data = kpkCanShim->pTableErrorState->plausibilityCheckCellvoltageSpread[stringNumber];
428  CAN_TxSetMessageDataWithSignalData(&message, 55u, 1u, data, endianness);
429  /* AXIVION Enable Style Generic-NoMagicNumbers: */
430 
431  /* Open wire number: TODO */
432 
433  /* now copy data in the buffer that will be used to send data */
434  CAN_TxSetCanDataWithMessageData(message, pCanData, endianness);
435 
436  /* Increment multiplexer for next cell */
437  (*pMuxId)++;
438 
439  /* Check mux value */
440  if (*pMuxId >= BS_NR_OF_STRINGS) {
441  *pMuxId = 0u;
442  }
443 
444  return 0;
445 }
446 
447 /*========== Externalized Static Function Implementations (Unit Test) =======*/
448 #ifdef UNITY_UNIT_TEST
449 
450 #endif
#define BS_NR_OF_STRINGS
bool BMS_IsTransitionToErrorStateActive(void)
Check if transition in to error state is active.
Definition: bms.c:1321
uint8_t BMS_GetNumberOfConnectedStrings(void)
Returns number of connected strings.
Definition: bms.c:1317
bool BMS_IsStringClosed(uint8_t stringNumber)
Returns string state (closed or open)
Definition: bms.c:1299
BMS_STATEMACH_e BMS_GetState(void)
Returns the current state.
Definition: bms.c:629
bms driver header
CAN callbacks header.
uint32_t CAN_TxStringState(uint32_t id, uint8_t dlc, CAN_ENDIANNESS_e endianness, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for string state values
uint32_t CAN_TxState(uint32_t id, uint8_t dlc, CAN_ENDIANNESS_e endianness, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can tx callback function for state
#define CAN_MAX_11BIT_ID
Definition: can_cfg.h:68
enum CAN_ENDIANNESS CAN_ENDIANNESS_e
#define CAN_MAX_DLC
Definition: can_cfg.h:70
void CAN_TxSetMessageDataWithSignalData(uint64_t *pMessage, uint64_t bitStart, uint8_t bitLength, uint64_t canSignal, CAN_ENDIANNESS_e endianness)
Puts CAN signal data in a 64-bit variable. This function is used to compose a 64-bit CAN message....
Definition: can_helper.c:166
void CAN_TxSetCanDataWithMessageData(uint64_t message, uint8_t *pCanData, CAN_ENDIANNESS_e endianness)
Copy CAN data from a 64-bit variable to 8 bytes. This function is used to copy a 64-bit CAN message t...
Definition: can_helper.c:205
Headers for the helper functions for the CAN module.
#define DATA_READ_DATA(...)
Definition: database.h:76
bool DIAG_IsAnyFatalErrorSet(void)
Check if any fatal error is set.
Definition: diag.c:374
Diagnosis driver header.
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
Definition: fassert.h:233
#define NULL_PTR
Null pointer.
Definition: fstd_types.h:66
DATA_BLOCK_MOL_FLAG_s * pTableMol
Definition: can_cfg.h:309
DATA_BLOCK_INSULATION_MONITORING_s * pTableInsulation
Definition: can_cfg.h:306
DATA_BLOCK_RSL_FLAG_s * pTableRsl
Definition: can_cfg.h:308
DATA_BLOCK_MSL_FLAG_s * pTableMsl
Definition: can_cfg.h:307
DATA_BLOCK_ERRORSTATE_s * pTableErrorState
Definition: can_cfg.h:305
uint8_t currentSensorTimeoutV3[BS_NR_OF_STRINGS]
Definition: database_cfg.h:345
uint8_t plausibilityCheckCelltemperature[BS_NR_OF_STRINGS]
Definition: database_cfg.h:362
uint8_t currentMeasurementTimeout[BS_NR_OF_STRINGS]
Definition: database_cfg.h:342
uint8_t deepDischargeDetected[BS_NR_OF_STRINGS]
Definition: database_cfg.h:363
uint8_t crcError[BS_NR_OF_STRINGS]
Definition: database_cfg.h:332
uint8_t canTimingEc[BS_NR_OF_STRINGS]
Definition: database_cfg.h:355
uint8_t plausibilityCheckPackvoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:358
uint8_t currentMeasurementError[BS_NR_OF_STRINGS]
Definition: database_cfg.h:343
uint8_t plausibilityCheckCellvoltageSpread[BS_NR_OF_STRINGS]
Definition: database_cfg.h:360
uint8_t currentSensorTimeoutV1[BS_NR_OF_STRINGS]
Definition: database_cfg.h:344
uint8_t spiError[BS_NR_OF_STRINGS]
Definition: database_cfg.h:334
uint8_t open_wire[BS_NR_OF_STRINGS]
Definition: database_cfg.h:351
uint8_t fuseStateNormal[BS_NR_OF_STRINGS]
Definition: database_cfg.h:349
uint8_t fuseStateCharge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:350
uint8_t plausibilityCheckCelltemperatureSpread[BS_NR_OF_STRINGS]
Definition: database_cfg.h:361
uint8_t plausibilityCheckCellvoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:359
uint8_t micCellTemperatureError[BS_NR_OF_STRINGS]
Definition: database_cfg.h:337
uint8_t micCellvoltageError[BS_NR_OF_STRINGS]
Definition: database_cfg.h:336
uint8_t canTimingCc[BS_NR_OF_STRINGS]
Definition: database_cfg.h:354
uint8_t stringDischargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:483
uint8_t overtemperatureDischarge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:477
uint8_t cellDischargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:482
uint8_t underVoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:475
uint8_t overtemperatureCharge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:476
uint8_t stringChargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:481
uint8_t undertemperatureCharge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:478
uint8_t cellChargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:480
uint8_t overVoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:474
uint8_t packDischargeOvercurrent
Definition: database_cfg.h:433
uint8_t cellChargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:440
uint8_t overtemperatureDischarge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:437
uint8_t undertemperatureCharge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:438
uint8_t stringDischargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:443
uint8_t underVoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:435
uint8_t stringChargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:441
uint8_t packChargeOvercurrent
Definition: database_cfg.h:432
uint8_t cellDischargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:442
uint8_t overtemperatureCharge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:436
uint8_t undertemperatureDischarge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:439
uint8_t overVoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:434
uint8_t overtemperatureDischarge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:457
uint8_t overVoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:454
uint8_t stringChargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:461
uint8_t overtemperatureCharge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:456
uint8_t undertemperatureCharge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:458
uint8_t undertemperatureDischarge[BS_NR_OF_STRINGS]
Definition: database_cfg.h:459
uint8_t cellChargeOvercurrent[BS_NR_OF_STRINGS]
Definition: database_cfg.h:460
uint8_t underVoltage[BS_NR_OF_STRINGS]
Definition: database_cfg.h:455