/*
***********************************************************************************************************************
* 
* Product Info
* Isolar version: ISOLAR-AB 4.0.2
* Product release version: RTA-BSW 3.1.0
* 
***********************************************************************************************************************
*/

/********************************************************************************************************************/
/*                                                                                                                  */
/* TOOL-GENERATED SOURCECODE, DO NOT CHANGE                                                                         */
/*                                                                                                                  */
/********************************************************************************************************************/

#ifndef DEM_CFG_DTCS_H
#define DEM_CFG_DTCS_H

#include "Std_Types.h"

/* ---------------------------------------- */
/* DEM_CFG_STOREWAITINGFORMONITORINGEVENT     */
/* ---------------------------------------- */
#define DEM_CFG_STOREWAITINGFORMONITORINGEVENT  FALSE

/* ---------------------------------------- */
/* DEM_CFG_DTCFILTER_EXTERNALPROCESSING     */
/* ---------------------------------------- */
#define DEM_CFG_DTCFILTER_EXTERNALPROCESSING_OFF  STD_OFF
#define DEM_CFG_DTCFILTER_EXTERNALPROCESSING_ON   STD_ON
#define DEM_CFG_DTCFILTER_EXTERNALPROCESSING      DEM_CFG_DTCFILTER_EXTERNALPROCESSING_OFF

/* --------------------------------------------------- */
/* DEM_CFG_REPORT_CHRONOLOGICAL_ORDER_HOOKS_ENABLED    */
/* --------------------------------------------------- */
#define DEM_CFG_REPORT_CHRONOLOGICAL_ORDER_HOOKS_ENABLED   FALSE

#define DEM_CFG_DTCSTATUS_AVAILABILITYMASK     0xFFu
#define DEM_CFG_DTC_TRANSLATION_TYPE           DEM_DTC_TRANSLATION_ISO14229_1

#define DEM_CFG_DTCSTATEMANGER_DTCS_PER_CYCLE   10u

/* --------------------------------------------------- */
/* DEM DTC STATE BITPOSITION                         */
/* --------------------------------------------------- */

#define DEM_DTC_BP_STATE_SUPPRESSED             0u
#define DEM_DTC_BP_GROUP_DTCSETTING_DISABLED    1u

typedef uint8 Dem_DtcStateType;
#define DEM_DTCSTATE_ISBITSET                    rba_DiagLib_Bit8IsBitSet
#define DEM_DTCSTATE_OVERWRITEBIT                rba_DiagLib_Bit8OverwriteBit
#define DEM_DTCSTATE_CLEARBIT                    rba_DiagLib_Bit8ClearBit
#define DEM_DTCSTATE_SETBIT                      rba_DiagLib_Bit8SetBit

/**
 * Selects a group of DTCs.
 */

/*                KIND                               SEVERITY                           NV-STORAGE  FUNC_UNIT                DTCCODE_IS_INDEX          */

#define DEM_CFG_DTCPARAMS8 \
{ \
    DEM_DTCS_INIT8(0u,                                0u,                                0u,         0u,                      FALSE                    )/* No DTC Assigned */ \
    ,DEM_DTCS_INIT8(DEM_DTC_KIND_EMISSION_REL_DTCS,    DEM_SEVERITY_NO_SEVERITY,          0u,         0x0u,                    FALSE                    )/*DemDTC_LostComm_SEN*/ \
    ,DEM_DTCS_INIT8(DEM_DTC_KIND_ALL_DTCS,             DEM_SEVERITY_NO_SEVERITY,          0u,         0x1u,                    FALSE                    )/*DemDTC_LostComm_MPDU*/ \
    ,DEM_DTCS_INIT8(DEM_DTC_KIND_ALL_DTCS,             DEM_SEVERITY_NO_SEVERITY,          0u,         0x2u,                    FALSE                    )/*DemDTC_LostComm_SEN_1*/ \
    ,DEM_DTCS_INIT8(DEM_DTC_KIND_ALL_DTCS,             DEM_SEVERITY_NO_SEVERITY,          0u,         0x3u,                    FALSE                    )/*DemDTC_MCAL_Error*/ \
    ,DEM_DTCS_INIT8(DEM_DTC_KIND_ALL_DTCS,             DEM_SEVERITY_NO_SEVERITY,          0u,         0x4u,                    FALSE                    )/*DemDTC_MCU_Error*/ \
}

#define DEM_CFG_DTCPARAMS16 \
{ \
    DEM_DTCS_INIT16(0              )/* No DTC Assigned */ \
    ,DEM_DTCS_INIT16(0x12           )/*DemDTC_LostComm_SEN*/ \
    ,DEM_DTCS_INIT16(0x00           )/*DemDTC_LostComm_MPDU*/ \
    ,DEM_DTCS_INIT16(0x00           )/*DemDTC_LostComm_SEN_1*/ \
    ,DEM_DTCS_INIT16(0x00           )/*DemDTC_MCAL_Error*/ \
    ,DEM_DTCS_INIT16(0x00           )/*DemDTC_MCU_Error*/ \
}

#define DEM_CFG_DTCPARAMS32 \
{ \
    DEM_DTCS_INIT32(0              )/* No DTC Assigned */ \
    ,DEM_DTCS_INIT32(0xC10010       )/*DemDTC_LostComm_SEN*/ \
    ,DEM_DTCS_INIT32(0xC10020       )/*DemDTC_LostComm_MPDU*/ \
    ,DEM_DTCS_INIT32(0xC10030       )/*DemDTC_LostComm_SEN_1*/ \
    ,DEM_DTCS_INIT32(0xC10040       )/*DemDTC_MCAL_Error*/ \
    ,DEM_DTCS_INIT32(0xC10050       )/*DemDTC_MCU_Error*/ \
}

/*                DTCGROUPCODE  */

#define DEM_CFG_DTCGROUPPARAMS \
{ \
    DEM_DTCGROUPS_INIT(0       )/* No DTCGROUP Assigned */ \
,DEM_DTCGROUPS_INIT(DEM_DTC_GROUP_ALL_DTCS) /* DEM_DTC_GROUP_ALL_DTCS */\
}

#define DEM_DTC_FILTER_NUMBER_OF_EVENTS_PER_CYCLE    25u
#define DEM_DTC_FILTER_RETRIEVE_NUMBER_OF_DTCS       50u

#define DEM_DTC_DTCSETTING_CALLBACK_SUPPORTED_OFF STD_OFF
#define DEM_DTC_DTCSETTING_CALLBACK_SUPPORTED_ON STD_ON

#define DEM_DTC_DTCSETTING_CALLBACK_SUPPORTED DEM_DTC_DTCSETTING_CALLBACK_SUPPORTED_OFF

#endif

