foxBMS  1.1.0
The foxBMS Battery Management System API Documentation
diag_cfg.h File Reference

Diagnostic module configuration header. More...

#include "general.h"
#include "battery_system_cfg.h"
#include "database_cfg.h"
Include dependency graph for diag_cfg.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  DIAG_DATABASE_SHIM
 
struct  DIAG_CH_CFG
 
struct  DIAG_DEV
 

Macros

#define DIAG_ERROR_SENSITIVITY_FIRST_EVENT   (0)
 
#define DIAG_ERROR_SENSITIVITY_THIRD_EVENT   (2)
 
#define DIAG_ERROR_SENSITIVITY_FIFTH_EVENT   (4)
 
#define DIAG_ERROR_SENSITIVITY_TENTH_EVENT   (9)
 
#define DIAG_ERROR_SENSITIVITY_HIGH   (0)
 
#define DIAG_ERROR_SENSITIVITY_MID   (5)
 
#define DIAG_ERROR_SENSITIVITY_LOW   (10)
 
#define DIAG_ERROR_INTERLOCK_SENSITIVITY   (10)
 
#define DIAG_ERROR_VOLTAGE_SENSITIVITY_MSL   (500)
 
#define DIAG_ERROR_VOLTAGE_SENSITIVITY_RSL   (500)
 
#define DIAG_ERROR_VOLTAGE_SENSITIVITY_MOL   (500)
 
#define DIAG_ERROR_TEMPERATURE_SENSITIVITY_MSL   (500)
 
#define DIAG_ERROR_TEMPERATURE_SENSITIVITY_RSL   (500)
 
#define DIAG_ERROR_TEMPERATURE_SENSITIVITY_MOL   (500)
 
#define DIAG_ERROR_CURRENT_SENSITIVITY_MSL   (500)
 
#define DIAG_ERROR_CURRENT_SENSITIVITY_RSL   (500)
 
#define DIAG_ERROR_CURRENT_SENSITIVITY_MOL   (500)
 
#define DIAG_ERROR_LTC_PEC_SENSITIVITY   (5)
 
#define DIAG_ERROR_LTC_MUX_SENSITIVITY   (5)
 
#define DIAG_ERROR_LTC_SPI_SENSITIVITY   (5)
 
#define DIAG_ERROR_CAN_TIMING_SENSITIVITY   (100)
 
#define DIAG_ERROR_CAN_TIMING_CC_SENSITIVITY   (100)
 
#define DIAG_ERROR_CAN_SENSOR_SENSITIVITY   (100)
 
#define DIAG_ERROR_CONTACTOR_FEEDBACK_SENSITIVITY   (20)
 
#define DIAG_DELAY_DISCARDED   (UINT32_MAX)
 
#define DIAG_NO_DELAY   (0u)
 
#define DIAG_DELAY_INTERLOCK_ms   (100u)
 
#define DIAG_DELAY_OVERVOLTAGE_ms   (200u)
 
#define DIAG_DELAY_UNDERVOLTAGE_ms   (200u)
 
#define DIAG_DELAY_TEMPERATURE_ms   (1000u)
 
#define DIAG_DELAY_OVERCURRENT_ms   (100u)
 
#define DIAG_DELAY_MIC_ms   (100u)
 
#define DIAG_DELAY_CAN_TIMING_ms   (200u)
 
#define DIAG_DELAY_EC_CC_TIMING_ms   (2000u)
 
#define DIAG_DELAY_CURRENT_SENSOR_ms   (200u)
 
#define DIAG_DELAY_SBC_ms   (100u)
 
#define DIAG_DELAY_PL_PACK_VOLTAGE_ms   (100u)
 
#define DIAG_DELAY_CONTACTOR_FEEDBACK_ms   (100u)
 
#define DIAG_DELAY_DEEP_DISCHARGE_ms   (100u)
 
#define DIAG_DELAY_REDUNDANCY_MEAS_TIMEOUT_ms   (100u)
 
#define DIAG_DELAY_REDUNDANCY_MEAS_ERROR_ms   (100u)
 
#define DIAG_MAX_ENTRIES_OF_ERROR   (5)
 
#define DIAG_CAN_TIMING   (DIAG_EVALUATION_ENABLED)
 Value that is written into the field that describes whether CAN timing diag entries should be generated. More...
 
#define DIAG_CAN_SENSOR_PRESENT   (DIAG_EVALUATION_ENABLED)
 Value that is written into the field that describes whether current sensor diag entries should be generated if it is not present. More...
 

Typedefs

typedef struct DIAG_DATABASE_SHIM DIAG_DATABASE_SHIM_s
 
typedef enum DIAG_ID DIAG_ID_e
 
typedef enum DIAG_EVENT DIAG_EVENT_e
 
typedef enum DIAG_EVALUATE DIAG_EVALUATE_e
 
typedef enum DIAG_IMPACT_LEVEL DIAG_IMPACT_LEVEL_e
 
typedef enum DIAG_SEVERITY_LEVEL DIAG_SEVERITY_LEVEL_e
 
typedef enum DIAG_RECORDING DIAG_RECORDING_e
 
typedef 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 More...
 
typedef struct DIAG_CH_CFG DIAG_ID_CFG_s
 
typedef struct DIAG_DEV DIAG_DEV_s
 

Enumerations

enum  DIAG_ID {
  DIAG_ID_FLASHCHECKSUM , DIAG_ID_SYSTEMMONITORING , DIAG_ID_CONFIGASSERT , DIAG_ID_LTC_SPI ,
  DIAG_ID_LTC_PEC , DIAG_ID_LTC_MUX , DIAG_ID_LTC_CONFIG , DIAG_ID_CAN_TIMING ,
  DIAG_ID_CAN_RX_QUEUE_FULL , DIAG_ID_CAN_CC_RESPONDING , DIAG_ID_CAN_EC_RESPONDING , DIAG_ID_CURRENT_SENSOR_RESPONDING ,
  DIAG_ID_PLAUSIBILITY_CELL_VOLTAGE , DIAG_ID_MEASUREMENT_IC_CELL_VOLTAGE_MEAS_ERROR , DIAG_ID_MEASUREMENT_IC_CELL_TEMPERATURE_MEAS_ERROR , DIAG_ID_PLAUSIBILITY_CELL_TEMP ,
  DIAG_ID_PLAUSIBILITY_CELL_VOLTAGE_SPREAD , DIAG_ID_PLAUSIBILITY_CELL_TEMPERATURE_SPREAD , DIAG_ID_CELLVOLTAGE_OVERVOLTAGE_MSL , DIAG_ID_CELLVOLTAGE_OVERVOLTAGE_RSL ,
  DIAG_ID_CELLVOLTAGE_OVERVOLTAGE_MOL , DIAG_ID_CELLVOLTAGE_UNDERVOLTAGE_MSL , DIAG_ID_CELLVOLTAGE_UNDERVOLTAGE_RSL , DIAG_ID_CELLVOLTAGE_UNDERVOLTAGE_MOL ,
  DIAG_ID_TEMP_OVERTEMPERATURE_CHARGE_MSL , DIAG_ID_TEMP_OVERTEMPERATURE_CHARGE_RSL , DIAG_ID_TEMP_OVERTEMPERATURE_CHARGE_MOL , DIAG_ID_TEMP_OVERTEMPERATURE_DISCHARGE_MSL ,
  DIAG_ID_TEMP_OVERTEMPERATURE_DISCHARGE_RSL , DIAG_ID_TEMP_OVERTEMPERATURE_DISCHARGE_MOL , DIAG_ID_TEMP_UNDERTEMPERATURE_CHARGE_MSL , DIAG_ID_TEMP_UNDERTEMPERATURE_CHARGE_RSL ,
  DIAG_ID_TEMP_UNDERTEMPERATURE_CHARGE_MOL , DIAG_ID_TEMP_UNDERTEMPERATURE_DISCHARGE_MSL , DIAG_ID_TEMP_UNDERTEMPERATURE_DISCHARGE_RSL , DIAG_ID_TEMP_UNDERTEMPERATURE_DISCHARGE_MOL ,
  DIAG_ID_OVERCURRENT_CHARGE_CELL_MSL , DIAG_ID_OVERCURRENT_CHARGE_CELL_RSL , DIAG_ID_OVERCURRENT_CHARGE_CELL_MOL , DIAG_ID_OVERCURRENT_DISCHARGE_CELL_MSL ,
  DIAG_ID_OVERCURRENT_DISCHARGE_CELL_RSL , DIAG_ID_OVERCURRENT_DISCHARGE_CELL_MOL , DIAG_ID_STRING_OVERCURRENT_CHARGE_MSL , DIAG_ID_STRING_OVERCURRENT_CHARGE_RSL ,
  DIAG_ID_STRING_OVERCURRENT_CHARGE_MOL , DIAG_ID_STRING_OVERCURRENT_DISCHARGE_MSL , DIAG_ID_STRING_OVERCURRENT_DISCHARGE_RSL , DIAG_ID_STRING_OVERCURRENT_DISCHARGE_MOL ,
  DIAG_ID_PACK_OVERCURRENT_CHARGE_MSL , DIAG_ID_PACK_OVERCURRENT_DISCHARGE_MSL , DIAG_ID_CURRENT_ON_OPEN_STRING , DIAG_ID_DEEP_DISCHARGE_DETECTED ,
  DIAG_ID_OPEN_WIRE , DIAG_ID_PLAUSIBILITY_PACK_VOLTAGE , DIAG_ID_INTERLOCK_FEEDBACK , DIAG_ID_STRING_CONTACTOR_FEEDBACK ,
  DIAG_ID_PRECHARGE_CONTACTOR_FEEDBACK , DIAG_ID_SBC_FIN_STATE , DIAG_ID_SBC_RSTB_STATE , DIAG_ID_BASE_CELL_VOLTAGE_MESUREMENT_TIMEOUT ,
  DIAG_ID_REDUNDANCY0_CELL_VOLTAGE_MESUREMENT_TIMEOUT , DIAG_ID_BASE_CELL_TEMPERATURE_MESUREMENT_TIMEOUT , DIAG_ID_REDUNDANCY0_CELL_TEMPERATURE_MESUREMENT_TIMEOUT , DIAG_ID_CURRENT_MEASUREMENT_TIMEOUT ,
  DIAG_ID_CURRENT_MEASUREMENT_ERROR , DIAG_ID_CURRENT_SENSOR_V1_MEASUREMENT_TIMEOUT , DIAG_ID_CURRENT_SENSOR_V3_MEASUREMENT_TIMEOUT , DIAG_ID_CURRENT_SENSOR_POWER_MEASUREMENT_TIMEOUT ,
  DIAG_ID_POWER_MEASUREMENT_ERROR , DIAG_ID_INSULATION_MEASUREMENT_INVALID , DIAG_ID_INSULATION_ERROR , DIAG_ID_INSULATION_GROUND_ERROR ,
  DIAG_ID_MAX
}
 
enum  DIAG_EVENT { DIAG_EVENT_OK , DIAG_EVENT_NOT_OK , DIAG_EVENT_RESET }
 
enum  DIAG_EVALUATE { DIAG_EVALUATION_ENABLED , DIAG_EVALUATION_DISABLED }
 
enum  DIAG_IMPACT_LEVEL { DIAG_SYSTEM , DIAG_STRING }
 
enum  DIAG_SEVERITY_LEVEL { DIAG_FATAL_ERROR , DIAG_WARNING , DIAG_INFO }
 
enum  DIAG_RECORDING { DIAG_RECORDING_ENABLED , DIAG_RECORDING_DISABLED }
 

Functions

void DIAG_UpdateFlags (void)
 update function for diagnosis flags More...
 

Variables

const DIAG_DATABASE_SHIM_s diag_kDatabaseShim
 
DIAG_DEV_s diag_device
 
DIAG_ID_CFG_s DIAG_ID_cfg [DIAG_ID_MAX]
 

Detailed Description

Diagnostic module configuration header.

SPDX-License-Identifier: BSD-3-Clause

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

We kindly request you to use one or more of the following phrases to refer to foxBMS in your hardware, software, documentation or advertising materials:

  • ″This product uses parts of foxBMS®″
  • ″This product includes parts of foxBMS®″
  • ″This product is derived from foxBMS®″
Author
foxBMS Team
Date
2019-11-28 (date of creation)
Updated
2021-07-29 (date of last update)
Prefix
DIAG

In this header filer are the different diagnosis channel defines assigned to different diagnosis IDs. Furthermore are the diagnosis error log settings be configured here.

Definition in file diag_cfg.h.

Macro Definition Documentation

◆ DIAG_CAN_SENSOR_PRESENT

#define DIAG_CAN_SENSOR_PRESENT   (DIAG_EVALUATION_ENABLED)

Value that is written into the field that describes whether current sensor diag entries should be generated if it is not present.

Definition at line 268 of file diag_cfg.h.

◆ DIAG_CAN_TIMING

#define DIAG_CAN_TIMING   (DIAG_EVALUATION_ENABLED)

Value that is written into the field that describes whether CAN timing diag entries should be generated.

Definition at line 257 of file diag_cfg.h.

◆ DIAG_DELAY_CAN_TIMING_ms

#define DIAG_DELAY_CAN_TIMING_ms   (200u)

delay for can timing error

Definition at line 123 of file diag_cfg.h.

◆ DIAG_DELAY_CONTACTOR_FEEDBACK_ms

#define DIAG_DELAY_CONTACTOR_FEEDBACK_ms   (100u)

delay for contactor feedback errors

Definition at line 133 of file diag_cfg.h.

◆ DIAG_DELAY_CURRENT_SENSOR_ms

#define DIAG_DELAY_CURRENT_SENSOR_ms   (200u)

delay for current sensor response error

Definition at line 127 of file diag_cfg.h.

◆ DIAG_DELAY_DEEP_DISCHARGE_ms

#define DIAG_DELAY_DEEP_DISCHARGE_ms   (100u)

delay for deep-discharge error

Definition at line 135 of file diag_cfg.h.

◆ DIAG_DELAY_DISCARDED

#define DIAG_DELAY_DISCARDED   (UINT32_MAX)

define if delay in DIAG_ID_CFG_s is discarded because of severity level

Definition at line 107 of file diag_cfg.h.

◆ DIAG_DELAY_EC_CC_TIMING_ms

#define DIAG_DELAY_EC_CC_TIMING_ms   (2000u)

delay for energy counting/coulomb counting timing error

Definition at line 125 of file diag_cfg.h.

◆ DIAG_DELAY_INTERLOCK_ms

#define DIAG_DELAY_INTERLOCK_ms   (100u)

delay for interlock error

Definition at line 111 of file diag_cfg.h.

◆ DIAG_DELAY_MIC_ms

#define DIAG_DELAY_MIC_ms   (100u)

delay for mic related errors

Definition at line 121 of file diag_cfg.h.

◆ DIAG_DELAY_OVERCURRENT_ms

#define DIAG_DELAY_OVERCURRENT_ms   (100u)

delay for overcurrent errors

Definition at line 119 of file diag_cfg.h.

◆ DIAG_DELAY_OVERVOLTAGE_ms

#define DIAG_DELAY_OVERVOLTAGE_ms   (200u)

delay for overvoltage errors

Definition at line 113 of file diag_cfg.h.

◆ DIAG_DELAY_PL_PACK_VOLTAGE_ms

#define DIAG_DELAY_PL_PACK_VOLTAGE_ms   (100u)

delay for pack voltage plausibility error

Definition at line 131 of file diag_cfg.h.

◆ DIAG_DELAY_REDUNDANCY_MEAS_ERROR_ms

#define DIAG_DELAY_REDUNDANCY_MEAS_ERROR_ms   (100u)

delay redundancy measurement errors

Definition at line 139 of file diag_cfg.h.

◆ DIAG_DELAY_REDUNDANCY_MEAS_TIMEOUT_ms

#define DIAG_DELAY_REDUNDANCY_MEAS_TIMEOUT_ms   (100u)

delay redundancy measurement timeout errors

Definition at line 137 of file diag_cfg.h.

◆ DIAG_DELAY_SBC_ms

#define DIAG_DELAY_SBC_ms   (100u)

delay for SBC related errors

Definition at line 129 of file diag_cfg.h.

◆ DIAG_DELAY_TEMPERATURE_ms

#define DIAG_DELAY_TEMPERATURE_ms   (1000u)

delay for temperature errors

Definition at line 117 of file diag_cfg.h.

◆ DIAG_DELAY_UNDERVOLTAGE_ms

#define DIAG_DELAY_UNDERVOLTAGE_ms   (200u)

delay for undervoltage errors

Definition at line 115 of file diag_cfg.h.

◆ DIAG_ERROR_CAN_SENSOR_SENSITIVITY

#define DIAG_ERROR_CAN_SENSOR_SENSITIVITY   (100)

logging level of CAN errors on the current sensor

Definition at line 101 of file diag_cfg.h.

◆ DIAG_ERROR_CAN_TIMING_CC_SENSITIVITY

#define DIAG_ERROR_CAN_TIMING_CC_SENSITIVITY   (100)

logging level of CAN timing errors on the current sensor

Definition at line 100 of file diag_cfg.h.

◆ DIAG_ERROR_CAN_TIMING_SENSITIVITY

#define DIAG_ERROR_CAN_TIMING_SENSITIVITY   (100)

logging level of CAN timing errors

Definition at line 99 of file diag_cfg.h.

◆ DIAG_ERROR_CONTACTOR_FEEDBACK_SENSITIVITY

#define DIAG_ERROR_CONTACTOR_FEEDBACK_SENSITIVITY   (20)

logging level of errors connected with the contactor feedback

Definition at line 104 of file diag_cfg.h.

◆ DIAG_ERROR_CURRENT_SENSITIVITY_MOL

#define DIAG_ERROR_CURRENT_SENSITIVITY_MOL   (500)

MOL level for event occurrence if over/under current event

Definition at line 93 of file diag_cfg.h.

◆ DIAG_ERROR_CURRENT_SENSITIVITY_MSL

#define DIAG_ERROR_CURRENT_SENSITIVITY_MSL   (500)

MSL level for event occurrence if over/under current event

Definition at line 89 of file diag_cfg.h.

◆ DIAG_ERROR_CURRENT_SENSITIVITY_RSL

#define DIAG_ERROR_CURRENT_SENSITIVITY_RSL   (500)

RSL level for event occurrence if over/under current event

Definition at line 91 of file diag_cfg.h.

◆ DIAG_ERROR_INTERLOCK_SENSITIVITY

#define DIAG_ERROR_INTERLOCK_SENSITIVITY   (10)

logging level of interlock

Definition at line 75 of file diag_cfg.h.

◆ DIAG_ERROR_LTC_MUX_SENSITIVITY

#define DIAG_ERROR_LTC_MUX_SENSITIVITY   (5)

logging level of LTC MUX errors

Definition at line 96 of file diag_cfg.h.

◆ DIAG_ERROR_LTC_PEC_SENSITIVITY

#define DIAG_ERROR_LTC_PEC_SENSITIVITY   (5)

logging level of LTC PEC errors

Definition at line 95 of file diag_cfg.h.

◆ DIAG_ERROR_LTC_SPI_SENSITIVITY

#define DIAG_ERROR_LTC_SPI_SENSITIVITY   (5)

logging level of LTC SPI errors

Definition at line 97 of file diag_cfg.h.

◆ DIAG_ERROR_SENSITIVITY_FIFTH_EVENT

#define DIAG_ERROR_SENSITIVITY_FIFTH_EVENT   (4)

logging at first event

Definition at line 68 of file diag_cfg.h.

◆ DIAG_ERROR_SENSITIVITY_FIRST_EVENT

#define DIAG_ERROR_SENSITIVITY_FIRST_EVENT   (0)

logging at first event

Definition at line 66 of file diag_cfg.h.

◆ DIAG_ERROR_SENSITIVITY_HIGH

#define DIAG_ERROR_SENSITIVITY_HIGH   (0)

logging at first event

Definition at line 71 of file diag_cfg.h.

◆ DIAG_ERROR_SENSITIVITY_LOW

#define DIAG_ERROR_SENSITIVITY_LOW   (10)

logging at tenth event

Definition at line 73 of file diag_cfg.h.

◆ DIAG_ERROR_SENSITIVITY_MID

#define DIAG_ERROR_SENSITIVITY_MID   (5)

logging at fifth event

Definition at line 72 of file diag_cfg.h.

◆ DIAG_ERROR_SENSITIVITY_TENTH_EVENT

#define DIAG_ERROR_SENSITIVITY_TENTH_EVENT   (9)

logging at tenth event

Definition at line 69 of file diag_cfg.h.

◆ DIAG_ERROR_SENSITIVITY_THIRD_EVENT

#define DIAG_ERROR_SENSITIVITY_THIRD_EVENT   (2)

logging at first event

Definition at line 67 of file diag_cfg.h.

◆ DIAG_ERROR_TEMPERATURE_SENSITIVITY_MOL

#define DIAG_ERROR_TEMPERATURE_SENSITIVITY_MOL   (500)

MOL level for event occurrence if over/under temperature event

Definition at line 86 of file diag_cfg.h.

◆ DIAG_ERROR_TEMPERATURE_SENSITIVITY_MSL

#define DIAG_ERROR_TEMPERATURE_SENSITIVITY_MSL   (500)

MSL level for event occurrence if over/under temperature event

Definition at line 82 of file diag_cfg.h.

◆ DIAG_ERROR_TEMPERATURE_SENSITIVITY_RSL

#define DIAG_ERROR_TEMPERATURE_SENSITIVITY_RSL   (500)

RSL level for event occurrence if over/under temperature event

Definition at line 84 of file diag_cfg.h.

◆ DIAG_ERROR_VOLTAGE_SENSITIVITY_MOL

#define DIAG_ERROR_VOLTAGE_SENSITIVITY_MOL   (500)

MOL level for event occurrence if over/under voltage event

Definition at line 79 of file diag_cfg.h.

◆ DIAG_ERROR_VOLTAGE_SENSITIVITY_MSL

#define DIAG_ERROR_VOLTAGE_SENSITIVITY_MSL   (500)

MSL level for event occurrence if over/under voltage event

Definition at line 77 of file diag_cfg.h.

◆ DIAG_ERROR_VOLTAGE_SENSITIVITY_RSL

#define DIAG_ERROR_VOLTAGE_SENSITIVITY_RSL   (500)

RSL level for event occurrence if over/under voltage event

Definition at line 78 of file diag_cfg.h.

◆ DIAG_MAX_ENTRIES_OF_ERROR

#define DIAG_MAX_ENTRIES_OF_ERROR   (5)

Maximum number of the same errors that are logged

Definition at line 142 of file diag_cfg.h.

◆ DIAG_NO_DELAY

#define DIAG_NO_DELAY   (0u)

no delay after error is detected, open contactors instantaneous

Definition at line 109 of file diag_cfg.h.

Typedef Documentation

◆ DIAG_CALLBACK_FUNCTION_f

typedef 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

Parameters
[in]ch_idID of diag entry
[in]eventDIAG_EVENT_e
[in]kpkDiagShimshim to the database entries
[in]datadata

Definition at line 293 of file diag_cfg.h.

◆ DIAG_DATABASE_SHIM_s

composite type for storing and passing on the local database table handles

◆ DIAG_DEV_s

typedef struct DIAG_DEV DIAG_DEV_s

struct for device Configuration of diag module

◆ DIAG_EVALUATE_e

enable or disable the diagnosis handling for an event

◆ DIAG_EVENT_e

typedef enum DIAG_EVENT DIAG_EVENT_e

diagnosis check result (event)

◆ DIAG_ID_CFG_s

typedef struct DIAG_CH_CFG DIAG_ID_CFG_s

Channel configuration of one diag channel

◆ DIAG_ID_e

typedef enum DIAG_ID DIAG_ID_e

list of diag IDs

◆ DIAG_IMPACT_LEVEL_e

impact level of diagnosis event, e.g., influences the event the whole system or only a string

◆ DIAG_RECORDING_e

diagnosis recording activation

◆ DIAG_SEVERITY_LEVEL_e

diagnosis severity level

Enumeration Type Documentation

◆ DIAG_EVALUATE

enable or disable the diagnosis handling for an event

Enumerator
DIAG_EVALUATION_ENABLED 

enables evaluation of diagnosis handling

DIAG_EVALUATION_DISABLED 

disables evaluation of diagnosis handling

Definition at line 240 of file diag_cfg.h.

◆ DIAG_EVENT

enum DIAG_EVENT

diagnosis check result (event)

Enumerator
DIAG_EVENT_OK 

diag channel event OK

DIAG_EVENT_NOT_OK 

diag channel event NOK

DIAG_EVENT_RESET 

reset diag channel eventcounter to 0

Definition at line 233 of file diag_cfg.h.

◆ DIAG_ID

enum DIAG_ID

list of diag IDs

Enumerator
DIAG_ID_FLASHCHECKSUM 

TODO

DIAG_ID_SYSTEMMONITORING 

TODO

DIAG_ID_CONFIGASSERT 

TODO

DIAG_ID_LTC_SPI 
DIAG_ID_LTC_PEC 
DIAG_ID_LTC_MUX 
DIAG_ID_LTC_CONFIG 
DIAG_ID_CAN_TIMING 
DIAG_ID_CAN_RX_QUEUE_FULL 
DIAG_ID_CAN_CC_RESPONDING 
DIAG_ID_CAN_EC_RESPONDING 
DIAG_ID_CURRENT_SENSOR_RESPONDING 
DIAG_ID_PLAUSIBILITY_CELL_VOLTAGE 
DIAG_ID_MEASUREMENT_IC_CELL_VOLTAGE_MEAS_ERROR 
DIAG_ID_MEASUREMENT_IC_CELL_TEMPERATURE_MEAS_ERROR 
DIAG_ID_PLAUSIBILITY_CELL_TEMP 
DIAG_ID_PLAUSIBILITY_CELL_VOLTAGE_SPREAD 
DIAG_ID_PLAUSIBILITY_CELL_TEMPERATURE_SPREAD 
DIAG_ID_CELLVOLTAGE_OVERVOLTAGE_MSL 
DIAG_ID_CELLVOLTAGE_OVERVOLTAGE_RSL 
DIAG_ID_CELLVOLTAGE_OVERVOLTAGE_MOL 
DIAG_ID_CELLVOLTAGE_UNDERVOLTAGE_MSL 
DIAG_ID_CELLVOLTAGE_UNDERVOLTAGE_RSL 
DIAG_ID_CELLVOLTAGE_UNDERVOLTAGE_MOL 
DIAG_ID_TEMP_OVERTEMPERATURE_CHARGE_MSL 
DIAG_ID_TEMP_OVERTEMPERATURE_CHARGE_RSL 
DIAG_ID_TEMP_OVERTEMPERATURE_CHARGE_MOL 
DIAG_ID_TEMP_OVERTEMPERATURE_DISCHARGE_MSL 
DIAG_ID_TEMP_OVERTEMPERATURE_DISCHARGE_RSL 
DIAG_ID_TEMP_OVERTEMPERATURE_DISCHARGE_MOL 
DIAG_ID_TEMP_UNDERTEMPERATURE_CHARGE_MSL 
DIAG_ID_TEMP_UNDERTEMPERATURE_CHARGE_RSL 
DIAG_ID_TEMP_UNDERTEMPERATURE_CHARGE_MOL 
DIAG_ID_TEMP_UNDERTEMPERATURE_DISCHARGE_MSL 
DIAG_ID_TEMP_UNDERTEMPERATURE_DISCHARGE_RSL 
DIAG_ID_TEMP_UNDERTEMPERATURE_DISCHARGE_MOL 
DIAG_ID_OVERCURRENT_CHARGE_CELL_MSL 
DIAG_ID_OVERCURRENT_CHARGE_CELL_RSL 
DIAG_ID_OVERCURRENT_CHARGE_CELL_MOL 
DIAG_ID_OVERCURRENT_DISCHARGE_CELL_MSL 
DIAG_ID_OVERCURRENT_DISCHARGE_CELL_RSL 
DIAG_ID_OVERCURRENT_DISCHARGE_CELL_MOL 
DIAG_ID_STRING_OVERCURRENT_CHARGE_MSL 
DIAG_ID_STRING_OVERCURRENT_CHARGE_RSL 
DIAG_ID_STRING_OVERCURRENT_CHARGE_MOL 
DIAG_ID_STRING_OVERCURRENT_DISCHARGE_MSL 
DIAG_ID_STRING_OVERCURRENT_DISCHARGE_RSL 
DIAG_ID_STRING_OVERCURRENT_DISCHARGE_MOL 
DIAG_ID_PACK_OVERCURRENT_CHARGE_MSL 
DIAG_ID_PACK_OVERCURRENT_DISCHARGE_MSL 
DIAG_ID_CURRENT_ON_OPEN_STRING 
DIAG_ID_DEEP_DISCHARGE_DETECTED 
DIAG_ID_OPEN_WIRE 
DIAG_ID_PLAUSIBILITY_PACK_VOLTAGE 
DIAG_ID_INTERLOCK_FEEDBACK 
DIAG_ID_STRING_CONTACTOR_FEEDBACK 
DIAG_ID_PRECHARGE_CONTACTOR_FEEDBACK 
DIAG_ID_SBC_FIN_STATE 
DIAG_ID_SBC_RSTB_STATE 
DIAG_ID_BASE_CELL_VOLTAGE_MESUREMENT_TIMEOUT 
DIAG_ID_REDUNDANCY0_CELL_VOLTAGE_MESUREMENT_TIMEOUT 
DIAG_ID_BASE_CELL_TEMPERATURE_MESUREMENT_TIMEOUT 
DIAG_ID_REDUNDANCY0_CELL_TEMPERATURE_MESUREMENT_TIMEOUT 
DIAG_ID_CURRENT_MEASUREMENT_TIMEOUT 
DIAG_ID_CURRENT_MEASUREMENT_ERROR 
DIAG_ID_CURRENT_SENSOR_V1_MEASUREMENT_TIMEOUT 
DIAG_ID_CURRENT_SENSOR_V3_MEASUREMENT_TIMEOUT 
DIAG_ID_CURRENT_SENSOR_POWER_MEASUREMENT_TIMEOUT 
DIAG_ID_POWER_MEASUREMENT_ERROR 
DIAG_ID_INSULATION_MEASUREMENT_INVALID 
DIAG_ID_INSULATION_ERROR 
DIAG_ID_INSULATION_GROUND_ERROR 
DIAG_ID_MAX 

MAX indicator - do not change

Definition at line 156 of file diag_cfg.h.

◆ DIAG_IMPACT_LEVEL

impact level of diagnosis event, e.g., influences the event the whole system or only a string

Enumerator
DIAG_SYSTEM 

diag event impact is system related e.g., can timing

DIAG_STRING 

diag event impact is string related e.g., overvoltage in string x

Definition at line 246 of file diag_cfg.h.

◆ DIAG_RECORDING

diagnosis recording activation

Enumerator
DIAG_RECORDING_ENABLED 

enable diagnosis event recording

DIAG_RECORDING_DISABLED 

disable diagnosis event recording

Definition at line 281 of file diag_cfg.h.

◆ DIAG_SEVERITY_LEVEL

diagnosis severity level

Enumerator
DIAG_FATAL_ERROR 
DIAG_WARNING 
DIAG_INFO 

Definition at line 274 of file diag_cfg.h.

Function Documentation

◆ DIAG_UpdateFlags()

void DIAG_UpdateFlags ( void  )

update function for diagnosis flags

TODO

Definition at line 222 of file diag_cfg.c.

Variable Documentation

◆ diag_device

DIAG_DEV_s diag_device
extern

diag device configuration struct

Definition at line 212 of file diag_cfg.c.

◆ DIAG_ID_cfg

DIAG_ID_CFG_s DIAG_ID_cfg[DIAG_ID_MAX]
extern

variable tracking the state of the diag channels

Definition at line 114 of file diag_cfg.c.

◆ diag_kDatabaseShim

const DIAG_DATABASE_SHIM_s diag_kDatabaseShim
extern

variable for storing and passing on the local database table handles

Definition at line 103 of file diag_cfg.c.