Provides the current DoIP power mode of the vehicle to Diagnostic Management via a callback interface.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: afa4b2f1975cProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Provides the current DoIP power mode of the vehicle to Diagnostic Management via a callback interface.
Interface class ara::diag::DoIPPowerMode enables applications to provide the current DoIP power mode to Diagnostic Management via callback function GetDoIPPowerMode()[SWS_DM_00734]. After instantiation, the handler must be activated via Offer() and deregistered again via StopOffer() before destruction [SWS_DM_00735], [SWS_DM_00736]. As a unique instance, the class is neither copyable nor movable [SWS_DM_01645].
Context
Abstract class ara::diag::DoIPPowerMode defines the interface for providing the current DoIP power mode to Diagnostic Management (DM). In vehicle architectures that utilize Diagnostic over Internet Protocol (DoIP), the communication protocol must be informed about the operating state of the vehicle network or power supply. The application software derives a concrete handler class from ara::diag::DoIPPowerMode and implements the power mode query [SWS_DM_00734]. Interaction partners are the providing diagnostic application offering the interface and the DM runtime system delegating incoming requests to this handler [SWS_DM_00735].
Lifecycle
Instances of ara::diag::DoIPPowerMode are created internally by the application and identified via a PortPrototype referenced by a ara::core::InstanceSpecifier[SWS_DM_00732]. When calling the constructor, argument ConcurrencyType specifies whether callback method GetDoIPPowerMode() must be executed thread-safe (kConcurrent) or non-thread-safe (kNotConcurrent) [SWS_DM_00732]. The constructor itself is thread-safe [SWS_DM_00732].
According to the specification, this is a non-copyable and non-movable instance: Both copy constructor [SWS_DM_01645] and move constructor [SWS_DM_01646] as well as the corresponding assignment operators [SWS_DM_01643], [SWS_DM_01644] are explicitly deleted (=delete).
After instantiation, the handler must be activated via Offer() so that the DM can forward requests [SWS_DM_00735]. To terminate the forwarding of requests, StopOffer() is called [SWS_DM_00736]. Virtual destructor ~DoIPPowerMode()[SWS_DM_00733] as well as Offer() and StopOffer() are specified as non-thread-safe. Presumably, StopOffer() should always be executed prior to calling the destructor in order to properly disconnect pending interactions with the DM. Question Q-85ede935aa303c45 (open)
Usage Path
Typical usage of ara::diag::DoIPPowerMode follows a fixed sequence of initialization, service registration, cyclic or event-based mode querying, and deregistration:
The application instantiates its derived class with the appropriate InstanceSpecifier and the desired ConcurrencyType[SWS_DM_00732].
The application actively registers the handler with Diagnostic Management using Offer()[SWS_DM_00735].
As soon as the DoIP protocol requires the status, the DM calls pure virtual function GetDoIPPowerMode()[SWS_DM_00734]. The implementation returns a ara::core::Future<PowerModeType> that is resolved asynchronously [SWS_DM_00734].
Upon termination of operation, the application calls StopOffer() to no longer accept any further requests [SWS_DM_00736].
The instance is released via the destructor [SWS_DM_00733].
When calling the constructor, model and mapping violations can occur that are documented [SWS_DM_00732]:
InstanceSpecifierMappingIntegrityViolation: The identifier cannot be resolved in the context of the executable or does not reference a PortPrototype element [SWS_DM_00732].
PortInterfaceMappingViolation: The referenced PortPrototype is not typed by a DiagnosticDoIPPowerModeInterface[SWS_DM_00732].
ProcessMappingViolation: An instance reference exists, but no matching modeled process for the runtime environment exists [SWS_DM_00732].
InstanceSpecifierAlreadyInUseViolation: The InstanceSpecifier has already been used for another instance within the same process [SWS_DM_00732].
If Offer() is called while the service is already actively offered, the method returns the error code DiagOfferErrc::kAlreadyOffered via the ara::core::Result[SWS_DM_00735]. In contrast, the GetDoIPPowerMode() method defines no standardized error codes [SWS_DM_00734].
This guide is based on the AUTOSAR specification for the Adaptive Platform (Release R25-11). All statements and error codes are based on the referenced SWS requirements.
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 DiagnosticDoIpPowerModePortMapping needs to be typed by a DiagnosticDoIPPowerModeInterface. 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 DiagnosticDoIPPowerModeInterface
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: 5f8fb75036b6Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The synchronous method Offer of class ara::diag::DoIPPowerMode serves an Adaptive Application to register and release the service for DoIP power mode with Diagnostic Management (DM) [SWS_DM_00735]. The call enables the DM to forward incoming request messages to this handler [SWS_DM_00735]. The function expects no parameters, throws no exceptions (noexcept), and returns a ara::core::Result<void> as a return value [SWS_DM_00735].
As long as Offer has not yet been called by the providing application, the DM responds to client requests for DoIP power mode information with status value 0 ("Not ready") in accordance with ISO 13400-2 [SWS_DM_01525]. Once the handler is registered and the DM requires the current power mode to respond to DoIP messages, it queries it via ara::diag::DoIPPowerMode::GetDoIPPowerMode[SWS_DM_00814].
In case of an error, the Result object contains a corresponding error code. If the method has already been successfully called on the instance in question, another call fails and returns DiagOfferErrc::kAlreadyOffered with rollback semantics [SWS_DM_00735].
Regarding concurrency, the function is specified as not thread-safe (not thread-safe) [SWS_DM_00735]. Parallel calls on the same instance must therefore be synchronized by the caller. The function provides complete exception safety (exception safe) [SWS_DM_00735].
This usage note was created by an AI and is based on the specifications of AUTOSAR Release R25-11.
This StopOffer will disable the forwarding of request messages from DM.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 2a0861404a22ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Method StopOffer of class ara::diag::DoIPPowerMode disables the forwarding of incoming diagnostic request messages by Diagnostic Management (DM) to the handler [SWS_DM_00736]. The function is provided via the header file ara/diag/doip_power_mode.h, has no return value, and takes no parameters [SWS_DM_00736].
The following specification details apply to error behavior and execution environment:
Exception safety: The function is declared as noexcept and defined as exception-safe (exception safe) [SWS_DM_00736]. No exceptions are thrown and no error codes are returned.
Thread safety: The operation is specified as not thread-safe (not thread-safe) [SWS_DM_00736]. Interpretation: If the method is called in multithreading scenarios or in parallel with other operations of the instance, external synchronization by the application is likely required. Question Q-1593f08472d584d1 (open)
The provision pattern with Offer and StopOffer is uniformly designed in Diagnostic Management AUTOSAR_AP_SWS_Diagnostics §7.3.4.1.2 “Monitors”. Stopping the forwarding of DM requests via StopOffer is used analogously in other diagnostic components, such as in ara::diag::DoIPGroupIdentification[SWS_DM_00726], ara::diag::DoIPActivationLine[SWS_DM_00837], ara::diag::GenericUDSService[SWS_DM_00620], ara::diag::DownloadService[SWS_DM_00793], and ara::diag::Authentication[SWS_DM_01131].
This usage note was generated automatically based on AUTOSAR specification R25-11.
gemini-3.8-flash-low· 2026-10-13 · German original