Enables adaptive applications to query and event-drivenly monitor vehicle diagnostic indicators.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 7d81598b6e77ProvenanceOpen questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Enables adaptive applications to query and event-drivenly monitor vehicle diagnostic indicators.
The interface serves for the structured querying and monitoring of vehicle diagnostic indicators within the AUTOSAR Adaptive Platform. Applications instantiate the object via a modeled identifier and can retrieve the current status via an asynchronous query method [SWS_DM_00744]. In addition, a user-defined callback function can be registered that receives status updates directly upon changes [SWS_DM_00745]. As an essential boundary condition, the instance is strictly bound to a port, neither copyable nor movable, and requires synchronization against concurrent calls during registration as well as destruction.
Context
The ara::diag::Indicator class acts in the Adaptive Platform module diag as the central representation of the DiagnosticIndicatorInterface[SWS_DM_00742]. Its core task is to enable applications to access diagnostic indicators such as warning lamps or function indicators (for example, a Malfunction Indicator Light, MIL).
Essentially three components participate in the interaction: a consuming adaptive application (such as an instrument cluster or an HMI service), the instance of ara::diag::Indicator as a local interface endpoint, and the Diagnostic Management daemon (DM). The latter processes the vehicle-wide diagnostic events and UDS DTC states and provides the underlying diagnostic functionality [SWS_DM_00744].
Context diagram: Interaction partners of the ara::diag::Indicator interface between application logic and Diagnostic Management daemon. Sources: [SWS_DM_00742], [SWS_DM_00744].
Lifecycle
Creation of an ara::diag::Indicator object takes place explicitly by passing an ara::core::InstanceSpecifier to the constructor [SWS_DM_00742]. This identifier binds the object to an PortPrototype defined in the design model, which must strictly be typed as DiagnosticIndicatorInterface[SWS_DM_00742].
With regard to ownership and object semantics, ara::diag::Indicator is designed as a strict single instance: neither copying nor moving is permitted. Accordingly, copy constructor [SWS_DM_01629], move constructor [SWS_DM_01630], copy assignment operator [SWS_DM_01627], and move assignment operator [SWS_DM_01628] are declared as deleted (=delete).
The lifecycle ends with the call of the destructor ~Indicator()[SWS_DM_00743]. While constructor and status query are specified as thread-safe [SWS_DM_00742], [SWS_DM_00744], the destructor is not thread-safe [SWS_DM_00743]. The calling application must therefore ensure that no concurrent method calls or notifier executions take place during destruction.
Usage Path
After successful initialization, the class supports two complementary usage models for determining the indicator state:
Event-driven notification: A callback function of type IndicatorStatusTypeNotifier can be registered via SetNotifier()[SWS_DM_00745], [SWS_DM_02129]. As soon as the status of the indicator changes, the runtime environment calls this notifier. A consecutive call of SetNotifier() overwrites the previously registered handler [SWS_DM_00745]. Since SetNotifier() is not thread-safe, registration must be synchronized externally [SWS_DM_00745]. Presumably, the notifier is executed in the context of a background thread of Diagnostic Management, which is why no time-consuming blocking operations should occur within it. Question Q-c27898ecefb8006f (open)
Targeted query: The current state can be actively queried at any time via GetIndicatorState()[SWS_DM_00744]. The method is thread-safe and returns a ara::core::Future<IndicatorStatusType>[SWS_DM_00744]. Interpretation: The asynchronous provisioning via a future indicates that the query is internally delegated via inter-process communication (IPC) to the central Diagnostic Management daemon. Question Q-61a650bd8ab7fc04 (open)
Error conditions can occur both during the initialization phase and at runtime:
Configuration violations during construction: The constructor reports modeling inconsistencies in the form of defined violations [SWS_DM_00742]. These include InstanceSpecifierMappingIntegrityViolation (the identifier cannot be resolved or does not reference a port), PortInterfaceMappingViolation (the referenced port is not typed by an DiagnosticIndicatorInterface), ProcessMappingViolation (no matching modeled process available for the runtime instance), and InstanceSpecifierAlreadyInUseViolation (the identifier is already used by another instance in the process) [SWS_DM_00742].
Failure of diagnostic functions: If the execution of GetIndicatorState() fails, the error code DiagErrc::kServiceNotAvailable is transported via the returned future [SWS_DM_00744]. This occurs when essential functions of Diagnostic Management are not available at call time [SWS_DM_00744].
Concurrent accesses: Since SetNotifier()[SWS_DM_00745] and the destructor [SWS_DM_00743] are not thread-safe, unprotected concurrent access leads to undefined runtime behavior.
This guide is based on the AUTOSAR Adaptive Platform R25-11 specification and was created by an AI curation assistant.
Register a notifier function which is called if the indicator is updated. 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 DiagnosticIndicatorPortMapping needs to be typed by a DiagnosticIndicatorInterface. 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 DiagnosticIndicatorInterface.
Request a governed re-review of this record. The record is not changed immediately.
Register a notifier function which is called if the indicator is updated. 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: f2935619a27aProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The function SetNotifier of class ara::diag::Indicator ([SWS_DM_00745], declared in header ara/diag/indicator.h) registers an application-specific notification function of type IndicatorStatusTypeNotifier. This callback function is called by Diagnostic Management as soon as a status update of the diagnostic warning indicator is available ([SWS_DM_00745]).
Behavior on multiple calls
A repeated call of SetNotifier on the same instance completely overwrites the previously registered notifier ([SWS_DM_00745], [SWS_DM_01359]). This overwriting behavior corresponds to the general pattern in Diagnostic Management, as specified equally for ara::diag::OperationCycle::SetNotifier ([SWS_DM_00755]) and ara::diag::CancellationHandler::SetNotifier ([SWS_DM_00615]).
Error Handling and Concurrency
Error handling: The method is specified as noexcept and exception-safe (exception safe) ([SWS_DM_00745]). Since no standardized errors are defined, the returned ara::core::Result<void> is, as an interpretation, likely to always encapsulate a successful call. Question Q-dcde3dd383fbfb4a (open)
Concurrency: The interface is explicitly declared as not thread-safe (not thread-safe) ([SWS_DM_00745]). Concurrent calls on the same instance must be synchronized by the application.
gemini-3.8-flash-low· 2026-10-13 · German original