foxBMS  1.1.2
The foxBMS Battery Management System API Documentation
diag_cfg.h
Go to the documentation of this file.
1 /**
2  *
3  * @copyright © 2010 - 2021, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V.
4  * All rights reserved.
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are met:
10  *
11  * 1. Redistributions of source code must retain the above copyright notice, this
12  * list of conditions and the following disclaimer.
13  *
14  * 2. Redistributions in binary form must reproduce the above copyright notice,
15  * this list of conditions and the following disclaimer in the documentation
16  * and/or other materials provided with the distribution.
17  *
18  * 3. Neither the name of the copyright holder nor the names of its
19  * contributors may be used to endorse or promote products derived from
20  * this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  *
33  * We kindly request you to use one or more of the following phrases to refer to
34  * foxBMS in your hardware, software, documentation or advertising materials:
35  *
36  * - ″This product uses parts of foxBMS®″
37  * - ″This product includes parts of foxBMS®″
38  * - ″This product is derived from foxBMS®″
39  *
40  */
41 
42 /**
43  * @file diag_cfg.h
44  * @author foxBMS Team
45  * @date 2019-11-28 (date of creation)
46  * @updated 2021-07-29 (date of last update)
47  * @ingroup ENGINE_CONFIGURATION
48  * @prefix DIAG
49  *
50  * @brief Diagnostic module configuration header
51  * @details In this header filer are the different diagnosis channel defines
52  * assigned to different diagnosis IDs. Furthermore are the diagnosis
53  * error log settings be configured here.
54  */
55 
56 #ifndef FOXBMS__DIAG_CFG_H_
57 #define FOXBMS__DIAG_CFG_H_
58 
59 /*========== Includes =======================================================*/
60 #include "general.h"
61 
62 #include "battery_system_cfg.h"
63 #include "database_cfg.h"
64 
65 /*========== Macros and Definitions =========================================*/
66 #define DIAG_ERROR_SENSITIVITY_FIRST_EVENT (0) /*!< logging at first event */
67 #define DIAG_ERROR_SENSITIVITY_THIRD_EVENT (2) /*!< logging at first event */
68 #define DIAG_ERROR_SENSITIVITY_FIFTH_EVENT (4) /*!< logging at first event */
69 #define DIAG_ERROR_SENSITIVITY_TENTH_EVENT (9) /*!< logging at tenth event */
70 
71 #define DIAG_ERROR_SENSITIVITY_HIGH (0) /*!< logging at first event */
72 #define DIAG_ERROR_SENSITIVITY_MID (5) /*!< logging at fifth event */
73 #define DIAG_ERROR_SENSITIVITY_LOW (10) /*!< logging at tenth event */
74 
75 #define DIAG_ERROR_INTERLOCK_SENSITIVITY (10) /*!< logging level of interlock */
76 
77 #define DIAG_ERROR_VOLTAGE_SENSITIVITY_MSL (500) /*!< MSL level for event occurrence if over/under voltage event */
78 #define DIAG_ERROR_VOLTAGE_SENSITIVITY_RSL (500) /*!< RSL level for event occurrence if over/under voltage event */
79 #define DIAG_ERROR_VOLTAGE_SENSITIVITY_MOL (500) /*!< MOL level for event occurrence if over/under voltage event */
80 
81 /** MSL level for event occurrence if over/under temperature event */
82 #define DIAG_ERROR_TEMPERATURE_SENSITIVITY_MSL (500)
83 /** RSL level for event occurrence if over/under temperature event */
84 #define DIAG_ERROR_TEMPERATURE_SENSITIVITY_RSL (500)
85 /** MOL level for event occurrence if over/under temperature event */
86 #define DIAG_ERROR_TEMPERATURE_SENSITIVITY_MOL (500)
87 
88 /** MSL level for event occurrence if over/under current event */
89 #define DIAG_ERROR_CURRENT_SENSITIVITY_MSL (500)
90 /** RSL level for event occurrence if over/under current event */
91 #define DIAG_ERROR_CURRENT_SENSITIVITY_RSL (500)
92 /** MOL level for event occurrence if over/under current event */
93 #define DIAG_ERROR_CURRENT_SENSITIVITY_MOL (500)
94 
95 #define DIAG_ERROR_LTC_PEC_SENSITIVITY (5) /*!< logging level of LTC PEC errors */
96 #define DIAG_ERROR_LTC_MUX_SENSITIVITY (5) /*!< logging level of LTC MUX errors */
97 #define DIAG_ERROR_LTC_SPI_SENSITIVITY (5) /*!< logging level of LTC SPI errors */
98 
99 #define DIAG_ERROR_CAN_TIMING_SENSITIVITY (100) /*!< logging level of CAN timing errors */
100 #define DIAG_ERROR_CAN_TIMING_CC_SENSITIVITY (100) /*!< logging level of CAN timing errors on the current sensor */
101 #define DIAG_ERROR_CAN_SENSOR_SENSITIVITY (100) /*!< logging level of CAN errors on the current sensor */
102 
103 /** logging level of errors connected with the contactor feedback */
104 #define DIAG_ERROR_CONTACTOR_FEEDBACK_SENSITIVITY (20)
105 
106 /** define if delay in #DIAG_ID_CFG_s is discarded because of severity level */
107 #define DIAG_DELAY_DISCARDED (UINT32_MAX)
108 /** no delay after error is detected, open contactors instantaneous */
109 #define DIAG_NO_DELAY (0u)
110 /** delay for interlock error */
111 #define DIAG_DELAY_INTERLOCK_ms (100u)
112 /** delay for overvoltage errors */
113 #define DIAG_DELAY_OVERVOLTAGE_ms (200u)
114 /** delay for undervoltage errors */
115 #define DIAG_DELAY_UNDERVOLTAGE_ms (200u)
116 /** delay for temperature errors */
117 #define DIAG_DELAY_TEMPERATURE_ms (1000u)
118 /** delay for overcurrent errors */
119 #define DIAG_DELAY_OVERCURRENT_ms (100u)
120 /** delay for mic related errors */
121 #define DIAG_DELAY_MIC_ms (100u)
122 /** delay for can timing error */
123 #define DIAG_DELAY_CAN_TIMING_ms (200u)
124 /** delay for energy counting/coulomb counting timing error */
125 #define DIAG_DELAY_EC_CC_TIMING_ms (2000u)
126 /** delay for current sensor response error */
127 #define DIAG_DELAY_CURRENT_SENSOR_ms (200u)
128 /** delay for SBC related errors */
129 #define DIAG_DELAY_SBC_ms (100u)
130 /** delay for pack voltage plausibility error */
131 #define DIAG_DELAY_PL_PACK_VOLTAGE_ms (100u)
132 /** delay for contactor feedback errors */
133 #define DIAG_DELAY_CONTACTOR_FEEDBACK_ms (100u)
134 /** delay for deep-discharge error */
135 #define DIAG_DELAY_DEEP_DISCHARGE_ms (100u)
136 /** delay redundancy measurement timeout errors */
137 #define DIAG_DELAY_REDUNDANCY_MEAS_TIMEOUT_ms (100u)
138 /** delay redundancy measurement errors */
139 #define DIAG_DELAY_REDUNDANCY_MEAS_ERROR_ms (100u)
140 
141 /** Maximum number of the same errors that are logged */
142 #define DIAG_MAX_ENTRIES_OF_ERROR (5)
143 
144 /** composite type for storing and passing on the local database table handles */
145 typedef struct DIAG_DATABASE_SHIM {
146  DATA_BLOCK_ERRORSTATE_s *pTableError; /*!< database table with errorstates */
147  DATA_BLOCK_MOL_FLAG_s *pTableMol; /*!< database table with MOL flags */
148  DATA_BLOCK_RSL_FLAG_s *pTableRsl; /*!< database table with RSL flags */
149  DATA_BLOCK_MSL_FLAG_s *pTableMsl; /*!< database table with MSL flags */
151 
152 /** variable for storing and passing on the local database table handles */
154 
155 /** list of diag IDs */
156 typedef enum DIAG_ID {
157  DIAG_ID_FLASHCHECKSUM, /**< TODO */
159  DIAG_ID_CONFIGASSERT, /**< TODO*/
175  DIAG_ID_CELLVOLTAGE_OVERVOLTAGE_MSL, /* Cell voltage limits violated */
176  DIAG_ID_CELLVOLTAGE_OVERVOLTAGE_RSL, /* Cell voltage limits violated */
177  DIAG_ID_CELLVOLTAGE_OVERVOLTAGE_MOL, /* Cell voltage limits violated */
178  DIAG_ID_CELLVOLTAGE_UNDERVOLTAGE_MSL, /* Cell voltage limits violated */
179  DIAG_ID_CELLVOLTAGE_UNDERVOLTAGE_RSL, /* Cell voltage limits violated */
180  DIAG_ID_CELLVOLTAGE_UNDERVOLTAGE_MOL, /* Cell voltage limits violated */
181  DIAG_ID_TEMP_OVERTEMPERATURE_CHARGE_MSL, /* Temperature limits violated */
182  DIAG_ID_TEMP_OVERTEMPERATURE_CHARGE_RSL, /* Temperature limits violated */
183  DIAG_ID_TEMP_OVERTEMPERATURE_CHARGE_MOL, /* Temperature limits violated */
184  DIAG_ID_TEMP_OVERTEMPERATURE_DISCHARGE_MSL, /* Temperature limits violated */
185  DIAG_ID_TEMP_OVERTEMPERATURE_DISCHARGE_RSL, /* Temperature limits violated */
186  DIAG_ID_TEMP_OVERTEMPERATURE_DISCHARGE_MOL, /* Temperature limits violated */
187  DIAG_ID_TEMP_UNDERTEMPERATURE_CHARGE_MSL, /* Temperature limits violated */
188  DIAG_ID_TEMP_UNDERTEMPERATURE_CHARGE_RSL, /* Temperature limits violated */
189  DIAG_ID_TEMP_UNDERTEMPERATURE_CHARGE_MOL, /* Temperature limits violated */
190  DIAG_ID_TEMP_UNDERTEMPERATURE_DISCHARGE_MSL, /* Temperature limits violated */
191  DIAG_ID_TEMP_UNDERTEMPERATURE_DISCHARGE_RSL, /* Temperature limits violated */
192  DIAG_ID_TEMP_UNDERTEMPERATURE_DISCHARGE_MOL, /* Temperature limits violated */
193  DIAG_ID_OVERCURRENT_CHARGE_CELL_MSL, /* Overcurrent on cell-level */
194  DIAG_ID_OVERCURRENT_CHARGE_CELL_RSL, /* Overcurrent on cell-level */
195  DIAG_ID_OVERCURRENT_CHARGE_CELL_MOL, /* Overcurrent on cell-level */
196  DIAG_ID_OVERCURRENT_DISCHARGE_CELL_MSL, /* Overcurrent on cell-level */
197  DIAG_ID_OVERCURRENT_DISCHARGE_CELL_RSL, /* Overcurrent on cell-level */
198  DIAG_ID_OVERCURRENT_DISCHARGE_CELL_MOL, /* Overcurrent on cell-level */
199  DIAG_ID_STRING_OVERCURRENT_CHARGE_MSL, /* Overcurrent on string-level */
200  DIAG_ID_STRING_OVERCURRENT_CHARGE_RSL, /* Overcurrent on string-level */
201  DIAG_ID_STRING_OVERCURRENT_CHARGE_MOL, /* Overcurrent on string-level */
202  DIAG_ID_STRING_OVERCURRENT_DISCHARGE_MSL, /* Overcurrent on string-level */
203  DIAG_ID_STRING_OVERCURRENT_DISCHARGE_RSL, /* Overcurrent on string-level */
204  DIAG_ID_STRING_OVERCURRENT_DISCHARGE_MOL, /* Overcurrent on string-level */
205  DIAG_ID_PACK_OVERCURRENT_CHARGE_MSL, /* Overcurrent on string-level */
206  DIAG_ID_PACK_OVERCURRENT_DISCHARGE_MSL, /* Overcurrent on pack-level */
207  DIAG_ID_CURRENT_ON_OPEN_STRING, /* Current flowing on open string */
229  DIAG_ID_MAX, /**< MAX indicator - do not change */
231 
232 /** diagnosis check result (event) */
233 typedef enum DIAG_EVENT {
234  DIAG_EVENT_OK, /**< diag channel event OK */
235  DIAG_EVENT_NOT_OK, /**< diag channel event NOK */
236  DIAG_EVENT_RESET, /**< reset diag channel eventcounter to 0 */
238 
239 /** enable or disable the diagnosis handling for an event */
240 typedef enum DIAG_EVALUATE {
241  DIAG_EVALUATION_ENABLED, /**< enables evaluation of diagnosis handling */
242  DIAG_EVALUATION_DISABLED, /**< disables evaluation of diagnosis handling */
244 
245 /** impact level of diagnosis event, e.g., influences the event the whole system or only a string */
246 typedef enum DIAG_IMPACT_LEVEL {
247  DIAG_SYSTEM, /**< diag event impact is system related e.g., can timing */
248  DIAG_STRING, /**< diag event impact is string related e.g., overvoltage in string x */
250 
251 /**
252  * @def DIAG_CAN_TIMING
253  * @brief Value that is written into the field that describes whether CAN
254  * timing diag entries should be generated
255  */
256 #if CHECK_CAN_TIMING == true
257 #define DIAG_CAN_TIMING (DIAG_EVALUATION_ENABLED)
258 #else
259 #define DIAG_CAN_TIMING (DIAG_EVALUATION_DISABLED)
260 #endif
261 
262 /**
263  * @def DIAG_CAN_SENSOR_PRESENT
264  * @brief Value that is written into the field that describes whether current
265  * sensor diag entries should be generated if it is not present
266  */
267 #if CURRENT_SENSOR_PRESENT == true
268 #define DIAG_CAN_SENSOR_PRESENT (DIAG_EVALUATION_ENABLED)
269 #else /* CURRENT_SENSOR_PRESENT == true */
270 #define DIAG_CAN_SENSOR_PRESENT (DIAG_EVALUATION_DISABLED)
271 #endif /* CURRENT_SENSOR_PRESENT */
272 
273 /** diagnosis severity level */
274 typedef enum DIAG_SEVERITY_LEVEL {
279 
280 /** diagnosis recording activation */
281 typedef enum DIAG_RECORDING {
282  DIAG_RECORDING_ENABLED, /**< enable diagnosis event recording */
283  DIAG_RECORDING_DISABLED, /**< disable diagnosis event recording */
285 
286 /**
287  * @brief function type for diag callbacks
288  * @param[in] ch_id ID of diag entry
289  * @param[in] event #DIAG_EVENT_e
290  * @param[in] kpkDiagShim shim to the database entries
291  * @param[in] data data
292  */
294  DIAG_ID_e ch_id,
295  DIAG_EVENT_e event,
296  const DIAG_DATABASE_SHIM_s *const kpkDiagShim,
297  uint32_t data);
298 
299 /** Channel configuration of one diag channel */
300 typedef struct DIAG_CH_CFG {
301  DIAG_ID_e id; /**< diagnosis event id diag_id */
302  uint16_t threshold; /**< threshold for number of events which will be
303  * tolerated before generating a notification in both directions:
304  * threshold = 0: reports the value at first occurrence,
305  * threshold = 1: reports the value at second occurrence */
307  severity; /**< severity of diag entry, #DIAG_FATAL_ERROR will lead to an opening of the contactors */
308  uint32_t
309  delay_ms; /**< delay in ms after error detection if severity is #DIAG_FATAL_ERROR until an opening the contactors */
310  DIAG_RECORDING_e enable_recording; /**< if enabled recording in diag_memory * will be activated */
311  DIAG_EVALUATE_e enable_evaluate; /**< if enabled diagnosis event will be evaluated */
312  DIAG_CALLBACK_FUNCTION_f *fpCallback; /**< will be called if
313  * number of events exceeds threshold in both
314  * directions with parameter DIAG_EVENT_e
315  * string id or system related data */
317 
318 /** struct for device Configuration of diag module */
319 typedef struct DIAG_DEV {
320  uint8_t nr_of_ch; /*!< number of entries in DIAG_ID_CFG_s */
321  DIAG_ID_CFG_s *ch_cfg; /*!< pointer to diag channel config struct */
322  uint16_t numberOfFatalErrors; /*!< number of configured diagnosis entries with severity #DIAG_FATAL_ERROR */
324  [DIAG_ID_MAX]; /*!< list with pointers to all diagnosis entries with severity #DIAG_FATAL_ERROR */
326 
327 /*========== Extern Constant and Variable Declarations ======================*/
328 /** diag device configuration struct */
329 extern DIAG_DEV_s diag_device;
331 
332 /*========== Extern Function Prototypes =====================================*/
333 /**
334  * @brief update function for diagnosis flags
335  * @details TODO
336  */
337 extern void DIAG_UpdateFlags(void);
338 
339 /*========== Externalized Static Functions Prototypes (Unit Test) ===========*/
340 
341 #endif /* FOXBMS__DIAG_CFG_H_ */
Configuration of the battery system (e.g., number of battery modules, battery cells,...
Database configuration header.
DIAG_IMPACT_LEVEL
Definition: diag_cfg.h:246
@ DIAG_SYSTEM
Definition: diag_cfg.h:247
@ DIAG_STRING
Definition: diag_cfg.h:248
DIAG_SEVERITY_LEVEL
Definition: diag_cfg.h:274
@ DIAG_WARNING
Definition: diag_cfg.h:276
@ DIAG_INFO
Definition: diag_cfg.h:277
@ DIAG_FATAL_ERROR
Definition: diag_cfg.h:275
void DIAG_CALLBACK_FUNCTION_f(DIAG_ID_e ch_id, DIAG_EVENT_e event, const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t data)
function type for diag callbacks
Definition: diag_cfg.h:293
enum DIAG_EVENT DIAG_EVENT_e
enum DIAG_SEVERITY_LEVEL DIAG_SEVERITY_LEVEL_e
DIAG_RECORDING
Definition: diag_cfg.h:281
@ DIAG_RECORDING_ENABLED
Definition: diag_cfg.h:282
@ DIAG_RECORDING_DISABLED
Definition: diag_cfg.h:283
DIAG_EVENT
Definition: diag_cfg.h:233
@ DIAG_EVENT_RESET
Definition: diag_cfg.h:236
@ DIAG_EVENT_NOT_OK
Definition: diag_cfg.h:235
@ DIAG_EVENT_OK
Definition: diag_cfg.h:234
enum DIAG_IMPACT_LEVEL DIAG_IMPACT_LEVEL_e
struct DIAG_CH_CFG DIAG_ID_CFG_s
struct DIAG_DATABASE_SHIM DIAG_DATABASE_SHIM_s
DIAG_ID_CFG_s DIAG_ID_cfg[DIAG_ID_MAX]
Definition: diag_cfg.c:114
enum DIAG_ID DIAG_ID_e
DIAG_ID
Definition: diag_cfg.h:156
@ DIAG_ID_TEMP_OVERTEMPERATURE_DISCHARGE_MSL
Definition: diag_cfg.h:184
@ DIAG_ID_POWER_MEASUREMENT_ERROR
Definition: diag_cfg.h:225
@ DIAG_ID_PACK_OVERCURRENT_CHARGE_MSL
Definition: diag_cfg.h:205
@ DIAG_ID_OVERCURRENT_CHARGE_CELL_RSL
Definition: diag_cfg.h:194
@ DIAG_ID_INSULATION_MEASUREMENT_INVALID
Definition: diag_cfg.h:226
@ DIAG_ID_CAN_CC_RESPONDING
Definition: diag_cfg.h:166
@ DIAG_ID_CURRENT_MEASUREMENT_TIMEOUT
Definition: diag_cfg.h:220
@ DIAG_ID_CELLVOLTAGE_UNDERVOLTAGE_RSL
Definition: diag_cfg.h:179
@ DIAG_ID_TEMP_UNDERTEMPERATURE_CHARGE_MSL
Definition: diag_cfg.h:187
@ DIAG_ID_PLAUSIBILITY_CELL_TEMPERATURE_SPREAD
Definition: diag_cfg.h:174
@ DIAG_ID_TEMP_OVERTEMPERATURE_DISCHARGE_RSL
Definition: diag_cfg.h:185
@ DIAG_ID_STRING_OVERCURRENT_DISCHARGE_MOL
Definition: diag_cfg.h:204
@ DIAG_ID_BASE_CELL_TEMPERATURE_MESUREMENT_TIMEOUT
Definition: diag_cfg.h:218
@ DIAG_ID_STRING_OVERCURRENT_DISCHARGE_RSL
Definition: diag_cfg.h:203
@ DIAG_ID_PLAUSIBILITY_CELL_VOLTAGE_SPREAD
Definition: diag_cfg.h:173
@ DIAG_ID_TEMP_UNDERTEMPERATURE_DISCHARGE_RSL
Definition: diag_cfg.h:191
@ DIAG_ID_PLAUSIBILITY_PACK_VOLTAGE
Definition: diag_cfg.h:210
@ DIAG_ID_REDUNDANCY0_CELL_TEMPERATURE_MESUREMENT_TIMEOUT
Definition: diag_cfg.h:219
@ DIAG_ID_CELLVOLTAGE_OVERVOLTAGE_MOL
Definition: diag_cfg.h:177
@ DIAG_ID_STRING_OVERCURRENT_CHARGE_RSL
Definition: diag_cfg.h:200
@ DIAG_ID_PLAUSIBILITY_CELL_VOLTAGE
Definition: diag_cfg.h:169
@ DIAG_ID_FLASHCHECKSUM
Definition: diag_cfg.h:157
@ DIAG_ID_PLAUSIBILITY_CELL_TEMP
Definition: diag_cfg.h:172
@ DIAG_ID_OVERCURRENT_DISCHARGE_CELL_MSL
Definition: diag_cfg.h:196
@ DIAG_ID_CELLVOLTAGE_OVERVOLTAGE_RSL
Definition: diag_cfg.h:176
@ DIAG_ID_CONFIGASSERT
Definition: diag_cfg.h:159
@ DIAG_ID_TEMP_UNDERTEMPERATURE_CHARGE_RSL
Definition: diag_cfg.h:188
@ DIAG_ID_TEMP_OVERTEMPERATURE_DISCHARGE_MOL
Definition: diag_cfg.h:186
@ DIAG_ID_STRING_OVERCURRENT_CHARGE_MSL
Definition: diag_cfg.h:199
@ DIAG_ID_STRING_OVERCURRENT_CHARGE_MOL
Definition: diag_cfg.h:201
@ DIAG_ID_TEMP_OVERTEMPERATURE_CHARGE_MSL
Definition: diag_cfg.h:181
@ DIAG_ID_OPEN_WIRE
Definition: diag_cfg.h:209
@ DIAG_ID_CURRENT_SENSOR_POWER_MEASUREMENT_TIMEOUT
Definition: diag_cfg.h:224
@ DIAG_ID_LTC_PEC
Definition: diag_cfg.h:161
@ DIAG_ID_INSULATION_GROUND_ERROR
Definition: diag_cfg.h:228
@ DIAG_ID_TEMP_OVERTEMPERATURE_CHARGE_MOL
Definition: diag_cfg.h:183
@ DIAG_ID_TEMP_UNDERTEMPERATURE_CHARGE_MOL
Definition: diag_cfg.h:189
@ DIAG_ID_INSULATION_ERROR
Definition: diag_cfg.h:227
@ DIAG_ID_STRING_CONTACTOR_FEEDBACK
Definition: diag_cfg.h:212
@ DIAG_ID_MAX
Definition: diag_cfg.h:229
@ DIAG_ID_SBC_RSTB_STATE
Definition: diag_cfg.h:215
@ DIAG_ID_PRECHARGE_CONTACTOR_FEEDBACK
Definition: diag_cfg.h:213
@ DIAG_ID_CAN_TIMING
Definition: diag_cfg.h:164
@ DIAG_ID_PACK_OVERCURRENT_DISCHARGE_MSL
Definition: diag_cfg.h:206
@ DIAG_ID_REDUNDANCY0_CELL_VOLTAGE_MESUREMENT_TIMEOUT
Definition: diag_cfg.h:217
@ DIAG_ID_CURRENT_SENSOR_V1_MEASUREMENT_TIMEOUT
Definition: diag_cfg.h:222
@ DIAG_ID_DEEP_DISCHARGE_DETECTED
Definition: diag_cfg.h:208
@ DIAG_ID_CURRENT_SENSOR_V3_MEASUREMENT_TIMEOUT
Definition: diag_cfg.h:223
@ DIAG_ID_TEMP_UNDERTEMPERATURE_DISCHARGE_MOL
Definition: diag_cfg.h:192
@ DIAG_ID_BASE_CELL_VOLTAGE_MESUREMENT_TIMEOUT
Definition: diag_cfg.h:216
@ DIAG_ID_SBC_FIN_STATE
Definition: diag_cfg.h:214
@ DIAG_ID_MEASUREMENT_IC_CELL_VOLTAGE_MEAS_ERROR
Definition: diag_cfg.h:170
@ DIAG_ID_CURRENT_ON_OPEN_STRING
Definition: diag_cfg.h:207
@ DIAG_ID_STRING_OVERCURRENT_DISCHARGE_MSL
Definition: diag_cfg.h:202
@ DIAG_ID_OVERCURRENT_CHARGE_CELL_MSL
Definition: diag_cfg.h:193
@ DIAG_ID_LTC_MUX
Definition: diag_cfg.h:162
@ DIAG_ID_OVERCURRENT_DISCHARGE_CELL_MOL
Definition: diag_cfg.h:198
@ DIAG_ID_CURRENT_SENSOR_RESPONDING
Definition: diag_cfg.h:168
@ DIAG_ID_CURRENT_MEASUREMENT_ERROR
Definition: diag_cfg.h:221
@ DIAG_ID_CAN_RX_QUEUE_FULL
Definition: diag_cfg.h:165
@ DIAG_ID_CELLVOLTAGE_UNDERVOLTAGE_MOL
Definition: diag_cfg.h:180
@ DIAG_ID_OVERCURRENT_CHARGE_CELL_MOL
Definition: diag_cfg.h:195
@ DIAG_ID_CAN_EC_RESPONDING
Definition: diag_cfg.h:167
@ DIAG_ID_CELLVOLTAGE_OVERVOLTAGE_MSL
Definition: diag_cfg.h:175
@ DIAG_ID_LTC_SPI
Definition: diag_cfg.h:160
@ DIAG_ID_TEMP_OVERTEMPERATURE_CHARGE_RSL
Definition: diag_cfg.h:182
@ DIAG_ID_MEASUREMENT_IC_CELL_TEMPERATURE_MEAS_ERROR
Definition: diag_cfg.h:171
@ DIAG_ID_INTERLOCK_FEEDBACK
Definition: diag_cfg.h:211
@ DIAG_ID_OVERCURRENT_DISCHARGE_CELL_RSL
Definition: diag_cfg.h:197
@ DIAG_ID_CELLVOLTAGE_UNDERVOLTAGE_MSL
Definition: diag_cfg.h:178
@ DIAG_ID_TEMP_UNDERTEMPERATURE_DISCHARGE_MSL
Definition: diag_cfg.h:190
@ DIAG_ID_LTC_CONFIG
Definition: diag_cfg.h:163
@ DIAG_ID_SYSTEMMONITORING
Definition: diag_cfg.h:158
void DIAG_UpdateFlags(void)
update function for diagnosis flags
Definition: diag_cfg.c:222
struct DIAG_DEV DIAG_DEV_s
DIAG_EVALUATE
Definition: diag_cfg.h:240
@ DIAG_EVALUATION_ENABLED
Definition: diag_cfg.h:241
@ DIAG_EVALUATION_DISABLED
Definition: diag_cfg.h:242
enum DIAG_RECORDING DIAG_RECORDING_e
enum DIAG_EVALUATE DIAG_EVALUATE_e
const DIAG_DATABASE_SHIM_s diag_kDatabaseShim
Definition: diag_cfg.c:103
DIAG_DEV_s diag_device
Definition: diag_cfg.c:212
General macros and definitions for the whole platform.
DIAG_RECORDING_e enable_recording
Definition: diag_cfg.h:310
DIAG_CALLBACK_FUNCTION_f * fpCallback
Definition: diag_cfg.h:312
DIAG_ID_e id
Definition: diag_cfg.h:301
DIAG_EVALUATE_e enable_evaluate
Definition: diag_cfg.h:311
uint32_t delay_ms
Definition: diag_cfg.h:309
uint16_t threshold
Definition: diag_cfg.h:302
DIAG_SEVERITY_LEVEL_e severity
Definition: diag_cfg.h:307
DATA_BLOCK_MSL_FLAG_s * pTableMsl
Definition: diag_cfg.h:149
DATA_BLOCK_RSL_FLAG_s * pTableRsl
Definition: diag_cfg.h:148
DATA_BLOCK_ERRORSTATE_s * pTableError
Definition: diag_cfg.h:146
DATA_BLOCK_MOL_FLAG_s * pTableMol
Definition: diag_cfg.h:147
DIAG_ID_CFG_s * pFatalErrorLinkTable[DIAG_ID_MAX]
Definition: diag_cfg.h:324
uint8_t nr_of_ch
Definition: diag_cfg.h:320
DIAG_ID_CFG_s * ch_cfg
Definition: diag_cfg.h:321
uint16_t numberOfFatalErrors
Definition: diag_cfg.h:322