Serves to provide application-side extended diagnostic data to adaptive Diagnostic Management.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 0446a63ad449ProvenanceOpen questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Serves to provide application-side extended diagnostic data to adaptive Diagnostic Management.
The class <ExtendedDataRecordElementInterface> serves adaptive applications as an interface for providing extended diagnostic data to Diagnostic Management ([SWS_DM_02152]). Following instantiation and activation via Offer(), the handler implements asynchronous provisioning of the data via the pure virtual method Read() ([SWS_DM_02156]). Because the Diagnostic Manager permanently saves the records in non-volatile memory, unavailable values must mandatorily be padded with a fill pattern. The interface is neither copyable nor movable, and its destructor is not thread-safe.
Context
The interface <ExtendedDataRecordElementInterface> serves in the diagnostic subsystem of the AUTOSAR Adaptive Platform to provide application-specific extended diagnostic data (Extended Data Records) to Diagnostic Management (DM) (AUTOSAR AP SWS Diagnostics §7.2 “DiagnosticExtendedDataRecordInterface”). An Extended Data Record contains diagnostic-related additional data, such as counter readings or environmental information, associated with a failure event. The class acts as an abstract base interface for application-side handler components. Interaction partners include the Diagnostic Manager (DM), which requests and coordinates read operations, the concrete handler implementation within the application, and the non-volatile memory (NVM) in which the DM permanently stores the retrieved data ([SWS_DM_02156]). Interpretation: The invocation of Read() is presumably initiated by internal diagnostic processing in the DM, for example upon the occurrence of a failure event or upon status changes of a diagnostic trouble code. Question Q-f80be8c2bd5697fc (open)
Creation occurs via the parameterized constructor with specification of an ara::core::InstanceSpecifier and the concurrency mode ara::diag::ConcurrencyType ([SWS_DM_02158], AUTOSAR AP SWS Diagnostics §7.2 “DiagnosticExtendedDataRecordInterface”). Construction is thread-safe and exception safe. The parameter concurrencyType determines whether calls to the interface may be processed concurrently (kConcurrent) or sequentially (kNotConcurrent) ([SWS_DM_02158]). Copy and move operations are completely prevented: copy constructor ([SWS_DM_02147]), copy assignment ([SWS_DM_02148]), move constructor ([SWS_DM_02149]), and move assignment ([SWS_DM_02150]) are deleted (=delete). An instance thus possesses a fixed identity and can neither be duplicated nor transferred.
After instantiation, the object is initially in an inactive state. Only by calling Offer() ([SWS_DM_02152]) is the service activated and the DM forwards requests to the handler. Using StopOffer() ([SWS_DM_02153]), this forwarding can be stopped at any time. Destruction occurs via the virtual destructor ~<ExtendedDataRecordElementInterface>() ([SWS_DM_02151]). Although this destructor is exception-safe, it is explicitly not thread-safe ([SWS_DM_02151]). Interpretation: StopOffer() likely has to be called before destroying the handler object to ensure that no further requests arrive while the object is being deallocated. Question Q-c77dda63f0e8798a (open)
Usage Path
The regular flow comprises the offering, the asynchronous answering of read requests, and the deactivation of the service:
Initialization: The application instantiates the derived class with the appropriate port identifier and concurrency configuration ([SWS_DM_02158]).
Service offering: By calling Offer(), the forwarding of requests in the DM is enabled ([SWS_DM_02152]). The method returns a ara::core::Result<void>.
Data retrieval: When a read request arrives, the DM calls the pure virtual method Read() ([SWS_DM_02156]). In doing so, the request metadata (metaInfo) and a cancellationHandler are passed.
Cancellation handling and return: The handler can check via cancellationHandler.IsCanceled() whether the conversation was cancelled, or register a notification via cancellationHandler.SetNotifier() ([SWS_DM_02156]). The result is delivered asynchronously via a ara::core::Future with a ReadOutput object ([SWS_DM_02156], [SWS_DM_02154]).
Persistence: The DM takes over the retrieved data and permanently stores it in non-volatile memory ([SWS_DM_02156]).
Service deregistration: Prior to shutdown, the application calls StopOffer() ([SWS_DM_02153]) to terminate forwarding by the DM before the instance is destroyed ([SWS_DM_02151]).
When using the interface, several error conditions and preconditions must be observed:
Construction errors and model violations: When calling the constructor, modeling errors can occur ([SWS_DM_02158]). These include InstanceSpecifierMappingIntegrityViolation (the identifier cannot be resolved or does not reference a PortPrototype), PortInterfaceMappingViolation (missing referencing by a DiagnosticDataPortMapping), ProcessMappingViolation (no suitable process found in the model), as well as InstanceSpecifierAlreadyInUseViolation (the identifier is already used in the process) ([SWS_DM_02158]).
Multiple offering: If Offer() is called when the service is already actively offered, the call fails and returns the error code DiagOfferErrc::kAlreadyOffered ([SWS_DM_02152]).
Unavailable data during read requests: Because the DM stores the data in non-volatile memory, a value must mandatory be returned when Read() is called ([SWS_DM_02156]). If data is not available at the time of the query, the handler implementation must fill it with a defined fill pattern such as 0xFF ([SWS_DM_02156]).
Application and diagnostic errors: If the data provision fails entirely, the returned ara::core::Future can contain a corresponding diagnostic NRC error code (DiagUdsNrcErrc) or an application-specific error (ApApplicationError) ([SWS_DM_02156]).
Destruction hazard: Because the destructor is not thread-safe ([SWS_DM_02151]), destroying the object during concurrent calls or without prior StopOffer() ([SWS_DM_02153]) leads to undefined behavior.
This guide was generated by an AI based on the AUTOSAR R25-11 specification.
Provision of a Read ExtendedDataRecordElement. The data fetched by this method is stored in non-volatile memory by the DM and therefore always a value needs to be returned. Not available data at the time of the method call shall be filled with a filling pattern, e.g 0xFF by the implementation of this method (DiagnosticExtendedDataRecordInterface in the role provide).
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 5f6f8ec51798ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Usage and Call Context
The function <ExtendedDataRecordElementInterface> serves as a constructor for creating an DataElement for an extended data record interface based on an ara::core::InstanceSpecifier[SWS_DM_02158]. The declaration is located in the scope <ExtendedDataRecord-Namespace>::<ExtendedDataRecordElementInterface> and requires including the header file #include "<ExtendedDataRecordElementShortname>.h"AUTOSAR_AP_SWS_Diagnostics §8.49.2.2.1.6.
The synchronous invocation requires two input parameters [SWS_DM_02158]:
instanceSpec (ara::core::InstanceSpecifier): Identifier of the concrete service instance in the AUTOSAR model.
concurrencyType (ara::diag::ConcurrencyType): Determines whether the interface is instantiated as thread-safe (kConcurrent) or non-thread-safe (kNotConcurrent).
Concurrency and error safety
The constructor function itself is declared as noexcept and specified as thread-safe as well as exception safe[SWS_DM_02158]. Interpretation: Because the function is defined as noexcept, modeling and initialization errors are likely signaled not via C++ exceptions, but via the violations defined in the Adaptive framework [SWS_DM_02158]. Question Q-9ce91764c3e8364e (open)
Error Handling and Model Violations
In case of faulty model configuration or invalid identifiers, specific violations occur [SWS_DM_02158]:
InstanceSpecifierMappingIntegrityViolation: The identifier cannot be resolved in the context of the process or does not reference an PortPrototype.
PortInterfaceMappingViolation: An PortPrototype typed by DiagnosticExtendedDataRecordInterface is not referenced by an DiagnosticDataPortMapping.
ProcessMappingViolation: A matching InstanceRef exists, but no matching modeled process was found for the runtime process.
InstanceSpecifierAlreadyInUseViolation: The constructor was called with an InstanceSpecifier that is already in use in the process.
This usage note was generated automatically based on the specification of AUTOSAR Adaptive R25-11.
Implementer's Guide to follow (complexity I1)
Header-Datei
#include "<ExtendedDataRecordElementShortname>.h"
Scope
class <ExtendedDataRecord-Namespace>::<ExtendedDataRecordElementInterface>
Exception-Sicherheit
exception safe
Thread-Sicherheit
thread-safe
Verletzungen (Violations)
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 typed by a pingViolation DiagnosticExtendedDataRecordInterface needs to be referenced by a DiagnosticDataPortMapping.
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
instanceSpec
The specifier of a specific instance of a service.
concurrencyType
Specifies if the interface is implemented as thread safe ( kConcurrent) or non-thread safe (kNotConcurrent).
Request a governed re-review of this record. The record is not changed immediately.
This Offer will enable the DM to forward request messages to this handler
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: e44e4ef775f3ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The function Offer enables the forwarding of diagnostic requests by the Diagnostic Management Daemon (DM) to the corresponding instance of the handler [SWS_DM_02152]. It is called without parameters and synchronously returns an ara::core::Result<void>, declared as noexcept and specified as exception-safe [SWS_DM_02152].
For proper usage and error handling, the following specifications apply:
Return value and errors: In case of success, the result contains an empty value. If the service was already registered for this handler instance previously, the call fails and returns the error code DiagOfferErrc::kAlreadyOffered with rollback semantics [SWS_DM_02152]. Related error domains also define the error code kAlreadyOffered for this state [SWS_DM_00514][SWS_DM_00560].
Concurrency: In contrast to other diagnostic handlers, which are often designated as not thread-safe (such as in [SWS_DM_00557]), this method is explicitly defined as thread-safe [SWS_DM_02152].
Interplay in the system: As long as an interface has not yet been offered by the application using Offer, the DM reacts depending on the context with defined default or fallback values, such as with the status "Not ready" for DoIP PowerMode queries [SWS_DM_01525] or fallback values for group identifiers [SWS_DM_01527]. In addition, the specification emphasizes that diagnostic offer functions are specific to ara::diag and must not be confused with ara::com::OfferAUTOSAR_AP_SWS_Diagnostics §7.3.4.1.2 “Monitors”.
Interpretation: The synchronous feedback behavior of Offer is likely intended to ensure that handler registration is completely finished before subsequent UDS requests are received. Question Q-e6b2916cf4887164 (open)
This text was generated by an AI based on the AUTOSAR specification R25-11.
Implementer's Guide to follow (complexity I2)
Header-Datei
#include "<ExtendedDataRecordElementShortname>.h"
Scope
class <ExtendedDataRecord-Namespace>::<ExtendedDataRecordElementInterface>
• If successful: an ara::core::Result containing a ara:: core::Result::value_type • If unsuccessful: an ara::core::Result containing an ara:: core::Result::error_type i.e. a corresponding ara:: diag::DiagOfferErrc
Fehler
Fehlercode
Beschreibung
DiagOfferErrc::kAlreadyOffered
rollback_semantics The service is already offered.
Request a governed re-review of this record. The record is not changed immediately.
Provision of a Read ExtendedDataRecordElement. The data fetched by this method is stored in non-volatile memory by the DM and therefore always a value needs to be returned. Not available data at the time of the method call shall be filled with a filling pattern, e.g 0xFF by the implementation of this method (DiagnosticExtendedDataRecordInterface in the role provide).
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: fe834745387eProvenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Usage and Semantics
The pure virtual method Read is called by the Diagnostic Management (DM) to retrieve the data of an ExtendedDataRecordElement from the application ([SWS_DM_02156]). Since the DM permanently saves the retrieved data in non-volatile memory, the method must always supply a value. If data is not available at the time of the call, it must be padded by the implementation with a fill pattern such as 0xFF ([SWS_DM_02156]).
Execution is asynchronous and returns a ara::core::Future, which encapsulates the structure ReadOutput in the case of success ([SWS_DM_02154]). The call passes the following parameters ([SWS_DM_02156]):
metaInfo: Transmits meta-information of the underlying diagnostic request.
cancellationHandler: Enables querying a cancellation via cancellationHandler.IsCanceled() as well as registering a notification function via cancellationHandler.SetNotifier().
Error handling
In case of an error, the Future provides a negative UDS response code (DiagUdsNrcErrc) or an application-specific error (ApApplicationError) ([SWS_DM_02156], AUTOSAR_AP_SWS_Diagnostics §7.3.2.6.1 “NRCs created by application”). If the required service interface is not yet or no longer provided via offer(), the DM responds with NRC 0x94 (ResourceTemporarilyNotAvailable) ([SWS_DM_01257]). In addition, DiagOfferErrc::kAlreadyOffered reports if the service is already being offered ([SWS_DM_02156]).
Concurrency and Interaction
The method is specified as exception-safe (exception safe) ([SWS_DM_02156]). Thread safety is conditional and implementation-defined (implementation defined) ([SWS_DM_02156]). This distinguishes Read for extended data records from read operations on regular data elements ([SWS_DM_00596]) or data identifiers ([SWS_DM_00640]), which are explicitly not thread-safe.
This text was generated by an AI system based on the specifications of release R25-11.
Implementer's Guide to follow (complexity I1)
Header-Datei
#include "<ExtendedDataRecordElementShortname>.h"
Scope
class <ExtendedDataRecord-Namespace>::<ExtendedDataRecordElementInterface>
Exception-Sicherheit
exception safe
Thread-Sicherheit
conditional Thread safety is implementation defined
Parameter (in)
Parameter
Beschreibung
metaInfo
MetaInfo of the request.
cancellationHandler
This parameter is used to • Query the current cancellation status by calling cancellationHandler.IsCanceled. Returns TRUE in case, the current conversation has been cancelled and FALSE otherwise. • Register a notifier function by calling cancellationHandler.SetNotifier. The registered notifier is called if the current conversation is cancelled.
• If successful: an ara::core::Future containing an ReadOutput object as per [SWS_DM_02154] • If unsuccessful: an ara::core::Future containing a corresponding DiagUdsNrcErrc or ApApplicationError.
Fehler
Fehlercode
Beschreibung
DiagOfferErrc::kAlreadyOffered
rollback_semantics The service is already offered.
Request a governed re-review of this record. The record is not changed immediately.
This StopOffer will disable the forwarding of request messages from DM
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 7a0fc3b7b561ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Usage and Call Context
The function StopOffer is called on an instance of the extended data record interface (<ExtendedDataRecord-Namespace>::<ExtendedDataRecordElementInterface>), which is included via the header #include "<ExtendedDataRecordElementShortname>.h"[SWS_DM_02153]. The call is synchronous, takes no parameters, and has no return value (void).
The purpose of the method is to deactivate the forwarding of incoming request messages from Diagnostic Management (DM) to the respective extended data record element [SWS_DM_02153]. After execution, the DM no longer forwards any new diagnostic requests to the associated handler.
Error Handling and Concurrency
The function is declared with the identifier noexcept and specified as exception-safe (exception safe) [SWS_DM_02153]. Specific error codes, return values, or notifications to error monitors are not defined in the payload; in case of an error, no exceptions are thrown.
Regarding concurrency, the method is explicitly classified as thread-safe (thread-safe) [SWS_DM_02153]. This represents a peculiarity, as related StopOffer interfaces in ara::diag—such as for routines [SWS_DM_00558], data elements [SWS_DM_00617], or monitors [SWS_DM_01089]—are specified as not thread-safe. Requests already in processing are presumably still completed or discarded prior to the final stop. Question Q-82e9d44f8ac1969d (open)
gemini-3.8-flash-low· 2026-10-13 · German original