1 /* -------------------------------- Arctic Core ------------------------------
\r
2 * Arctic Core - the open source AUTOSAR platform http://arccore.com
\r
4 * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
\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
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
14 * -------------------------------- Arctic Core ------------------------------*/
\r
24 * General requirements
\r
33 #include "Dem_Types.h"
\r
34 #if defined(USE_DCM)
\r
35 #include "Dcm_Types.h" /** @req DEM176.Dcm */
\r
40 * Callback function prototypes
\r
43 // InitMonitorForEvent
\r
44 typedef Std_ReturnType (*Dem_CallbackInitMonitorForEventFncType)(Dem_InitMonitorKindType InitMonitorKind); /** @req DEM256 */
\r
46 // InitMonitorForFunction
\r
47 typedef Std_ReturnType (*Dem_CallbackInitMonitorForFunctionFncType)(void); /** @req DEM258 */
\r
49 // EventStatusChanged
\r
50 typedef Std_ReturnType (*Dem_CallbackEventStatusChangedFncType)(Dem_EventStatusExtendedType EventStatusOld, Dem_EventStatusExtendedType EventStatusNew); /** @req DEM259 */
\r
53 typedef Std_ReturnType (*Dem_CallbackDTCStatusChangedFncType)(uint8 DTCStatusOld, uint8 DTCStatusNew); /** @req DEM260 */
\r
55 // DIDServices /** @req DEM261 */
\r
56 #if defined(USE_DCM)
\r
57 typedef Std_ReturnType (*Dem_CallbackConditionCheckReadFncType)(Dcm_NegativeResponseCodeType *Nrc);
\r
58 typedef Std_ReturnType (*Dem_CallbackReadDataFncType)(uint8 *Data);
\r
59 typedef Std_ReturnType (*Dem_CallbackReadDataLength)(uint16 *DidLength);
\r
61 typedef Std_ReturnType (*Dem_CallbackConditionCheckReadFncType)(uint8 *Nrc);
\r
62 typedef Std_ReturnType (*Dem_CallbackReadDataFncType)(uint8 *Data);
\r
63 typedef Std_ReturnType (*Dem_CallbackReadDataLength)(uint16 *DidLength);
\r
66 // GetExtendedDataRecord
\r
67 typedef Std_ReturnType (*Dem_CallbackGetExtDataRecordFncType)(uint8 *ExtendedDataRecord); /** @req DEM262 */
\r
69 // GetFaultDetectionCounter
\r
70 typedef Std_ReturnType (*Dem_CallbackGetFaultDetectionCounterFncType)(sint8 *EventIdFaultDetectionCounter); /** @req DEM263 */
\r
73 typedef Std_ReturnType (*Dem_CallbackGetPIDValueFncType)(uint8 *DataValueBuffer); /** @req DEM326 */
\r
80 // 10.2.25 DemEnableCondition
\r
82 boolean EnableConditionStatus; //
\r
83 // uint16 EnableConditionID; // Optional
\r
84 } Dem_EnableConditionType;
\r
86 // 10.2.30 DemExtendedDataRecordClass
\r
88 uint16 RecordNumber; // (1)
\r
89 uint16 DataSize; // (1)
\r
90 Dem_CallbackGetExtDataRecordFncType CallbackGetExtDataRecord;// (1) /** @req DEM139 */
\r
91 } Dem_ExtendedDataRecordClassType; /** @req DEM135 */
\r
93 // 10.2.13 DemExtendedDataClass
\r
95 const Dem_ExtendedDataRecordClassType *const ExtendedDataRecordClassRef[DEM_MAX_NR_OF_RECORDS_IN_EXTENDED_DATA+1]; // (1..253)
\r
96 } Dem_ExtendedDataClassType; /** @req DEM135 */
\r
98 // 10.2.8 DemPidOrDid
\r
100 // boolean PidOrDidUsePort; // (1) Not used in current implementation
\r
101 uint8 PidOrDidSize; // (1)
\r
102 const uint16 *DidIdentifier; // (0..1)
\r
103 Dem_CallbackConditionCheckReadFncType DidConditionCheckReadFnc; // (0..1)
\r
104 Dem_CallbackReadDataLength DidReadDataLengthFnc; // (0..1)
\r
105 Dem_CallbackReadDataFncType DidReadFnc; // (0..1)
\r
106 const uint8 *PidIndentifier; // (0..1)
\r
107 Dem_CallbackGetPIDValueFncType PidReadFnc; // (0..1)
\r
109 } Dem_PidOrDidType; /** @req DEM136 */
\r
111 // 10.2.18 DemFreezeFrameClass
\r
113 Dem_FreezeFrameKindType FFKind; // (1)
\r
114 uint8 FFRecordNumber; // (1)
\r
115 const Dem_PidOrDidType *FFIdClassRef; // (1..255)
\r
116 } Dem_FreezeFrameClassType; /** @req DEM136 */
\r
118 // 10.2.4 DemIndicator
\r
120 uint16 Indicator; // (1)
\r
121 } Dem_IndicatorType; /** @req DEM129 */
\r
123 // 10.2.28 DemNvramBlockId
\r
126 } Dem_NvramBlockIdType;
\r
129 * DemConfigSetType types
\r
132 // 10.2.6 DemCallbackDTCStatusChanged
\r
134 Dem_CallbackDTCStatusChangedFncType CallbackDTCStatusChangedFnc; // (0..1)
\r
135 } Dem_CallbackDTCStatusChangedType; /** @req DEM140 */
\r
137 // 10.2.26 DemCallbackInitMForF
\r
139 Dem_CallbackInitMonitorForFunctionFncType CallbackInitMForF; // (0..1)
\r
140 } Dem_CallbackInitMForFType;
\r
142 // 10.2.17 DemDTCClass
\r
145 uint8 DTCFunctionalUnit; // (1)
\r
146 Dem_DTCKindType DTCKind; // (1)
\r
147 const Dem_CallbackDTCStatusChangedType *CallbackDTCStatusChanged; // (0..*)
\r
148 const Dem_CallbackInitMForFType *CallbackInitMForF; // (0..*)
\r
149 // Dem_DTCSeverityType DTCSeverity // (0..1) Optional
\r
151 } Dem_DTCClassType; /** @req DEM132 */
\r
153 // 10.2.5 DemCallbackEventStatusChanged
\r
155 Dem_CallbackEventStatusChangedFncType CallbackEventStatusChangedFnc; // (0..1)
\r
156 } Dem_CallbackEventStatusChangedType; /** @req DEM140 */
\r
158 // 10.2.27 DemCallbackInitMForE
\r
160 Dem_CallbackInitMonitorForEventFncType CallbackInitMForEFnc; // (0..1)
\r
161 } Dem_CallbackInitMforEType; /** @req DEM130 */
\r
165 Dem_IndicatorStatusType IndicatorBehaviour; // (1)
\r
166 Dem_IndicatorType *LinkedIndicator; // (1)
\r
167 } Dem_IndicatorAttributeType; /** @req DEM133 */
\r
169 // 10.2.23 DemPreDebounceMonitorInternal
\r
171 Dem_CallbackGetFaultDetectionCounterFncType CallbackGetFDCntFnc; // (1)
\r
172 } Dem_PreDebounceMonitorInternalType; /** @req DEM146 */
\r
174 // 10.2.21 DemPreDebounceCounterBased
\r
178 uint8 CountInStepSize;
\r
179 uint8 CountOutStepSize;
\r
180 } Dem_PreDebounceCounterBasedType; /** @req DEM144 */
\r
182 // 10.2.22 DemPreDebounceFrequencyBased
\r
185 } Dem_PreDebounceFrequencyBasedType;
\r
187 // 10.2.24 DemPreDebounceTimeBased
\r
190 } Dem_PreDebounceTimeBasedType;
\r
194 Dem_PreDebounceNameType PreDebounceName; // (1)
\r
196 const Dem_PreDebounceMonitorInternalType *PreDebounceMonitorInternal; // (0..1)
\r
197 const Dem_PreDebounceCounterBasedType *PreDebounceCounterBased; // (0..1)
\r
198 const Dem_PreDebounceFrequencyBasedType *PreDebounceFrequencyBased; // (0..1)
\r
199 const Dem_PreDebounceTimeBasedType *PreDebounceTimeBased; // (0..1)
\r
200 } PreDebounceAlgorithm;
\r
201 } Dem_PreDebounceAlgorithmClassType;
\r
203 // 10.2.14 DemEventClass
\r
205 boolean ConsiderPtoStatus; // (1)
\r
206 const Dem_DTCOriginType EventDestination[DEM_MAX_NR_OF_EVENT_DESTINATION+1];// (0..4)
\r
207 uint8 EventPriority; // (1)
\r
208 boolean FFPrestorageSupported; // (1)
\r
209 boolean HealingAllowed; // (1)
\r
210 Dem_OperationCycleIdType OperationCycleRef; // (1)
\r
211 // uint8 HealingCycleCounter; // (0..1) Optional
\r
212 // const Dem_EnableConditionType *EnableConditionRef; // (0..*) Optional
\r
213 // const Dem_OperationCycleTgtType *HealingCycleRef; // (0..1) Optional
\r
214 const Dem_PreDebounceAlgorithmClassType *PreDebounceAlgorithmClass; // (0..255) (Only 0..1 supported)
\r
215 const Dem_IndicatorAttributeType *IndicatorAttribute; // (0..255)
\r
217 } Dem_EventClassType; /** @req DEM131 */
\r
219 // 10.2.12 DemEventParameter
\r
221 uint16 EventID; // (1)
\r
222 Dem_EventKindType EventKind; // (1)
\r
223 const Dem_EventClassType *EventClass; // (1)
\r
224 const Dem_ExtendedDataClassType *ExtendedDataClassRef; // (0..1)
\r
225 const Dem_FreezeFrameClassType *FreezeFrameClassRef; // (0..255) (Only 0..1 supported)
\r
226 const Dem_CallbackInitMforEType *CallbackInitMforE; // (0..1)
\r
227 const Dem_CallbackEventStatusChangedType *CallbackEventStatusChanged;// (0..*)
\r
228 const Dem_DTCClassType *DTCClassRef; // (0..1)
\r
230 } Dem_EventParameterType; /** @req DEM130 */
\r
232 // 10.2.19 DemGroupOfDTC
\r
235 } Dem_GroupOfDtcType;
\r
237 // 10.2.10 DemOemIdClass
\r
240 } Dem_OemIdClassType; /** @req DEM141 */
\r
242 // 10.2.9 DemConfigSet
\r
244 const Dem_EventParameterType *EventParameter; // (0..65535)
\r
245 const Dem_DTCClassType *DTCClass; // (1..16777214)
\r
246 const Dem_GroupOfDtcType *GroupOfDtc; // (1.16777214)
\r
247 const Dem_OemIdClassType *OemIdClass; // (0..*)
\r
248 } Dem_ConfigSetType; /** @req DEM130 */
\r
252 const Dem_ConfigSetType *ConfigSet; // (1)
\r
257 * Make the DEM_Config visible for others.
\r
259 extern const Dem_ConfigType DEM_Config;
\r
262 #endif /*DEM_LCFG_H_*/
\r