Enables querying and monitoring multiple diagnostic events via event handles and callback notifications.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 4cd8b0cbe34dProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Enables querying and monitoring multiple diagnostic events via event handles and callback notifications.
The class enables applications to perform state-based querying and monitoring of multiple diagnostic events via a common interface using event handles [SWS_DM_01705]. In addition to registering notification callbacks, asynchronous methods are available for determining event status, debouncing, fault counter, and DTC number [SWS_DM_01707], [SWS_DM_01709]. Instances are neither copyable nor movable and, due to the non-thread-safe destructor, require an orderly termination of active operations prior to release [SWS_DM_01706], [SWS_DM_02067].
Context
The class ara::diag::MultipleEvent provides interfaces to the application for querying and monitoring diagnostic events via interfaces for multiple events [SWS_DM_01705]. In contrast to single-event classes, operations on instances of MultipleEvent address concrete events via an identifier of type EventHandleType[SWS_DM_01707], [SWS_DM_01708]. The class acts as an interface between the application software component and the Diagnostic Management (DM) of Adaptive AUTOSAR AUTOSAR AP SWS Diagnostics, p. 69. Via the port prototype of a DiagnosticMultipleEventInterface, the object is bound to the configured diagnostic infrastructure [SWS_DM_01705].
Lifecycle
An instance of MultipleEvent is created via an explicit constructor by specifying an ara::core::InstanceSpecifier[SWS_DM_01705]. The constructor is thread-safe and verifies the modeled binding to a port prototype of interface type DiagnosticMultipleEventInterface[SWS_DM_01705]. If the mapping fails or if the same instance identifier is reused within the process, the platform reports corresponding violations such as InstanceSpecifierAlreadyInUseViolation or PortInterfaceMappingViolation[SWS_DM_01705].
Copy and move operations are completely prohibited for MultipleEvent: Both copy and move constructors as well as the corresponding assignment operators are declared as deleted [SWS_DM_02067], [SWS_DM_02068], [SWS_DM_02069], [SWS_DM_02070]. The object thus possesses strict identity and remains at its creation site. The destructor ~MultipleEvent() is specified as not thread-safe [SWS_DM_01706]. Calling components must therefore ensure prior to destruction that no more asynchronous queries or notifications are running via the instance AUTOSAR AP SWS Diagnostics, p. 78.
Usage Path
After instantiation, the application typically registers a callback function by means of SetEventStatusChangedNotifier to be informed about status changes of a specific event (identified via EventHandleType) [SWS_DM_01708]. A repeated call of this method for the same event overwrites the previously set notifier [SWS_DM_01708]. This registration function is not thread-safe [SWS_DM_01708].
During ongoing operation, current diagnostic information can be queried specifically per event handle. All state-based read operations return their data asynchronously in a ara::core::Future:
GetEventStatus returns the current status byte of the event as EventStatusByte[SWS_DM_01707].
GetDebouncingStatus returns the debouncing state (DebouncingState) of the event [SWS_DM_01710].
GetFaultDetectionCounter returns the current fault detection counter (FaultDetectionCounter) as a signed 8-bit integer value [SWS_DM_01711].
GetDTCNumber queries the assigned DTC number in the requested DTCFormatType[SWS_DM_01709].
Sequence diagram: Typical usage path for observing and querying diagnostic events via MultipleEvent. Sources: [SWS_DM_01705], [SWS_DM_01707], [SWS_DM_01708], [SWS_DM_01709], [SWS_DM_01710], [SWS_DM_01711]
Error Scenarios
Methods of MultipleEvent signal error states via the type DiagErrc, which is conveyed encapsulated either in a ara::core::Result or in the returned ara::core::Future[SWS_DM_01707], [SWS_DM_01708], [SWS_DM_01709]. The following error cases are specified:
Register a notifier function which is called if a diagnostic event is changed. A consecutive call of this method will overwrite the previous registered notifier.
InstanceSpeci- InstanceSpecifier either cannot be resolved in the model in the fierMappingIn- context of your executable, or it refers to a model element other tegrityViolation than a PortPrototype. PortInterfaceMap- A PortPrototype that is referenced by a pingViolation DiagnosticMultipleEventPortMapping needs to be typed by a DiagnosticMultipleEventInterface. ProcessMappingVio- Matching InstanceRef exists, but no matching (modelled) Process lation found that matches the (runtime) process. InstanceSpecifier- Violation message that is sent in case a constructor in the ara AlreadyInUseViola- framework was called with an InstanceSpecifier already in use in tion this process.
Parameter (in)
Parameter
Beschreibung
specifier
InstanceSpecifier to a PortPrototype of a DiagnosticMultipleEventInterface.
Request a governed re-review of this record. The record is not changed immediately.
Register a notifier function which is called if a diagnostic event is changed. A consecutive call of this method will overwrite the previous registered notifier.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: bd91ad4f4cb5ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
use
The method ara::diag::MultipleEvent::SetEventStatusChangedNotifier[SWS_DM_01708] registers a callback function of type EventStatusByteNotifier that is called when the state of a diagnostic event changes. Via the parameter eventHandle, the desired event within the instance is identified. The method is specified as noexcept and returns a ara::core::Result<void>. A renewed call overwrites the previously registered notifier [SWS_DM_01708].
Error handling
If an error occurs during registration, the ara::core::Result returns a corresponding error code. Specified is the error DiagErrc::kInvalidArgument, for example in the context of internal debouncing such as kPreFailed[SWS_DM_01708].
Concurrency and Limitations
The operation is declared as exception safe, but explicitly classified as not thread-safe[SWS_DM_01708]. Concurrent calls on the same instance must therefore be synchronized externally.
gemini-3.8-flash-low· 2026-10-13 · German original