Diagnostic interfaces and notification autosar
Published: 2024-03-04 17:56:57


My name is Sharana Basava, and I work at Luxoft India as a junior software engineer. I have had multiple opportunities to work on different projects at Luxoft, which has motivated me to talk about the crucial steps in creating a diagnostic standard.

**introduction Diagnostic Interfaces**
To provide the data maintained by the Dem to an external tester the Dem supports interfaces to the Dcm ,Please note, these API are intended for use by the Dcm module exclusively and may not be safe
to use otherwise.In case a replacement for the Dcm module has to be implemented,

**Notifications**
The Dem supports several configurable global and specific event or DTC related notification functions which will be described in the following. Notification functions will only be called, if the Dem is fully initialized.

**Monitor Status Changed**
These are notifications for a monitor status change. With the given event ID the receiver is able to identify what has changed.
-> General notification:
This callback function is called from Dem for each event on monitor status change.
-> FiM notification:
This callback function is called from Dem for each event on monitor status change.Dependent on the given state the FiM is able to derive the new fault inhibition state.
Event Status Changed
These are notifications for an event status change independent of the DTC status availability mask. With the given old and new status, the receiver is able to identify what has changed.

**-> General notification:**
This callback function is called from Dem for each event on event status change Event specific notifications:
Each event may have one or more of these callback functions which are called only if the respective event status has changed.

**-> FiM notification:**
This callback function is called for each event on event status change. Dependent on the given state the FiM is able to derive the new fault inhibition state. In contrast to the other Event Status Changed callbacks, the FiM is also notified about status changes resulting from disconnecting or reconnecting the event via API Dem Set Event Available()

**-> Dlt notification:**
This callback function is called for each event on event status change.The event status notifications are triggered from the Dem task function, not directly out of the context of the monitor.
There will be a delay of up to the Dem task cycle time between a monitor report and the change notification. This also affects the function permission calculation in the FiM module which is based on the event status notification

**DTC Status Changed**
These are notifications for a DTC status change. The DTC status availability mask is taken into account, so status bits which are not supported will not cause a notification. It is also possible
that a changed event status does not change the resulting status of a combined DTC status

**-> Global notifications:**
The configuration can define one or more of these callback functions which are called only if the respective DTC status has changed.
**-> Dcm notification:**
This callback function is called for each DTC status change. Dependent on the given state the Dcm is able to decide if a ROE message shall be sent.Changes API Dem_Dcm Control DTC Status Changed Notification is no longer supported and notifications are called always unless caused by Clear DTC.
-> General notification:
This is a single callback function which is called for each event on data change.
-> Event specific notification:
Each event may have one callback function which is called on event data change.

**Monitor Re-Initialization**
These notifications are called from Dem, to signal to diagnostic monitors that a new test result is now requested. This can happen due to clearing the fault memory, the start of a new operation
cycle, or the re-enabling of previously disabled DTC settings or enable conditions The set of notification calls is fully customizable in the configuration.
-> Event specific notification:
Each event may have one callback function which is called for the reasons mentioned above.
-> Function specific notifications:
Each event may have one or more of this callback functions which is called for the reasons mentioned above. For combined events, this callback is notified for each event if they are re-enabled by enable conditions. Note-Monitor re-initialization callbacks due to an operation cycle restart are called between the end of the previous, but before the start of the new operation cycle. So events cannot be reported at that point of time.

**Clear DTC Notification**
These notifications will be called from the Dem task function either before or after processing the clear request. This is configurable per notification.
-> Before a clear request is started, i.e. before any DTC is modified or a Clear Allowed callbacks is invoked.
-> After a clear request has finished. This is either after all DTCs have been reset in RAM, or after the cleared NV information was persisted by the NvM. The notification will be triggered before Dcm can send a response.

**Indicators**
An event can be configured to have one or more indicators assigned· An indicator is reported active if at least one assigned event requests it, and cleared when all events assigned to it have
revoked their warning indicator request (i.e. by healing or diagnostic service Clear Dtc).The indicator status is set always with event confirmation (set condition of bit 3), and reset after
the configured number of operation cycles during which the event was tested, but not tested failed. An event’s warning indicator request status is reported in bit 7 of the UDS status byte·