\r
#ifndef DEM_LCFG_H_\r
#define DEM_LCFG_H_\r
-\r
#include "Dem_Types.h"\r
#if defined(USE_DCM)\r
#include "Dcm_Types.h" /** @req DEM176.Dcm */\r
+#include "Dcm_Lcfg.h" /** @req DEM136.Dcm */\r
#endif\r
-\r
+//#if defined(USE_NVRam)\r
+#include "NvM_ConfigTypes.h" /** @req Dem147.Nvm */\r
+//#endif\r
\r
/*\r
* Callback function prototypes\r
// GetPIDValue\r
typedef Std_ReturnType (*Dem_CallbackGetPIDValueFncType)(uint8 *DataValueBuffer); /** @req DEM326 */\r
\r
+typedef enum{\r
+ FF_STORAGE_CONDITION_WRONG = 0, //FF storage condition is wrong\r
+ PREFAILED = 1, //store FF when the event status is prefailed\r
+ FAILED = 2 //store FF when the event status is failed\r
+}Dem_FreezeFrameStorageConditonType; /** @req Dem001_private */\r
/*\r
* DemGeneral types\r
*/\r
\r
// 10.2.8 DemPidOrDid\r
typedef struct {\r
-// boolean PidOrDidUsePort; // (1) Not used in current implementation\r
- uint8 PidOrDidSize; // (1)\r
- const uint16 *DidIdentifier; // (0..1)\r
- Dem_CallbackConditionCheckReadFncType DidConditionCheckReadFnc; // (0..1)\r
+ Dem_CallbackConditionCheckReadFncType DidConditionCheckReadFnc; // (0..1)\r
+ const uint16 DidIdentifier; // (0..1)\r
Dem_CallbackReadDataLength DidReadDataLengthFnc; // (0..1)\r
Dem_CallbackReadDataFncType DidReadFnc; // (0..1)\r
- const uint8 *PidIndentifier; // (0..1)\r
+ const uint8 PidIndentifier; // (0..1)\r
+ uint8 PidOrDidSize; // (1)\r
+ boolean PidOrDidUsePort; // (1) Not used in current implementation \r
Dem_CallbackGetPIDValueFncType PidReadFnc; // (0..1)\r
boolean Arc_EOL;\r
} Dem_PidOrDidType; /** @req DEM136 */\r
// 10.2.18 DemFreezeFrameClass\r
typedef struct {\r
Dem_FreezeFrameKindType FFKind; // (1)\r
- uint8 FFRecordNumber; // (1)\r
- const Dem_PidOrDidType *FFIdClassRef; // (1..255)\r
+ uint8 FFRecordNumber; // (1)/** @req DEM040 */\r
+ Dem_FreezeFrameStorageConditonType FFStorageConditon;/** @req Dem001_private */\r
+ const Dem_PidOrDidType *FFIdClassRef; // (1..255)/** @req DEM039 */\r
} Dem_FreezeFrameClassType; /** @req DEM136 */\r
\r
+\r
// 10.2.4 DemIndicator\r
typedef struct {\r
uint16 Indicator; // (1)\r
\r
// 10.2.28 DemNvramBlockId\r
typedef struct {\r
- // TODO: Fill out\r
-} Dem_NvramBlockIdType;\r
+\r
+//#if defined(USE_NVRam)\r
+ const NvM_BlockDescriptorType *BlockDescriptor;/** @req FIM083 *//** @req Dem697_Conf AutoSAR 4.2.0*/\r
+//#endif\r
+\r
+} Dem_NvramBlockIdType;/** @req Dem147 *//** @req Dem696_Conf AutoSAR 4.2.0*/\r
\r
/*\r
* DemConfigSetType types\r
// 10.2.14 DemEventClass\r
typedef struct {\r
boolean ConsiderPtoStatus; // (1)\r
- const Dem_DTCOriginType EventDestination[DEM_MAX_NR_OF_EVENT_DESTINATION+1];// (0..4)\r
+ const Dem_DTCOriginType EventDestination[DEM_MAX_NR_OF_EVENT_DESTINATION+1];// (0..4)\r
uint8 EventPriority; // (1)\r
boolean FFPrestorageSupported; // (1)\r
boolean HealingAllowed; // (1)\r
- Dem_OperationCycleIdType OperationCycleRef; // (1)\r
-// uint8 HealingCycleCounter; // (0..1) Optional\r
+ Dem_OperationCycleIdType OperationCycleRef; // (1) \r
+ boolean AgingAllowed; // (1)/** @req Dem622_Conf AutoSAR 4.2.0*/\r
+ uint8 AgingCounterThreshold; // (1)/** @req Dem623_Conf AutoSAR 4.2.0*/\r
+ Dem_OperationCycleIdType AgingCycleRef; // (1)/** @req Dem624_Conf AutoSAR 4.2.0*/\r
+// uint8 HealingCycleCounter; // (0..1) Optional\r
// const Dem_EnableConditionType *EnableConditionRef; // (0..*) Optional\r
// const Dem_OperationCycleTgtType *HealingCycleRef; // (0..1) Optional\r
const Dem_PreDebounceAlgorithmClassType *PreDebounceAlgorithmClass; // (0..255) (Only 0..1 supported)\r
Dem_EventKindType EventKind; // (1)\r
const Dem_EventClassType *EventClass; // (1)\r
const Dem_ExtendedDataClassType *ExtendedDataClassRef; // (0..1)\r
- const Dem_FreezeFrameClassType *FreezeFrameClassRef; // (0..255) (Only 0..1 supported)\r
+ const Dem_FreezeFrameClassType *FreezeFrameClassRef[DEM_MAX_NR_OF_CLASSES_IN_FREEZEFRAME_DATA+1]; // (0..255) (Only 0..1 supported)/** @req DEM021 */\r
const Dem_CallbackInitMforEType *CallbackInitMforE; // (0..1)\r
const Dem_CallbackEventStatusChangedType *CallbackEventStatusChanged;// (0..*)\r
const Dem_DTCClassType *DTCClassRef; // (0..1)\r
boolean Arc_EOL;\r
} Dem_EventParameterType; /** @req DEM130 */\r
\r
+\r
+\r
// 10.2.19 DemGroupOfDTC\r
typedef struct {\r
// TODO: Fill out\r
} Dem_ConfigType;\r
\r
\r
+typedef uint16 ChecksumType;\r
+typedef struct {\r
+ Dem_EventIdType eventId;\r
+ uint16 occurrence;\r
+ uint16 dataSize;\r
+ uint8 recordNumber;\r
+ uint32 timeStamp;\r
+ uint8 data[DEM_MAX_SIZE_FF_DATA];\r
+ ChecksumType checksum;\r
+} FreezeFrameRecType;\r
+\r
+\r
+\r
/*\r
* Make the DEM_Config visible for others.\r
*/\r
extern const Dem_ConfigType DEM_Config;\r
-\r
-\r
+/* block in NVRam, use for freezeframe */\r
+extern const Dem_NvramBlockIdType FreezeFrameBlockId[DEM_MAX_NUMBER_FF_DATA_PRI_MEM];\r
+/* block in NVRam, use for aging */\r
+extern const Dem_NvramBlockIdType AgingBlockId;\r
#endif /*DEM_LCFG_H_*/\r