函数 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.
使用
调用方法 [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" |
|---|---|
| Scope | class ara::diag::DownloadService |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | conditional whether the function has to be implemented thread safe or non-thread safe is determined by the ConcurrencyType given in the constructor |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| transferRequestParameterRecord | data to be transferred (copied/downloaded to the ECU/server) Lifetime: Valid until Promise is fulfilled or the processing is cancelled by the cancellationHandler. |
| metaInfo | MetaInfo of the request. |
| cancellationHandler | This 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
| Typ | Beschreibung |
|---|---|
| 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
| Fehlercode | Beschreibung |
|---|---|
| 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
Recorded Revisions (8):
- R25-11
rel:R25-11#805cae222026-09-30 - R19-11
rel:R19-11#266301b32026-10-14 - R20-11
rel:R20-11#0ebd14d12026-10-14 - R21-11
rel:R21-11#3484339d2026-10-14 - R22-11
rel:R22-11#f928e1d22026-10-14 - R23-11
rel:R23-11#83a2741f2026-10-14 - R24-11
rel:R24-11#0b81b5b92026-10-14 - R25-11
rel:R25-11#a75753442026-10-14 active
Requirement Text as-of this release:
Curation Decisions:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
|---|---|---|---|---|
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
gemini-3.8-flash-low· 2026-10-13 · 德文原文