* Procedure: zeroPriMemBuffers\r
* Description: Fill the primary buffers with zeroes\r
*/\r
-void zeroPriMemBuffers(void)\r
+void demZeroPriMemBuffers(void)\r
{\r
memset(priMemEventBuffer, 0, sizeof(priMemEventBuffer));\r
memset(priMemFreezeFrameBuffer, 0, sizeof(priMemFreezeFrameBuffer));\r
* Procedure: calcChecksum\r
* Description: Calculate checksum over *data to *(data+nrOfBytes-1) area\r
*/\r
-ChecksumType calcChecksum(void *data, uint16 nrOfBytes)\r
+static ChecksumType calcChecksum(void *data, uint16 nrOfBytes)\r
{\r
uint16 i;\r
uint8 *ptr = (uint8*)data;\r
* Description: Return TRUE if "dtcKind" match the events DTCKind or "dtcKind"\r
* is "DEM_DTC_KIND_ALL_DTCS" otherwise FALSE.\r
*/\r
-boolean checkDtcKind(Dem_DTCKindType dtcKind, const Dem_EventParameterType *eventParam)\r
+static boolean checkDtcKind(Dem_DTCKindType dtcKind, const Dem_EventParameterType *eventParam)\r
{\r
boolean result = FALSE;\r
\r
* Description: Return TRUE if "dtc" match the events DTC or "dtc" is\r
* "DEM_DTC_GROUP_ALL_DTCS" otherwise FALSE.\r
*/\r
-boolean checkDtcGroup(uint32 dtc, const Dem_EventParameterType *eventParam)\r
+static boolean checkDtcGroup(uint32 dtc, const Dem_EventParameterType *eventParam)\r
{\r
boolean result = FALSE;\r
\r
* Procedure: checkDtcOrigin\r
* Description: Return TRUE if "dtcOrigin" match any of the events DTCOrigin otherwise FALSE.\r
*/\r
-boolean checkDtcOrigin(Dem_DTCOriginType dtcOrigin, const Dem_EventParameterType *eventParam)\r
+static boolean checkDtcOrigin(Dem_DTCOriginType dtcOrigin, const Dem_EventParameterType *eventParam)\r
{\r
boolean result = FALSE;\r
uint16 i;\r
* Procedure: checkDtcSeverityMask\r
* Description: Return TRUE if "dtcSeverityMask" match any of the events DTC severity otherwise FALSE.\r
*/\r
-boolean checkDtcSeverityMask(Dem_DTCSeverityType dtcSeverityMask, const Dem_EventParameterType *eventParam)\r
+static boolean checkDtcSeverityMask(Dem_DTCSeverityType dtcSeverityMask, const Dem_EventParameterType *eventParam)\r
{\r
boolean result = TRUE;\r
\r
* Procedure: checkDtcFaultDetectionCounterMask\r
* Description: TBD.\r
*/\r
-boolean checkDtcFaultDetectionCounter(const Dem_EventParameterType *eventParam)\r
+static boolean checkDtcFaultDetectionCounter(const Dem_EventParameterType *eventParam)\r
{\r
boolean result = TRUE;\r
\r
* Description: Returns the pointer to event id parameters of "eventId" in "*eventStatusBuffer",\r
* if not found NULL is returned.\r
*/\r
-void lookupEventStatusRec(Dem_EventIdType eventId, EventStatusRecType **const eventStatusRec)\r
+static void lookupEventStatusRec(Dem_EventIdType eventId, EventStatusRecType **const eventStatusRec)\r
{\r
EventStatusRecType *eventStatusRecPtr = eventStatusBuffer;\r
\r
* Description: Returns the pointer to event id parameters of "eventId" in "*eventIdParam",\r
* if not found NULL is returned.\r
*/\r
-void lookupEventIdParameter(Dem_EventIdType eventId, const Dem_EventParameterType **const eventIdParam)\r
+static void lookupEventIdParameter(Dem_EventIdType eventId, const Dem_EventParameterType **const eventIdParam)\r
{\r
const Dem_EventParameterType *EventIdParamPtr = configSet->EventParameter;\r
\r
\r
\r
/*\r
- * Procedure: PreDebounceNone\r
+ * Procedure: preDebounceNone\r
* Description: Returns the result of the debouncing.\r
*/\r
-Dem_EventStatusType PreDebounceNone(Dem_EventStatusType reportedStatus, EventStatusRecType* statusRecord) {\r
+static Dem_EventStatusType preDebounceNone(Dem_EventStatusType reportedStatus, EventStatusRecType* statusRecord) {\r
Dem_EventStatusType returnCode;\r
\r
switch (reportedStatus) {\r
\r
\r
/*\r
- * Procedure: PreDebounceCounterBased\r
+ * Procedure: preDebounceCounterBased\r
* Description: Returns the result of the debouncing.\r
*/\r
-Dem_EventStatusType PreDebounceCounterBased(Dem_EventStatusType reportedStatus, EventStatusRecType* statusRecord) {\r
+static Dem_EventStatusType preDebounceCounterBased(Dem_EventStatusType reportedStatus, EventStatusRecType* statusRecord) {\r
Dem_EventStatusType returnCode;\r
const Dem_PreDebounceCounterBasedType* pdVars = statusRecord->eventParamRef->EventClass->PreDebounceAlgorithmClass->PreDebounceAlgorithm.PreDebounceCounterBased;\r
\r
* Description: Update the status of "eventId", if not exist and "createIfNotExist" is\r
* true a new record is created\r
*/\r
-void updateEventStatusRec(const Dem_EventParameterType *eventParam, Dem_EventStatusType eventStatus, boolean createIfNotExist, EventStatusRecType *eventStatusRec)\r
+static void updateEventStatusRec(const Dem_EventParameterType *eventParam, Dem_EventStatusType eventStatus, boolean createIfNotExist, EventStatusRecType *eventStatusRec)\r
{\r
EventStatusRecType *eventStatusRecPtr;\r
imask_t state = McuE_EnterCriticalSection();\r
// Handle debouncing\r
switch (eventParam->EventClass->PreDebounceAlgorithmClass->PreDebounceName) {\r
case DEM_NO_PRE_DEBOUNCE:\r
- eventStatus = PreDebounceNone(eventStatus, eventStatusRecPtr);\r
+ eventStatus = preDebounceNone(eventStatus, eventStatusRecPtr);\r
break;\r
\r
case DEM_PRE_DEBOUNCE_COUNTER_BASED:\r
- eventStatus = PreDebounceCounterBased(eventStatus, eventStatusRecPtr);\r
+ eventStatus = preDebounceCounterBased(eventStatus, eventStatusRecPtr);\r
break;\r
\r
default:\r
* Procedure: mergeEventStatusRec\r
* Description: Update the occurrence counter of status, if not exist a new record is created\r
*/\r
-void mergeEventStatusRec(EventRecType *eventRec)\r
+static void mergeEventStatusRec(EventRecType *eventRec)\r
{\r
EventStatusRecType *eventStatusRecPtr;\r
imask_t state = McuE_EnterCriticalSection();\r
* Procedure: deleteEventStatusRec\r
* Description: Delete the status record of "eventParam->eventId" from "eventStatusBuffer".\r
*/\r
-void deleteEventStatusRec(const Dem_EventParameterType *eventParam)\r
+static void deleteEventStatusRec(const Dem_EventParameterType *eventParam)\r
{\r
EventStatusRecType *eventStatusRecPtr;\r
imask_t state = McuE_EnterCriticalSection();\r
* Procedure: getEventStatusRec\r
* Description: Returns the status record of "eventId" in "eventStatusRec"\r
*/\r
-void getEventStatusRec(Dem_EventIdType eventId, EventStatusRecType *eventStatusRec)\r
+static void getEventStatusRec(Dem_EventIdType eventId, EventStatusRecType *eventStatusRec)\r
{\r
EventStatusRecType *eventStatusRecPtr;\r
\r
* Description: Returns TRUE if the DTC was found and "eventStatusRec" points\r
* to the event record found.\r
*/\r
-boolean lookupDtcEvent(uint32 dtc, EventStatusRecType **eventStatusRec)\r
+static boolean lookupDtcEvent(uint32 dtc, EventStatusRecType **eventStatusRec)\r
{\r
boolean dtcFound = FALSE;\r
uint16 i;\r
* Description: Returns TRUE if the event pointed by "event" fulfill\r
* the "dtcFilter" global filter settings.\r
*/\r
-boolean matchEventWithDtcFilter(const EventStatusRecType *eventRec)\r
+static boolean matchEventWithDtcFilter(const EventStatusRecType *eventRec)\r
{\r
boolean dtcMatch = FALSE;\r
\r
}\r
\r
\r
-void getFreezeFrameData(const Dem_EventParameterType *eventParam, FreezeFrameRecType *freezeFrame)\r
+static void getFreezeFrameData(const Dem_EventParameterType *eventParam, FreezeFrameRecType *freezeFrame)\r
{\r
// TODO: Fill out\r
freezeFrame->eventId = DEM_EVENT_ID_NULL; // Not supported yet\r
}\r
\r
\r
-void storeFreezeFrameDataPreInit(const Dem_EventParameterType *eventParam, FreezeFrameRecType *freezeFrame)\r
+static void storeFreezeFrameDataPreInit(const Dem_EventParameterType *eventParam, FreezeFrameRecType *freezeFrame)\r
{\r
// TODO: Fill out\r
}\r
\r
\r
-void updateFreezeFrameOccurrencePreInit(EventRecType *EventBuffer)\r
+static void updateFreezeFrameOccurrencePreInit(EventRecType *EventBuffer)\r
{\r
// TODO: Fill out\r
}\r
* Description: Collects the extended data according to "eventParam" and return it in "extData",\r
* if not found eventId is set to DEM_EVENT_ID_NULL.\r
*/\r
-void getExtendedData(const Dem_EventParameterType *eventParam, ExtDataRecType *extData)\r
+static void getExtendedData(const Dem_EventParameterType *eventParam, ExtDataRecType *extData)\r
{\r
Std_ReturnType callbackReturnCode;\r
uint16 i;\r
* Description: Store the extended data pointed by "extendedData" to the "preInitExtDataBuffer",\r
* if non existent a new entry is created.\r
*/\r
-void storeExtendedDataPreInit(const Dem_EventParameterType *eventParam, ExtDataRecType *extendedData)\r
+static void storeExtendedDataPreInit(const Dem_EventParameterType *eventParam, ExtDataRecType *extendedData)\r
{\r
uint16 i;\r
imask_t state = McuE_EnterCriticalSection();\r
* Description: Store the event data of "eventStatus->eventId" in "priMemEventBuffer",\r
* if non existent a new entry is created.\r
*/\r
-void storeEventPriMem(const Dem_EventParameterType *eventParam, EventStatusRecType *eventStatus)\r
+static void storeEventPriMem(const Dem_EventParameterType *eventParam, EventStatusRecType *eventStatus)\r
{\r
uint16 i;\r
imask_t state = McuE_EnterCriticalSection();\r
* Procedure: deleteEventPriMem\r
* Description: Delete the event data of "eventParam->eventId" from "priMemEventBuffer".\r
*/\r
-void deleteEventPriMem(const Dem_EventParameterType *eventParam)\r
+static void deleteEventPriMem(const Dem_EventParameterType *eventParam)\r
{\r
uint16 i;\r
imask_t state = McuE_EnterCriticalSection();\r
* Description: Store the event data of "eventStatus->eventId" in event memory according to\r
* "eventParam" destination option.\r
*/\r
-void storeEventEvtMem(const Dem_EventParameterType *eventParam, EventStatusRecType *eventStatus)\r
+static void storeEventEvtMem(const Dem_EventParameterType *eventParam, EventStatusRecType *eventStatus)\r
{\r
uint16 i;\r
\r
* Description: Store the extended data pointed by "extendedData" to the "priMemExtDataBuffer",\r
* if non existent a new entry is created.\r
*/\r
-void storeExtendedDataPriMem(const Dem_EventParameterType *eventParam, ExtDataRecType *extendedData)\r
+static void storeExtendedDataPriMem(const Dem_EventParameterType *eventParam, ExtDataRecType *extendedData)\r
{\r
uint16 i;\r
imask_t state = McuE_EnterCriticalSection();\r
* Procedure: deleteExtendedDataPriMem\r
* Description: Delete the extended data of "eventParam->eventId" from "priMemExtDataBuffer".\r
*/\r
-void deleteExtendedDataPriMem(const Dem_EventParameterType *eventParam)\r
+static void deleteExtendedDataPriMem(const Dem_EventParameterType *eventParam)\r
{\r
uint16 i;\r
imask_t state = McuE_EnterCriticalSection();\r
* Description: Store the extended data in event memory according to\r
* "eventParam" destination option\r
*/\r
-void storeExtendedDataEvtMem(const Dem_EventParameterType *eventParam, ExtDataRecType *extendedData)\r
+static void storeExtendedDataEvtMem(const Dem_EventParameterType *eventParam, ExtDataRecType *extendedData)\r
{\r
uint16 i;\r
\r
* Description: Returns TRUE if the requested extended data number was found among the configured records for the event.\r
* "extDataRecClassPtr" returns a pointer to the record class, "posInExtData" returns the position in stored extended data.\r
*/\r
-boolean lookupExtendedDataRecNumParam(uint8 extendedDataNumber, const Dem_EventParameterType *eventParam, Dem_ExtendedDataRecordClassType const **extDataRecClassPtr, uint8 *posInExtData)\r
+static boolean lookupExtendedDataRecNumParam(uint8 extendedDataNumber, const Dem_EventParameterType *eventParam, Dem_ExtendedDataRecordClassType const **extDataRecClassPtr, uint8 *posInExtData)\r
{\r
boolean recNumFound = FALSE;\r
\r
* Procedure: lookupExtendedDataPriMem\r
* Description: Returns TRUE if the requested event id is found, "extData" points to the found data.\r
*/\r
-boolean lookupExtendedDataPriMem(Dem_EventIdType eventId, ExtDataRecType **extData)\r
+static boolean lookupExtendedDataPriMem(Dem_EventIdType eventId, ExtDataRecType **extData)\r
{\r
boolean eventIdFound = FALSE;\r
uint16 i;\r
}\r
\r
\r
-void storeFreezeFrameDataPriMem(const Dem_EventParameterType *eventParam, FreezeFrameRecType *freezeFrame)\r
+static void storeFreezeFrameDataPriMem(const Dem_EventParameterType *eventParam, FreezeFrameRecType *freezeFrame)\r
{\r
// TODO: Fill out\r
}\r
\r
\r
-void deleteFreezeFrameDataPriMem(const Dem_EventParameterType *eventParam)\r
+static void deleteFreezeFrameDataPriMem(const Dem_EventParameterType *eventParam)\r
{\r
// TODO: Fill out\r
}\r
* Description: Store the freeze frame data in event memory according to\r
* "eventParam" destination option\r
*/\r
-void storeFreezeFrameDataEvtMem(const Dem_EventParameterType *eventParam, FreezeFrameRecType *freezeFrame)\r
+static void storeFreezeFrameDataEvtMem(const Dem_EventParameterType *eventParam, FreezeFrameRecType *freezeFrame)\r
{\r
uint16 i;\r
\r
* Description: Handle the updating of event status and storing of\r
* event related data in preInit buffers.\r
*/\r
-void handlePreInitEvent(Dem_EventIdType eventId, Dem_EventStatusType eventStatus)\r
+static void handlePreInitEvent(Dem_EventIdType eventId, Dem_EventStatusType eventStatus)\r
{\r
const Dem_EventParameterType *eventParam;\r
EventStatusRecType eventStatusLocal;\r
* Description: Handle the updating of event status and storing of\r
* event related data in event memory.\r
*/\r
-Std_ReturnType handleEvent(Dem_EventIdType eventId, Dem_EventStatusType eventStatus)\r
+static Std_ReturnType handleEvent(Dem_EventIdType eventId, Dem_EventStatusType eventStatus)\r
{\r
Std_ReturnType returnCode = E_OK;\r
const Dem_EventParameterType *eventParam;\r
* Procedure: resetEventStatus\r
* Description: Resets the events status of eventId.\r
*/\r
-void resetEventStatus(Dem_EventIdType eventId)\r
+static void resetEventStatus(Dem_EventIdType eventId)\r
{\r
imask_t state = McuE_EnterCriticalSection();\r
EventStatusRecType *eventStatusRecPtr;\r
* Procedure: getEventStatus\r
* Description: Returns the extended event status bitmask of eventId in "eventStatusExtended".\r
*/\r
-void getEventStatus(Dem_EventIdType eventId, Dem_EventStatusExtendedType *eventStatusExtended)\r
+static void getEventStatus(Dem_EventIdType eventId, Dem_EventStatusExtendedType *eventStatusExtended)\r
{\r
EventStatusRecType eventStatusLocal;\r
\r
* Procedure: getEventFailed\r
* Description: Returns the TRUE or FALSE of "eventId" in "eventFailed" depending on current status.\r
*/\r
-void getEventFailed(Dem_EventIdType eventId, boolean *eventFailed)\r
+static void getEventFailed(Dem_EventIdType eventId, boolean *eventFailed)\r
{\r
EventStatusRecType eventStatusLocal;\r
\r
* Description: Returns the TRUE or FALSE of "eventId" in "eventTested" depending on\r
* current status the "test not completed this operation cycle" bit.\r
*/\r
-void getEventTested(Dem_EventIdType eventId, boolean *eventTested)\r
+static void getEventTested(Dem_EventIdType eventId, boolean *eventTested)\r
{\r
EventStatusRecType eventStatusLocal;\r
\r
* Description: Returns pre debounce counter of "eventId" in "counter" and return value E_OK if\r
* the counter was available else E_NOT_OK.\r
*/\r
-Std_ReturnType getFaultDetectionCounter(Dem_EventIdType eventId, sint8 *counter)\r
+static Std_ReturnType getFaultDetectionCounter(Dem_EventIdType eventId, sint8 *counter)\r
{\r
Std_ReturnType returnCode = E_NOT_OK;\r
const Dem_EventParameterType *eventParam;\r
* event connected to this cycle id.\r
* Returns E_OK if operation was successful else E_NOT_OK.\r
*/\r
-Std_ReturnType setOperationCycleState(Dem_OperationCycleIdType operationCycleId, Dem_OperationCycleStateType cycleState)\r
+static Std_ReturnType setOperationCycleState(Dem_OperationCycleIdType operationCycleId, Dem_OperationCycleStateType cycleState)\r
{\r
uint16 i;\r
Std_ReturnType returnCode = E_OK;\r