Background
The Diagnostic Event Manager (Dem) is a Basic Software Module of the AUTOSAR Diagnostic Services.
Relevant errors are reported either from Application Layer (resp. SW-C) or Basic Software Modules (BSWM).
- BSWs report the new status of the event with the
Dem_ReportErrorStatus API
- SWCs report the new status of the event
with the Dem_SetEventStatus API (through the RTE)
The Diagnostic Event Manager (Dem) handles and stores the diagnostic events detected
by diagnostic monitors in both Software Components (SW-Cs) and Basic
Software Modules (BSWM). The stored event information is available
via an interface to other BSW modules or SW-Cs.
Function Dem_SetEventStatus()
This function has a prototype of:
Std_ReturnType Dem_SetEventStatus(
Dem_EventIdType EventId,
Dem_EventStatusType EventStatus
)
Note the return type is Std_ReturnType
- which returns either E_OK
or E_NOT_OK
MISRA C:2012 Rule 17.7
MISRA C:2012 Rule 17.7 requires that you do something with the values returned from a (non-void
) function...
The function is telling you something... it has either succeeded E_OK
or failed E_NOT_OK
- ignoring this information is probably not a good idea.
If you genuinely want to ignore it, then stick in a (void)
cast - but make sure you add a good clear rationale for doing so.
See profile for affiliation