DEENESPTFRRUARHIKOZHNL

类 apext::diag::uds_transport::UdsTransportProtocolPeriodicHandler

[SWS_DM_01064] Upstream: RS_Diag_04215

class UdsTransportProtocolPeriodicHandler {...};

UdsTransportProtocolPeriodicHandler class to support 0x2A service from ISO.

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

用户指南人工智能生成

支持周期性传输 UDS 诊断消息以支持服务 0x2A。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: fabfa1b95261 来源 未决问题(3)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

支持周期性传输 UDS 诊断消息以支持服务 0x2A。

类 apext::diag::uds_transport::UdsTransportProtocolPeriodicHandler 提供了一个纯虚接口,用于通过传输特定的诊断通道处理周期性 UDS 服务 0x2A([SWS_DM_01064])。它允许诊断管理确定通道特定的有效负载与数量限制,并通过 PeriodicTransmit 有序传输多条 UDS 消息([SWS_DM_01067])。若发送某条消息失败,则该过程被中止并通过确认函数报告状态。由于所有方法均被规范为非线程安全,因此并发访问必须由调用方进行同步。

上下文

纯虚类 apext::diag::uds_transport::UdsTransportProtocolPeriodicHandler 代表了根据 UDS 服务 0x2A 支持周期性读取诊断数据的标准化接口([SWS_DM_01064]、AUTOSAR_AP_SWS_Diagnostics §C.3.1 “Class: UdsTransportProtocolPeriodicHandler”)。在 AUTOSAR Adaptive Platform 的诊断系统中,它将上层诊断管理与具体的网络及传输协议实现解耦。当诊断管理评估周期性传输的传入请求并组装相应的数据包时,处理程序负责通过具体连接实际传输这些周期性报文([SWS_DM_01067])。此时,调用方侧的诊断管理以及通过唯一 ChannelID 标识的相应通信通道充当交互伙伴([SWS_DM_01065]、[SWS_DM_01066])。

diag_periodic_kontext diag_server Diagnose-Server (UDS 0x2A) handler UdsTransportProtocolPeriodicHandler diag_server->handler 容量查询与发送请求 handler->diag_server PeriodicTransmit Confirmation transport Transportschicht (ChannelID) handler->transport Periodische Nachrichten

上下文图:UdsTransportProtocolPeriodicHandler 在诊断服务器与传输层之间的嵌入。来源:[SWS_DM_01064]、[SWS_DM_01067]、AUTOSAR_AP_SWS_Diagnostics §C.3.1 “Class: UdsTransportProtocolPeriodicHandler”。

生命周期

由于 UdsTransportProtocolPeriodicHandler 被定义为带有纯虚方法的抽象基接口,因此不能直接对其进行实例化([SWS_DM_01064])。具体处理程序实例的创建推测由传输特定的驱动程序组件(例如用于基于 DoIP 或 CAN 的协议)完成。 问题 Q-d0b3bf3b0c14dcf6 (未决)该实例的生命周期通常绑定到相应传输协议栈的可用性。为了在通信栈终止时进行干净的多态销毁,该类提供了一个虚析构函数 ~UdsTransportProtocolPeriodicHandler()([SWS_DM_02089]、AUTOSAR_AP_SWS_Diagnostics §C.3.1.1.1.1 “Destructor”)。

关于并发性,该类的所有成员函数均被明确标识为非线程安全(not thread-safe)([SWS_DM_01065]、[SWS_DM_01066]、[SWS_DM_01067]、[SWS_DM_02089])。因此,在通过多个线程并行访问或通过同一 ChannelID 同时发出请求时,调用方必须自行负责同步访问。

使用路径

针对服务 0x2A 执行周期性消息传输的典型流程分为以下步骤:

通过 UdsTransportProtocolPeriodicHandler 周期性传输Diagnose-Server (0x2A)UdsTransportProtocolPeriodicHandlerTransportschicht / KanalUse Case: Kanalparameter ermittelnGetMaxPayloadLength(channelId)maxPayloadLengthGetNumberOfPeriodicMessages(channelId)numberOfPeriodicMessagesUse Case: Periodischer SendevorgangPeriodicTransmit(channelId, messages)loop针对 messages 中的每条消息传输消息alt发生传输错误Sendeprozess stoppenPeriodicTransmit Confirmation(anzahlGesendet, messages)所有消息成功PeriodicTransmit Confirmation(gesamtAnzahl, messages)

时序图:容量查询、周期性发送与确认的典型流程。来源:[SWS_DM_01065]、[SWS_DM_01066]、[SWS_DM_01067]。

错误场景

在执行 PeriodicTransmit 期间,列表中的所有消息都按顺序传输。若单条消息的传输失败,则整个发送过程将立即中止([SWS_DM_01067])。在这种情况下,列表中后续的消息将不再发送。为了进行故障诊断并通知诊断管理,仍会触发确认调用 PeriodicTransmit Confirmation。该调用包含直至中止前成功传输的消息数量以及保持不变的包含 UDS 消息的完整向量([SWS_DM_01067])。由此,诊断管理可以准确查明是哪条消息导致了错误。

所有接口方法均被规范为 noexcept 且异常安全(exception safe)([SWS_DM_01065]、[SWS_DM_01066]、[SWS_DM_01067]、[SWS_DM_02089])。传输中的错误状态不会导致 C++ 异常,而是通过预定的确认机制确定性地报告。

本类指南基于 AUTOSAR Adaptive Platform Release R25-11 规范并自动生成。

成员图

类图

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

G napext__diag__uds_transport__UdsTransportProtocolPeriodicHandler54 UdsTransportProtocolPeriodicHandler + ~UdsTransportProtocolPeriodicHandler() + GetMaxPayloadLength() + GetNumberOfPeriodicMessages() + PeriodicTransmit()

详细视图

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

构造函数和析构函数

方法

Reports the maximum payload length supported for a single periodic transmission on the channel.

virtual std::size_t GetMaxPayloadLength (ChannelID channelId) const noexcept=0;

Reports the Transport Protocol implementation and connection specific number of periodic messages.

virtual std::size_t GetNumberOfPeriodicMessages (ChannelID channelId) const noexcept=0;

Sends all the messages in the list in the given order. If one message transmission fails, the send process is stopped and the PeriodicTransmit Confirmation is invoked with the number of sent messages and the same Vector with Uds Messages.

virtual void PeriodicTransmit (ChannelID channelId, ara::core::Vector< UdsMessageConstPtr > messages) noexcept=0;

方法文档

函数 GetMaxPayloadLength [SWS_DM_01066] Upstream: RS_Diag_04215

virtual std::size_t GetMaxPayloadLength (ChannelID channelId) const noexcept=0;

Reports the maximum payload length supported for a single periodic transmission on the channel.

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

Parameter (in)

ParameterBeschreibung
channelIdThe concrete connection for which the maximum payload length is reported.

Rückgabewert

TypBeschreibung
std::size_tSupported payload length

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

Record
AUTOSAR/AP/record/SWS_DM_01066
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01066@rel:R25-11#32b67b8b
Content hash
32b67b8b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01066
Status: valid/unmigrated Version: rel:R25-11#cac9e976 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_01066@rel:R25-11#cac9e976
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#1dc32cc82026-09-30
  • R20-11rel:R20-11#28bcd8642026-10-14
  • R21-11rel:R21-11#a933cb442026-10-14
  • R22-11rel:R22-11#7020a1832026-10-14
  • R23-11rel:R23-11#68f8be1a2026-10-14
  • R24-11rel:R24-11#22ba880f2026-10-14
  • R25-11rel:R25-11#cac9e9762026-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

函数 GetNumberOfPeriodicMessages [SWS_DM_01065] Upstream: RS_Diag_04215

virtual std::size_t GetNumberOfPeriodicMessages (ChannelID channelId) const noexcept=0;

Reports the Transport Protocol implementation and connection specific number of periodic messages.

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

Parameter (in)

ParameterBeschreibung
channelIdThe concrete connection to send over.

Rückgabewert

TypBeschreibung
std::size_tNumber of periodic messages.

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

Record
AUTOSAR/AP/record/SWS_DM_01065
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01065@rel:R25-11#3b38d4ff
Content hash
3b38d4ff
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01065
Status: valid/unmigrated Version: rel:R25-11#4725f9e5 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_01065@rel:R25-11#4725f9e5
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#f28623fc2026-09-30
  • R20-11rel:R20-11#bdc723c72026-10-14
  • R21-11rel:R21-11#bdc723c72026-10-14
  • R22-11rel:R22-11#81d54d3a2026-10-14
  • R23-11rel:R23-11#2c2c83b92026-10-14
  • R24-11rel:R24-11#1dee77bf2026-10-14
  • R25-11rel:R25-11#4725f9e52026-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

函数 PeriodicTransmit [SWS_DM_01067] Upstream: RS_Diag_04215

virtual void PeriodicTransmit (ChannelID channelId, ara::core::Vector< UdsMessageConstPtr > messages) noexcept=0;

Sends all the messages in the list in the given order. If one message transmission fails, the send process is stopped and the PeriodicTransmit Confirmation is invoked with the number of sent messages and the same Vector with Uds Messages.

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

接口 apext::diag::uds_transport::UdsTransportProtocolPeriodicHandler 的纯虚方法 PeriodicTransmit 用于通过现有的传输连接批量发送周期性 UDS 报文 [SWS_DM_01067]。它通常由 Diagnostic Management(DM)在符合 ISO 14229-1 的调度器类型 1 周期性传输框架下调用,其中配置的周期性 DID(PDID)会被周期性触发 AUTOSAR_AP_SWS_Diagnostics §Scheduler Periodic Transmission [SWS_DM_01060]。

参数与语义

  • channelId:进行传输的具体通信通道的标识符 [SWS_DM_01067]。
  • messages:紧接着依次传输的所有报文的有序列表(ara::core::Vector<UdsMessageConstPtr>)[SWS_DM_01067]。

该函数没有返回值,并保证声明为 noexcept 的异常安全性 [SWS_DM_01067]。报文严格按照传递的顺序进行处理。

错误处理与确认

如果发送单个报文失败,整个发送过程将立即中止 [SWS_DM_01067]。为了反馈结果,将调用 UdsTransportProtocolMgr 的确认函数 PeriodicTransmitConfirmation [SWS_DM_01069]。该回调将传递成功传输的报文数量以及相同的原始报文向量 [SWS_DM_01067]。

并发性

该方法被指定为 not thread-safe [SWS_DM_01067]。同一实例上的并行调用必须由调用方进行同步。

本文档由 AI 基于 AUTOSAR Adaptive R25-11 规范生成。

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

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

Parameter (in)

ParameterBeschreibung
channelIdThe concrete connection to send over
messagesOrdered list of messages to send at once

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_DM_01067
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01067@rel:R25-11#d7c5ea96
Content hash
d7c5ea96
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01067
Status: valid/unmigrated Version: rel:R25-11#59bd4882 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_01067@rel:R25-11#59bd4882
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#f35c930a2026-09-30
  • R20-11rel:R20-11#6586083c2026-10-14
  • R21-11rel:R21-11#5d391bcd2026-10-14
  • R22-11rel:R22-11#3723eafa2026-10-14
  • R23-11rel:R23-11#eb3e5ef12026-10-14
  • R24-11rel:R24-11#9533d1602026-10-14
  • R25-11rel:R25-11#59bd48822026-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

函数 ~UdsTransportProtocolPeriodicHandler [SWS_DM_02089] Upstream: RS_Diag_04215

virtual ~UdsTransportProtocolPeriodicHandler () noexcept;

Destructor.

Header-Datei#include "apext/diag/uds_transport/protocol_periodic_handler.h"
Scopeclass apext::diag::uds_transport::UdsTransportProtocolPeriodicHandler
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_02089
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02089@rel:R25-11#f6c3bac2
Content hash
f6c3bac2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02089
Status: valid/unmigrated Version: rel:R25-11#d455b1a3 Versionshistorie & Revisions (1 transition, 3 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_02089@rel:R25-11#d455b1a3
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#a6cfcd7a2026-09-30
  • R24-11rel:R24-11#b5a34f3b2026-10-14
  • R25-11rel:R25-11#d455b1a32026-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