DEENESPTFRRUARHIKOZHNL

class ara::diag::GenericRoutine

[SWS_DM_00605] Upstream: RS_Diag_04169, RS_Diag_04224

class GenericRoutine {...};

Generic Routine interface.

Header-Datei#include "ara/diag/generic_routine.h"
Forwarding-Header#include "ara/diag/diag_fwd.h"
Scopenamespace ara::diag

User GuideAI-GENERATED

Enables applications to perform generic processing of UDS RoutineControl services with asynchronous data transfer.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: ed3ab770d945 Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Enables applications to perform generic processing of UDS RoutineControl services with asynchronous data transfer.

The class provides a generic handler for UDS RoutineControl services and forwards requests for different routine identifiers to adaptive applications [SWS_DM_00552]. Developers implement the required routine actions via asynchronous methods such as Start and activate message forwarding by Offer [SWS_DM_00557]. Because instances are neither copyable nor movable, lifecycle and concurrency must be controlled precisely via the constructor and the interface configuration. Ongoing operations support cooperative cancellations as well as standardized UDS error codes.

Context

The class ara::diag::GenericRoutine provides the generic interface for processing diagnostic routines according to ISO 14229-1 (UDS RoutineControl, Service 0x31) in the AUTOSAR Adaptive Platform. It acts as a link between the central Diagnostic Management (DM) and the adaptive application. An instance of this class is bound to a modeled port prototype of type DiagnosticRoutineGenericInterface, which must be referenced via a DiagnosticServiceGenericMapping in the model [SWS_DM_00552]. In contrast to type-specific routine interfaces, GenericRoutine passes the raw data of the diagnostic request as ara::core::Span<const std::uint8_t> together with the concrete routine identifier (routineId) to the application [SWS_DM_00554], [SWS_DM_00555], [SWS_DM_00556]. This allows a single handler to serve multiple routines flexibly.

Lifecycle

Instances of GenericRoutine are bound to their specific port and must neither be copied nor moved; copy and move constructors as well as assignment operators are explicitly deleted [SWS_DM_01637], [SWS_DM_01638], [SWS_DM_01635], [SWS_DM_01636]. Initialization is performed via the constructor by specifying the ara::core::InstanceSpecifier as well as the concurrency behavior (ConcurrencyType: kConcurrent or kNotConcurrent) [SWS_DM_00552]. This parameter defines whether the virtual execution methods must be implemented in a thread-safe manner.

After creation, the DM initially does not forward any messages to the handler. Only by calling Offer() is forwarding activated [SWS_DM_00557]. Via StopOffer(), forwarding can be deactivated again [SWS_DM_00558] before the instance is released by the virtual destructor ~GenericRoutine() [SWS_DM_00553]. While the constructor is thread-safe, Offer(), StopOffer(), and the destructor are not thread-safe and require external synchronization [SWS_DM_00552], [SWS_DM_00557], [SWS_DM_00558], [SWS_DM_00553].

generic_routine_lifecycle start instantiated Instantiated (Not offered) start->instantiated GenericRoutine(...) offered Angeboten (Weiterleitung aktiv) instantiated->offered Offer() end instantiated->end ~GenericRoutine() offered->instantiated StopOffer() offered->offered Start() / Stop() / RequestResults() offered->end ~GenericRoutine()

State diagram: Lifecycle and state transitions of a GenericRoutine instance. Sources: [SWS_DM_00552], [SWS_DM_00557], [SWS_DM_00558], [SWS_DM_00553]

Usage Path

To provide a generic routine, an application derives from GenericRoutine and overrides the required virtual methods. The method Start (UDS subfunction 0x01) is pure virtual (pure virtual) and must be implemented mandatory [SWS_DM_00554]. The methods Stop (subfunction 0x02) [SWS_DM_00555] and RequestResults (subfunction 0x03) [SWS_DM_00556] are virtual methods; interpretation: Since they are not pure virtual, they would presumably only need to be overridden if the respective routine functionally supports stopping or separate result querying. Question (open)

The regular sequence comprises the following phases:

  • Instantiation: Creating the derived handler with port reference and concurrency mode [SWS_DM_00552].
  • Activation: Calling Offer() to enable for the DM [SWS_DM_00557].
  • Execution: Upon incoming UDS requests, the DM calls Start, Stop, or RequestResults. The application receives routineId, requestData, metaInfo as well as a CancellationHandler and returns a ara::core::Future<OperationOutput> [SWS_DM_00554], [SWS_DM_00555], [SWS_DM_00556]. The validity of requestData is guaranteed until the associated promise is fulfilled or the operation is cancelled [SWS_DM_00554].
  • Cancellation handling: The application can check the cancellation status via cancellationHandler.IsCanceled() or register a callback via cancellationHandler.SetNotifier() [SWS_DM_00554]. Interpretation: In the event of a cancellation, the application would presumably terminate running background activities prematurely and resolve the promise promptly. Question (open)
  • Deactivation: Stopping forwarding via StopOffer() [SWS_DM_00558] prior to destruction of the object.
Typical sequence of generic routine processingDiagnostic Manager (DM)GenericRoutine-HandlerAnwendungs-WorkerOffer()Result<void> (Erfolg)Use Case: Diagnoseanfrage RoutineControl (Start 0x01)Start(routineId, requestData, metaInfo, cancellationHandler)Trigger asynchronous executionFuture<OperationOutput>altErfolgreicher AbschlussFulfill promise (OperationOutput)FehlerfallFulfill promise with UDS NRC (DiagUdsNrcErrc)Use Case: Dienst deregistrierenStopOffer()

Sequence diagram: Typical sequence of registration, routine execution, and deregistration. Sources: [SWS_DM_00557], [SWS_DM_00554], [SWS_DM_00558]

Error Scenarios

Errors can occur both during configuration and during runtime and execution:

  • Model and mapping violations: If resolution of the InstanceSpecifier in the model fails, if it is not identified as PortPrototype, or if no matching DiagnosticServiceGenericMapping exists, the framework reports violations such as InstanceSpecifierMappingIntegrityViolation, PortInterfaceMappingViolation, ProcessMappingViolation, or InstanceSpecifierAlreadyInUseViolation [SWS_DM_00552].
  • Provisioning errors: If Offer() is called even though the service is already offered, the call fails and returns the error code DiagOfferErrc::kAlreadyOffered [SWS_DM_00557].
  • Diagnostic error codes (NRC): If a routine operation cannot be completed successfully or if the request contains invalid parameters, the application fulfills the returned future not with OperationOutput, but with an appropriate UDS Negative Response Code (NRC) from DiagUdsNrcErrc according to ISO 14229-1 [SWS_DM_00554], [SWS_DM_00555], [SWS_DM_00556].

This class guide is based on the specification AUTOSAR Adaptive Platform R25-11 and was generated automatically.

Member map

Constructors and destructor

2

Operators

1

Embedded types

1

Class diagram

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__diag__GenericRoutine818 GenericRoutine + GenericRoutine() + operator=() + ~GenericRoutine() + Offer() + RequestResults() + Start() + Stop() + StopOffer()

Detail view

Select an entry in the outline.

Constructors and destructor

GenericRoutine function 3

Class for an GenericRoutine.

Overloads GenericRoutine 3
explicit GenericRoutine (const ara::core::InstanceSpecifier &specifier, ConcurrencyType concurrencyType) noexcept; SWS_DM_00552
GenericRoutine (GenericRoutine &)=delete; SWS_DM_01637
GenericRoutine (GenericRoutine &&) noexcept=delete; SWS_DM_01638

Destructor of class GenericRoutine .

virtual ~GenericRoutine () noexcept;

Methods

Offer function

This Offer will enable the DM to forward request messages to this handler.

ara::core::Result< void > Offer () noexcept;

Called for RoutineControl with SubFunction RequestResults (0x03) request for this Diagnostic RoutineIdentifier.

virtual ara::core::Future< OperationOutput > RequestResults (std::uint16_t routineId, ara::core::Span< const std::uint8_t > requestData, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept;
Start function

Called for RoutineControl with SubFunction Start (0x01) request for this DiagnosticRoutine Identifier.

virtual ara::core::Future< OperationOutput > Start (std::uint16_t routineId, ara::core::Span< const std::uint8_t > requestData, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept=0;
Stop function

Called for RoutineControl with SubFunction Stop (0x02) request for this DiagnosticRoutine Identifier.

virtual ara::core::Future< OperationOutput > Stop (std::uint16_t routineId, ara::core::Span< const std::uint8_t > requestData, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept;
StopOffer function

This StopOffer will disable the forwarding of request messages from DM.

void StopOffer () noexcept;

Operators

operator= function 2

GenericRoutine shall be a single not assignable instance.

Overloads = 2

Embedded types

Method documentation

function GenericRoutine [SWS_DM_00552] Upstream: RS_AP_00137, RS_Diag_04169, RS_Diag_04224, RS_AP_00170, RS_ AP_00171, RS_AP_00172, RS_AP_00173

explicit GenericRoutine (const ara::core::InstanceSpecifier &specifier, ConcurrencyType concurrencyType) noexcept;

Class for an GenericRoutine.

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine
Exception-Sicherheitexception safe
Thread-Sicherheitthread-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 DiagnosticRoutineGenericInterface needs to be referenced by a DiagnosticServiceGenericMapping. 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)

ParameterBeschreibung
specifierInstanceSpecifier to a PortPrototype of a DiagnosticRoutineGenericInterface.
concurrencyTypeSpecifies 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.

Record
AUTOSAR/AP/record/SWS_DM_00552
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00552@rel:R25-11#3b80ef8b
Content hash
3b80ef8b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00552
Status: valid/unmigrated Version: rel:R25-11#c9b9a91d Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_00552@rel:R25-11#c9b9a91d
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#3b80ef8b2026-09-30
  • R19-11rel:R19-11#51e933df2026-10-14
  • R20-11rel:R20-11#0d85dbb92026-10-14
  • R21-11rel:R21-11#92d6b5382026-10-14
  • R22-11rel:R22-11#8bf360da2026-10-14
  • R23-11rel:R23-11#a1b6139f2026-10-14
  • R24-11rel:R24-11#96d2033b2026-10-14
  • R25-11rel:R25-11#c9b9a91d2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function GenericRoutine [SWS_DM_01637] Upstream: RS_AP_00147

GenericRoutine (GenericRoutine &)=delete;

GenericRoutine shall be a single not copy-able instance.

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_DM_01637
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01637@rel:R25-11#14cfa5d2
Content hash
14cfa5d2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01637
Status: valid/unmigrated Version: rel:R25-11#9a0cb8e2 Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_01637@rel:R25-11#9a0cb8e2
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#14cfa5d22026-09-30
  • R23-11rel:R23-11#51890adb2026-10-14
  • R24-11rel:R24-11#3254577b2026-10-14
  • R25-11rel:R25-11#9a0cb8e22026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function GenericRoutine [SWS_DM_01638] Upstream: RS_AP_00147

GenericRoutine (GenericRoutine &&) noexcept=delete;

Move constructor of GenericRoutine.

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_DM_01638
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01638@rel:R25-11#773a8774
Content hash
773a8774
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01638
Status: valid/unmigrated Version: rel:R25-11#51079bf1 Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_01638@rel:R25-11#51079bf1
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#773a87742026-09-30
  • R23-11rel:R23-11#39b72a912026-10-14
  • R24-11rel:R24-11#51079bf12026-10-14
  • R25-11rel:R25-11#51079bf12026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function Offer [SWS_DM_00557] Upstream: RS_AP_00119, RS_AP_00138, RS_Diag_04169, RS_Diag_04224

ara::core::Result< void > Offer () noexcept;

This Offer will enable the DM to forward request messages to this handler.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 36b2772d0811 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The function Offer of class ara::diag::GenericRoutine enables Diagnostic Management (DM) to forward incoming diagnostic request messages for a routine to the registered handler [SWS_DM_00557]. The call is synchronous, takes no parameters, and returns a ara::core::Result<void> [SWS_DM_00557]. Since the method is declared with the specification noexcept, it is considered exception safe (exception safe) [SWS_DM_00557].

Error handling

If offering fails, the method returns a negative result. If the routine was already previously offered for the instance in question, the method returns the specific error code DiagOfferErrc::kAlreadyOffered [SWS_DM_00557]. Rollback semantics are defined for this error case so that the state remains unchanged [SWS_DM_00557]. The error identifier kAlreadyOffered is also anchored in the internal error domains for diagnostic calls [SWS_DM_00514].

Concurrency and Limitations

The interface is explicitly specified as not thread-safe (not thread-safe) [SWS_DM_00557]. If multiple threads of an application access the same handler, the call must be synchronized. Interpretation: The call would typically occur during initialization, since no requests can be received prior to executing Offer. Question Q-0c42f415bcb0de20 (open)

Interaction

Offering functionalities via Offer is a central pattern in the AUTOSAR Adaptive diagnostic cluster; it is analogously used for type-specific routine interfaces [SWS_DM_00594], generic UDS services [SWS_DM_00619], and data identifiers [SWS_DM_00638]. Despite sharing the name with ara::com, this represents a specific Diagnostic Management implementation SWS Diagnostics §7.3.4.1.2 “Monitors”.

This usage note was curated by an AI and is based exclusively on the AUTOSAR specification R25-11.

Implementer's Guide to follow (complexity I2)

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Rückgabewert

TypBeschreibung
ara::core::Result< void >Returns nothing or an error.

Fehler

FehlercodeBeschreibung
DiagOfferErrc::kAlreadyOfferedrollback_semantics The service is already offered.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_DM_00557
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00557@rel:R25-11#e128836f
Content hash
e128836f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00557
Status: valid/unmigrated Version: rel:R25-11#842b3bff Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_00557@rel:R25-11#842b3bff
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#e128836f2026-09-30
  • R19-11rel:R19-11#2759f9062026-10-14
  • R20-11rel:R20-11#d89302952026-10-14
  • R21-11rel:R21-11#0eadb9e12026-10-14
  • R22-11rel:R22-11#eee8d1382026-10-14
  • R23-11rel:R23-11#292d5a312026-10-14
  • R24-11rel:R24-11#f26055882026-10-14
  • R25-11rel:R25-11#842b3bff2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function RequestResults [SWS_DM_00556] Upstream: RS_AP_00119, RS_Diag_04169, RS_Diag_04170, RS_Diag_04224

virtual ara::core::Future< OperationOutput > RequestResults (std::uint16_t routineId, ara::core::Span< const std::uint8_t > requestData, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept;

Called for RoutineControl with SubFunction RequestResults (0x03) request for this Diagnostic RoutineIdentifier.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: f4080ca4c8cd Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The method RequestResults of class ara::diag::GenericRoutine is called by the diagnostic server instance to generically process UDS RoutineControl requests of service 0x31 with subfunction requestRoutineResults (0x03) for the parameterized diagnostic routine identifier ([SWS_DM_00575], [SWS_DM_00556]).

During the call, routine identifier routineId, request-specific metadata metaInfo, and input data requestData are passed ([SWS_DM_00556]). The validity of span requestData is strictly limited to until the corresponding Promise is fulfilled or execution is cancelled ([SWS_DM_00556]). A passed cancellationHandler allows querying the cancellation status via IsCanceled as well as registering a notification function via SetNotifier ([SWS_DM_00556]).

The result is returned asynchronously as ara::core::Future<OperationOutput> ([SWS_DM_00556]). Interpretation: The provision of output data is likely typically done asynchronously via an application-side ara::core::Promise. Question Q-f50c8509d7515e3f (open) In the event of success, the future provides a OperationOutput, whereas in the event of an error, a matching UDS NRC according to ISO 14229-1 is transmitted via DiagUdsNrcErrc ([SWS_DM_00556]). The function is declared as noexcept and is considered exception-safe ([SWS_DM_00556]).

Regarding concurrency, thread safety is conditional (conditional): Whether the method must be implemented thread-safe is bindingly controlled via the ConcurrencyType passed to the constructor ([SWS_DM_00556]).

This usage note was generated automatically based on the AUTOSAR specification.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine
Exception-Sicherheitexception safe
Thread-Sicherheitconditional whether the function has to be implemented thread safe or non-thread safe is determined by the ConcurrencyType given in the constructor

Parameter (in)

ParameterBeschreibung
routineIdthe corresponding RoutineIdentifier
requestDataContent of request message (without RoutineIdentifier), Lifetime: Valid until Promise is fulfilled or the processing is cancelled by the cancellationHandler.
metaInfoMetaInfo of the request.
cancellationHandlerThis 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.

Rückgabewert

TypBeschreibung
ara::core::Future<OperationOutput >A Future with either OperationOutput (for a positive response message) or an UDS NRC value (for a negative response message).

Fehler

FehlercodeBeschreibung
Please use an applicable NRC, as defined in ISO 14229-1, using DiagUdsNrcErrc.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_DM_00556
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00556@rel:R25-11#de1ddb39
Content hash
de1ddb39
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00556
Status: valid/unmigrated Version: rel:R25-11#53fd1ae4 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_00556@rel:R25-11#53fd1ae4
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#de1ddb392026-09-30
  • R19-11rel:R19-11#20a566642026-10-14
  • R20-11rel:R20-11#d68da6d72026-10-14
  • R21-11rel:R21-11#b76c6ec72026-10-14
  • R22-11rel:R22-11#5b49da632026-10-14
  • R23-11rel:R23-11#be4d5ce62026-10-14
  • R24-11rel:R24-11#307b0f5f2026-10-14
  • R25-11rel:R25-11#53fd1ae42026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function Start [SWS_DM_00554] Upstream: RS_AP_00119, RS_AP_00138, RS_Diag_04169, RS_Diag_04170, RS_ Diag_04224

virtual ara::core::Future< OperationOutput > Start (std::uint16_t routineId, ara::core::Span< const std::uint8_t > requestData, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept=0;

Called for RoutineControl with SubFunction Start (0x01) request for this DiagnosticRoutine Identifier.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 9e819a027940 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The method Start of class ara::diag::GenericRoutine is called as soon as a diagnostic request for RoutineControl with the sub-function Start (0x01) for the specified routineId is received [SWS_DM_00554]. In contrast to the typed routine interface according to [SWS_DM_00591], this generic interface accepts the raw data of the request message as a byte span.

The following requirements and interface properties apply to the implementation:

  • Call context and parameters: In addition to routineId and the metadata (metaInfo), the parameter requestData is passed. The lifetime of the request data remains valid until the promise is fulfilled or processing is canceled by the cancellationHandler [SWS_DM_00554].
  • Cancellation handling: The routine can query the current cancellation status using cancellationHandler.IsCanceled() or register a notifier function via cancellationHandler.SetNotifier() that is called when the conversation is canceled [SWS_DM_00554].
  • Asynchronous semantics: Processing takes place non-blocking via ara::core::Future<OperationOutput>. Upon successful execution, OperationOutput provides the payload for the positive response [SWS_DM_00554].
  • Error handling: If execution fails, the future must be completed with a matching Negative Response Code (NRC) according to ISO 14229-1 using DiagUdsNrcErrc [SWS_DM_00554].
  • Concurrency: The function is declared exception-safe (noexcept). Whether the provision must be thread-safe is determined by the ConcurrencyType passed to the constructor [SWS_DM_00554].

This usage note was generated automatically based on the AUTOSAR specification.

Implementer's Guide to follow (complexity I2)

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine
Exception-Sicherheitexception safe
Thread-Sicherheitconditional whether the function has to be implemented thread safe or non-thread safe is determined by the ConcurrencyType given in the constructor

Parameter (in)

ParameterBeschreibung
routineIdthe corresponding RoutineIdentifier
requestDataContent of request message (without RoutineIdentifier). Lifetime: Valid until Promise is fulfilled or the processing is cancelled by the cancellationHandler.
metaInfoMetaInfo of the request.
cancellationHandlerThis 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.

Rückgabewert

TypBeschreibung
ara::core::Future<OperationOutput >A Future with either OperationOutput (for a positive response message) or an UDS NRC value (for a negative response message).

Fehler

FehlercodeBeschreibung
Please use an applicable NRC, as defined in ISO 14229-1, using DiagUdsNrcErrc.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_DM_00554
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00554@rel:R25-11#a9ad9212
Content hash
a9ad9212
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00554
Status: valid/unmigrated Version: rel:R25-11#632d4829 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_00554@rel:R25-11#632d4829
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#a9ad92122026-09-30
  • R19-11rel:R19-11#f6d47d602026-10-14
  • R20-11rel:R20-11#ba587eba2026-10-14
  • R21-11rel:R21-11#5f3710452026-10-14
  • R22-11rel:R22-11#927f1c032026-10-14
  • R23-11rel:R23-11#362a0cc42026-10-14
  • R24-11rel:R24-11#a07e64292026-10-14
  • R25-11rel:R25-11#632d48292026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function Stop [SWS_DM_00555] Upstream: RS_AP_00119, RS_AP_00138, RS_Diag_04169, RS_Diag_04170, RS_ Diag_04224

virtual ara::core::Future< OperationOutput > Stop (std::uint16_t routineId, ara::core::Span< const std::uint8_t > requestData, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept;

Called for RoutineControl with SubFunction Stop (0x02) request for this DiagnosticRoutine Identifier.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: d8c6cb55284b Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Method Stop is called upon a UDS RoutineControl request with subfunction Stop (0x02) for the respective generic diagnostic routine [SWS_DM_00555]. Compared to typed routine interfaces [SWS_DM_00592], it accepts the routine identifier routineId and the request data as a raw data span requestData [SWS_DM_00555].

When using the method, the following parameter and flow rules must be observed [SWS_DM_00555]:

  • Lifetime of the input data span: The memory area of requestData remains valid until the associated Promise is fulfilled or execution has been canceled via cancellationHandler [SWS_DM_00555].
  • Cancellation handling: The application can check via cancellationHandler.IsCanceled() whether the current diagnostic conversation was canceled, or register a notification function via cancellationHandler.SetNotifier that is triggered upon cancellation [SWS_DM_00555].
  • Asynchrony and return: The function operates asynchronously and returns a ara::core::Future<OperationOutput> that, in the case of success, contains the output data for the positive UDS response [SWS_DM_00555].

Error handling is performed via negative diagnostic return values: If stopping the routine fails, the future must be completed with a matching UDS NRC error code according to ISO 14229-1 via DiagUdsNrcErrc [SWS_DM_00555].

Regarding concurrency, the method is specified as noexcept and exception-safe. Whether the concrete implementation must be designed to be thread-safe depends on ConcurrencyType, which was passed in the constructor during instantiation [SWS_DM_00555].

This usage note is based exclusively on the specifications of Adaptive AUTOSAR release R25-11.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine
Exception-Sicherheitexception safe
Thread-Sicherheitconditional whether the function has to be implemented thread safe or non-thread safe is determined by the ConcurrencyType given in the constructor

Parameter (in)

ParameterBeschreibung
routineIdthe corresponding RoutineIdentifier
requestDataContent of request message (without RoutineIdentifier). Lifetime: Valid until Promise is fulfilled or the processing is cancelled by the cancellationHandler.
metaInfoMetaData of the request.
cancellationHandlerThis 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.

Rückgabewert

TypBeschreibung
ara::core::Future<OperationOutput >A Future with either OperationOutput (for a positive response message) or an UDS NRC value (for an negative response message).

Fehler

FehlercodeBeschreibung
Please use an applicable NRC, as defined in ISO 14229-1, using DiagUdsNrcErrc.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_DM_00555
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00555@rel:R25-11#04e6a862
Content hash
04e6a862
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00555
Status: valid/unmigrated Version: rel:R25-11#56c0affc Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_00555@rel:R25-11#56c0affc
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#04e6a8622026-09-30
  • R19-11rel:R19-11#23fc2c642026-10-14
  • R20-11rel:R20-11#3e55de712026-10-14
  • R21-11rel:R21-11#b34b7e672026-10-14
  • R22-11rel:R22-11#dbc3abf42026-10-14
  • R23-11rel:R23-11#146ebc662026-10-14
  • R24-11rel:R24-11#702a311c2026-10-14
  • R25-11rel:R25-11#56c0affc2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function StopOffer [SWS_DM_00558] Upstream: RS_Diag_04169, RS_Diag_04224

void StopOffer () noexcept;

This StopOffer will disable the forwarding of request messages from DM.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 73588f5f0b57 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The method ara::diag::GenericRoutine::StopOffer disables the forwarding of incoming diagnostic requests from Diagnostic Management (DM) to the corresponding routine instance [SWS_DM_00558]. The function has the signature void StopOffer() noexcept;, takes no parameters, and returns no value [SWS_DM_00558]. The call is processed synchronously and signals to the DM that the routine will no longer accept requests from this point forward.

Error handling

The operation is specified as exception safe and declared with noexcept [SWS_DM_00558]. No error codes or C++ exceptions occur during execution. Specific notifications to development or diagnostic event managers (DET/DEM) are not provided for this interface in the diagnostic module.

Concurrency and Limitations

Regarding threading behavior, the method is designated as not thread-safe [SWS_DM_00558]. Concurrent calls on the same instance of ara::diag::GenericRoutine must therefore be synchronized by the application. Interpretation: A call would primarily take place when a routine is temporarily deactivated or the application is shut down in a controlled manner after an offering call has previously occurred. Question Q-e110ce01110699e3 (open)

Interaction

The naming conceptually follows the service offering of ara::com, but represents an independent implementation within ara::diag and must not be confused with communication offers (AUTOSAR_AP_SWS_Diagnostics §7.3.4.1.2 “Monitors”). The same offering pattern for disabling request forwarding is also used module-wide by further diagnostic classes such as ara::diag::GenericUDSService [SWS_DM_00620], ara::diag::GenericDataIdentifier [SWS_DM_00639], routine interfaces [SWS_DM_00595], and ara::diag::Monitor [SWS_DM_01089].

This text was created by an AI and is based exclusively on the specification documents of AUTOSAR R25-11.

Implementer's Guide to follow (complexity I2)

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Rückgabewert

TypBeschreibung
None

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_DM_00558
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00558@rel:R25-11#f2c61aa6
Content hash
f2c61aa6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00558
Status: valid/unmigrated Version: rel:R25-11#39feb507 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_00558@rel:R25-11#39feb507
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f2c61aa62026-09-30
  • R19-11rel:R19-11#33f222af2026-10-14
  • R20-11rel:R20-11#ec8bc9632026-10-14
  • R21-11rel:R21-11#c0037e202026-10-14
  • R22-11rel:R22-11#b08db6972026-10-14
  • R23-11rel:R23-11#3cfad6d22026-10-14
  • R24-11rel:R24-11#ec651f742026-10-14
  • R25-11rel:R25-11#39feb5072026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function operator= [SWS_DM_01635] Upstream: RS_AP_00147

GenericRoutine & operator= (GenericRoutine &)=delete;

GenericRoutine shall be a single not assignable instance.

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_DM_01635
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01635@rel:R25-11#fea4feed
Content hash
fea4feed
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01635
Status: valid/unmigrated Version: rel:R25-11#3028b007 Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_01635@rel:R25-11#3028b007
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#fea4feed2026-09-30
  • R23-11rel:R23-11#98987c072026-10-14
  • R24-11rel:R24-11#3028b0072026-10-14
  • R25-11rel:R25-11#3028b0072026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function operator= [SWS_DM_01636] Upstream: RS_AP_00147

GenericRoutine & operator= (GenericRoutine &&)=delete;

Move assignment operator of GenericRoutine.

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_DM_01636
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01636@rel:R25-11#24fc6364
Content hash
24fc6364
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01636
Status: valid/unmigrated Version: rel:R25-11#881d1dd4 Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_01636@rel:R25-11#881d1dd4
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#24fc63642026-09-30
  • R23-11rel:R23-11#98cccf9a2026-10-14
  • R24-11rel:R24-11#881d1dd42026-10-14
  • R25-11rel:R25-11#881d1dd42026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function ~GenericRoutine [SWS_DM_00553] Upstream: RS_AP_00134, RS_Diag_04169, RS_Diag_04224

virtual ~GenericRoutine () noexcept;

Destructor of class GenericRoutine .

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_DM_00553
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00553@rel:R25-11#c9913752
Content hash
c9913752
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00553
Status: valid/unmigrated Version: rel:R25-11#a6efdb40 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_00553@rel:R25-11#a6efdb40
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#c99137522026-09-30
  • R19-11rel:R19-11#b7ba28462026-10-14
  • R20-11rel:R20-11#dbe0f1bb2026-10-14
  • R21-11rel:R21-11#dbe0f1bb2026-10-14
  • R22-11rel:R22-11#510ac3412026-10-14
  • R23-11rel:R23-11#50b0d8172026-10-14
  • R24-11rel:R24-11#a6efdb402026-10-14
  • R25-11rel:R25-11#a6efdb402026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill