]> rtime.felk.cvut.cz Git - arc.git/blob - include/WdgM_ConfigTypes.h
cc85acd8018eac0d1d35859eac9d23addbd8b7c1
[arc.git] / include / WdgM_ConfigTypes.h
1 /* -------------------------------- Arctic Core ------------------------------\r
2  * Arctic Core - the open source AUTOSAR platform http://arccore.com\r
3  *\r
4  * Copyright (C) 2009  ArcCore AB <contact@arccore.com>\r
5  *\r
6  * This source code is free software; you can redistribute it and/or modify it\r
7  * under the terms of the GNU General Public License version 2 as published by the\r
8  * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.\r
9  *\r
10  * This program is distributed in the hope that it will be useful, but\r
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\r
12  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\r
13  * for more details.\r
14  * -------------------------------- Arctic Core ------------------------------*/\r
15 \r
16 #ifndef WDGM_CONFIGTYPES_H_\r
17 #define WDGM_CONFIGTYPES_H_\r
18 \r
19 \r
20 typedef enum\r
21 {\r
22   WDGM_ALIVE_OK,\r
23   WDGM_ALIVE_FAILED,\r
24   WDGM_ALIVE_EXPIRED,\r
25   WDGM_ALIVE_STOPPED,\r
26   WDGM_ALIVE_DEACTIVATED\r
27 }WdgM_AliveSupervisionStatusType;\r
28 \r
29 \r
30 \r
31 \r
32 typedef enum\r
33 {\r
34   WDGM_SUPERVISION_DISABLED,\r
35   WDGM_SUPERVISION_ENABLED\r
36 }WdgM_ActivationStatusType;\r
37 \r
38 typedef int16_t WdgM_SupervisionCounterType ;\r
39 typedef uint16_t WdgM_TriggerCounterType ;\r
40 \r
41 typedef struct\r
42 {\r
43   WdgM_SupervisionCounterType     AliveCounter;\r
44   WdgM_SupervisionCounterType     SupervisionCycle;\r
45   WdgM_AliveSupervisionStatusType SupervisionStatus;\r
46   WdgM_SupervisionCounterType     NbrOfFailedRefCycles;\r
47 }WdgM_AliveEntityStateType;\r
48 \r
49 typedef struct\r
50 {\r
51   /** @req WDGM093 **/\r
52   const boolean                     WdgM_DeactivationAccessEnabled;\r
53   const WdgM_SupervisedEntityIdType WdgM_SupervisedEntityID;\r
54 }WdgM_SupervisedEntityType;\r
55 \r
56 /** @req WDGM046 **/\r
57 /** @req WDGM090 **/\r
58 /** @req WDGM091 **/\r
59 /** @req WDGM095 **/\r
60 /** @req WDGM096 **/\r
61 typedef struct\r
62 {\r
63   const boolean                         WdgM_ActivationActivated;\r
64   const WdgM_SupervisedEntityIdType     WdgM_AliveSupervisionConfigID;\r
65   const WdgM_SupervisionCounterType     WdgM_ExpectedAliveIndications;\r
66   const WdgM_SupervisionCounterType     WdgM_SupervisionReferenceCycle;\r
67   const WdgM_SupervisionCounterType     WdgM_FailedSupervisionReferenceCycleTolerance;\r
68   const WdgM_SupervisionCounterType     WdgM_MinMargin;\r
69   const WdgM_SupervisionCounterType     WdgM_MaxMargin;\r
70   const WdgM_SupervisedEntityType       *WdgM_SupervisedEntityRef;\r
71 }WdgM_AliveSupervisionType;\r
72 \r
73 typedef struct\r
74 {\r
75         const char_t           *WdgM_WatchdogName;\r
76         const WdgIf_DeviceType *WdgM_DeviceRef;\r
77 }WdgM_WatchdogType;\r
78 \r
79 /** @req WDGM002 **/\r
80 /** @req WDGM003 **/\r
81 typedef struct\r
82 {\r
83         const uint16                     WdgM_NumberOfSupervisedEntities;\r
84         const uint16                     WdgM_NumberOfWatchdogs;\r
85         const WdgM_SupervisedEntityType  *WdgM_SupervisedEntityPtr;\r
86     const WdgM_WatchdogType          *WdgM_Watchdog;\r
87 }WdgM_GeneralType;\r
88 \r
89 /** @req WDGM116 **/\r
90 typedef struct\r
91 {\r
92         const uint16                     WdgM_TriggerReferenceCycle;\r
93         const WdgIf_ModeType             WdgM_WatchdogMode;\r
94         const WdgM_WatchdogType          *WdgM_WatchdogRef;\r
95 }WdgM_TriggerType;\r
96 \r
97 typedef struct\r
98 {\r
99         const float32                    WdgM_SupervisionCycle;\r
100         const float32                    WdgM_TriggerCycle;\r
101 }WdgM_ActivationSchMType;\r
102 \r
103 typedef struct\r
104 {\r
105         const uint32                     WdgM_GptCycle;\r
106         const Gpt_ChannelType            WdgM_GptChannelRef;\r
107 }WdgM_ActivationGPTType;\r
108 \r
109 typedef struct\r
110 {\r
111         const boolean                    WdgM_IsGPTActivated;\r
112         const WdgM_ActivationSchMType    WdgM_ActivationSchM;\r
113         const WdgM_ActivationGPTType     WdgM_ActivationGPT;\r
114 }WdgM_ActivationType;\r
115 \r
116 typedef struct\r
117 {\r
118         const WdgM_SupervisionCounterType WdgM_ExpiredSupervisionCycleTol;\r
119         const WdgM_ModeType               WdgM_ModeId;\r
120         const WdgM_ActivationType         WdgM_Activation;\r
121         const WdgM_AliveSupervisionType   *WdgM_AliveSupervisionPtr;\r
122         const WdgM_TriggerType            WdgM_Trigger[WDGM_NBR_OF_WATCHDOGS];\r
123 }WdgM_ModeConfigType;\r
124 \r
125 typedef struct\r
126 {\r
127         const WdgM_ModeType             WdgM_InitialMode;\r
128         WdgM_AliveEntityStateType       *WdgM_AliveEntityStatePtr;\r
129         const WdgM_ModeConfigType       WdgM_Mode[];\r
130 }WdgM_ConfigSetType;\r
131 \r
132 /** @req WDGM118 **/\r
133 typedef struct\r
134 {\r
135   const WdgM_GeneralType   *WdgM_General;\r
136   const WdgM_ConfigSetType *WdgM_ConfigSet;\r
137 }WdgM_ConfigType;\r
138 #endif /* WDGM_CONFIGTYPES_H_ */\r