DEENESPTFRRUARHIKOZHNL

类 ara::diag::GenericRoutine

[SWS_DM_00605] Upstream: RS_Diag_04169, RS_Diag_04224

class GenericRoutine {...};

Generic Routine interface.

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

用户指南人工智能生成

使应用程序能够通用地处理带有异步数据传递的 UDS RoutineControl 服务。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: ed3ab770d945 来源 未决问题(2)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使应用程序能够通用地处理带有异步数据传递的 UDS RoutineControl 服务。

该类为 UDS RoutineControl 服务提供了通用处理程序,并将针对不同例程标识符的请求转发给自适应应用程序 [SWS_DM_00552]。开发人员通过异步方法(例如 Start)实现所需的例程操作,并通过 Offer 激活消息转发 [SWS_DM_00557]。由于实例既不可复制也不可移动,因此必须通过构造函数和接口配置精确控制生命周期与并发。正在运行的操作支持协作式取消以及标准化 UDS 错误代码。

上下文

类 ara::diag::GenericRoutine 提供了在 AUTOSAR Adaptive Platform 中根据 ISO 14229-1(UDS RoutineControl,服务 0x31)处理诊断例程的通用接口。它充当中心 Diagnostic Management(DM)与自适应应用程序之间的纽带。该类的实例绑定到类型为 DiagnosticRoutineGenericInterface 的建模端口原型,该端口原型必须通过模型中的 DiagnosticServiceGenericMapping 进行引用 [SWS_DM_00552]。与类型特定的例程接口不同,GenericRoutine 将诊断请求的原始数据作为 ara::core::Span<const std::uint8_t> 连同具体的例程标识符(routineId)一起传递给应用程序 [SWS_DM_00554]、[SWS_DM_00555]、[SWS_DM_00556]。因此,单个处理程序即可灵活服务于多个例程。

生命周期

GenericRoutine 的实例绑定到其特定端口,既不得复制也不得移动;复制构造函数、移动构造函数以及赋值运算符均被显式删除 [SWS_DM_01637]、[SWS_DM_01638]、[SWS_DM_01635]、[SWS_DM_01636]。初始化通过构造函数进行,需指定 ara::core::InstanceSpecifier 以及并发行为(ConcurrencyType:kConcurrent 或 kNotConcurrent)[SWS_DM_00552]。该参数决定了虚执行方法是否必须以线程安全的方式实现。

创建之后,DM 最初不会向处理程序转发任何消息。只有通过调用 Offer() 才会激活转发 [SWS_DM_00557]。通过 StopOffer() 可以重新停用转发 [SWS_DM_00558],然后实例由虚析构函数 ~GenericRoutine() 释放 [SWS_DM_00553]。虽然构造函数是线程安全的,但 Offer()、StopOffer() 和析构函数不是线程安全的,需要外部同步 [SWS_DM_00552]、[SWS_DM_00557]、[SWS_DM_00558]、[SWS_DM_00553]。

generic_routine_lifecycle start instantiated 已实例化 (未提供) start->instantiated GenericRoutine(...) offered Angeboten (Weiterleitung aktiv) instantiated->offered Offer() end instantiated->end ~GenericRoutine() offered->instantiated StopOffer() offered->offered Start() / Stop() / RequestResults() offered->end ~GenericRoutine()

状态图:GenericRoutine 实例的生命周期与状态转换。来源:[SWS_DM_00552]、[SWS_DM_00557]、[SWS_DM_00558]、[SWS_DM_00553]

使用路径

为了提供通用例程,应用程序从 GenericRoutine 派生并重写所需的虚方法。方法 Start(UDS 子功能 0x01)是纯虚的(pure virtual),必须强制实现 [SWS_DM_00554]。方法 Stop(子功能 0x02)[SWS_DM_00555] 和 RequestResults(子功能 0x03)[SWS_DM_00556] 是虚方法;解释:由于它们不是纯虚的,推测只有在相应例程在业务上支持停止或单独查询结果时才必须重写它们。 问题 (未决)

常规流程包括以下阶段:

  • 实例化:创建带有端口引用和并发模式的派生处理程序 [SWS_DM_00552]。
  • 激活:调用 Offer() 以向 DM 开放 [SWS_DM_00557]。
  • 执行:当收到传入的 UDS 请求时,DM 调用 Start、Stop 或 RequestResults。应用程序接收 routineId、requestData、metaInfo 以及一个 CancellationHandler,并返回一个 ara::core::Future<OperationOutput> [SWS_DM_00554]、[SWS_DM_00555]、[SWS_DM_00556]。requestData 的有效性得到保证,直到关联的 Promise 被兑现或操作被取消 [SWS_DM_00554]。
  • 取消处理:应用程序可以通过 cancellationHandler.IsCanceled() 检查取消状态,或通过 cancellationHandler.SetNotifier() 注册回调 [SWS_DM_00554]。解释:在发生取消的情况下,应用程序可能会提前终止正在运行的后台活动,并及时兑现 Promise。 问题 (未决)
  • 停用:在销毁对象之前,通过 StopOffer() 终止转发 [SWS_DM_00558]。
通用例程处理的典型流程Diagnostic Manager (DM)GenericRoutine-HandlerAnwendungs-WorkerOffer()Result<void> (Erfolg)Use Case: Diagnoseanfrage RoutineControl (Start 0x01)Start(routineId, requestData, metaInfo, cancellationHandler)触发异步执行Future<OperationOutput>altErfolgreicher Abschluss满足 Promise(OperationOutput)Fehlerfall使用 UDS NRC 满足 Promise(DiagUdsNrcErrc)Use Case: Dienst deregistrierenStopOffer()

时序图:注册、例程执行和注销的典型流程。来源:[SWS_DM_00557]、[SWS_DM_00554]、[SWS_DM_00558]

错误场景

在配置期间以及运行和执行期间都可能发生错误:

  • 模型与映射违规:如果模型中 InstanceSpecifier 的解析失败、未被识别为 PortPrototype 或不存在匹配的 DiagnosticServiceGenericMapping,则框架会报告违规,例如 InstanceSpecifierMappingIntegrityViolation、PortInterfaceMappingViolation、ProcessMappingViolation 或 InstanceSpecifierAlreadyInUseViolation [SWS_DM_00552]。
  • 提供服务错误:如果在已提供服务的情况下调用 Offer(),则调用失败并返回错误代码 DiagOfferErrc::kAlreadyOffered [SWS_DM_00557]。
  • 诊断错误代码 (NRC):如果例程操作无法成功完成或请求包含无效参数,应用程序不会使用 OperationOutput 兑现返回的 Future,而是根据 ISO 14229-1 使用来自 DiagUdsNrcErrc 的相应 UDS Negative Response Code (NRC) 予以兑现 [SWS_DM_00554]、[SWS_DM_00555]、[SWS_DM_00556]。

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

成员图

类图

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

G nara__diag__GenericRoutine818 GenericRoutine + GenericRoutine() + operator=() + ~GenericRoutine() + Offer() + RequestResults() + Start() + Stop() + StopOffer()

详细视图

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

构造函数和析构函数

Class for an GenericRoutine.

重载 GenericRoutine 3
explicit GenericRoutine (const ara::core::InstanceSpecifier &specifier, ConcurrencyType concurrencyType) noexcept; SWS_DM_00552
GenericRoutine (GenericRoutine &)=delete; SWS_DM_01637
GenericRoutine (GenericRoutine &&) noexcept=delete; SWS_DM_01638

Destructor of class GenericRoutine .

virtual ~GenericRoutine () noexcept;

方法

Offer 函数

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

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

Called for RoutineControl with SubFunction RequestResults (0x03) request for this Diagnostic RoutineIdentifier.

virtual ara::core::Future< OperationOutput > RequestResults (std::uint16_t routineId, ara::core::Span< const std::uint8_t > requestData, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept;
Start 函数

Called for RoutineControl with SubFunction Start (0x01) request for this DiagnosticRoutine Identifier.

virtual ara::core::Future< OperationOutput > Start (std::uint16_t routineId, ara::core::Span< const std::uint8_t > requestData, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept=0;
Stop 函数

Called for RoutineControl with SubFunction Stop (0x02) request for this DiagnosticRoutine Identifier.

virtual ara::core::Future< OperationOutput > Stop (std::uint16_t routineId, ara::core::Span< const std::uint8_t > requestData, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept;
StopOffer 函数

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

void StopOffer () noexcept;

运算符

operator= 函数 2

GenericRoutine shall be a single not assignable instance.

重载 = 2

嵌套类型

方法文档

函数 GenericRoutine [SWS_DM_00552] Upstream: RS_AP_00137, RS_Diag_04169, RS_Diag_04224, RS_AP_00170, RS_ AP_00171, RS_AP_00172, RS_AP_00173

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

Class for an GenericRoutine.

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine
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 DiagnosticRoutineGenericInterface 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 DiagnosticRoutineGenericInterface.
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_00552
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00552@rel:R25-11#a9daae17
Content hash
a9daae17
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00552
Status: valid/unmigrated Version: rel:R25-11#c9b9a91d 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_00552@rel:R25-11#c9b9a91d
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#3b80ef8b2026-09-30
  • R19-11rel:R19-11#51e933df2026-10-14
  • R20-11rel:R20-11#0d85dbb92026-10-14
  • R21-11rel:R21-11#92d6b5382026-10-14
  • R22-11rel:R22-11#8bf360da2026-10-14
  • R23-11rel:R23-11#a1b6139f2026-10-14
  • R24-11rel:R24-11#96d2033b2026-10-14
  • R25-11rel:R25-11#c9b9a91d2026-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

函数 GenericRoutine [SWS_DM_01637] Upstream: RS_AP_00147

GenericRoutine (GenericRoutine &)=delete;

GenericRoutine shall be a single not copy-able instance.

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine

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

Record
AUTOSAR/AP/record/SWS_DM_01637
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01637@rel:R25-11#dcf21557
Content hash
dcf21557
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01637
Status: valid/unmigrated Version: rel:R25-11#9a0cb8e2 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_01637@rel:R25-11#9a0cb8e2
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#14cfa5d22026-09-30
  • R23-11rel:R23-11#51890adb2026-10-14
  • R24-11rel:R24-11#3254577b2026-10-14
  • R25-11rel:R25-11#9a0cb8e22026-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

函数 GenericRoutine [SWS_DM_01638] Upstream: RS_AP_00147

GenericRoutine (GenericRoutine &&) noexcept=delete;

Move constructor of GenericRoutine.

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine

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

Record
AUTOSAR/AP/record/SWS_DM_01638
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01638@rel:R25-11#c4e13f9b
Content hash
c4e13f9b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01638
Status: valid/unmigrated Version: rel:R25-11#51079bf1 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_01638@rel:R25-11#51079bf1
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#773a87742026-09-30
  • R23-11rel:R23-11#39b72a912026-10-14
  • R24-11rel:R24-11#51079bf12026-10-14
  • R25-11rel:R25-11#51079bf12026-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_00557] Upstream: RS_AP_00119, RS_AP_00138, RS_Diag_04169, RS_Diag_04224

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

使用

类 ara::diag::GenericRoutine 的函数 Offer 使 Diagnostic Management (DM) 能够将某个例程的传入诊断请求消息转发给已注册的处理程序 [SWS_DM_00557]。该调用为同步调用,不接受任何参数,并返回 ara::core::Result<void> [SWS_DM_00557]。由于该方法声明了规范 noexcept,因此被视为异常安全(exception safe)[SWS_DM_00557]。

错误处理

如果提供失败,该方法返回否定结果。如果之前已为相关实例提供过该例程,该方法将返回特定错误代码 DiagOfferErrc::kAlreadyOffered [SWS_DM_00557]。针对此错误情况定义了回滚语义,以使状态保持不变 [SWS_DM_00557]。错误标识符 kAlreadyOffered 还锚定在用于诊断调用的内部错误域中 [SWS_DM_00514]。

并发性与限制

该接口被明确指定为非线程安全(not thread-safe)[SWS_DM_00557]。如果应用程序的多个线程访问同一个处理程序,则必须对调用进行同步。解释:该调用通常应在初始化期间进行,因为在执行 Offer 之前无法接收任何请求。 问题 Q-0c42f415bcb0de20 (未决)

相互作用

通过 Offer 提供功能是 AUTOSAR Adaptive 诊断集群中的核心模式;它同样以类似方式用于类型特定的例程接口 [SWS_DM_00594]、通用 UDS 服务 [SWS_DM_00619] 以及数据标识符 [SWS_DM_00638]。尽管名称与 ara::com 相同,但这代表了 Diagnostic Management 的特定实现 SWS Diagnostics §7.3.4.1.2 “Monitors”。

本使用说明由 AI 整理,并完全基于 AUTOSAR 规范 R25-11。

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

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine
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_00557
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00557@rel:R25-11#96adb91c
Content hash
96adb91c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00557
Status: valid/unmigrated Version: rel:R25-11#842b3bff 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_00557@rel:R25-11#842b3bff
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#e128836f2026-09-30
  • R19-11rel:R19-11#2759f9062026-10-14
  • R20-11rel:R20-11#d89302952026-10-14
  • R21-11rel:R21-11#0eadb9e12026-10-14
  • R22-11rel:R22-11#eee8d1382026-10-14
  • R23-11rel:R23-11#292d5a312026-10-14
  • R24-11rel:R24-11#f26055882026-10-14
  • R25-11rel:R25-11#842b3bff2026-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

函数 RequestResults [SWS_DM_00556] Upstream: RS_AP_00119, RS_Diag_04169, RS_Diag_04170, RS_Diag_04224

virtual ara::core::Future< OperationOutput > RequestResults (std::uint16_t routineId, ara::core::Span< const std::uint8_t > requestData, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept;

Called for RoutineControl with SubFunction RequestResults (0x03) request for this Diagnostic RoutineIdentifier.

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

类ara::diag::GenericRoutine的方法RequestResults由 Diagnostic-Server 实例调用,以便针对参数化的诊断例程标识符通用处理服务 0x31 且子功能为 requestRoutineResults(0x03)的 UDS RoutineControl 请求([SWS_DM_00575]、[SWS_DM_00556])。

调用时将传入例程标识符routineId、请求特定元数据metaInfo以及输入数据requestData([SWS_DM_00556])。Span requestData的有效性严格限制在相应的Promise满足或执行被中止之前([SWS_DM_00556])。传入的cancellationHandler允许通过IsCanceled查询中止状态,并通过SetNotifier注册通知函数([SWS_DM_00556])。

结果作为ara::core::Future<OperationOutput>异步返回([SWS_DM_00556])。Interpretation:输出数据的提供通常大概通过应用侧的ara::core::Promise异步进行。 问题 Q-f50c8509d7515e3f (未决)成功时 Future 提供一个OperationOutput,而失败时则通过DiagUdsNrcErrc传输符合 ISO 14229-1 的相应 UDS NRC([SWS_DM_00556])。该函数声明为noexcept并视为异常安全([SWS_DM_00556])。

关于并发性,线程安全性是有条件的(conditional):方法是否必须以线程安全的方式实现,由传递给构造函数的ConcurrencyType进行具约束力的控制([SWS_DM_00556])。

此使用说明基于AUTOSAR规范自动生成。

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

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine
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
routineIdthe corresponding RoutineIdentifier
requestDataContent of request message (without RoutineIdentifier), 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 with either OperationOutput (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_00556
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00556@rel:R25-11#9b5e607b
Content hash
9b5e607b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00556
Status: valid/unmigrated Version: rel:R25-11#53fd1ae4 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_00556@rel:R25-11#53fd1ae4
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#de1ddb392026-09-30
  • R19-11rel:R19-11#20a566642026-10-14
  • R20-11rel:R20-11#d68da6d72026-10-14
  • R21-11rel:R21-11#b76c6ec72026-10-14
  • R22-11rel:R22-11#5b49da632026-10-14
  • R23-11rel:R23-11#be4d5ce62026-10-14
  • R24-11rel:R24-11#307b0f5f2026-10-14
  • R25-11rel:R25-11#53fd1ae42026-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_00554] Upstream: RS_AP_00119, RS_AP_00138, RS_Diag_04169, RS_Diag_04170, RS_ Diag_04224

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

Called for RoutineControl with SubFunction Start (0x01) request for this DiagnosticRoutine Identifier.

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

一旦针对指定的 routineId 收到子功能为 Start (0x01) 的 RoutineControl 诊断请求,就会调用类 ara::diag::GenericRoutine 的方法 Start [SWS_DM_00554]。与符合 [SWS_DM_00591] 的类型化例程接口不同,此通用接口将请求消息的原始数据作为字节范围(byte span)接收。

以下要求和接口属性适用于该实现:

  • 调用上下文和形参:除 routineId 和元数据(metaInfo)外,还会传递参数 requestData。请求数据的生存期一直保持有效,直至 Promise 被完成或处理被 cancellationHandler 取消 [SWS_DM_00554]。
  • 取消处理:例程可以通过 cancellationHandler.IsCanceled() 查询当前取消状态,或通过 cancellationHandler.SetNotifier() 注册一个在会话取消时被调用的通知程序函数 [SWS_DM_00554]。
  • 异步语义:处理过程通过 ara::core::Future<OperationOutput> 非阻塞式进行。成功执行时,OperationOutput 为肯定响应提供有效负载数据 [SWS_DM_00554]。
  • 错误处理:如果执行失败,必须使用 DiagUdsNrcErrc 并以符合 ISO 14229-1 的适当否定响应码(NRC)来完成 Future [SWS_DM_00554]。
  • 并发性:该函数被声明为异常安全(noexcept)。提供过程是否必须以线程安全的方式进行,由传递给构造函数的 ConcurrencyType 决定 [SWS_DM_00554]。

此使用说明基于AUTOSAR规范自动生成。

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

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine
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
routineIdthe corresponding RoutineIdentifier
requestDataContent of request message (without RoutineIdentifier). 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 with either OperationOutput (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_00554
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00554@rel:R25-11#177337c3
Content hash
177337c3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00554
Status: valid/unmigrated Version: rel:R25-11#632d4829 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_00554@rel:R25-11#632d4829
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#a9ad92122026-09-30
  • R19-11rel:R19-11#f6d47d602026-10-14
  • R20-11rel:R20-11#ba587eba2026-10-14
  • R21-11rel:R21-11#5f3710452026-10-14
  • R22-11rel:R22-11#927f1c032026-10-14
  • R23-11rel:R23-11#362a0cc42026-10-14
  • R24-11rel:R24-11#a07e64292026-10-14
  • R25-11rel:R25-11#632d48292026-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_00555] Upstream: RS_AP_00119, RS_AP_00138, RS_Diag_04169, RS_Diag_04170, RS_ Diag_04224

virtual ara::core::Future< OperationOutput > Stop (std::uint16_t routineId, ara::core::Span< const std::uint8_t > requestData, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept;

Called for RoutineControl with SubFunction Stop (0x02) request for this DiagnosticRoutine Identifier.

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

当发生带有子功能 Stop(0x02)的 UDS RoutineControl 请求时,将针对相应的通用诊断例程调用方法 Stop [SWS_DM_00555]。与类型化例程接口 [SWS_DM_00592] 相比,它接收例程标识符 routineId 以及作为原始数据 span 的请求数据 requestData [SWS_DM_00555]。

使用时须遵守以下参数和执行规则 [SWS_DM_00555]:

  • 输入数据 span 的生命周期:requestData 的内存区域保持有效,直到关联的 Promise 被满足或执行通过 cancellationHandler 被取消 [SWS_DM_00555]。
  • 取消处理:应用程序可以通过 cancellationHandler.IsCanceled() 检查当前诊断会话是否已取消,或者通过 cancellationHandler.SetNotifier 注册一个在取消时触发的通知函数 [SWS_DM_00555]。
  • 异步性与返回:该函数以异步方式工作并返回一个 ara::core::Future<OperationOutput>,成功时该对象包含用于肯定 UDS 响应的输出数据 [SWS_DM_00555]。

错误处理通过否定诊断返回值进行:如果停止例程失败,则必须通过 DiagUdsNrcErrc 使用符合 ISO 14229-1 的合适 UDS NRC 错误代码来完成该 Future [SWS_DM_00555]。

关于并发性,该方法被指定为 noexcept 且异常安全。具体的实现是否必须设计为线程安全,取决于在构造函数中进行实例化时传递的 ConcurrencyType [SWS_DM_00555]。

此使用说明仅基于 Adaptive AUTOSAR 版本 R25-11 的规范。

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

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine
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
routineIdthe corresponding RoutineIdentifier
requestDataContent of request message (without RoutineIdentifier). Lifetime: Valid until Promise is fulfilled or the processing is cancelled by the cancellationHandler.
metaInfoMetaData 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 with either OperationOutput (for a positive response message) or an UDS NRC value (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_00555
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00555@rel:R25-11#77d331ec
Content hash
77d331ec
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00555
Status: valid/unmigrated Version: rel:R25-11#56c0affc 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_00555@rel:R25-11#56c0affc
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#04e6a8622026-09-30
  • R19-11rel:R19-11#23fc2c642026-10-14
  • R20-11rel:R20-11#3e55de712026-10-14
  • R21-11rel:R21-11#b34b7e672026-10-14
  • R22-11rel:R22-11#dbc3abf42026-10-14
  • R23-11rel:R23-11#146ebc662026-10-14
  • R24-11rel:R24-11#702a311c2026-10-14
  • R25-11rel:R25-11#56c0affc2026-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_00558] Upstream: RS_Diag_04169, RS_Diag_04224

void StopOffer () noexcept;

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

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

使用

方法 ara::diag::GenericRoutine::StopOffer 停用 Diagnostic Management (DM) 向对应例程实例 [SWS_DM_00558] 转发传入诊断请求的功能。该函数的签名为 void StopOffer() noexcept;,不接受任何参数且不返回值 [SWS_DM_00558]。该调用被同步处理,并向 DM 发出信号,表明该例程自此不再接受任何请求。

错误处理

该操作被指定为 exception safe 并声明为 noexcept [SWS_DM_00558]。执行时不会产生错误代码或 C++ 异常。诊断模块中未为此接口规定向开发或错误内存实例 (DET/DEM) 发送特定消息。

并发性与限制

关于线程行为,该方法被标明为 not thread-safe [SWS_DM_00558]。因此,在 ara::diag::GenericRoutine 的同一实例上的并发调用必须在应用程序端进行同步。解释:调用大概率主要在例程被临时停用或应用程序在先前已进行提供调用后受控终止时发生。 问题 Q-e110ce01110699e3 (未决)

相互作用

该命名在概念上遵循 ara::com 的服务提供模式,但代表 ara::diag 内部的独立实现,不得与通信提供相混淆(AUTOSAR_AP_SWS_Diagnostics §7.3.4.1.2 “Monitors”)。在模块范围内,其他诊断类也使用相同的提供模式来停用请求转发,例如 ara::diag::GenericUDSService [SWS_DM_00620]、ara::diag::GenericDataIdentifier [SWS_DM_00639]、例程接口 [SWS_DM_00595] 以及 ara::diag::Monitor [SWS_DM_01089]。

本段文本由 AI 生成,并完全基于 AUTOSAR R25-11 规范文档。

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

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine
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_00558
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00558@rel:R25-11#4b96ff95
Content hash
4b96ff95
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00558
Status: valid/unmigrated Version: rel:R25-11#39feb507 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_00558@rel:R25-11#39feb507
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f2c61aa62026-09-30
  • R19-11rel:R19-11#33f222af2026-10-14
  • R20-11rel:R20-11#ec8bc9632026-10-14
  • R21-11rel:R21-11#c0037e202026-10-14
  • R22-11rel:R22-11#b08db6972026-10-14
  • R23-11rel:R23-11#3cfad6d22026-10-14
  • R24-11rel:R24-11#ec651f742026-10-14
  • R25-11rel:R25-11#39feb5072026-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_01635] Upstream: RS_AP_00147

GenericRoutine & operator= (GenericRoutine &)=delete;

GenericRoutine shall be a single not assignable instance.

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine

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

Record
AUTOSAR/AP/record/SWS_DM_01635
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01635@rel:R25-11#c131f2fa
Content hash
c131f2fa
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01635
Status: valid/unmigrated Version: rel:R25-11#3028b007 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_01635@rel:R25-11#3028b007
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#fea4feed2026-09-30
  • R23-11rel:R23-11#98987c072026-10-14
  • R24-11rel:R24-11#3028b0072026-10-14
  • R25-11rel:R25-11#3028b0072026-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_01636] Upstream: RS_AP_00147

GenericRoutine & operator= (GenericRoutine &&)=delete;

Move assignment operator of GenericRoutine.

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine

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

Record
AUTOSAR/AP/record/SWS_DM_01636
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01636@rel:R25-11#a14290cc
Content hash
a14290cc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01636
Status: valid/unmigrated Version: rel:R25-11#881d1dd4 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_01636@rel:R25-11#881d1dd4
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#24fc63642026-09-30
  • R23-11rel:R23-11#98cccf9a2026-10-14
  • R24-11rel:R24-11#881d1dd42026-10-14
  • R25-11rel:R25-11#881d1dd42026-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

函数 ~GenericRoutine [SWS_DM_00553] Upstream: RS_AP_00134, RS_Diag_04169, RS_Diag_04224

virtual ~GenericRoutine () noexcept;

Destructor of class GenericRoutine .

Header-Datei#include "ara/diag/generic_routine.h"
Scopeclass ara::diag::GenericRoutine
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_00553
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00553@rel:R25-11#800b008a
Content hash
800b008a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00553
Status: valid/unmigrated Version: rel:R25-11#a6efdb40 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_00553@rel:R25-11#a6efdb40
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#c99137522026-09-30
  • R19-11rel:R19-11#b7ba28462026-10-14
  • R20-11rel:R20-11#dbe0f1bb2026-10-14
  • R21-11rel:R21-11#dbe0f1bb2026-10-14
  • R22-11rel:R22-11#510ac3412026-10-14
  • R23-11rel:R23-11#50b0d8172026-10-14
  • R24-11rel:R24-11#a6efdb402026-10-14
  • R25-11rel:R25-11#a6efdb402026-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