DEENESPTFRRUARHIKOZHNL

namespace apext::diag::uds_transport

User GuideAI-GEGENEREERD

Dient voor de gestandaardiseerde koppeling en het beheer van externe UDS-transportprotocollen in het diagnosebeheer.
DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: ce8b113ec3f5 Herkomst Open vragen (1)
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

Dient voor de gestandaardiseerde koppeling en het beheer van externe UDS-transportprotocollen in het diagnosebeheer.

De namespace apext::diag::uds_transport biedt de C++-transportinterface voor het ontkoppelen van het generieke diagnosebeheer van specifieke UDS-transportprotocollen AUTOSAR_AP_SWS_Diagnostics §7.1 “UDS Transport Layer”. Protocol-plug-ins leiden af van de basisklasse UdsTransportProtocolHandler en doorlopen een strikte levenscyclus van constructie, initialisatie, start en geordend stoppen [SWS_DM_00329]. Binnenkomende berichten worden via IndicateMessage gemeld en ontvangen bij vrije capaciteit een geheugenbeheerde UdsMessagePtr voor de overname van gebruikersgegevens. Een centrale randvoorwaarde is dat er na het stoppen geen verdere aanroepen naar het diagnosebeheer mogen plaatsvinden behalve het bevestigingsbericht.

Context

De namespace apext::diag::uds_transport definieert de gestandaardiseerde C++-transportinterface (Transport Protocol API) voor het diagnosebeheer (DM) in het AUTOSAR Adaptive Platform AUTOSAR_AP_SWS_Diagnostics §7.1 “UDS Transport Layer”. De architectuur scheidt de generieke kern van het diagnosebeheer functioneel van concrete netwerk- en transportlagen. Op deze wijze kunnen gestandaardiseerde protocollen zoals DoIP evenals toekomstige of fabrikantspecifieke transportprotocollen (bijvoorbeeld voor CAN, CAN-FD of FlexRay) als modulaire plug-ins worden geïntegreerd AUTOSAR_AP_SWS_Diagnostics §7.1 “UDS Transport Layer”.

De centrale bemiddelende instantie wordt gevormd door de klasse UdsTransportProtocolMgr, die de interactie tussen de instanties van de Diagnostic Server en de aangesloten transportprotocollen coördineert. Concrete protocol-plug-ins leiden af van de abstracte basisklasse UdsTransportProtocolHandler AUTOSAR_AP_SWS_Diagnostics §7.1.1 “Support of UDS Transport Layer” [SWS_DM_00315]. Afzonderlijke handler-instanties worden via UdsTransportProtocolHandlerID geadresseerd [SWS_DM_00336], terwijl communicatiekanalen via het type ChannelID worden geïdentificeerd [SWS_DM_00337]. Ter ondersteuning van periodieke gegevensopvragingen conform ISO-dienst 0x2A bindt de interface tevens de klasse UdsTransportProtocolPeriodicHandler in.

Levenscyclus

Het diagnosebeheer stuurt de levenscyclus van elke UdsTransportProtocolHandler-instantie in een vast voorgeschreven volgorde [SWS_DM_00329]:

  1. Aanmaak: De DM instantieert de protocol-plugin via de constructor UdsTransportProtocolHandler::UdsTransportProtocolHandler [SWS_DM_00329].
  2. Initialisatie: De DM roept UdsTransportProtocolHandler::Initialize aan [SWS_DM_00329]. Afgezien van het opvragen van GetPeriodicHandler mag de DM vóór de succesvolle return van kInitializeOk geen verdere methoden op de handler aanroepen [SWS_DM_01746].
  3. Start en werking: Na succesvolle initialisatie wordt de handler geactiveerd met UdsTransportProtocolHandler::Start. Pas na deze aanroep verwerkt de DM meldingen over gereactiveerde kanalen via UdsTransportProtocolMgr::ChannelReestablished [SWS_DM_01744].
  4. Beëindiging: Als de DM overgaat naar de toestand ApplicationState.kTerminating, roept hij voor alle actieve plugins UdsTransportProtocolHandler::Stop aan [SWS_DM_00333]. Na terugkeer van deze aanroep mag de plugin uitsluitend UdsTransportProtocolMgr::HandlerStopped aanroepen [SWS_DM_01741]. De DM wacht actief op deze bevestiging [SWS_DM_00340].
handler_lifecycle NichtInitialisiert NichtInitialisiert Initialisierend Initialisierend NichtInitialisiert->Initialisierend Konstruktor Initialisiert Initialisiert Initialisierend->Initialisiert Initialize() -> kInitializeOk Fehlgeschlagen Fehlgeschlagen Initialisierend->Fehlgeschlagen Initialize() -> kInitializeFailed Gestartet Gestartet Initialisiert->Gestartet Start() Stoppend Stoppend Gestartet->Stoppend Stop() bij kTerminating Gestoppt Gestoppt Stoppend->Gestoppt HandlerStopped()

Toestandsdiagram: levenscyclusfasen en overgangsvoorwaarden van een implementatie van een transportprotocol-handler. Bronnen: [SWS_DM_00329], [SWS_DM_00333], [SWS_DM_00340], [SWS_DM_01741], [SWS_DM_01744], [SWS_DM_01745], [SWS_DM_01746]

Gebruikspad

Tijdens normaal bedrijf verloopt het doorsturen van inkomende diagnoseberichten via een afgestemd samenspel tussen handler en manager:

  1. Berichtindicatie: Als de handler gegevens ontvangt op een kanaal (ChannelID [SWS_DM_00337]), roept hij UdsTransportProtocolMgr::IndicateMessage aan. Daarbij kan hij vooraf-payload doorgeven in payloadInfo; aangeraden worden minimaal de eerste twee bytes voor de vroegtijdige herkenning van functionele verzoeken AUTOSAR_AP_SWS_Diagnostics §7.1 “UDS Transport Layer”.
  2. Bufferallocatie: Als de DM gereed is voor opname, antwoordt IndicateMessage met een std::pair uit IndicationResult::kIndicationOk en een geldige smart pointer UdsMessagePtr [SWS_DM_00309] [SWS_DM_00385]. Het gerefereerde UdsMessage-object bezit een minimale capaciteit van één byte [SWS_DM_00385]. De buffer wordt beheerd als std::unique_ptr met een specifieke deleter van de DM-core en is niet thread-safe [SWS_DM_00303]. Voor leestoegangen bestaat het constante equivalent UdsMessageConstPtr [SWS_DM_00304].
  3. Gegevensoverdracht: De handler schrijft de ontvangen diagnosegegevens in de klaargezette buffer, waarvan de bytesequentie via het type ByteSpan (alias voor ara::core::Span<ara::core::Byte> [SWS_DM_00338]) getypeerd is. Vermoedelijk dient het beschikbaar stellen van de afzonderlijke klasse UdsTransportProtocolPeriodicHandler via GetPeriodicHandler voor het ontkoppelen van de periodieke transmissiedienst 0x2A van het reguliere UDS-berichtpad. Vraag Q-230ef0b7c384c594 (open)
Verloop van de UDS-berichtindicatieHandlerUdsTransportProtocolMgrDM-KernIndicateMessage(channelId, payloadInfo)Controleer servertoestand & resourcesaltDM bereitAllokiere UdsMessagereturn pair(kIndicationOk, UdsMessagePtr)Kopiere Nutzdaten in ByteSpanDM belegtreturn pair(kIndicationOccupied, nullptr)

Sequentiediagram: verloop van de berichtindicatie en bufferallocatie tussen handler, manager en DM-core. Bronnen: AUTOSAR_AP_SWS_Diagnostics §7.1 “UDS Transport Layer”, [SWS_DM_00303], [SWS_DM_00309], [SWS_DM_00385], [SWS_DM_00386]

Foutscenario's

De specificatie definieert concrete fouttoestanden en precondities voor de transportkoppeling:

  • Mislukte initialisatie: Levert UdsTransportProtocolHandler::Initialize het resultaat kInitializeFailed op, dan breekt de DM het initialisatieproces voor deze handler onmiddellijk af en roept hij er geen verdere methoden meer op aan [SWS_DM_01745].
  • Weigering bij bezette diagnosecore: Wanneer de DM geblokkeerd is door een lopende serviceverwerking van dezelfde Tester Present-conversatie en het geen functionele Tester Present met payloadInfo 0x3E 0x80 betreft, geeft IndicateMessage het resultaat kIndicationOccupied samen met een nullptr terug in plaats van een berichtbuffer [SWS_DM_00386].
  • Niet-toegestane aanroepen na beëindiging: Als een plugin na terugkeer van Stop een andere methode van UdsTransportProtocolMgr dan HandlerStopped aanroept, schendt dit de protocolvoorschriften [SWS_DM_01741]. Evenzo negeert de DM signalen zoals ChannelReestablished wanneer deze vóór de succesvolle aanroep van Start binnenkomen [SWS_DM_01744].

Deze handleiding is uitsluitend gebaseerd op de specificaties van de AUTOSAR Adaptive Platform Release R25-11.

Themakaart

KI-gestützte Gruppierung auf Basis der Records und Spezifikationsauszüge; keine Gliederung aus der AUTOSAR-Spezifikation.

Klassendiagram

Abgerundete Rahmen = Namespace- bzw. Klassen-Scopes; hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); graue Boxen = namespace-fremde bzw. externe Basisklassen. Klicken öffnet die jeweilige Klassen- bzw. cppreference-Seite.

G cluster_ns apext::diag::uds_transport napext__diag__uds_transport__UdsMessage UdsMessage napext__diag__uds_transport__UdsTransportProtocolHandler UdsTransportProtocolHandler napext__diag__uds_transport__UdsTransportProtocolMgr UdsTransportProtocolMgr napext__diag__uds_transport__UdsTransportProtocolPeriodicHandler UdsTransportProtocolPeriodicHandler

Detailweergave

Kies een item in de inhoudsopgave.

Nachrichtendaten

UdsMessage klasse

class represents an UDS message exchanged between DM generic core (UdsTransport ProtocolMgr) and a specific implementation of UdsTransportPr

ByteSpan typealias

This is the type of ByteSpan.

using ByteSpan = ara::core::Span<ara::core::Byte>;

This is the unique_ptr for constant UdsMessages containing a custom deleter as provided by the generic/core DM part towards the UdsTransportLayer-Plugin.

using UdsMessageConstPtr = std::unique_ptr<const UdsMessage, std::function<void(const UdsMessage*)>>;
UdsMessagePtr typealias

This is the unique_ptr for UdsMessages containing a custom deleter as provided by the generic/ core DM part towards the UdsTransportLayer-Plugin.

using UdsMessagePtr = std::unique_ptr<UdsMessage, std::function<void(UdsMessage*)>>;

Protokoll-Plugins

Abstract Class, which a specific UDS Transport Protocol (plugin) shall subclass.

UdsTransportProtocolPeriodicHandler class to support 0x2A service from ISO.

UdsTransportProtocolHandler are flexible "plugins", which need an identification.

using UdsTransportProtocolHandlerID = std::uint8_t;

Protokollverwaltung

The UdsTransportProtocolMgr class manages the interaction between the Diagnostic Server instance(s) and various UDS Transport Protocols (e.g

ChannelID typealias

This is the identification of channel on which to transmit.

using ChannelID = std::uint32_t;

Typealiassen

typealias ByteSpan [SWS_DM_00338] Upstream: RS_Diag_04147

using ByteSpan = ara::core::Span<ara::core::Byte>;

This is the type of ByteSpan.

Header-Datei#include "apext/diag/uds_transport/protocol_types.h"
Scopenamespace apext::diag::uds_transport
SymbolByteSpan

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

Record
AUTOSAR/AP/record/SWS_DM_00338
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00338@rel:R25-11#8e5f4bd3
Content hash
8e5f4bd3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00338
Status: valid/unmigrated Version: rel:R25-11#1a041728 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_00338@rel:R25-11#1a041728
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#3f6b4b552026-09-30
  • R19-11rel:R19-11#87b9aa052026-10-14
  • R20-11rel:R20-11#280ab9cb2026-10-14
  • R21-11rel:R21-11#280ab9cb2026-10-14
  • R22-11rel:R22-11#21aad9862026-10-14
  • R23-11rel:R23-11#a3af51d32026-10-14
  • R24-11rel:R24-11#1a0417282026-10-14
  • R25-11rel:R25-11#1a0417282026-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

typealias ChannelID [SWS_DM_00337] Upstream: RS_Diag_04147

using ChannelID = std::uint32_t;

This is the identification of channel on which to transmit.

Header-Datei#include "apext/diag/uds_transport/protocol_types.h"
Scopenamespace apext::diag::uds_transport
SymbolChannelID

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

Record
AUTOSAR/AP/record/SWS_DM_00337
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00337@rel:R25-11#2eeac1e8
Content hash
2eeac1e8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00337
Status: valid/unmigrated Version: rel:R25-11#1d8116d5 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_00337@rel:R25-11#1d8116d5
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#a89726192026-09-30
  • R19-11rel:R19-11#a09308352026-10-14
  • R20-11rel:R20-11#6bf394982026-10-14
  • R21-11rel:R21-11#6bf394982026-10-14
  • R22-11rel:R22-11#1855826a2026-10-14
  • R23-11rel:R23-11#3d08977c2026-10-14
  • R24-11rel:R24-11#1d8116d52026-10-14
  • R25-11rel:R25-11#1d8116d52026-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

typealias UdsMessageConstPtr [SWS_DM_00304] Upstream: RS_Diag_04147

using UdsMessageConstPtr = std::unique_ptr<const UdsMessage, std::function<void(const UdsMessage*)>>;

This is the unique_ptr for constant UdsMessages containing a custom deleter as provided by the generic/core DM part towards the UdsTransportLayer-Plugin.

Header-Datei#include "apext/diag/uds_transport/uds_message.h"
Scopenamespace apext::diag::uds_transport
SymbolUdsMessageConstPtr
Thread-Sicherheitnot thread-safe
Hinweise: How the exact typedef for UdsMessageConstPtr looks like, is up to the DM product vendor. I.e. how f.i. the deleter signature looks like ... basically the minimal agreement is: UdsMessage ConstPtr shall behave like a std::unique_ptr<const UdsMessage>!

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

Record
AUTOSAR/AP/record/SWS_DM_00304
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00304@rel:R25-11#0150877a
Content hash
0150877a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00304
Status: valid/unmigrated Version: rel:R25-11#cbe7d8ab 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_00304@rel:R25-11#cbe7d8ab
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#8e4075282026-09-30
  • R19-11rel:R19-11#f70a6f152026-10-14
  • R20-11rel:R20-11#70977a452026-10-14
  • R21-11rel:R21-11#70977a452026-10-14
  • R22-11rel:R22-11#3632365b2026-10-14
  • R23-11rel:R23-11#ee76163c2026-10-14
  • R24-11rel:R24-11#6389682c2026-10-14
  • R25-11rel:R25-11#cbe7d8ab2026-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

typealias UdsMessagePtr [SWS_DM_00303] Upstream: RS_Diag_04147

using UdsMessagePtr = std::unique_ptr<UdsMessage, std::function<void(UdsMessage*)>>;

This is the unique_ptr for UdsMessages containing a custom deleter as provided by the generic/ core DM part towards the UdsTransportLayer-Plugin.

Header-Datei#include "apext/diag/uds_transport/uds_message.h"
Scopenamespace apext::diag::uds_transport
SymbolUdsMessagePtr
Thread-Sicherheitnot thread-safe
Hinweise: How the exact typedef for UdsMessagePtr looks like, is up to the DM product vendor. I.e. how f.i. the deleter signature looks like ... basically the minimal agreement is: UdsMessagePtr shall behave like a std::unique_ptr<UdsMessage>!

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

Record
AUTOSAR/AP/record/SWS_DM_00303
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00303@rel:R25-11#fb0e17e5
Content hash
fb0e17e5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00303
Status: valid/unmigrated Version: rel:R25-11#6be645e6 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_00303@rel:R25-11#6be645e6
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b75a0d132026-09-30
  • R19-11rel:R19-11#401203282026-10-14
  • R20-11rel:R20-11#a5dd04072026-10-14
  • R21-11rel:R21-11#a5dd04072026-10-14
  • R22-11rel:R22-11#812335462026-10-14
  • R23-11rel:R23-11#057e29102026-10-14
  • R24-11rel:R24-11#fb6c8d462026-10-14
  • R25-11rel:R25-11#6be645e62026-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

typealias UdsTransportProtocolHandlerID [SWS_DM_00336] Upstream: RS_Diag_04147, RS_Diag_04168

using UdsTransportProtocolHandlerID = std::uint8_t;

UdsTransportProtocolHandler are flexible "plugins", which need an identification.

Header-Datei#include "apext/diag/uds_transport/protocol_types.h"
Scopenamespace apext::diag::uds_transport
SymbolUdsTransportProtocolHandlerID

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

Record
AUTOSAR/AP/record/SWS_DM_00336
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00336@rel:R25-11#ee1edcd5
Content hash
ee1edcd5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00336
Status: valid/unmigrated Version: rel:R25-11#dbbb3100 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_00336@rel:R25-11#dbbb3100
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#44559d542026-09-30
  • R19-11rel:R19-11#d727dd482026-10-14
  • R20-11rel:R20-11#7d7439fe2026-10-14
  • R21-11rel:R21-11#7d7439fe2026-10-14
  • R22-11rel:R22-11#c079e14d2026-10-14
  • R23-11rel:R23-11#d98d683b2026-10-14
  • R24-11rel:R24-11#dbbb31002026-10-14
  • R25-11rel:R25-11#dbbb31002026-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