DEENESPTFRRUARHIKOZHNL

类 ara::diag::UploadService

[SWS_DM_00794] Upstream: RS_Diag_04033

class UploadService {...};

Upload service interface.

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

用户指南人工智能生成

允许应用程序向 Diagnostic Management 提供用于 UDS 上传的 ECU 数据。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: e2e1ae703412 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

允许应用程序向 Diagnostic Management 提供用于 UDS 上传的 ECU 数据。

类 ara::diag::UploadService 用作应用侧服务接口,以根据 UDS [SWS_DM_00797] 为外部诊断上传提供 ECU 数据。通过 Offer() 成功激活后,处理程序异步处理关于上传启动、数据块传输和传输终止的连续请求 [SWS_DM_00802]。该不可复制的服务实例在此既支持分块数据传递,也支持通过取消处理程序提前中止。处理程序通过异步响应 Future 内的否定 UDS 返回码确认有错误的请求。

上下文

类 ara::diag::UploadService 定义了 AUTOSAR Adaptive Platform 内用于诊断上传操作的核心服务接口 [SWS_DM_00797]。它充当应用侧处理程序,用于根据诊断标准 UDS(ISO 14229-1)向外部测试设备读取并提供车内数据 [SWS_DM_00799]。

在系统架构中,ara::diag::UploadService 基本上与两个伙伴交互:外部诊断客户端(测试仪)和平台侧诊断守护进程 Diagnostic Management(DM)[SWS_DM_00799], [SWS_DM_00802]。DM 在协议层接收传入的 UDS 服务请求(如 RequestUpload、TransferData 和 RequestTransferExit),对它们进行验证,并将业务查询转发给应用程序的已注册处理程序 [SWS_DM_00799], [SWS_DM_00800], [SWS_DM_00801]。应用程序实例实现该接口的虚方法,以便从内存中读取并返回实际的数据块 [SWS_DM_00800]。

uploadservice_kontext client Diagnose-Client (Tester) dm Diagnostic Management (DM) client->dm UDS RequestUpload / TransferData / RequestTransferExit dm->client UDS Response / NRC app ara::diag::UploadService (Applikation) dm->app RequestUpload() / UploadData() / RequestUploadExit() app->dm Offer() / StopOffer() app->dm Future-Ergebnisse / OperationOutput

上下文图:上传服务在诊断客户端、Diagnostic Management 与应用程序处理程序之间的集成。来源:[SWS_DM_00797], [SWS_DM_00799], [SWS_DM_00802]。

生命周期

ara::diag::UploadService 的实例通过指定 ara::core::InstanceSpecifier 以及并发行为 concurrencyType 进行构造 [SWS_DM_00797]。该说明符将该实例与类型为 DiagnosticUploadInterface 的建模端口原型链接 [SWS_DM_00797]。该构造函数被指定为具有异常安全性和线程安全性 [SWS_DM_00797]。为确保服务实例的唯一分配,复制与移动构造函数以及赋值运算符均被显式删除 [SWS_DM_01671], [SWS_DM_01672], [SWS_DM_01673], [SWS_DM_01674]。

实例化后,服务最初处于非活动状态;DM 尚不转发任何请求。只有通过显式调用 Offer() 才会激活转发 [SWS_DM_00802]。通过 StopOffer() 可以随时再次禁止请求转发 [SWS_DM_00803]。Offer() 和 StopOffer() 均被定义为非线程安全,从多个线程调用时需要外部同步 [SWS_DM_00802], [SWS_DM_00803]。

销毁通过虚析构函数 ~UploadService() 进行,该函数同样不是线程安全的 [SWS_DM_00798]。因此,在释放对象之前,应通过 StopOffer() 规范注销服务 [SWS_DM_00803]。虚拟处理方法在内部是否必须以线程安全方式执行,取决于在构造时配置的 ConcurrencyType(kConcurrent 或 kNotConcurrent)[SWS_DM_00797], [SWS_DM_00799]。

使用路径

上传会话的常规流程按多个连续步骤进行:

  1. 服务提供:应用程序初始化处理程序并调用 Offer(),以接收来自 DM 的传入诊断请求 [SWS_DM_00802]。
  2. 请求上传(RequestUpload):当用于启动上传的 UDS 请求到达时,DM 调用方法 RequestUpload() [SWS_DM_00799]。处理程序检查数据格式、寻址格式以及内存地址和长度(memoryAddressAndSize)。传入的存储区域一直保持有效,直到返回的 ara::core::Future<void> 被兑现或该过程被中止 [SWS_DM_00799]。
  3. 传输数据块 (UploadData):成功初始化后,测试仪发送 UDS TransferData 请求。DM 随后会重复调用 UploadData() [SWS_DM_00800]。应用程序读取所请求的数据块并通过 ara::core::Future<OperationOutput> 将其返回;OperationOutput.responseData 中的字节在肯定响应中放置在块计数器之后 [SWS_DM_00800]。Interpretation:缓冲区限制 numBytesToReturn 在此可能用作 DM 内部缓冲的最大分块大小,以便通过连续调用对较大的内存区域进行顺序分段。 问题 Q-6ede2e3041d99294 (未决)
  4. 终止传输 (RequestUploadExit):在结束时,DM 调用 RequestUploadExit() 并传入 transferRequestParameterRecord 中的厂商自定义传输参数 [SWS_DM_00801]。处理程序验证终止操作,并在 OperationOutput 中返回可选的返回参数 [SWS_DM_00801]。
  5. 停用服务:完成所有上传事务后或在关机时,应用程序使用 StopOffer() 终止转发 [SWS_DM_00803]。

在整个数据传输期间,处理程序都会收到一个 CancellationHandler 对象。如果测试仪提前中断对话,可以通过该对象使用 IsCanceled() 主动查询取消状态,或者通过 SetNotifier() 注册回调 [SWS_DM_00799]、[SWS_DM_00800]、[SWS_DM_00801]。

诊断上传流程DMUploadServiceOffer()RequestUpload(dataFormat, addressAndLength, memoryAddressAndSize, metaInfo, cancelHandler)Future<void> 已完成loop只要还存在其他数据块UploadData(numBytesToReturn, metaInfo, cancelHandler)Future<OperationOutput> (responseData)RequestUploadExit(transferRequestParamRecord, metaInfo, cancelHandler)Future<OperationOutput>StopOffer()

时序图:上传事务期间 Diagnostic Management 与 UploadService 之间的典型交互序列。来源:[SWS_DM_00799]、[SWS_DM_00800]、[SWS_DM_00801]、[SWS_DM_00802]、[SWS_DM_00803]。

错误场景

错误状态可能在构造期间、激活期间以及实际数据处理期间发生:

  • 模型与配置违规:如果配置与 ARXML 模型不一致,则在构造函数调用时会发生违规 [SWS_DM_00797]。其中包括 InstanceSpecifierMappingIntegrityViolation(说明符未引用 PortPrototype)、PortInterfaceMappingViolation(缺少通过 DiagnosticServiceGenericMapping 的链接)、ProcessMappingViolation(与建模的进程不匹配)以及 InstanceSpecifierAlreadyInUseViolation(在同一进程内多次使用相同说明符)[SWS_DM_00797]。
  • 重复激活服务:如果在服务已提供时调用 Offer(),则该调用失败并在 ara::core::Result<void> 中返回错误代码 DiagOfferErrc::kAlreadyOffered [SWS_DM_00802]。
  • UDS 错误响应 (Negative Response):如果处理程序在业务上无法处理 RequestUpload()、UploadData() 或 RequestUploadExit() 中的请求(例如非法的内存地址、格式错误或无效的序列计数器),则它通过在返回的 Future 中提供来自 DiagUdsNrcErrc 的错误代码来发出信号 [SWS_DM_00799]、[SWS_DM_00800]、[SWS_DM_00801]。DM 随后向外部测试仪生成符合标准的 UDS 否定响应 (NRC) [SWS_DM_00799]。

本指南仅基于 AUTOSAR Adaptive Platform Release R25-11 规范。

成员图

类图

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

G nara__diag__UploadService152 UploadService + UploadService() + operator=() + ~UploadService() + Offer() + RequestUpload() + RequestUploadExit() + StopOffer() + UploadData()

详细视图

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

构造函数和析构函数

UploadService 函数 3

Class for an UploadService.

重载 UploadService 3
explicit UploadService (const ara::core::InstanceSpecifier &specifier, ConcurrencyType concurrencyType) noexcept; SWS_DM_00797
UploadService (UploadService &)=delete; SWS_DM_01673
UploadService (UploadService &&) noexcept=delete; SWS_DM_01674

Destructor of class UploadService.

virtual ~UploadService () noexcept;

方法

Offer 函数

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

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

Called for RequestUpload.

virtual ara::core::Future< void > RequestUpload (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 > RequestUploadExit (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;
UploadData 函数

Called for TransferData following a previous RequestUpload.

virtual ara::core::Future< OperationOutput > UploadData (std::size_t numBytesToReturn, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept=0;

运算符

operator= 函数 2

UploadService shall be a single not assignable instance.

重载 = 2
UploadService & operator= (UploadService &)=delete; SWS_DM_01671
UploadService & operator= (UploadService &&)=delete; SWS_DM_01672

嵌套类型

方法文档

函数 Offer [SWS_DM_00802] 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 · 温度: 不可控 · 提示词: dce89cbe34ef 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用法与语义

类 ara::diag::UploadService([SWS_DM_00802])的同步成员函数 Offer 激活由 Diagnostic Management(DM)向已注册处理程序转发诊断请求的功能。该调用不接受任何参数,并声明了异常安全性 noexcept([SWS_DM_00802])。返回类型为 ara::core::Result<void>,用于表示成功提供或发生的错误([SWS_DM_00802])。

错误处理与并发

  • 错误码:如果该服务先前已被提供,则执行失败并返回错误码 DiagOfferErrc::kAlreadyOffered([SWS_DM_00802]);此时适用回滚语义。
  • 线程安全性:该函数被显式指定为 not thread-safe([SWS_DM_00802])。同一服务实例上的并发调用必须由应用端进行同步。

诊断子系统中的交互

该操作融入了自适应诊断处理程序的一致提供模式,例如用于 DownloadService([SWS_DM_00792])或 GenericUDSService([SWS_DM_00619])等情况。只要尚未完成提供,DM 就不会将传入的诊断消息转发给处理程序(参见 [SWS_DM_01525] 中的类似行为)。解释:Offer 的调用通常可能在应用程序的初始化阶段进行,早于接收诊断流量之前。 问题 Q-aba091d233b5e45b (未决)

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

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

Header-Datei#include "ara/diag/upload.h"
Scopeclass ara::diag::UploadService
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_00802
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00802@rel:R25-11#ce2eb3d2
Content hash
ce2eb3d2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00802
Status: valid/unmigrated Version: rel:R25-11#bad97a1d 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_00802@rel:R25-11#bad97a1d
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#786c252c2026-09-30
  • R19-11rel:R19-11#3f54e3d62026-10-14
  • R20-11rel:R20-11#0298249e2026-10-14
  • R21-11rel:R21-11#13db1e2f2026-10-14
  • R22-11rel:R22-11#c89046b12026-10-14
  • R23-11rel:R23-11#5c26975d2026-10-14
  • R24-11rel:R24-11#27f9bbaf2026-10-14
  • R25-11rel:R25-11#bad97a1d2026-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

函数 RequestUpload [SWS_DM_00799] Upstream: RS_AP_00119, RS_AP_00138, RS_Diag_04033, RS_Diag_04170

virtual ara::core::Future< void > RequestUpload (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 RequestUpload.

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

使用

服务类 ara::diag::UploadService 的方法 RequestUpload 由 Diagnostic Server 调用,以根据 ISO 14229-1 处理 UDS 服务 0x35(RequestUpload)的传入诊断请求 [SWS_DM_00134] [SWS_DM_00868] AUTOSAR_AP_SWS_Diagnostics §7.3.2.8.17 “Service 0x35 – RequestUpload”。该函数接收以下参数 [SWS_DM_00799]:

  • dataFormatIdentifier 与 addressAndLengthFormatIdentifier:用于数据、内存地址和长度信息的 UDS 格式标识符。
  • memoryAddressAndSize:包含内存地址和大小的 ara::core::Span,其有效性保证持续至 promise 履行或处理被取消。
  • metaInfo:诊断请求的元信息。
  • cancellationHandler:用于通过 cancellationHandler.IsCanceled 查询取消状态,并通过 cancellationHandler.SetNotifier 注册通知函数。

处理以异步方式进行,返回类型为 ara::core::Future<void> [SWS_DM_00799]。

错误处理

发生错误时,ara::core::Future 会通过 DiagUdsNrcErrc 提供符合 ISO 14229-1 的相应 UDS NRC 错误码,随后返回否定响应 [SWS_DM_00799]。在肯定响应的情况下,Diagnostic Manager 会向 IdsM [SWS_DM_02031] 报告安全事件 SEV_UDS_REQUEST_UP_DOWNLOAD_SUCCESSFUL,在否定响应的情况下则报告事件 SEV_UDS_REQUEST_UP_DOWNLOAD_FAILED [SWS_DM_02033]。

并发性与交互

该函数声明为 noexcept 且是异常安全的。该方法是否必须以线程安全的方式实现是有条件的,由构造函数中传递的 ConcurrencyType 决定 [SWS_DM_00799]。

在成功确认 RequestUpload 之后,实际的上传数据传输将在后续 UDS 服务 0x36(TransferData)请求中通过 UploadData 继续进行 [SWS_DM_00800] [SWS_DM_01096]。

本使用说明由人工智能基于 AUTOSAR Adaptive R25-11 规范生成。

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

Header-Datei#include "ara/diag/upload.h"
Scopeclass ara::diag::UploadService
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 Result with either void (for a positive response message) or an UDS NRC value (for a 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_00799
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00799@rel:R25-11#235cacbf
Content hash
235cacbf
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00799
Status: valid/unmigrated Version: rel:R25-11#0b83de5a 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_00799@rel:R25-11#0b83de5a
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#8fbf8bca2026-09-30
  • R19-11rel:R19-11#33d5ee1b2026-10-14
  • R20-11rel:R20-11#d252b6b12026-10-14
  • R21-11rel:R21-11#ef0d46112026-10-14
  • R22-11rel:R22-11#2327d0512026-10-14
  • R23-11rel:R23-11#e790ec332026-10-14
  • R24-11rel:R24-11#32605e462026-10-14
  • R25-11rel:R25-11#0b83de5a2026-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

函数 RequestUploadExit [SWS_DM_00801] Upstream: RS_AP_00119, RS_AP_00138, RS_Diag_04033, RS_Diag_04170

virtual ara::core::Future< OperationOutput > RequestUploadExit (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 · 温度: 不可控 · 提示词: c83d03772031 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用法与调用上下文

当需要处理通过 UDS 服务 RequestTransferExit(0x37)终止数据传输时,类 ara::diag::UploadService(SWS Diagnostics §8.27.1.1.3.3 “RequestUploadExit”)的方法 RequestUploadExit 会由诊断服务器实例调用 [SWS_DM_00141],[SWS_DM_00801]。

该接口接收以下参数 [SWS_DM_00801]:

  • transferRequestParameterRecord:包含用于支持传输的厂商特定参数,格式为 ara::core::Span<const std::uint8_t>。数据保持有效,直到关联的 promise 履行或处理被取消。Interpretation:这些参数的评估可能主要用于在完成上传时执行厂商特定的验证。 问题 Q-d3989837f58761d7 (未决)
  • metaInfo:传递当前诊断请求的元信息。
  • cancellationHandler:允许通过 cancellationHandler.IsCanceled() 查询取消状态,或通过 cancellationHandler.SetNotifier() 注册通知回调。

返回值与错误处理

执行以异步方式进行,并返回 ara::core::Future<OperationOutput> [SWS_DM_00801]。在成功的情况下,future 会以 OperationOutput 的实例得到履行。其中由 responseData 传递的数据将在服务 ID 之后作为 transferResponseParameterRecord 插入到肯定诊断响应中 [SWS_DM_00796],[SWS_DM_00801]。在出错的情况下,需使用来自 DiagUdsNrcErrc 的符合 ISO 14229-1 的相应错误码来完成该 future [SWS_DM_00801]。

并发性与限制

该方法指定为 noexcept [SWS_DM_00801]。对线程安全性的要求是有条件的:函数是否必须以线程安全的方式执行,由 UploadService 的构造函数中传递的 ConcurrencyType 决定 [SWS_DM_00801]。

本使用说明基于 AUTOSAR AP SWS Diagnostics R25-11 中的规范。

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

Header-Datei#include "ara/diag/upload.h"
Scopeclass ara::diag::UploadService
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_00801
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00801@rel:R25-11#42585484
Content hash
42585484
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00801
Status: valid/unmigrated Version: rel:R25-11#f77c400c 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_00801@rel:R25-11#f77c400c
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f103b5002026-09-30
  • R19-11rel:R19-11#6d772d5c2026-10-14
  • R20-11rel:R20-11#c9d5fd842026-10-14
  • R21-11rel:R21-11#6b59a7682026-10-14
  • R22-11rel:R22-11#1e7bc3b72026-10-14
  • R23-11rel:R23-11#7014682b2026-10-14
  • R24-11rel:R24-11#883ba93a2026-10-14
  • R25-11rel:R25-11#f77c400c2026-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_00803] 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 · 温度: 不可控 · 提示词: e7cdc33ba5c7 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

类 ara::diag::UploadService 的方法 StopOffer()([SWS_DM_00803],在 #include "ara/diag/upload.h" 中声明)禁用从 Diagnostic Management (DM) 向上传服务转发传入诊断请求。该函数具有签名 void StopOffer() noexcept;,不接收任何参数,且不返回值。该调用同步进行并立即终止请求的转发。

错误处理

该操作被指定为异常安全(exception safe),并使用标识符 noexcept 声明 [SWS_DM_00803]。因此不会引发 C++ 异常。此调用未规定特定的错误代码或错误消息。

并发性与限制

根据规范,StopOffer() 不是线程安全的(not thread-safe)[SWS_DM_00803]。因此,调用的 Adaptive Application 必须自行确保不会在没有外部同步的情况下从多个线程并发调用同一实例。关于调用顺序,该方法通常可能仅在先前提供该服务之后被调用,以便以受控方式再次注销该服务。 问题 Q-90ce659f307f54ca (未决)

相互作用

该接口符合 AUTOSAR Adaptive 诊断的统一提供模式,该模式为服务实例提供了单独的激活与停用方法 AUTOSAR_AP_SWS_Diagnostics §7.3.4.1.2 “Monitors”。该方法构成了 ara::diag::DownloadService::StopOffer([SWS_DM_00793])的功能对应部分,后者遵循相同的上游要求。类似的停用功能还存在于其他诊断组件中,例如通用例程([SWS_DM_00558])、UDS 服务([SWS_DM_00620])以及认证接口([SWS_DM_01131])。

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

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

Header-Datei#include "ara/diag/upload.h"
Scopeclass ara::diag::UploadService
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_00803
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00803@rel:R25-11#af86e13f
Content hash
af86e13f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00803
Status: valid/unmigrated Version: rel:R25-11#8b63b743 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_00803@rel:R25-11#8b63b743
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#dd707d232026-09-30
  • R19-11rel:R19-11#68387f162026-10-14
  • R20-11rel:R20-11#0faa733b2026-10-14
  • R21-11rel:R21-11#3a7bf50e2026-10-14
  • R22-11rel:R22-11#413e742c2026-10-14
  • R23-11rel:R23-11#d3704b4a2026-10-14
  • R24-11rel:R24-11#376798192026-10-14
  • R25-11rel:R25-11#8b63b7432026-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

函数 UploadData [SWS_DM_00800] Upstream: RS_AP_00119, RS_AP_00138, RS_Diag_04033, RS_Diag_04170

virtual ara::core::Future< OperationOutput > UploadData (std::size_t numBytesToReturn, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept=0;

Called for TransferData following a previous RequestUpload.

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

用法与调用上下文

接口 ara::diag::UploadService 的纯虚方法 UploadData 由 Diagnostic Server 调用,以便在先前通过 RequestUpload(0x35)初始化后处理 UDS 服务 TransferData(0x36)([SWS_DM_00800]、[SWS_DM_01096]、AUTOSAR_AP_SWS_Diagnostics §7.3.2.8 “TransferData (0x36) upload processing”)。

  • numBytesToReturn:指定 Diagnostic Manager(DM)因其内部缓冲区大小针对该数据块最多可容纳的字节数([SWS_DM_00800])。解读:应用程序应严格将块大小限制在此阈值内。 问题 Q-89de95e70e1e6223 (未决)
  • metaInfo:提供传入诊断请求的元信息([SWS_DM_00800])。
  • cancellationHandler:用于通过 cancellationHandler.IsCanceled() 监控正在进行的会话,并在发生取消时通过 cancellationHandler.SetNotifier() 注册通知([SWS_DM_00800])。

返回通过 ara::core::Future<OperationOutput> 异步进行([SWS_DM_00800])。在成功的情况下,在 OperationOutput.responseData 中提供的有效载荷数据([SWS_DM_00796])在肯定响应中作为 transferResponseParameterRecord 直接放置在计数器 blockSequenceCounter 之后([SWS_DM_00800])。

错误处理与验证

在出错时,Future 将通过来自 DiagUdsNrcErrc 的合适错误码(NRC,符合 ISO 14229-1)进行解决([SWS_DM_00800])。除了根据 [SWS_DM_00101] 和 [SWS_DM_00103] 进行的基本 NRC 检查外,Diagnostic Manager 不执行进一步的服务验证;所有其余要求的 NRC 检查必须由被调用的应用程序自身实现([SWS_DM_01096])。

并发性与执行安全性

该操作是异常安全的(exception safe)([SWS_DM_00800]、AUTOSAR_AP_SWS_Diagnostics §8.27.1.1.3.5 “UploadData”)。线程安全性是有条件的:UploadData 是否必须实现为线程安全,取决于在 UploadService 的构造函数中传入的 ConcurrencyType([SWS_DM_00800])。

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

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

Header-Datei#include "ara/diag/upload.h"
Scopeclass ara::diag::UploadService
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
numBytesToReturnnumber of bytes DM accepts (due to its internal buffer) for this chunk.
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 a negative response message). Data in OperationOutput.responseData will be placed after block SequenceCounter 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_00800
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00800@rel:R25-11#b2e23b7c
Content hash
b2e23b7c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00800
Status: valid/unmigrated Version: rel:R25-11#4ee36ff3 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_00800@rel:R25-11#4ee36ff3
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#91b276562026-09-30
  • R19-11rel:R19-11#597f021f2026-10-14
  • R20-11rel:R20-11#07f442e92026-10-14
  • R21-11rel:R21-11#5d3267c42026-10-14
  • R22-11rel:R22-11#5ba2c4292026-10-14
  • R23-11rel:R23-11#96d3edad2026-10-14
  • R24-11rel:R24-11#512c5d2b2026-10-14
  • R25-11rel:R25-11#4ee36ff32026-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

函数 UploadService [SWS_DM_00797] Upstream: RS_AP_00137, RS_Diag_04033, RS_AP_00170, RS_AP_00171, RS_AP_00172, RS_AP_00173

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

Class for an UploadService.

Header-Datei#include "ara/diag/upload.h"
Scopeclass ara::diag::UploadService
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 DiagnosticUploadInterface needs to be referenced 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 DiagnosticUploadInterface.
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_00797
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00797@rel:R25-11#c37ad922
Content hash
c37ad922
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00797
Status: valid/unmigrated Version: rel:R25-11#e7e491fd 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_00797@rel:R25-11#e7e491fd
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#216dae2f2026-09-30
  • R19-11rel:R19-11#fcb841452026-10-14
  • R20-11rel:R20-11#c9f4cf932026-10-14
  • R21-11rel:R21-11#c9f4cf932026-10-14
  • R22-11rel:R22-11#a535d2f62026-10-14
  • R23-11rel:R23-11#b8c1cbe42026-10-14
  • R24-11rel:R24-11#fd0c15cb2026-10-14
  • R25-11rel:R25-11#e7e491fd2026-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

函数 UploadService [SWS_DM_01673] Upstream: RS_AP_00147

UploadService (UploadService &)=delete;

UploadService shall be a single not copy-able instance.

Header-Datei#include "ara/diag/upload.h"
Scopeclass ara::diag::UploadService

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

Record
AUTOSAR/AP/record/SWS_DM_01673
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01673@rel:R25-11#d51adccc
Content hash
d51adccc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01673
Status: valid/unmigrated Version: rel:R25-11#138bf0fb 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_01673@rel:R25-11#138bf0fb
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#3ed52c152026-09-30
  • R23-11rel:R23-11#ee1fd89a2026-10-14
  • R24-11rel:R24-11#84b805742026-10-14
  • R25-11rel:R25-11#138bf0fb2026-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

函数 UploadService [SWS_DM_01674] Upstream: RS_AP_00147

UploadService (UploadService &&) noexcept=delete;

Move constructor of UploadService.

Header-Datei#include "ara/diag/upload.h"
Scopeclass ara::diag::UploadService

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

Record
AUTOSAR/AP/record/SWS_DM_01674
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01674@rel:R25-11#cc544a52
Content hash
cc544a52
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01674
Status: valid/unmigrated Version: rel:R25-11#1a0da022 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_01674@rel:R25-11#1a0da022
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#e66414f02026-09-30
  • R23-11rel:R23-11#ee76ef902026-10-14
  • R24-11rel:R24-11#1a0da0222026-10-14
  • R25-11rel:R25-11#1a0da0222026-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_01671] Upstream: RS_AP_00147

UploadService & operator= (UploadService &)=delete;

UploadService shall be a single not assignable instance.

Header-Datei#include "ara/diag/upload.h"
Scopeclass ara::diag::UploadService

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

Record
AUTOSAR/AP/record/SWS_DM_01671
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01671@rel:R25-11#3e6dc8fe
Content hash
3e6dc8fe
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01671
Status: valid/unmigrated Version: rel:R25-11#af20aa02 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_01671@rel:R25-11#af20aa02
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#297568772026-09-30
  • R23-11rel:R23-11#4f34cf602026-10-14
  • R24-11rel:R24-11#af20aa022026-10-14
  • R25-11rel:R25-11#af20aa022026-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_01672] Upstream: RS_AP_00147

UploadService & operator= (UploadService &&)=delete;

Move assignment operator of UploadService.

Header-Datei#include "ara/diag/upload.h"
Scopeclass ara::diag::UploadService

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

Record
AUTOSAR/AP/record/SWS_DM_01672
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01672@rel:R25-11#b700ca9e
Content hash
b700ca9e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01672
Status: valid/unmigrated Version: rel:R25-11#8d230917 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_01672@rel:R25-11#8d230917
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#1ac3ee402026-09-30
  • R23-11rel:R23-11#77d3925b2026-10-14
  • R24-11rel:R24-11#8d2309172026-10-14
  • R25-11rel:R25-11#8d2309172026-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

函数 ~UploadService [SWS_DM_00798] Upstream: RS_AP_00134, RS_Diag_04033

virtual ~UploadService () noexcept;

Destructor of class UploadService.

Header-Datei#include "ara/diag/upload.h"
Scopeclass ara::diag::UploadService
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_00798
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00798@rel:R25-11#520fd004
Content hash
520fd004
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00798
Status: valid/unmigrated Version: rel:R25-11#d8bb9189 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_00798@rel:R25-11#d8bb9189
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#66df81512026-09-30
  • R19-11rel:R19-11#b772d13d2026-10-14
  • R20-11rel:R20-11#4dbb305d2026-10-14
  • R21-11rel:R21-11#4dbb305d2026-10-14
  • R22-11rel:R22-11#0a6cc0fa2026-10-14
  • R23-11rel:R23-11#8d6c812b2026-10-14
  • R24-11rel:R24-11#978ec5a12026-10-14
  • R25-11rel:R25-11#d8bb91892026-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