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



/*
 **********************************************************************************************************************
 * Includes
 **********************************************************************************************************************
*/
#include "WdgM.h"
#include "Os.h"
#if (!defined(OS_AR_RELEASE_MAJOR_VERSION) || (OS_AR_RELEASE_MAJOR_VERSION != 4))
#error “AUTOSAR major version undefined or mismatched“
#endif
#if (!defined(OS_AR_RELEASE_MINOR_VERSION) || (OS_AR_RELEASE_MINOR_VERSION != 2))
#error “AUTOSAR minor version undefined or mismatched“
#endif
#include "WdgM_Prv.h"

/*
 ***************************************************************************************************
 * Variables
 ***************************************************************************************************
 */


/* There is no deadline Supervision configured in valid WdgMMode so corresponding Variables, data types are not defined....!!! */



/*
 ***************************************************************************************************
 * Dynamic Variables
 ***************************************************************************************************
 */
#define WDGM_START_SEC_VAR_FAST_CLEARED_UNSPECIFIED
#include "WdgM_Cfg_MemMap.h"
/* TRACE[WDGM200] Values of local supervsion should be described in WdgM_LocalStatusType */
VAR(WdgM_SupervisedEntityDynType, WDGM_VAR_FAST_CLEARED_UNSPECIFIED) WdgM_SupervisedEntityDyn[1];  /* WDGM242 */
static VAR(WdgM_CheckpointDynType, WDGM_VAR_FAST_CLEARED_UNSPECIFIED) WdgM_CheckpointDyn[2];
#define WDGM_STOP_SEC_VAR_FAST_CLEARED_UNSPECIFIED
#include "WdgM_Cfg_MemMap.h"

/*
 **********************************************************************************************************************
 * Defines/Macros
 **********************************************************************************************************************
*/

#define WDGM_START_SEC_CONFIG_DATA_FAST_UNSPECIFIED
#include "WdgM_Cfg_MemMap.h"


CONST(WdgM_CheckpointType, WDGM_CONST_FAST_UNSPECIFIED) WdgM_Checkpoint[2] =
{	
	/* PtrToCheckpointDyn                          Comment */ 
	
	{   &WdgM_CheckpointDyn[0]                       /* WdgMSupervisedEntityId: 0, WdgMCheckpointId: 0 */        },
	{   &WdgM_CheckpointDyn[1]                       /* WdgMSupervisedEntityId: 0, WdgMCheckpointId: 1 */        }
};


CONST(WdgM_SupervisedEntityType, WDGM_CONST_FAST_UNSPECIFIED) WdgM_SupervisedEntity[1]=
{	
    /* NoOfCheckpoint             PartionEnabled             TimerId                                        OsApplicationId                                PtrToCheckpoint                                PtrToSupervisedEntityDyn                         Comment */         
    
    {  2                        ,  FALSE                    ,  WDGM_INVALID_TIMER_ID                        ,  INVALID_OSAPPLICATION                        ,  &WdgM_Checkpoint[0]                          ,    &WdgM_SupervisedEntityDyn[0]                     /* WdgMSupervisedEntityId: 0 */              }
};
/* No WdgMInternalTransition configured for Internal Graph so corresponding code is not generated. */
/* No WdgMInternalTransitionDestRef configured for Internal Graph so corresponding code is not generated. */

CONST(WdgM_AliveSupervisionType, WDGM_CONST_FAST_UNSPECIFIED) WdgM_AliveSupervision[1] =
{
    /* MinMargin          MaxMargin                  AliveSupervisionCheckpointId     SupervisedEntityId              ExpectedAliveIndications   SupervisionReferenceCycle   Comment */ 
   
    {   1                   ,  1                   ,  0                              ,  0                             ,  5                       ,  10                       /* WdgMMode: 0  AliveSuperVision: WdgMAliveSupervision_0 */                     }
};

/* No WdgMDeadlineSupervision configured so corresponding code is not generated. */


CONST(WdgM_LocalStatusParamsType, WDGM_CONST_FAST_UNSPECIFIED) WdgM_LocalStatusParams[1] =
{
    /* FailedAliveSupervisionRefCycleTol               SupervisedEntityId                              Comment */                                    
    
    {   5                                            ,  0                                              /* WdgMMode: 0  WdgMLocalStatusParams: WdgMLocalStatusParams_0 */               }  
};


CONST(WdgM_TriggerType, WDGM_CONST_FAST_UNSPECIFIED) WdgM_Trigger[1] =
{
    /* TriggerConditionValue(in mili seconds)          DeviceIdx                                       TriggerModeType             Comment */                                    
    
    {   100                                          ,  WdgIfConf_WdgIfDevice_WdgIfDevice_17_Scu     ,  WDGIF_FAST_MODE            /* WdgMMode: 0  WdgMTrigger: WdgMTrigger_Fast */                                } 
};


CONST(WdgM_PrvModeType, WDGM_CONST_FAST_UNSPECIFIED) WdgM_PrvMode[1] =
{	    /* ExpiredSupervisionCycleTol                  SchMWdgMSupervisionCycle                                 SupervisionCycle(in mili seconds)               NoOfAliveSupervision                            NoOfDeadlineSupervision                         NoOfLocalStatusParams                           NoOfTrigger                                     PtrToAliveSupervision                           PtrToDeadlineSupervision                        PtrToLocalStatusParams                          PtrToTrigger                                    Comment */                                    
    
    {   0                                            ,  RTE_MODE_WdgMSupervisionCycle_SUPERVISION_CYCLE_0      ,  WDGM_SUPERVISION_CYCLE_0                     ,  1                                            ,  0                                            ,  1                                            ,  1                                            ,  &WdgM_AliveSupervision[0]                    ,  NULL_PTR                                     ,  &WdgM_LocalStatusParams[0]                   ,  &WdgM_Trigger[0]                               /* WdgMMode: WdgMMode_Default */             }
};

CONST(WdgM_ConfigType, WDGM_CONST_FAST_UNSPECIFIED)  WdgM_Config =
{
    0                                                           , /* InitialMode */
    1                                                           , /* NoOfMode */
    WDGM_INVALID_DEM_EVENT_ID                                   , /* ErrorImproperCaller */
    WDGM_INVALID_DEM_EVENT_ID                                   , /* ErrorSupervision */
    WDGM_INVALID_DEM_EVENT_ID                                   , /* ErrorSetMode */
    NULL_PTR                                                    , /* PtrToRunningCounterValue */
    NULL_PTR                                                    , /* PtrToDeadlineIndices */
    &WdgM_PrvMode[0]                                              /* PtrToMode */
};


#define      WDGM_STOP_SEC_CONFIG_DATA_FAST_UNSPECIFIED
#include "WdgM_Cfg_MemMap.h"

