DEENESPTFRRUARHIKOZHNL

类 ara::diag::DownloadService

[SWS_DM_00784] Upstream: RS_Diag_04033

class DownloadService {...};

Download service interface.

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

用户指南人工智能生成

用作用于处理带有数据传输和完成检查的 UDS 下载会话的接口。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 80e540367c50 来源 未决问题(2)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用作用于处理带有数据传输和完成检查的 UDS 下载会话的接口。

抽象类 ara::diag::DownloadService 用作在 AUTOSAR Adaptive Platform 上处理 UDS 下载过程的功能接口([SWS_DM_00787])。通过 Offer() 激活后,Diagnostic Management 将用于初始化、按块数据传输和完成检查的诊断请求转发给特定于应用程序的实现([SWS_DM_00792])。该实例既不可复制也不可移动,并且在创建时需要明确的端口分配以及并发行为的定义。所有传输例程均返回异步 Future,其中错误通过 Negative Response Code 发出信号。

上下文

抽象类 ara::diag::DownloadService 定义了用于在 AUTOSAR Adaptive Platform 中实现诊断下载功能服务的 C++ 功能接口([SWS_DM_00787])。它充当标准化的服务处理程序,Diagnostic Management (DM) 将符合 ISO 14229-1 的传入 UDS 请求转发给该处理程序([SWS_DM_00792])。对软件架构的绑定通过 DiagnosticDownloadInterface 的建模 PortPrototype 进行,该端口在运行时通过 ara::core::InstanceSpecifier 进行解析([SWS_DM_00787])。特定于应用程序的诊断组件从该接口继承,并实现具体的流程逻辑,用于在 ECU 中启动下载序列、按块传输数据以及有序完成下载序列([SWS_DM_00789]、[SWS_DM_00790]、[SWS_DM_00791])。

生命周期

实例化通过构造函数在指定 ara::core::InstanceSpecifier 和 ConcurrencyType 的情况下进行([SWS_DM_00787])。在此过程中,平台会验证模型完整性;错误的端口分配或在进程中多次使用同一标识符会导致运行时错误([SWS_DM_00787])。为确保与诊断端口之间的唯一映射,ara::diag::DownloadService 被设计为单实例:复制构造函数([SWS_DM_01649])和复制赋值运算符([SWS_DM_01647])以及移动构造函数([SWS_DM_01650])和移动赋值([SWS_DM_01648])均已被删除(delete)。

创建后,实例处于非活动状态。只有通过调用 Offer(),DM 对诊断请求的转发才会被启用([SWS_DM_00792])。使用 StopOffer() 可以再次停用此转发([SWS_DM_00793])。停用之后,如果要在应用程序流程中重新激活该服务,重新调用 Offer() 大概是允许的(推测)。 问题 Q-475cd8b8a6a86754 (未决)虚析构函数 ~DownloadService() 终止处理程序的生命周期([SWS_DM_00788])。

关于线程安全性,构造函数是线程安全的,而 Offer()、StopOffer() 和析构函数是非线程安全的([SWS_DM_00787]、[SWS_DM_00788]、[SWS_DM_00792]、[SWS_DM_00793])。派生的服务方法是否必须并发处理,取决于在调用构造函数时选择的 ConcurrencyType(kConcurrent 或 kNotConcurrent)([SWS_DM_00787]、[SWS_DM_00789])。

DownloadServiceLifecycle NichtInit 未初始化 Instanziiert 已实例化(未提供) NichtInit->Instanziiert DownloadService() Instanziiert->NichtInit ~DownloadService() Angeboten Angeboten (Weiterleitung aktiv) Instanziiert->Angeboten Offer() Angeboten->Instanziiert StopOffer()

状态图:DownloadService 实例从创建、提供状态到销毁的生命周期。来源:[SWS_DM_00787]、[SWS_DM_00792]、[SWS_DM_00793]、[SWS_DM_00788]

使用路径

常规下载过程遵循由初始化、数据传输和完成检查组成的三阶段序列:

  • 下载初始化:通过 Offer() 提供服务后([SWS_DM_00792]),DM 接收到用于下载初始化的 UDS 请求并调用 RequestDownload()([SWS_DM_00789])。应用程序验证 memoryAddressAndSize 中的 dataFormatIdentifier、addressAndLengthFormatIdentifier 以及目标地址和内存大小等参数([SWS_DM_00789])。验证成功后,返回的 ara::core::Future<void> 被肯定 resolve([SWS_DM_00789])。
  • 数据传输:对于后续的 TransferData 消息,DM 周期性地调用 DownloadData()([SWS_DM_00790])。段 transferRequestParameterRecord 包含有效负载数据,并在关联的 promise 兑现或处理被取消之前保持有效([SWS_DM_00790])。返回的 ara::core::Future<OperationOutput> 提供肯定响应数据,这些数据放置在 UDS 响应中的块计数器之后([SWS_DM_00790])。
  • 传输完成:数据传输完全完成后,DM 调用 RequestDownloadExit()([SWS_DM_00791])。应用程序处理来自 transferRequestParameterRecord 的制造商特定参数(例如最终校验和),并通过 ara::core::Future<OperationOutput> 异步确认该请求([SWS_DM_00791])。

有效负载数据块的处理通常可能发生在应用程序的异步后台线程中(推测),因为接口采用 ara::core::Future 工作,并且在每次调用时都会传递一个用于取消检查的 cancellationHandler([SWS_DM_00789]、[SWS_DM_00790]、[SWS_DM_00791])。 问题 Q-ba0fca00446cb679 (未决)在所有过程完成后,应用程序通过 StopOffer() 注销该服务([SWS_DM_00793])。

UDS 下载会话的典型流程DMDownloadServiceUse Case: DienstregistrierungOffer()Result<void> (Erfolg)Use Case: Download-InitialisierungRequestDownload(dataFormatIdentifier, addressAndLengthFormatIdentifier, memoryAddressAndSize, metaInfo, cancellationHandler)Future<void>(成功或 NRC)Use Case: 数据传输loop针对每个数据块(TransferData)DownloadData(transferRequestParameterRecord, metaInfo, cancellationHandler)Future<OperationOutput>(成功或 NRC)Use Case: 传输完成RequestDownloadExit(transferRequestParameterRecord, metaInfo, cancellationHandler)Future<OperationOutput>(成功或 NRC)Use Case: DienstabmeldungStopOffer()

时序图:Diagnostic Management (DM) 与 DownloadService 之间的典型 UDS 下载会话流程。来源:[SWS_DM_00789]、[SWS_DM_00790]、[SWS_DM_00791]、[SWS_DM_00792]、[SWS_DM_00793]

错误场景

错误可能发生在配置、服务注册以及当前协议运行期间:

  • 配置违规:如果模型中的 InstanceSpecifier 无法解析或未指向 PortPrototype,则会触发 InstanceSpecifierMappingIntegrityViolation([SWS_DM_00787])。缺少通过 DiagnosticServiceGenericMapping 进行的类型化会导致 PortInterfaceMappingViolation([SWS_DM_00787])。此外,缺少进程分配(ProcessMappingViolation)或重用已被占用的标识符(InstanceSpecifierAlreadyInUseViolation)会导致实例化错误([SWS_DM_00787])。
  • Offer 错误:如果在服务已处于活动提供状态时调用 Offer(),则该调用将在 ara::core::Result 中返回错误码 DiagOfferErrc::kAlreadyOffered([SWS_DM_00792])。
  • 诊断否定响应:如果在 RequestDownload()、DownloadData() 或 RequestDownloadExit() 中的处理失败(例如由于无效的地址范围或块错误),应用程序将使用符合 ISO 14229-1 的来自 DiagUdsNrcErrc 的错误码来结束相应的 ara::core::Future([SWS_DM_00789]、[SWS_DM_00790]、[SWS_DM_00791])。DM 随后生成相应的否定响应消息。
  • 取消与中断:通过对象 cancellationHandler,应用程序可以使用 IsCanceled() 检查当前诊断对话是否已中断,或通过 SetNotifier() 注册用于中断的回调([SWS_DM_00789]、[SWS_DM_00790]、[SWS_DM_00791])。在取消时,所传入缓冲区数据的有效性将提前失效([SWS_DM_00789]、[SWS_DM_00790]、[SWS_DM_00791])。

本指南由 AI 基于 AUTOSAR Adaptive Platform 规范 R25-11 生成。

成员图

类图

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

G nara__diag__DownloadService914 DownloadService + DownloadService() + operator=() + ~DownloadService() + DownloadData() + Offer() + RequestDownload() + RequestDownloadExit() + StopOffer()

详细视图

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

构造函数和析构函数

Class for an DownloadService.

重载 DownloadService 3
explicit DownloadService (const ara::core::InstanceSpecifier &specifier, ConcurrencyType concurrencyType) noexcept; SWS_DM_00787
DownloadService (DownloadService &)=delete; SWS_DM_01649
DownloadService (DownloadService &&) noexcept=delete; SWS_DM_01650

Destructor of class DownloadService.

virtual ~DownloadService () noexcept;

方法

Called for TransferData following a previous RequestDownload.

virtual ara::core::Future< OperationOutput > DownloadData (ara::core::Span< const std::uint8_t > transferRequestParameterRecord, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept=0;
Offer 函数

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

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

Called for RequestDownload.

virtual ara::core::Future< void > RequestDownload (std::uint8_t data FormatIdentifier, std::uint8_t addressAndLengthFormatIdentifier, ara::core::Span< const std::uint8_t > memoryAddressAndSize, const Meta Info &metaInfo, CancellationHandler cancellationHandler) noexcept=0;

Called for RequestTransferExit.

virtual ara::core::Future< OperationOutput > RequestDownloadExit (ara::core::Span< const std::uint8_t > transferRequestParameterRecord, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept=0;
StopOffer 函数

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

void StopOffer () noexcept;

运算符

operator= 函数 2

DownloadService shall be a single not assignable instance.

重载 = 2

嵌套类型

方法文档

函数 DownloadData [SWS_DM_00790] Upstream: RS_AP_00119, RS_AP_00138, RS_Diag_04033, RS_Diag_04170

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

Called for TransferData following a previous RequestDownload.

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

使用

调用方法 [SWS_DM_00790] 以在先前发起的下载请求后处理 UDS 服务 TransferData(0x36)的数据(AUTOSAR_AP_SWS_Diagnostics §8.14.1.1.3.1 “DownloadData”)。执行通过 ara::core::Future<OperationOutput> 异步进行。

作为输入,传入包含待传输数据的 ara::core::Span<const std::uint8_t>(transferRequestParameterRecord)、通过 MetaInfo 传入的上下文数据以及 CancellationHandler。有效载荷数据保持有效,直到 Promise 被满足或操作被取消。成功完成时,响应数据将存放在 OperationOutput.responseData 中,并放置在肯定响应消息中块序号的后面 [SWS_DM_00786]。

错误处理

若在处理期间发生错误,则 Promise 将使用来自 DiagUdsNrcErrc 的合适 ErrorCode(符合 ISO 14229-1 的 NRC)作为否定 UDS 响应结束 [SWS_DM_00790]。

并发性与限制

该函数声明为 noexcept。实现是否必须以线程安全的方式执行,有条件地由构造函数中传入的 ConcurrencyType 决定 [SWS_DM_00790]。通过 CancellationHandler 可以查询取消状态(IsCanceled)或通过 SetNotifier 注册通知回调。

相互作用

该操作在先前通过 RequestDownload(0x34)启动下载会话后,实现对 TransferData [SWS_DM_00137] 的处理 [SWS_DM_00869]。数据块的传输推测按照 UDS 会话顺序顺序进行。 问题 Q-fe18230bf7fcdf47 (未决)

本使用说明是基于 AUTOSAR 规范自动生成的。

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

Header-Datei#include "ara/diag/download.h"
Scopeclass ara::diag::DownloadService
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
transferRequestParameterRecorddata to be transferred (copied/downloaded to the ECU/server) 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, which either gets readied to OperationOutput (transfer ResponseParameterRecord for a positive response message) or readied with ErrorCode from DiagUdsNrcErrc (for an negative response message). Data in OperationOutput.responseData will be placed after the blockSequenceCounter as transferResponseParameterRecord in the positive response.

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_00790
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00790@rel:R25-11#c8457885
Content hash
c8457885
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00790
Status: valid/unmigrated Version: rel:R25-11#a7575344 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_00790@rel:R25-11#a7575344
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#805cae222026-09-30
  • R19-11rel:R19-11#266301b32026-10-14
  • R20-11rel:R20-11#0ebd14d12026-10-14
  • R21-11rel:R21-11#3484339d2026-10-14
  • R22-11rel:R22-11#f928e1d22026-10-14
  • R23-11rel:R23-11#83a2741f2026-10-14
  • R24-11rel:R24-11#0b81b5b92026-10-14
  • R25-11rel:R25-11#a75753442026-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

函数 DownloadService [SWS_DM_00787] Upstream: RS_AP_00137, RS_Diag_04033, RS_AP_00170, RS_AP_00171, RS_AP_00172, RS_AP_00173

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

Class for an DownloadService.

Header-Datei#include "ara/diag/download.h"
Scopeclass ara::diag::DownloadService
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 DiagnosticDownloadInterface needs to be typed 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 DiagnosticDownloadInterface
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_00787
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00787@rel:R25-11#92589fb0
Content hash
92589fb0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00787
Status: valid/unmigrated Version: rel:R25-11#8657e8dc 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_00787@rel:R25-11#8657e8dc
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#ffed83902026-09-30
  • R19-11rel:R19-11#798c93552026-10-14
  • R20-11rel:R20-11#8f95734d2026-10-14
  • R21-11rel:R21-11#8f95734d2026-10-14
  • R22-11rel:R22-11#36dbe1792026-10-14
  • R23-11rel:R23-11#94e653a32026-10-14
  • R24-11rel:R24-11#a6fa21eb2026-10-14
  • R25-11rel:R25-11#8657e8dc2026-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

函数 DownloadService [SWS_DM_01649] Upstream: RS_AP_00147

DownloadService (DownloadService &)=delete;

DownloadService shall be a single not copy-able instance.

Header-Datei#include "ara/diag/download.h"
Scopeclass ara::diag::DownloadService

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

Record
AUTOSAR/AP/record/SWS_DM_01649
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01649@rel:R25-11#a75aa524
Content hash
a75aa524
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01649
Status: valid/unmigrated Version: rel:R25-11#fb906636 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_01649@rel:R25-11#fb906636
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#cb7ef79e2026-09-30
  • R23-11rel:R23-11#582c174d2026-10-14
  • R24-11rel:R24-11#808329322026-10-14
  • R25-11rel:R25-11#fb9066362026-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

函数 DownloadService [SWS_DM_01650] Upstream: RS_AP_00147

DownloadService (DownloadService &&) noexcept=delete;

Move constructor of DownloadService.

Header-Datei#include "ara/diag/download.h"
Scopeclass ara::diag::DownloadService

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

Record
AUTOSAR/AP/record/SWS_DM_01650
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01650@rel:R25-11#17946380
Content hash
17946380
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01650
Status: valid/unmigrated Version: rel:R25-11#030ce002 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_01650@rel:R25-11#030ce002
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#88c77ae52026-09-30
  • R23-11rel:R23-11#fc491d3e2026-10-14
  • R24-11rel:R24-11#030ce0022026-10-14
  • R25-11rel:R25-11#030ce0022026-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

函数 Offer [SWS_DM_00792] Upstream: RS_AP_00119, RS_AP_00139, RS_Diag_04033

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

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

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

类 ara::diag::DownloadService 的方法 Offer 启用 Diagnostic Management Daemon(DM)向特定处理程序转发传入下载请求的功能 [SWS_DM_00792]。该调用为同步无参调用,且不引发 C++ 异常(noexcept)[SWS_DM_00792]。通常,该提供操作可能在处理应用程序的初始化阶段被调用,早于外部诊断请求到达之前。 问题 Q-0180c707edea0eec (未决)

该函数返回一个 ara::core::Result<void> [SWS_DM_00792]。若注册成功,则结果为空。若该服务此前已被提供给 DM,则操作失败并返回错误码 DiagOfferErrc::kAlreadyOffered,同时确保回滚语义 [SWS_DM_00792]。

关于并发性和安全性,适用以下条件:

  • 线程安全性:该函数被归类为非线程安全(not thread-safe)[SWS_DM_00792];在同一服务实例上的并行调用必须由应用端进行同步。
  • 异常安全性:该接口被指定为异常安全(exception safe)[SWS_DM_00792]。

通过 Offer 的模式符合 AUTOSAR Adaptive 中诊断服务的一致流程,其同样为 UploadService [SWS_DM_00802]、SecurityAccess [SWS_DM_00766] 或通用 UDS 服务 [SWS_DM_00619] 进行了类似定义。尽管与其他子系统同名,但这属于特定的诊断实现 AUTOSAR_AP_SWS_Diagnostics §7.3.4.1.2 “Monitors”。

本使用说明基于 AUTOSAR R25-11 规范自动生成。

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

Header-Datei#include "ara/diag/download.h"
Scopeclass ara::diag::DownloadService
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_00792
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00792@rel:R25-11#74a7d9f2
Content hash
74a7d9f2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00792
Status: valid/unmigrated Version: rel:R25-11#b34b20a3 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_00792@rel:R25-11#b34b20a3
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f711ba552026-09-30
  • R19-11rel:R19-11#f492a0482026-10-14
  • R20-11rel:R20-11#887c43c62026-10-14
  • R21-11rel:R21-11#053e9e6c2026-10-14
  • R22-11rel:R22-11#746b90042026-10-14
  • R23-11rel:R23-11#dc45d0452026-10-14
  • R24-11rel:R24-11#15a7b4052026-10-14
  • R25-11rel:R25-11#b34b20a32026-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

函数 RequestDownload [SWS_DM_00789] Upstream: RS_AP_00119, RS_AP_00138, RS_Diag_04033, RS_Diag_04170

virtual ara::core::Future< void > RequestDownload (std::uint8_t data FormatIdentifier, std::uint8_t addressAndLengthFormatIdentifier, ara::core::Span< const std::uint8_t > memoryAddressAndSize, const Meta Info &metaInfo, CancellationHandler cancellationHandler) noexcept=0;

Called for RequestDownload.

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

使用

类 ara::diag::DownloadService 的方法 RequestDownload 由 Diagnostic Server 实例调用,以根据 [SWS_DM_00128] 和 [SWS_DM_00867] 处理 UDS 服务 0x34 (RequestDownload)。它接收 dataFormatIdentifier、addressAndLengthFormatIdentifier、内存区域 memoryAddressAndSize、metaInfo 以及 cancellationHandler [SWS_DM_00789]。处理以异步方式进行并返回一个 ara::core::Future<void>;memoryAddressAndSize 中数据的有效性一直保持,直到关联的 Promise 被完成或操作被中止 [SWS_DM_00789]。

错误处理

在成功情况下,Future 将被设置为 void,从而产生肯定响应,随后将安全事件 SEV_UDS_REQUEST_UP_DOWNLOAD_SUCCESSFUL 报告给 IdsM [SWS_DM_02031]。如果请求失败,则必须使用来自 DiagUdsNrcErrc 的符合 ISO 14229-1 的合适错误码来结束该 Future [SWS_DM_00789]。

并发性与交互

该方法被指定为 exception safe,而线程安全性是有条件的,取决于在构造函数中传递的 ConcurrencyType [SWS_DM_00789]。可以通过 cancellationHandler.IsCanceled() 或通过 cancellationHandler.SetNotifier 注册的通知器处理会话的中止 [SWS_DM_00789]。在成功执行 RequestDownload 之后,通常紧接着通过 DownloadData 传输数据 [SWS_DM_00790]。Interpretation:实现应用程序可能会在完成 Future 之前验证内存地址和大小的有效性,正如内存相关 UDS 服务的上下文所建议的那样 AUTOSAR_AP_SWS_Diagnostics §7.3.2.8.2 “Common service processing items”。 问题 Q-728d2e5f7d09e605 (未决)

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

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

Header-Datei#include "ara/diag/download.h"
Scopeclass ara::diag::DownloadService
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
dataFormatIdentifierUDS dataFormat Identifier
addressAndLengthFormatIdentifierUDS addressAndLengthFormatIdentifier
memoryAddressAndSizememoryAddress and memorySize part of the request. 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< void >A Future, which either gets readied to void (for a positive response message) or readied with ErrorCode from DiagUdsNrcErrc (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_00789
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00789@rel:R25-11#9703295d
Content hash
9703295d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00789
Status: valid/unmigrated Version: rel:R25-11#ffbdbbd3 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_00789@rel:R25-11#ffbdbbd3
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#a74a1c182026-09-30
  • R19-11rel:R19-11#f998977a2026-10-14
  • R20-11rel:R20-11#bc61ad7e2026-10-14
  • R21-11rel:R21-11#6fc3d75b2026-10-14
  • R22-11rel:R22-11#21fafce42026-10-14
  • R23-11rel:R23-11#c991e0422026-10-14
  • R24-11rel:R24-11#b09d04162026-10-14
  • R25-11rel:R25-11#ffbdbbd32026-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

函数 RequestDownloadExit [SWS_DM_00791] Upstream: RS_AP_00119, RS_AP_00138, RS_Diag_04033, RS_Diag_04170

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

Called for RequestTransferExit.

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

类 ara::diag::DownloadService 的方法 RequestDownloadExit 由 Diagnostic Server 实例调用,以在下载序列中处理 UDS 服务 RequestTransferExit (0x37)([SWS_DM_00141],[SWS_DM_00871],SWS Diagnostics §7.3.2.8.19 “Service 0x37 – RequestTransferExit”)。

调用时传递以下参数([SWS_DM_00791]):

  • transferRequestParameterRecord:包含车辆制造商特定参数以支持数据传输的 ara::core::Span<const std::uint8_t>。该内存的有效性一直保持,直到关联的 Promise 被完成或处理被中止。
  • metaInfo:诊断请求的元信息。
  • cancellationHandler:用于使用 cancellationHandler.IsCanceled() 进行状态查询,以及通过 cancellationHandler.SetNotifier() 注册通知函数。

该函数以异步方式工作并返回一个 ara::core::Future<OperationOutput>([SWS_DM_00791])。在成功情况下,Future 以 OperationOutput 完成;OperationOutput::responseData 中包含的数据([SWS_DM_00786])在服务 ID 之后作为 transferResponseParameterRecord 嵌入到肯定响应中([SWS_DM_00791])。

如果发生错误,必须使用来自 DiagUdsNrcErrc 的合适错误码(符合 ISO 14229-1 的否定响应码)来结束该 Future([SWS_DM_00791])。该接口被指定为 noexcept;其线程安全性是有条件的,并在对象创建时通过 ConcurrencyType 确定([SWS_DM_00791])。

本文本由 AI 生成,用于文档记录。

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

Header-Datei#include "ara/diag/download.h"
Scopeclass ara::diag::DownloadService
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
transferRequestParameterRecordThis parameter record contains parameter(s), which are required by the server to support the transfer of data. Format and length of this parameter(s) are vehicle manufacturer specific. 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, which either gets readied to OperationOutput (transfer ResponseParameterRecord for a positive response message) or readied with ErrorCode from DiagUdsNrcErrc (for an negative response message). Data in OperationOutput.responseData will be placed after SID as transferResponseParameterRecord in the positive response.

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_00791
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00791@rel:R25-11#2c7f3dba
Content hash
2c7f3dba
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00791
Status: valid/unmigrated Version: rel:R25-11#21344e94 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_00791@rel:R25-11#21344e94
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#3e342a362026-09-30
  • R19-11rel:R19-11#8e6663042026-10-14
  • R20-11rel:R20-11#54678f6b2026-10-14
  • R21-11rel:R21-11#2a0ccfbc2026-10-14
  • R22-11rel:R22-11#1e8b923b2026-10-14
  • R23-11rel:R23-11#c81ea4142026-10-14
  • R24-11rel:R24-11#6f5df7482026-10-14
  • R25-11rel:R25-11#21344e942026-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

函数 StopOffer [SWS_DM_00793] Upstream: RS_Diag_04033

void StopOffer () noexcept;

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

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

用法与调用上下文

类 ara::diag::DownloadService(AUTOSAR_AP_SWS_Diagnostics §8.14.1.1.3.5 “StopOffer”、[SWS_DM_00793])的函数 StopOffer 用于停用 Diagnostic Management (DM) 向服务实例转发传入诊断请求消息的功能。该同步接口的签名为 void StopOffer () noexcept;,不接受任何参数且不返回值([SWS_DM_00793])。通过头文件 #include "ara/diag/download.h"([SWS_DM_00793])进行调用。

错误处理与并发

在错误处理方面,该方法被声明为 noexcept 并被指定为异常安全(exception safe);既不抛出异常也不生成错误代码([SWS_DM_00793])。在并发方面,StopOffer 为非线程安全(not thread-safe)([SWS_DM_00793])。因此,来自多个线程对同一实例的同时调用必须在应用程序端进行同步。

在诊断系统中的相互作用

通过 StopOffer 停用服务遵循 AUTOSAR Adaptive 内部的统一模式:对于上传服务,存在功能对应的 ara::diag::UploadService::StopOffer([SWS_DM_00803]),以及针对 CommunicationControl([SWS_DM_00810])、Authentication([SWS_DM_01131])和 EcuResetRequest([SWS_DM_01017])的类似方法。命名借鉴了平台的惯例,但代表了独立的诊断实现(AUTOSAR_AP_SWS_Diagnostics §7.3.4.1.2 “Monitors”)。解释:在调用 StopOffer 之后,DM 大概率不再转发或丢弃传入的 UDS 下载请求,直到再次提供该服务。 问题 Q-a45cc70b6ae09431 (未决)

本使用说明基于 AUTOSAR 规范 R25-11 自动生成。

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

Header-Datei#include "ara/diag/download.h"
Scopeclass ara::diag::DownloadService
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_00793
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00793@rel:R25-11#af1e9944
Content hash
af1e9944
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00793
Status: valid/unmigrated Version: rel:R25-11#1636e4f0 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_00793@rel:R25-11#1636e4f0
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#2738b0bc2026-09-30
  • R19-11rel:R19-11#bc39bfa02026-10-14
  • R20-11rel:R20-11#268f9e722026-10-14
  • R21-11rel:R21-11#ac0a03612026-10-14
  • R22-11rel:R22-11#7903b38f2026-10-14
  • R23-11rel:R23-11#27bfc5a42026-10-14
  • R24-11rel:R24-11#93e117af2026-10-14
  • R25-11rel:R25-11#1636e4f02026-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

函数 operator= [SWS_DM_01647] Upstream: RS_AP_00147

DownloadService & operator= (DownloadService &)=delete;

DownloadService shall be a single not assignable instance.

Header-Datei#include "ara/diag/download.h"
Scopeclass ara::diag::DownloadService

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

Record
AUTOSAR/AP/record/SWS_DM_01647
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01647@rel:R25-11#018ee858
Content hash
018ee858
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01647
Status: valid/unmigrated Version: rel:R25-11#304074df 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_01647@rel:R25-11#304074df
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#2a6e089d2026-09-30
  • R23-11rel:R23-11#e243c4cf2026-10-14
  • R24-11rel:R24-11#ed6b07a12026-10-14
  • R25-11rel:R25-11#304074df2026-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

函数 operator= [SWS_DM_01648] Upstream: RS_AP_00147

DownloadService & operator= (DownloadService &&)=delete;

Move assignment operator of DownloadService.

Header-Datei#include "ara/diag/download.h"
Scopeclass ara::diag::DownloadService

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

Record
AUTOSAR/AP/record/SWS_DM_01648
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01648@rel:R25-11#33c34571
Content hash
33c34571
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01648
Status: valid/unmigrated Version: rel:R25-11#490d7891 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_01648@rel:R25-11#490d7891
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#8eefcc8a2026-09-30
  • R23-11rel:R23-11#65f181ef2026-10-14
  • R24-11rel:R24-11#490d78912026-10-14
  • R25-11rel:R25-11#490d78912026-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

函数 ~DownloadService [SWS_DM_00788] Upstream: RS_AP_00134, RS_Diag_04033

virtual ~DownloadService () noexcept;

Destructor of class DownloadService.

Header-Datei#include "ara/diag/download.h"
Scopeclass ara::diag::DownloadService
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_00788
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00788@rel:R25-11#dbed87af
Content hash
dbed87af
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00788
Status: valid/unmigrated Version: rel:R25-11#45cce01a 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_00788@rel:R25-11#45cce01a
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b5d610242026-09-30
  • R19-11rel:R19-11#47e107992026-10-14
  • R20-11rel:R20-11#af90c1862026-10-14
  • R21-11rel:R21-11#af90c1862026-10-14
  • R22-11rel:R22-11#987c3d212026-10-14
  • R23-11rel:R23-11#acfe51ff2026-10-14
  • R24-11rel:R24-11#5b94246d2026-10-14
  • R25-11rel:R25-11#45cce01a2026-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