DEENESPTFRRUARHIKOZHNL

类 apext::diag::uds_transport::UdsTransportProtocolHandler

[SWS_DM_00315] Upstream: RS_Diag_04147, RS_Diag_04168

class UdsTransportProtocolHandler {...};

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

Header-Datei#include "apext/diag/uds_transport/protocol_handler.h"
Forwarding-Header#include "apext/diag/diag_fwd.h"
Scopenamespace apext::diag::uds_transport

用户指南人工智能生成

用作 UDS 传输插件的抽象基类,用于传输和转发诊断消息。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 8b34a053e223 来源 未决问题(2)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用作 UDS 传输插件的抽象基类,用于传输和转发诊断消息。

该抽象类用作 UDS 传输插件的基础接口,用于与自适应诊断管理(AUTOSAR_AP_SWS_Diagnostics §7.1.1 “Support of UDS Transport Layer”)进行标准化连接。派生实现将接收到的诊断消息转发给协议管理器,并通过特定于网络的通道将生成的响应消息传输给诊断测试仪。生命周期遵循由创建、独立初始化、异步启动和有序停止组成的严格序列([SWS_DM_00329])。实例化后,运行中的方法调用不是线程安全的,需要由诊断核心进行协同控制。

上下文

类 apext::diag::uds_transport::UdsTransportProtocolHandler 是 AUTOSAR Adaptive Platform 模块 diag 内的抽象基类。它定义了标准化接口,专有或特定于协议的 UDS 传输插件通过该接口连接到自适应诊断管理 (DM)(AUTOSAR_AP_SWS_Diagnostics §7.1.1 “Support of UDS Transport Layer”、[SWS_DM_00315])。每个具体的传输协议——例如用于通过汽车网络介质进行诊断——都将该接口实现为派生子类。DM 应当在其整个运行生命周期中独占拥有并管理相应的处理程序实例。 问题 Q-ef308265bfdf6cec (未决)诊断核心与插件之间的交互通过类型为 UdsTransportProtocolMgr& 的引用 transportprotocolManager 进行,该引用在构造函数中传递并受保护地存储([SWS_DM_09015]、[SWS_DM_09025])。每个处理程序均由一个数字 UdsTransportProtocolHandlerID 标识,可通过 GetHandlerID() 查询([SWS_DM_00325])。

生命周期

UDS 传输协议处理程序的生命周期由 DM 严格按顺序控制([SWS_DM_00329])。在通过构造函数 UdsTransportProtocolHandler([SWS_DM_09015])进行实例化后,方法 Initialize() 将实际的协议初始化与对象创建分离开来([SWS_DM_00319])。除了通过 GetPeriodicHandler() 进行的可选查询外,在成功返回 InitializationResult::kInitializeOk 之前,DM 不得在处理程序上调用任何方法([SWS_DM_01746]、[SWS_DM_09017])。成功初始化后,调用 Start() 使处理程序进入活动处理状态([SWS_DM_00322])。为了最大程度缩短启动时间,Start() 被设计为异步操作;DM 应当在内部协调多个处理程序的并行启动。 问题 Q-66e5a53d55e6d812 (未决)如果 DM 在关闭时进入状态 ApplicationState.kTerminating,它将通过 Stop() 指示处理程序终止([SWS_DM_00323]、[SWS_DM_00333])。DM 等待完成,处理程序通过调用 UdsTransportProtocolMgr::HandlerStopped() 予以确认([SWS_DM_00340])。从 Stop() 返回后,禁止插件对管理器进行除 HandlerStopped() 之外的任何方法调用([SWS_DM_01741])。资源最终通过虚析构函数释放([SWS_DM_09016])。虽然构造函数是线程安全的,但运行时的接口方法均被声明为非线程安全。

lebenszyklus Erzeugt Erzeugt Initialisiert Initialisiert Erzeugt->Initialisiert Initialize() == kInitializeOk InitialisierungFehlgeschlagen InitialisierungFehlgeschlagen Erzeugt->InitialisierungFehlgeschlagen Initialize() == kInitializeFailed Gestartet Gestartet Initialisiert->Gestartet Start() Stoppend Stoppend Gestartet->Stoppend Stop() Gestoppt Gestoppt Stoppend->Gestoppt HandlerStopped()

状态图:UDS 传输处理程序的生命周期阶段和状态转换。来源:[SWS_DM_00319]、[SWS_DM_00322]、[SWS_DM_00323]、[SWS_DM_00329]、[SWS_DM_01745]、[SWS_DM_01746]

使用路径

在常规诊断运行中,处理程序处理传入消息并传输响应。一旦网络接口上至少存在源地址、目标地址、地址类型(物理或功能)、总消息长度,以及在多字节有效负载时存在前两个字节(payloadInfo),该实现便通过 UdsTransportProtocolMgr::IndicateMessage() 向管理器报告请求([SWS_DM_00342]、AUTOSAR_AP_SWS_Diagnostics §7.1.1.3 “UDS message transmission on a UDS TransportLayer”)。每个请求均分配给一个唯一的通道(AUTOSAR_AP_SWS_Diagnostics §7.1.1.4 “Channel Notifications”)。为了进行应答,DM 通过 Transmit(message, channelId) 将诊断响应传递给相同的处理程序和通道([SWS_DM_00327]、[SWS_DM_00348])。物理传输后,处理程序通过 UdsTransportProtocolMgr::TransmitConfirmation() 将传递的消息对象返回给管理器([SWS_DM_00327]、[SWS_DM_00351])。一个特殊的使用路径涉及在重启后给出肯定响应的 ECU 复位(UDS 服务 0x11):在此情况下,DM 在复位前通过 NotifyReestablishment(channelId) 请求处理程序非易失性地保存连接信息;在重启并重新执行 Start() 后,处理程序通过 ChannelReestablished() 报告相同通道的恢复([SWS_DM_00326]、[SWS_DM_01744])。

UDS 消息指示与响应传输DiagnosetesterUdsTransportProtocolHandlerUdsTransportProtocolMgr诊断管理UDS-Anfrage empfangenIndicateMessage(globalChannelId, ...)Diagnoseanfrage weiterleitenDiagnoseanfrage verarbeitenTransmit(message, channelId)UDS-Antwort an Netzwerk sendenTransmitConfirmation(message, result)

时序图:UDS 消息指示和响应传输的流程。来源:[SWS_DM_00327]、[SWS_DM_00342]、[SWS_DM_00348]、[SWS_DM_00351]

错误场景

如果传输层初始化失败且 Initialize() 返回状态 InitializationResult::kInitializeFailed,DM 将立即中止该协议的启动过程,并不再调用该实例上的其他方法([SWS_DM_01745]、[SWS_DM_09017])。如果该传输协议不支持周期性传输,调用 GetPeriodicHandler() 会返回带有错误代码 kConfigurationMismatch 的 ara::core::Result([SWS_DM_01068])。如果无法保证为 ECU 复位所请求的通道恢复,NotifyReestablishment() 将失败并通过返回值 false 发出信号([SWS_DM_00326])。最后,如果网络层上的诊断响应发送过程失败,处理程序在向管理器确认时必须通过将 TransmitConfirmation() 中的参数 result 设置为 kTransmitFailed 来通知此事([SWS_DM_00351])。

本指南基于 AUTOSAR 规范 R25-11 自动生成。

成员图

类图

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

G napext__diag__uds_transport__UdsTransportProtocolHandler1 UdsTransportProtocolHandler + transportprotocolManager + ~UdsTransportProtocolHandler() + UdsTransportProtocolHandler() + GetHandlerID() + GetPeriodicHandler() + Initialize() + NotifyReestablishment() + Start() + Stop() + Transmit()

详细视图

请在大纲中选择一个条目。

构造函数和析构函数

Constructor of UdsTransportProtocolHandler.

explicit UdsTransportProtocolHandler (const UdsTransportProtocol HandlerID handlerId, UdsTransportProtocolMgr &transportProtocolMgr) noexcept;

Destructor of UdsTransportProtocolHandler.

virtual ~UdsTransportProtocolHandler () noexcept=default;

方法

Return the UdsTransportProtocolHandlerID, which was given to the implementation during construction (ctor call).

virtual UdsTransportProtocolHandlerID GetHandlerID () const noexcept;

Returns the corresponding periodic Transport Protocol handler.

virtual ara::core::Result< UdsTransportProtocolPeriodicHandler & > Get PeriodicHandler () noexcept;
Initialize 函数

Initializes UDS Transport Protocol handler. This methods needs to be called before a call of Start(). It is meant to separate the actual initialization of the UDS Transport Protocol handler from the constructor.

virtual InitializationResult Initialize () noexcept=0;

Tells the UdsTransportProtocolHandler, to notify the DM core via UdsTransportProtocol Mgr::ChannelReestablished() if the given channel has been re-established after next Uds TransportProtocolHandler::Start(). The main purpose of this method is to allow the DM to provide an ECU-Reset (0x11 service), with configuration option "positive response AFTER reset". In this scenario, the request for 0x11 will be received on a certain channel (GlobalChannel Identifier), then the ECU-Reset takes place and after ECU-Restart, all UdsProtocol Handlers/-plugins get restarted via call to UdsTransportProtocolHandler::Start().

virtual bool NotifyReestablishment (ChannelID channelId) noexcept=0;
Start 函数

Start processing the UDS Transport Protocol. Within the implementation there might be some stack specific implementation. The method is asynchronous to allow the DM to start multiple UdsTransportProtocolHandler in parallel to reduce startup time.

virtual void Start () noexcept=0;
Stop 函数

Method to indicate that this UdsTransportProtocolHandler should terminate. If UdsTransportProtocolHandler has stopped, it shall call UdsTransportProtocolMgr:: HandlerStopped(UdsTransportProtocolHandlerID).

virtual void Stop () noexcept=0;
Transmit 函数

Transmit a UDS message via the underlying UDS Transport Protocol channel.

virtual void Transmit (UdsMessageConstPtr message, ChannelID channel Id) noexcept=0;

枚举

Result of Initialize handler.

enum class InitializationResult : std::uint8_t {...};

常量

The UdsTransportProtocolMgr used/provided by the DM.

UdsTransportProtocolMgr& transportprotocolManager;

方法文档

函数 GetHandlerID [SWS_DM_00325] Upstream: RS_Diag_04147, RS_Diag_04168

virtual UdsTransportProtocolHandlerID GetHandlerID () const noexcept;

Return the UdsTransportProtocolHandlerID, which was given to the implementation during construction (ctor call).

Header-Datei#include "apext/diag/uds_transport/protocol_handler.h"
Scopeclass apext::diag::uds_transport::UdsTransportProtocolHandler
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Rückgabewert

TypBeschreibung
UdsTransportProtocolHandlerIDUdsTransportProtocolHandlerID.

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

Record
AUTOSAR/AP/record/SWS_DM_00325
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00325@rel:R25-11#aee509cc
Content hash
aee509cc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00325
Status: valid/unmigrated Version: rel:R25-11#98596bd3 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_00325@rel:R25-11#98596bd3
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#ba13d0a62026-09-30
  • R19-11rel:R19-11#47151ef62026-10-14
  • R20-11rel:R20-11#8d4acd5c2026-10-14
  • R21-11rel:R21-11#7170c6052026-10-14
  • R22-11rel:R22-11#a8caf4042026-10-14
  • R23-11rel:R23-11#5baf09172026-10-14
  • R24-11rel:R24-11#13e886b82026-10-14
  • R25-11rel:R25-11#98596bd32026-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

函数 GetPeriodicHandler [SWS_DM_01068] Upstream: RS_Diag_04215

virtual ara::core::Result< UdsTransportProtocolPeriodicHandler & > Get PeriodicHandler () noexcept;

Returns the corresponding periodic Transport Protocol handler.

Header-Datei#include "apext/diag/uds_transport/protocol_handler.h"
Scopeclass apext::diag::uds_transport::UdsTransportProtocolHandler
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Rückgabewert

TypBeschreibung
ara::core::Result< UdsTransportProtocolPeriodicHandler & >If periodic transmissions are supported on this transport protocol, a reference to UdsTransportProtocolPeriodicHandler is returned, and if not supported, an error (kConfigurationMismatch).

Fehler

FehlercodeBeschreibung
kConfigurationMismatch

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

Record
AUTOSAR/AP/record/SWS_DM_01068
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01068@rel:R25-11#5eba5b33
Content hash
5eba5b33
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01068
Status: valid/unmigrated Version: rel:R25-11#ab56dcd2 Versionshistorie & Revisions (1 transition, 7 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_01068@rel:R25-11#ab56dcd2
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#331116142026-09-30
  • R20-11rel:R20-11#846d3b552026-10-14
  • R21-11rel:R21-11#49b00e832026-10-14
  • R22-11rel:R22-11#1ddbb3d62026-10-14
  • R23-11rel:R23-11#f5d366552026-10-14
  • R24-11rel:R24-11#4fcfe9bb2026-10-14
  • R25-11rel:R25-11#ab56dcd22026-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

函数 Initialize [SWS_DM_00319] Upstream: RS_Diag_04147, RS_Diag_04168

virtual InitializationResult Initialize () noexcept=0;

Initializes UDS Transport Protocol handler. This methods needs to be called before a call of Start(). It is meant to separate the actual initialization of the UDS Transport Protocol handler from the constructor.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 2d1a514affd8 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

纯虚方法 Initialize 用于显式初始化 apext::diag::uds_transport::UdsTransportProtocolHandler 的实例,并在形式上将此过程与对象的构造分离 [SWS_DM_00319]。它由 Diagnostic Manager (DM) 同步且无参数调用,不引发异常(noexcept)并返回 InitializationResult [SWS_DM_00319] [SWS_DM_09017]。

生命周期和并发

该调用嵌入在 UDS 传输层的生命周期管理中 AUTOSAR_AP_SWS_Diagnostics §7.1.1.1 “Initialization, Starting and Stopping of a UDS TransportLayer”。DM 必须按固定顺序管理各阶段:构造、调用 Initialize、通过 Start 启动以及通过 Stop 终止 [SWS_DM_00329]。该方法被指定为非线程安全(not thread-safe)[SWS_DM_00319];因此 DM 可能在没有并行访问的同步初始化阶段执行该方法。 问题 Q-06180f9d8fe99092 (未决)

错误处理与交互

该方法通过枚举器 InitializationResult::kInitializeOk 或 InitializationResult::kInitializeFailed 报告结果 [SWS_DM_09017]。DM 的后续行为直接取决于返回值:

  • 若成功返回 kInitializeOk,则允许 DM 调用该处理程序的后续方法;在此成功返回值之前,除 GetPeriodicHandler 之外不允许进行其他方法调用 [SWS_DM_01746]。
  • 若处理程序返回 kInitializeFailed,DM 将完全中止该传输协议的初始化过程,并不再在相关实例上调用任何其他方法 [SWS_DM_01745]。

此文本由 AI 基于 AUTOSAR R25-11 生成。

实现者指南即将推出(复杂度 I1)

Header-Datei#include "apext/diag/uds_transport/protocol_handler.h"
Scopeclass apext::diag::uds_transport::UdsTransportProtocolHandler
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Rückgabewert

TypBeschreibung
InitializationResultkInitializeOk, in case, the initialization was successful, else kInitializeFailed is returned.

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

Record
AUTOSAR/AP/record/SWS_DM_00319
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00319@rel:R25-11#0a772e7e
Content hash
0a772e7e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00319
Status: valid/unmigrated Version: rel:R25-11#a9abbec3 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_00319@rel:R25-11#a9abbec3
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#6d238b482026-09-30
  • R19-11rel:R19-11#24dcf7ab2026-10-14
  • R20-11rel:R20-11#4d518db32026-10-14
  • R21-11rel:R21-11#4d518db32026-10-14
  • R22-11rel:R22-11#2a8e1b2b2026-10-14
  • R23-11rel:R23-11#79c84e752026-10-14
  • R24-11rel:R24-11#a9655bf92026-10-14
  • R25-11rel:R25-11#a9abbec32026-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

函数 NotifyReestablishment [SWS_DM_00326] Upstream: RS_Diag_04147, RS_Diag_04168

virtual bool NotifyReestablishment (ChannelID channelId) noexcept=0;

Tells the UdsTransportProtocolHandler, to notify the DM core via UdsTransportProtocol Mgr::ChannelReestablished() if the given channel has been re-established after next Uds TransportProtocolHandler::Start(). The main purpose of this method is to allow the DM to provide an ECU-Reset (0x11 service), with configuration option "positive response AFTER reset". In this scenario, the request for 0x11 will be received on a certain channel (GlobalChannel Identifier), then the ECU-Reset takes place and after ECU-Restart, all UdsProtocol Handlers/-plugins get restarted via call to UdsTransportProtocolHandler::Start().

Now there are two expectations, when this method has been called before and returned "TRUE": If the same remote client connects to the UdsProtocolHandler, it shall get a channel identification with the same identifying as the last time. It consecutively calls UdsTransportProtocolMgr::ChannelReestablished(Global ChannelIdentifier).

The detection/decision, whether the "same" client reconnects as before is an UdsProtocol Handler implementation specific decision.

The general expectation is:

If the channel is set up from exactly the same remote network-endpoint, it typically gets the same ChannelID. To support this functionality, the implementation at least has to store non-volatile, that this notification has to be done. Further it might be needed to store some additional connection specific info non-volatile to make sure, that the same ChannelID can be reassigned. This is the case if the mapping of protocol specific channel info -> channelID isn’t a

stable bijective mapping!

Small example:

The underlying network protocol, which UdsProtocolHandler implements is based on TCP. At the point in time, where the 0x11 Service Identifier request is received on channel identified by the DM calls UdsTransportProtocolHandler::NotifyReestablishment() on this ChannelID.

Now the implementation of UdsProtocolHandler stores non-volatile in the context of this call:

• NetworkEndpoint (IP-address and port number) of the channel. • NetworkEndpoint (IP-address and port number) of the local port (because in this example, the UdsTransportProtocolHandler listens on/supports different ports). • ChannelID it has currently assigned. After restart this ChannelID is only reused for a channel with exactly the same Network Endpoint addresses as stored non-volatile.

If this ChannelID then gets reassigned, then UdsTransportProtocolMgr::Channel Reestablished() has to be called.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 677bdfc28d3d 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

当在 ECU 重启(UDS 服务 0x11)的上下文中仅应在成功重启后发送肯定响应时,Diagnostic Manager (DM) 会同步调用方法 NotifyReestablishment([SWS_DM_00326],[SWS_DM_00360])。要监视的传输通道通过参数 channelId 传递([SWS_DM_00326])。

通过该调用,指示传输协议实现持久保存监视请求([SWS_DM_00359])。在系统恢复运行且处理程序重新启动后,协议处理程序通过 [SWS_DM_00313] 异步向 DM 报告通道的重新可用性([SWS_DM_00358])。布尔返回值通过 true 发出信号,表明通知请求已被接受且可以得到满足;否则返回 false([SWS_DM_00326])。

关于并发性和错误处理,适用以下规则:

本使用说明由 AI 基于规范创建。

实现者指南即将推出(复杂度 I2)

Header-Datei#include "apext/diag/uds_transport/protocol_handler.h"
Scopeclass apext::diag::uds_transport::UdsTransportProtocolHandler
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
channelIdThe channelID, whose re-establishment shall be notified to Uds TransportProtocolMgr

Rückgabewert

TypBeschreibung
boolTRUE, if notification request is accepted and can be fulfilled, else FALSE
Hinweise: The UdsTransportProtocolHandler will call UdsTransportProtocolMgr::Channel Reestablished() after UdsTransportProtocolHandler::Start() is called and as soon as it detects that the remote client/tester is reachable again.

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

Record
AUTOSAR/AP/record/SWS_DM_00326
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00326@rel:R25-11#35716b99
Content hash
35716b99
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00326
Status: valid/unmigrated Version: rel:R25-11#71ce018e 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_00326@rel:R25-11#71ce018e
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#eaebfef42026-09-30
  • R19-11rel:R19-11#c295123d2026-10-14
  • R20-11rel:R20-11#3a65f3fb2026-10-14
  • R21-11rel:R21-11#318d3d1b2026-10-14
  • R22-11rel:R22-11#ce8e0b802026-10-14
  • R23-11rel:R23-11#30993c3a2026-10-14
  • R24-11rel:R24-11#a15ad2ab2026-10-14
  • R25-11rel:R25-11#71ce018e2026-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

函数 Start [SWS_DM_00322] Upstream: RS_Diag_04147, RS_Diag_04168

virtual void Start () noexcept=0;

Start processing the UDS Transport Protocol. Within the implementation there might be some stack specific implementation. The method is asynchronous to allow the DM to start multiple UdsTransportProtocolHandler in parallel to reduce startup time.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: b5781ddbed6c 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

接口 apext::diag::uds_transport::UdsTransportProtocolHandler 的方法 Start 按照 [SWS_DM_00322] 启动 Diagnostic Management (DM) 中 UDS 传输插件的协议处理。它不接受任何参数,也不返回任何值。执行被设计为异步的,以便 DM 可以并行启动多个实例,从而缩短整个系统的启动时间([SWS_DM_00322])。由于签名声明了 void,因此异步处理可能通过内部后台机制在协议栈特定层面进行处理。 问题 Q-d1023a05a1f3e2ab (未决)

关于生命周期(SWS Diagnostics §7.1.1.1 “Initialization, Starting and Stopping of a UDS TransportLayer”、[SWS_DM_00329]),适用严格的顺序条件:

  • 前置条件:在调用之前,必须强制以结果 kInitializeOk 完成通过 Initialize([SWS_DM_00319])的初始化([SWS_DM_01746])。相反,如果初始化返回 kInitializeFailed,则 DM 中止该过程且不得调用 Start([SWS_DM_01745])。
  • 后置条件:仅在成功调用 Start 之后,DM 才允许在处理程序上触发诸如 Transmit 或 Stop 等下游函数([SWS_DM_01743])。此外,DM 仅在先前已执行 Start 的情况下才处理关于 ChannelReestablished([SWS_DM_00313])的通知([SWS_DM_01744]),这在带有重新连接的 ECU 复位场景([SWS_DM_00326])等情况下至关重要。

该方法被声明为 noexcept,因此是异常安全的,但被明确指定为非线程安全(not thread-safe)([SWS_DM_00322])。因此,调用方必须确保实例调用同步进行。

本使用说明基于规范数据自动生成。

实现者指南即将推出(复杂度 I2)

Header-Datei#include "apext/diag/uds_transport/protocol_handler.h"
Scopeclass apext::diag::uds_transport::UdsTransportProtocolHandler
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_00322
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00322@rel:R25-11#186b3a33
Content hash
186b3a33
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00322
Status: valid/unmigrated Version: rel:R25-11#0b2689e0 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_00322@rel:R25-11#0b2689e0
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#13806c572026-09-30
  • R19-11rel:R19-11#e7bc57b82026-10-14
  • R20-11rel:R20-11#967d60892026-10-14
  • R21-11rel:R21-11#967d60892026-10-14
  • R22-11rel:R22-11#5752c1402026-10-14
  • R23-11rel:R23-11#9e58e6f32026-10-14
  • R24-11rel:R24-11#dd7836172026-10-14
  • R25-11rel:R25-11#0b2689e02026-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

函数 Stop [SWS_DM_00323] Upstream: RS_Diag_04147, RS_Diag_04168

virtual void Stop () noexcept=0;

Method to indicate that this UdsTransportProtocolHandler should terminate. If UdsTransportProtocolHandler has stopped, it shall call UdsTransportProtocolMgr:: HandlerStopped(UdsTransportProtocolHandlerID).

After return from Stop(), the handler-plugin shall NOT call to UdsTransportProtocolMgr with any other method but UdsTransportProtocolMgr::HandlerStopped().

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: e507b828b86b 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

接口 apext::diag::uds_transport::UdsTransportProtocolHandler 的方法 Stop 向 UDS 传输协议实例发出应终止的信号 [SWS_DM_00323]。一旦 Diagnostic Management (DM) 转换到状态 ApplicationState.kTerminating,就会触发该调用 [SWS_DM_00333]。该函数无形参、无返回值,被声明为 noexcept,并被指定为异常安全(exception safe)[SWS_DM_00323]。

以下条件适用于调用上下文和并发性:

与 DM 的交互是异步进行的:在处理程序拆除其网络连接并释放资源后,必须通过 apext::diag::uds_transport::UdsTransportProtocolMgr::HandlerStopped 传递其 handlerId 来通知 DM [SWS_DM_00314]。DM 在调用 Stop 后必须等待此确认回调,然后才最终终止该过程 [SWS_DM_00340]。

此文本基于 AUTOSAR Adaptive R25-11 规范自动生成。

实现者指南即将推出(复杂度 I1)

Header-Datei#include "apext/diag/uds_transport/protocol_handler.h"
Scopeclass apext::diag::uds_transport::UdsTransportProtocolHandler
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_00323
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00323@rel:R25-11#d33df114
Content hash
d33df114
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00323
Status: valid/unmigrated Version: rel:R25-11#ddd9ac23 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_00323@rel:R25-11#ddd9ac23
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#59af1a9d2026-09-30
  • R19-11rel:R19-11#53424cef2026-10-14
  • R20-11rel:R20-11#fe2b5e9c2026-10-14
  • R21-11rel:R21-11#7d886f392026-10-14
  • R22-11rel:R22-11#c94b081a2026-10-14
  • R23-11rel:R23-11#a61d25202026-10-14
  • R24-11rel:R24-11#838592342026-10-14
  • R25-11rel:R25-11#ddd9ac232026-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

函数 Transmit [SWS_DM_00327] Upstream: RS_Diag_04147, RS_Diag_04168

virtual void Transmit (UdsMessageConstPtr message, ChannelID channel Id) noexcept=0;

Transmit a UDS message via the underlying UDS Transport Protocol channel.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 5022cdfe42a5 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

调用方法 Transmit 是为了通过传输协议的特定通道向网络发送诊断 UDS 消息([SWS_DM_00327]、SWS Diagnostics §7.1.1.3 “UDS message transmission on a UDS TransportLayer”)。它映射了符合 ISO 14229-2 的服务 T_Data.req([SWS_DM_00327])。调用方以 unique_ptr 的所有权样式将要发送的消息作为 UdsMessageConstPtr 传递,并传递 channelId,该标识符必须与先前接收到的请求的通道相对应([SWS_DM_00327]、[SWS_DM_00348]、SWS Diagnostics §7.1.1.4 “Channel Notifications”)。

关于顺序和生命周期,Diagnostic Manager 只有在处理程序的初始化通过 kInitializeOk 完成([SWS_DM_01746])并且方法 Start 已被调用([SWS_DM_01743])之后,才允许调用 Transmit。由于该操作被指定为 not thread-safe 和 exception safe([SWS_DM_00327]),根据解释,并行发送任务的协调可能必须在调用方侧的 Diagnostic Manager 中进行。 问题 Q-6edd917928b60e55 (未决)

该函数同步时不提供返回值。传输处理程序有义务在传输后通过 apext::diag::uds_transport::UdsTransportProtocolMgr::TransmitConfirmation 将消息指针异步返回给 Diagnostic Manager([SWS_DM_00327]、[SWS_DM_00312])。在网络层成功发送时,将报告结果 kTransmitOk,否则报告 kTransmitFailed([SWS_DM_00351])。

本使用说明基于 AUTOSAR Adaptive R25-11 规范。

实现者指南即将推出(复杂度 I1)

Header-Datei#include "apext/diag/uds_transport/protocol_handler.h"
Scopeclass apext::diag::uds_transport::UdsTransportProtocolHandler
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
messageThe message to be transmitted as a UdsMessage::Ptr (unique_ptr style). UdsTransportProtocolHandler has to give back this Uds Message::Ptr via UdsTransportProtocolMgr::Transmit Confirmation() to signal, that it is done with this message.
channelIdIdentification of channel on which to transmit.

Rückgabewert

TypBeschreibung
None
Hinweise: This transmit API covers T_Data.req of ISO 14229-2[25] Figure 2.

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

Record
AUTOSAR/AP/record/SWS_DM_00327
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00327@rel:R25-11#707276ad
Content hash
707276ad
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00327
Status: valid/unmigrated Version: rel:R25-11#476973a2 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_00327@rel:R25-11#476973a2
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b90d03092026-09-30
  • R19-11rel:R19-11#000cf4a42026-10-14
  • R20-11rel:R20-11#34d3b7782026-10-14
  • R21-11rel:R21-11#34d3b7782026-10-14
  • R22-11rel:R22-11#24d7a0a92026-10-14
  • R23-11rel:R23-11#a439d8b92026-10-14
  • R24-11rel:R24-11#b3938b682026-10-14
  • R25-11rel:R25-11#476973a22026-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

函数 UdsTransportProtocolHandler [SWS_DM_09015] Upstream: RS_Diag_04147, RS_Diag_04168

explicit UdsTransportProtocolHandler (const UdsTransportProtocol HandlerID handlerId, UdsTransportProtocolMgr &transportProtocolMgr) noexcept;

Constructor of UdsTransportProtocolHandler.

Header-Datei#include "apext/diag/uds_transport/protocol_handler.h"
Scopeclass apext::diag::uds_transport::UdsTransportProtocolHandler
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
handlerIdThe handler ID used by DM to identify this handler. This is just a number/identification given by the DM core, when instantiating a UdsTransportProtocolHandler instance, to be able to distinguish it from other handler-plugins or built-in UdsTransportProtocolHandler implementation(s).
transportProtocolMgrReference to UdsTransportProtocolMgr owned by this DM, with which UdsTransportProtocolHandler instance shall interact.

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

Record
AUTOSAR/AP/record/SWS_DM_09015
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_09015@rel:R25-11#2d425eee
Content hash
2d425eee
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_09015
Status: valid/unmigrated Version: rel:R25-11#a9ed45a3 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_09015@rel:R25-11#a9ed45a3
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#caee19702026-09-30
  • R19-11rel:R19-11#986eae482026-10-14
  • R20-11rel:R20-11#b8cc07892026-10-14
  • R21-11rel:R21-11#809c79d52026-10-14
  • R22-11rel:R22-11#a76b2d802026-10-14
  • R23-11rel:R23-11#f807b8cb2026-10-14
  • R24-11rel:R24-11#949b6e802026-10-14
  • R25-11rel:R25-11#a9ed45a32026-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

函数 ~UdsTransportProtocolHandler [SWS_DM_09016] Upstream: RS_Diag_04147, RS_Diag_04168

virtual ~UdsTransportProtocolHandler () noexcept=default;

Destructor of UdsTransportProtocolHandler.

Header-Datei#include "apext/diag/uds_transport/protocol_handler.h"
Scopeclass apext::diag::uds_transport::UdsTransportProtocolHandler
Exception-Sicherheitexception safe

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

Record
AUTOSAR/AP/record/SWS_DM_09016
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_09016@rel:R25-11#82f086ad
Content hash
82f086ad
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_09016
Status: valid/unmigrated Version: rel:R25-11#84d4080f 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_09016@rel:R25-11#84d4080f
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#698b1dff2026-09-30
  • R19-11rel:R19-11#0e5d954f2026-10-14
  • R20-11rel:R20-11#a89192a82026-10-14
  • R21-11rel:R21-11#a89192a82026-10-14
  • R22-11rel:R22-11#e44075962026-10-14
  • R23-11rel:R23-11#6adb5bb12026-10-14
  • R24-11rel:R24-11#5417259f2026-10-14
  • R25-11rel:R25-11#84d4080f2026-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

枚举文档

枚举 InitializationResult [SWS_DM_09017] Upstream: RS_Diag_04147, RS_Diag_04168

enum class InitializationResult :                std::uint8_t {...};

Result of Initialize handler.

Header-Datei#include "apext/diag/uds_transport/protocol_handler.h"
Forwarding-Header#include "apext/diag/diag_fwd.h"
Scopeclass apext::diag::uds_transport::UdsTransportProtocolHandler
SymbolInitializationResult
Basistypstd::uint8_t

Werte

EnumeratorBeschreibung
kInitializeOk=0 Initialization ok.
kInitializeFailed=1 Initialization failed.

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

Record
AUTOSAR/AP/record/SWS_DM_09017
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_09017@rel:R25-11#c75fd7b9
Content hash
c75fd7b9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_09017
Status: valid/unmigrated Version: rel:R25-11#95d25f6f 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_09017@rel:R25-11#95d25f6f
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#6e3b57b42026-09-30
  • R19-11rel:R19-11#1a1547832026-10-14
  • R20-11rel:R20-11#b70ecaf32026-10-14
  • R21-11rel:R21-11#b70ecaf32026-10-14
  • R22-11rel:R22-11#b70ecaf32026-10-14
  • R23-11rel:R23-11#fa76aad12026-10-14
  • R24-11rel:R24-11#86bf32092026-10-14
  • R25-11rel:R25-11#95d25f6f2026-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

常量 / 变量文档

变量 transportprotocolManager [SWS_DM_09025] Upstream: RS_Diag_04147, RS_Diag_04168

UdsTransportProtocolMgr& transportprotocolManager;

The UdsTransportProtocolMgr used/provided by the DM.

Header-Datei#include "apext/diag/uds_transport/protocol_handler.h"
Scopeclass apext::diag::uds_transport::UdsTransportProtocolHandler
SymboltransportprotocolManager
TypUdsTransportProtocolMgr &
Sichtbarkeitprotected

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

Record
AUTOSAR/AP/record/SWS_DM_09025
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_09025@rel:R25-11#f6e186e5
Content hash
f6e186e5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_09025
Status: valid/unmigrated Version: rel:R25-11#8f6915d3 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_09025@rel:R25-11#8f6915d3
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#d765c6b02026-09-30
  • R23-11rel:R23-11#a4f7fad02026-10-14
  • R24-11rel:R24-11#3b6191932026-10-14
  • R25-11rel:R25-11#8f6915d32026-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