DEENESPTFRRUARHIKOZHNL

klasse 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-GEGENEREERD

Stelt applicaties in staat UDS-RoutineControl-diensten generiek te verwerken met asynchrone gegevensoverdracht.
DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: ed3ab770d945 Herkomst Open vragen (2)
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

Stelt applicaties in staat UDS-RoutineControl-diensten generiek te verwerken met asynchrone gegevensoverdracht.

De klasse biedt een generieke handler voor UDS-RoutineControl-diensten en stuurt verzoeken voor verschillende routine-identifiers door naar adaptieve applicaties [SWS_DM_00552]. Ontwikkelaars implementeren de vereiste routine-acties via asynchrone methoden zoals Start en activeren het doorsturen van berichten door Offer [SWS_DM_00557]. Aangezien instanties noch kopieerbaar noch verplaatsbaar zijn, moeten de levenscyclus en gelijktijdigheid exact worden beheerst via de constructor en de interfaceconfiguratie. Lopende operaties ondersteunen coöperatieve annuleringen en gestandaardiseerde UDS-foutcodes.

Context

De klasse ara::diag::GenericRoutine biedt de generieke interface voor de verwerking van diagnoseroutines conform ISO 14229-1 (UDS RoutineControl, service 0x31) in het AUTOSAR Adaptive Platform. Deze fungeert als schakel tussen het centrale Diagnostic Management (DM) en de adaptieve applicatie. Een instantie van deze klasse wordt gebonden aan een gemodelleerd poortprototype van het type DiagnosticRoutineGenericInterface, die via een DiagnosticServiceGenericMapping in het model gerefereerd moet zijn [SWS_DM_00552]. In tegenstelling tot typespecifieke routine-interfaces draagt GenericRoutine de ruwe gegevens van het diagnoseverzoek als ara::core::Span<const std::uint8_t> samen met de concrete routine-identifier (routineId) over aan de applicatie [SWS_DM_00554], [SWS_DM_00555], [SWS_DM_00556]. Hierdoor kan één enkele handler meerdere routines flexibel bedienen.

Levenscyclus

Instanties van GenericRoutine zijn gebonden aan hun specifieke poort en mogen noch gekopieerd noch verplaatst worden; kopieer- en verplaatsingsconstructor alsmede toewijzingsoperatoren zijn expliciet verwijderd [SWS_DM_01637], [SWS_DM_01638], [SWS_DM_01635], [SWS_DM_01636]. De initialisatie vindt plaats via de constructor onder opgave van ara::core::InstanceSpecifier en het gelijktijdigheidsgedrag (ConcurrencyType: kConcurrent of kNotConcurrent) [SWS_DM_00552]. Deze parameter bepaalt of de virtuele uitvoeringsmethoden thread-safe geïmplementeerd moeten zijn.

Na de creatie stuurt de DM aanvankelijk geen berichten door naar de handler. Pas door het aanroepen van Offer() wordt het doorsturen geactiveerd [SWS_DM_00557]. Via StopOffer() kan het doorsturen weer worden gedeactiveerd [SWS_DM_00558], voordat de instantie door de virtuele destructor ~GenericRoutine() wordt vrijgegeven [SWS_DM_00553]. Terwijl de constructor thread-safe is, zijn Offer(), StopOffer() en de destructor niet thread-safe en vereisen zij externe synchronisatie [SWS_DM_00552], [SWS_DM_00557], [SWS_DM_00558], [SWS_DM_00553].

generic_routine_lifecycle start instantiated Geïnstantieerd (Niet aangeboden) 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()

Toestandsdiagram: Levenscyclus en toestandsovergangen van een GenericRoutine-instantie. Bronnen: [SWS_DM_00552], [SWS_DM_00557], [SWS_DM_00558], [SWS_DM_00553]

Gebruikspad

Voor het aanbieden van een generieke routine leidt een applicatie af van GenericRoutine en overschrijft de benodigde virtuele methoden. De methode Start (UDS-subfunctie 0x01) is puur virtueel (pure virtual) en moet dwingend worden geïmplementeerd [SWS_DM_00554]. De methoden Stop (subfunctie 0x02) [SWS_DM_00555] en RequestResults (subfunctie 0x03) [SWS_DM_00556] zijn virtuele methoden; interpretatie: aangezien zij niet puur virtueel zijn, hoeven zij vermoedelijk alleen dan te worden overschreven wanneer de betreffende routine het stoppen of het afzonderlijk opvragen van resultaten functioneel ondersteunt. Vraag (open)

Het reguliere verloop omvat de volgende fasen:

  • Instantiëring: Creëren van de afgeleide handler met poortreferentie en concurrency-modus [SWS_DM_00552].
  • Activering: Aanroepen van Offer() voor vrijgave voor de DM [SWS_DM_00557].
  • Uitvoering: Bij binnenkomende UDS-verzoeken roept de DM Start, Stop of RequestResults aan. De applicatie ontvangt routineId, requestData, metaInfo alsmede een CancellationHandler en levert een ara::core::Future<OperationOutput> op [SWS_DM_00554], [SWS_DM_00555], [SWS_DM_00556]. De geldigheid van requestData is gegarandeerd totdat de bijbehorende promise is vervuld of de operatie wordt afgebroken [SWS_DM_00554].
  • Annuleringsafhandeling: De applicatie kan via cancellationHandler.IsCanceled() de annuleringsstatus controleren of via cancellationHandler.SetNotifier() een callback registreren [SWS_DM_00554]. Interpretatie: In geval van een annulering zal de applicatie lopende achtergrondactiviteiten vermoedelijk voortijdig beëindigen en de promise tijdig vervullen. Vraag (open)
  • Deactivering: Beëindigen van het doorsturen via StopOffer() [SWS_DM_00558] vóór de vernietiging van het object.
Typisch verloop van de generieke routineverwerkingDiagnostic Manager (DM)GenericRoutine-HandlerAnwendungs-WorkerOffer()Result<void> (Erfolg)Use Case: Diagnoseanfrage RoutineControl (Start 0x01)Start(routineId, requestData, metaInfo, cancellationHandler)Asynchrone uitvoering initiërenFuture<OperationOutput>altErfolgreicher AbschlussPromise vervullen (OperationOutput)FehlerfallPromise vervullen met UDS-NRC (DiagUdsNrcErrc)Use Case: Dienst deregistrierenStopOffer()

Sequentiediagram: typisch verloop van de registratie, routine-uitvoering en deregistratie. Bronnen: [SWS_DM_00557], [SWS_DM_00554], [SWS_DM_00558]

Foutscenario's

Fouten kunnen zowel bij de configuratie als tijdens de runtime en uitvoering optreden:

  • Model- en toewijzingsschendingen: als het oplossen van de InstanceSpecifier in het model mislukt, deze niet als PortPrototype wordt geïdentificeerd of er geen passende DiagnosticServiceGenericMapping bestaat, meldt het framework schendingen zoals InstanceSpecifierMappingIntegrityViolation, PortInterfaceMappingViolation, ProcessMappingViolation of InstanceSpecifierAlreadyInUseViolation [SWS_DM_00552].
  • Aanbiedingsfouten: als Offer() wordt aangeroepen terwijl de service al wordt aangeboden, mislukt de aanroep en retourneert deze de foutcode DiagOfferErrc::kAlreadyOffered [SWS_DM_00557].
  • Diagnostische foutcodes (NRC): kan een routinebewerking niet succesvol worden voltooid of bevat het verzoek ongeldige parameters, dan vervult de applicatie de geretourneerde future niet met OperationOutput, maar met een passende UDS Negative Response Code (NRC) uit DiagUdsNrcErrc conform ISO 14229-1 [SWS_DM_00554], [SWS_DM_00555], [SWS_DM_00556].

Deze klassenhandleiding is gebaseerd op de specificatie AUTOSAR Adaptive Platform R25-11 en is geautomatiseerd gegenereerd.

Ledenkaart

Constructors en destructor

2

Operatoren

1

Geneste typen

1

Klassendiagram

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

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

Detailweergave

Kies een item in de inhoudsopgave.

Constructors en destructor

GenericRoutine functie 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;

Methoden

Offer functie

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 functie

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 functie

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 functie

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

void StopOffer () noexcept;

Operatoren

operator= functie 2

GenericRoutine shall be a single not assignable instance.

Overloads = 2

Geneste typen

Documentatie van de methoden

functie 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#44ea1f7d
Content hash
44ea1f7d
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

functie 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#3e27203d
Content hash
3e27203d
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

functie 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#dbec6e7f
Content hash
dbec6e7f
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

functie 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.

DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 36b2772d0811 Herkomst Open vragen (1)
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

Gebruik

De functie Offer van de klasse ara::diag::GenericRoutine stelt Diagnostic Management (DM) in staat om binnenkomende diagnoseverzoekberichten voor een routine door te sturen naar de geregistreerde handler [SWS_DM_00557]. De aanroep geschiedt synchroon, accepteert geen parameters en levert een ara::core::Result<void> op [SWS_DM_00557]. Aangezien de methode met de specificatie noexcept is gedeclareerd, geldt deze als uitzonderingsveilig (exception safe) [SWS_DM_00557].

Foutafhandeling

Mislukt het aanbieden, dan levert de methode een negatief resultaat op. Werd de routine voor de desbetreffende instantie al eerder aangeboden, dan retourneert de methode de specifieke foutcode DiagOfferErrc::kAlreadyOffered [SWS_DM_00557]. Voor dit foutgeval is een rollback-semantiek gedefinieerd, zodat de toestand ongewijzigd blijft [SWS_DM_00557]. De foutidentificator kAlreadyOffered is bovendien verankerd in de interne foutdomeinen voor diagnose-aanroepen [SWS_DM_00514].

Gelijktijdigheid en beperkingen

De interface is uitdrukkelijk als niet-draadveilig (not thread-safe) gespecificeerd [SWS_DM_00557]. Benaderen meerdere threads van een applicatie dezelfde handler, dan moet de aanroep worden gesynchroniseerd. Interpretatie: de aanroep vindt vermoedelijk typisch plaats tijdens de initialisatie, aangezien vóór de uitvoering van Offer geen verzoeken kunnen worden ontvangen. Vraag Q-0c42f415bcb0de20 (open)

Samenspel

Het aanbieden van functionaliteiten via Offer is een centraal patroon in het AUTOSAR Adaptive-diagnosecluster; het wordt analoog ook gebruikt voor typespecifieke routine-interfaces [SWS_DM_00594], generieke UDS-diensten [SWS_DM_00619] en data-identifiers [SWS_DM_00638]. Ondanks de naamsgelijkheid met ara::com vormt dit een specifieke implementatie van Diagnostic Management SWS Diagnostics §7.3.4.1.2 “Monitors”.

Deze gebruiksinstructie is samengesteld door een AI en baseert uitsluitend op de AUTOSAR-specificatie R25-11.

Implementer's Guide volgt (complexiteit 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#fff8c1ba
Content hash
fff8c1ba
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

functie 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.

DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: f4080ca4c8cd Herkomst Open vragen (1)
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

De methode RequestResults van de klasse ara::diag::GenericRoutine wordt aangeroepen door de Diagnostic Server-instantie om UDS RoutineControl-verzoeken van dienst 0x31 met de subfunctie requestRoutineResults (0x03) voor de geparametriseerde diagnose-routine-identificator generiek te verwerken ([SWS_DM_00575], [SWS_DM_00556]).

Bij de aanroep worden de routine-identificator routineId, de verzoekspecifieke metagegevens metaInfo en de ingangsgegevens requestData doorgegeven ([SWS_DM_00556]). De geldigheid van de span requestData is strikt daartoe beperkt totdat de corresponderende Promise is vervuld of de uitvoering wordt geannuleerd ([SWS_DM_00556]). Een doorgegeven cancellationHandler maakt het opvragen van de annuleringsstatus via IsCanceled en de registratie van een meldingsfunctie via SetNotifier mogelijk ([SWS_DM_00556]).

Het resultaat wordt asynchroon als ara::core::Future<OperationOutput> geretourneerd ([SWS_DM_00556]). Interpretatie: het verstrekken van de uitvoergegevens gebeurt typisch asynchroon via een applicatiezijdige ara::core::Promise. Vraag Q-f50c8509d7515e3f (open) In het geval van succes stelt de future een OperationOutput beschikbaar, terwijl in het geval van een fout een passende UDS-NRC conform ISO 14229-1 via DiagUdsNrcErrc wordt verzonden ([SWS_DM_00556]). De functie is gedeclareerd als noexcept en geldt als exception-safe ([SWS_DM_00556]).

Wat betreft gelijktijdigheid is de thread-safety voorwaardelijk (conditional): of de methode thread-safe moet worden geïmplementeerd, wordt dwingend gestuurd via de aan de constructor doorgegeven ConcurrencyType ([SWS_DM_00556]).

Deze gebruiksinstructie is geautomatiseerd gegenereerd op basis van de AUTOSAR-specificatie.

Implementer's Guide volgt (complexiteit 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#3d0ab7c3
Content hash
3d0ab7c3
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

functie 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.

DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 9e819a027940 Herkomst
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

De methode Start van de klasse ara::diag::GenericRoutine wordt aangeroepen zodra een diagnoseverzoek voor RoutineControl met de subfunctie Start (0x01) voor de gespecificeerde routineId binnenkomt [SWS_DM_00554]. In tegenstelling tot de getypeerde routine-interface conform [SWS_DM_00591] accepteert deze generieke interface de ruwe gegevens van het verzoekbericht als een byte-span.

Voor de implementatie gelden de volgende vereisten en interface-eigenschappen:

  • Aanroepcontext en parameters: Naast de routineId en de metadata (metaInfo) wordt de parameter requestData meegegeven. De levensduur van de verzoekgegevens blijft geldig totdat de promise is vervuld of de verwerking door de cancellationHandler wordt afgebroken [SWS_DM_00554].
  • Afbreekafhandeling: De routine kan via cancellationHandler.IsCanceled() de actuele afbreekstatus opvragen of via cancellationHandler.SetNotifier() een notifier-functie registreren die wordt aangeroepen bij het afbreken van de conversatie [SWS_DM_00554].
  • Asynchrone semantiek: De verwerking verloopt niet-blokkerend via ara::core::Future<OperationOutput>. Bij succesvolle uitvoering stelt OperationOutput de payload voor het positieve antwoord beschikbaar [SWS_DM_00554].
  • Foutafhandeling: Mislukt de uitvoering, dan moet de future worden afgesloten met een passende Negative Response Code (NRC) volgens ISO 14229-1 met gebruikmaking van DiagUdsNrcErrc [SWS_DM_00554].
  • Gelijktijdigheid: De functie is gedeclareerd als uitzonderingsveilig (noexcept). Of de beschikbaarstelling thread-safe moet plaatsvinden, wordt bepaald door de aan de constructor meegegeven ConcurrencyType [SWS_DM_00554].

Deze gebruiksinstructie is geautomatiseerd gegenereerd op basis van de AUTOSAR-specificatie.

Implementer's Guide volgt (complexiteit 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#ee58c579
Content hash
ee58c579
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

functie 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.

DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: d8c6cb55284b Herkomst
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

De methode Stop wordt aangeroepen bij een UDS-RoutineControl-verzoek met de subfunctie Stop (0x02) voor de desbetreffende generieke diagnoseroutine [SWS_DM_00555]. Ten opzichte van getypeerde routine-interfaces [SWS_DM_00592] accepteert deze de routine-identifier routineId en de verzoekgegevens als raw-data-span requestData [SWS_DM_00555].

Bij het gebruik moeten de volgende parameter- en verloopregels in acht worden genomen [SWS_DM_00555]:

  • Levensduur van de ingangsgegevens-span: Het geheugengebied van requestData blijft geldig totdat de bijbehorende Promise is vervuld of de uitvoering via de cancellationHandler is geannuleerd [SWS_DM_00555].
  • Annuleringsafhandeling: De applicatie kan via cancellationHandler.IsCanceled() controleren of de actuele diagnoseconversatie is geannuleerd, of via cancellationHandler.SetNotifier een notificatiefunctie registreren die bij annulering wordt getriggerd [SWS_DM_00555].
  • Asynchroniciteit en return: De functie werkt asynchroon en retourneert een ara::core::Future<OperationOutput>, die bij succes de uitvoergegevens voor het positieve UDS-antwoord bevat [SWS_DM_00555].

De foutafhandeling verloopt via negatieve diagnostische retourwaarden: als het stoppen van de routine mislukt, moet de future met een passende UDS-NRC-foutcode conform ISO 14229-1 via DiagUdsNrcErrc worden voltooid [SWS_DM_00555].

Met betrekking tot concurrency is de methode gespecificeerd als noexcept en exception-safe. Of de concrete implementatie thread-safe moet zijn ontworpen, hangt af van de ConcurrencyType die bij de instantiëring in de constructor is meegegeven [SWS_DM_00555].

Deze gebruiksinstructie is uitsluitend gebaseerd op de specificaties van de Adaptive AUTOSAR-release R25-11.

Implementer's Guide volgt (complexiteit 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#2b6f8c20
Content hash
2b6f8c20
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

functie 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.

DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 73588f5f0b57 Herkomst Open vragen (1)
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

Gebruik

De methode ara::diag::GenericRoutine::StopOffer deactiveert het doorsturen van binnenkomende diagnoseverzoeken van Diagnostic Management (DM) naar de overeenkomstige routine-instantie [SWS_DM_00558]. De functie heeft de signatuur void StopOffer() noexcept;, accepteert geen parameters en levert geen retourwaarde op [SWS_DM_00558]. De aanroep wordt synchroon verwerkt en signaleert aan het DM dat de routine vanaf dat moment geen verzoeken meer aanneemt.

Foutafhandeling

De operatie is als exception safe gespecificeerd en gedeclareerd met noexcept [SWS_DM_00558]. Foutcodes of C++-excepties treden bij de uitvoering niet op. Specifieke meldingen aan ontwikkelings- of foutgeheugeninstanties (DET/DEM) zijn voor deze interface in de diagnosemodule niet voorzien.

Gelijktijdigheid en beperkingen

Wat het threading-gedrag betreft, is de methode aangemerkt als not thread-safe [SWS_DM_00558]. Gelijktijdige aanroepen op dezelfde instantie van ara::diag::GenericRoutine moeten daarom aan de applicatiezijde worden gesynchroniseerd. Interpretatie: een aanroep vindt vermoedelijk vooral plaats wanneer een routine tijdelijk wordt geïnactiveerd of de applicatie gecontroleerd wordt beëindigd, nadat eerder een aanbiedingsaanroep heeft plaatsgevonden. Vraag Q-e110ce01110699e3 (open)

Samenspel

De naamgeving volgt conceptueel de service-offering van ara::com, maar vormt een zelfstandige implementatie binnen ara::diag en mag niet worden verward met communicatie-aanbiedingen (AUTOSAR_AP_SWS_Diagnostics §7.3.4.1.2 “Monitors”). Hetzelfde aanbiedingspatroon voor het deactiveren van het doorsturen van verzoeken wordt modulebreed ook gebruikt door verdere diagnoseklassen zoals ara::diag::GenericUDSService [SWS_DM_00620], ara::diag::GenericDataIdentifier [SWS_DM_00639], routine-interfaces [SWS_DM_00595] en ara::diag::Monitor [SWS_DM_01089].

Deze tekst is gegenereerd door een AI en is uitsluitend gebaseerd op de specificatiedocumenten van AUTOSAR R25-11.

Implementer's Guide volgt (complexiteit 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#820e347d
Content hash
820e347d
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

functie 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#ca2a5af8
Content hash
ca2a5af8
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

functie 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#f55518cf
Content hash
f55518cf
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

functie ~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#e8bac278
Content hash
e8bac278
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