DEENESPTFRRUARHIKOZHNL

类 ara::diag::GenericDataIdentifier

[SWS_DM_00607] Upstream: RS_Diag_04169

class GenericDataIdentifier {...};

Generic DataIdentifier interface.

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

用户指南人工智能生成

允许应用程序对诊断标识符进行通用的 UDS 读写请求处理。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 02c252ff66d0 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

允许应用程序对诊断标识符进行通用的 UDS 读写请求处理。

类 ara::diag::GenericDataIdentifier 用作通用接口,用于在 AUTOSAR Adaptive 中异步处理诊断标识符的 UDS 读写请求 [SWS_DM_00636]。在绑定到端口并通过 Offer() 释放后,Diagnostic Management 会将请求转发至已实现的方法 [SWS_DM_00638]。作为单例实例,该对象既不能复制也不能移动,而请求处理的线程安全性则通过在构造函数中选择的并发配置进行控制。

上下文

类 ara::diag::GenericDataIdentifier 表示 AUTOSAR Adaptive Platform 的功能集群 Diagnostic Management (DM) 内的通用服务接口 SWS Diagnostics §8.2 “GenericDataIdentifier”。类型特定接口绑定到固定建模的数据类型,而 GenericDataIdentifier 则用于灵活处理诊断标识符(Data Identifiers,DID),其中 16 位标识符作为参数动态传递。

主要有三个角色参与诊断处理:

  • 外部诊断测试仪,向车辆发送标准化的 UDS 服务,如 ReadDataByIdentifier (0x22) 或 WriteDataByIdentifier (0x2E)。
  • Diagnostic Management (DM),接收并验证诊断请求,并在先前已通过 Offer 激活的情况下,通过已定义的端口接口转发给相应的应用程序实例 [SWS_DM_00638]。
  • GenericDataIdentifier 的应用程序特定实现,通过提供方法 Read [SWS_DM_00636] 和 Write [SWS_DM_00637] 并异步返回数据来封装实际的处理逻辑。

生命周期

ara::diag::GenericDataIdentifier 的实例通过其构造函数显式实例化 [SWS_DM_00634]。在此过程中,调用方将对象绑定到一个 ara::core::InstanceSpecifier,该实例说明符指向建模的 DiagnosticDataIdentifierGenericInterface 的 PortPrototype。通过参数 concurrencyType(类型为 DataIdentifierConcurrencyType),指定请求是以并发方式(kConcurrent)还是顺序方式(kNotConcurrent)传递给处理程序 [SWS_DM_00634]。

关于所有权和生命周期,GenericDataIdentifier 被建模为单例、不可复制且不可移动的实例:

实例化后,该对象处于非激活状态;Diagnostic Management 尚不转发任何请求。只有通过调用 Offer() [SWS_DM_00638],转发才会被激活。为了再次停用诊断请求的转发,应用程序调用 StopOffer() [SWS_DM_00639]。对象的销毁通过虚析构函数 [SWS_DM_00635] 进行。

在并发性方面,构造函数是线程安全的(thread-safe)[SWS_DM_00634]。相比之下,管理方法 Offer() [SWS_DM_00638] 与 StopOffer() [SWS_DM_00639] 以及析构函数 [SWS_DM_00635] 则指定为非线程安全。方法 Read 和 Write 的线程安全性有条件地取决于所选的 concurrencyType [SWS_DM_00636]、[SWS_DM_00637]。

lifecycle NichtInitialisiert 未初始化 Inaktiv Inaktiv (StopOffer) NichtInitialisiert->Inaktiv Konstruktor Aktiv Aktiv (Offer) Inaktiv->Aktiv Offer() Beendet 已销毁 Inaktiv->Beendet Destruktor Aktiv->Inaktiv StopOffer() Aktiv->Beendet Destruktor

状态图:处理器实例在非活动状态与就绪转发状态之间的生命周期和状态转换。来源:[SWS_DM_00634]、[SWS_DM_00638]、[SWS_DM_00639]、[SWS_DM_00635]

使用路径

处理诊断请求的典型端到端流程分为以下步骤:

  1. 初始化:应用程序实例化其派生的处理器类,并指定 InstanceSpecifier 以及并发配置 [SWS_DM_00634]。Interpretation:在实践中,这通常应该在应用程序进程的初始化阶段进行。 问题 Q-32596fba68253958 (未决)
  2. 服务提供:应用程序调用 Offer() [SWS_DM_00638]。Diagnostic Management 激活传入 DID 请求的转发。
  3. 请求处理:
    • 当收到读取任务时,DM 调用方法 Read(dataIdentifier, metaInfo, cancellationHandler) [SWS_DM_00636]。应用程序检查传入的 16 位标识符并异步返回 ara::core::Future<OperationOutput>。
    • 当写入任务到达时,DM 调用 Write(dataIdentifier, requestData, metaInfo, cancellationHandler) [SWS_DM_00637]。requestData 中的有效负载数据保持有效,直到相应的 Promise 被兑现或处理被中止。
  4. 中止检查:在耗时较长的操作期间,处理器可通过 cancellationHandler.IsCanceled() 检查会话是否已中止,或通过 cancellationHandler.SetNotifier 注册通知函数 [SWS_DM_00636]、[SWS_DM_00637]。
  5. 服务注销:在终止处理器之前,应用程序调用 StopOffer() [SWS_DM_00639],从而使 DM 停止转发。
通用读取请求的流程Diagnosetester诊断管理GenericDataIdentifierUse Case: DienstregistrierungOffer()Result<void> (Erfolg)Use Case: Leseanforderung (UDS 0x22)ReadDataByIdentifierRead(dataIdentifier, metaInfo, cancellationHandler)altDaten erfolgreich ermittelt带有 OperationOutput 的 Future带有数据的肯定 UDS 响应Fehlerfall / NRC带有 DiagUdsNrcErrc 的 FutureNegative UDS-Antwort (NRC)

时序图:外部测试仪、Diagnostic Management 与 GenericDataIdentifier 在 UDS 读取请求时的相互作用。来源:[SWS_DM_00638]、[SWS_DM_00636]

错误场景

错误可能发生在交互的不同阶段:

  • 配置和映射冲突:若模型中的 InstanceSpecifier 无法解析或未指向 PortPrototype,则存在 InstanceSpecifierMappingIntegrityViolation [SWS_DM_00634]。若缺少到 DiagnosticDataPortMapping 的分配,则发生 PortInterfaceMappingViolation [SWS_DM_00634]。缺少进程映射会产生 ProcessMappingViolation,而已被使用的 InstanceSpecifier 会导致 InstanceSpecifierAlreadyInUseViolation [SWS_DM_00634]。
  • 重复提供:若在服务已处于主动提供状态时调用 Offer(),该方法将返回带有错误码 DiagOfferErrc::kAlreadyOffered 的 ara::core::Result [SWS_DM_00638]。
  • 业务诊断错误:若读取或写入请求在业务上无法处理,应用程序在 Future 中不返回成功状态,而是根据 ISO 14229-1 通过 DiagUdsNrcErrc 返回标准化的 UDS NRC(Negative Response Code)[SWS_DM_00636]、[SWS_DM_00637]。

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

成员图

类图

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

G nara__diag__GenericDataIdentifier357 GenericDataIdentifier + GenericDataIdentifier() + operator=() + ~GenericDataIdentifier() + Offer() + Read() + StopOffer() + Write()

详细视图

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

构造函数和析构函数

Class for an GenericDataIdentifier.

重载 GenericDataIdentifier 3
explicit GenericDataIdentifier (const ara::core::InstanceSpecifier &specifier, DataIdentifierConcurrencyType concurrencyType) noexcept; SWS_DM_00634
GenericDataIdentifier (GenericDataIdentifier &)=delete; SWS_DM_01653
GenericDataIdentifier (GenericDataIdentifier &&) noexcept=delete; SWS_DM_01654

Destructor of class GenericDataIdentifier .

virtual ~GenericDataIdentifier () noexcept;

方法

Offer 函数

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

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

Called for ReadDataByIdentifier request for this DiagnosticDataIdentifier.

virtual ara::core::Future< OperationOutput > Read (std::uint16_t data Identifier, const MetaInfo &metaInfo, CancellationHandler cancellation Handler) noexcept=0;
StopOffer 函数

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

void StopOffer () noexcept;
Write 函数

Called for WriteDataByIdentifier request for this DiagnosticDataIdentifier.

virtual ara::core::Future< void > Write (std::uint16_t dataIdentifier, ara::core::Span< const std::uint8_t > requestData, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept;

运算符

operator= 函数 2

GenericDataIdentifier shall be a single not assignable instance.

重载 = 2

嵌套类型

方法文档

函数 GenericDataIdentifier [SWS_DM_00634] Upstream: RS_AP_00137, RS_Diag_04169, RS_AP_00170, RS_AP_00171, RS_AP_00172, RS_AP_00173

explicit GenericDataIdentifier (const ara::core::InstanceSpecifier &specifier, DataIdentifierConcurrencyType concurrencyType) noexcept;

Class for an GenericDataIdentifier.

Header-Datei#include "ara/diag/generic_data_identifier.h"
Scopeclass ara::diag::GenericDataIdentifier
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 DiagnosticDataIdentifierGenericInterface needs to be referenced by a DiagnosticDataPortMapping. 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 DiagnosticDataIdentifierGenericInterface.
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_00634
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00634@rel:R25-11#843a69dc
Content hash
843a69dc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00634
Status: valid/unmigrated Version: rel:R25-11#71f09e07 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_00634@rel:R25-11#71f09e07
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#9d754b4c2026-09-30
  • R19-11rel:R19-11#281ed5b12026-10-14
  • R20-11rel:R20-11#c8b741432026-10-14
  • R21-11rel:R21-11#161554792026-10-14
  • R22-11rel:R22-11#55a5b7df2026-10-14
  • R23-11rel:R23-11#571dfcd62026-10-14
  • R24-11rel:R24-11#4a63e6522026-10-14
  • R25-11rel:R25-11#71f09e072026-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

函数 GenericDataIdentifier [SWS_DM_01653] Upstream: RS_AP_00147

GenericDataIdentifier (GenericDataIdentifier &)=delete;

GenericDataIdentifier shall be a single not copy-able instance.

Header-Datei#include "ara/diag/generic_data_identifier.h"
Scopeclass ara::diag::GenericDataIdentifier

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

Record
AUTOSAR/AP/record/SWS_DM_01653
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01653@rel:R25-11#c2ee2b25
Content hash
c2ee2b25
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01653
Status: valid/unmigrated Version: rel:R25-11#3de9089c 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_01653@rel:R25-11#3de9089c
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#f309daca2026-09-30
  • R23-11rel:R23-11#ad3cab8a2026-10-14
  • R24-11rel:R24-11#d3cdff682026-10-14
  • R25-11rel:R25-11#3de9089c2026-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

函数 GenericDataIdentifier [SWS_DM_01654] Upstream: RS_AP_00147

GenericDataIdentifier (GenericDataIdentifier &&) noexcept=delete;

Move constructor of GenericDataIdentifier.

Header-Datei#include "ara/diag/generic_data_identifier.h"
Scopeclass ara::diag::GenericDataIdentifier

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

Record
AUTOSAR/AP/record/SWS_DM_01654
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01654@rel:R25-11#fc2da9a1
Content hash
fc2da9a1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01654
Status: valid/unmigrated Version: rel:R25-11#8f08b1d5 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_01654@rel:R25-11#8f08b1d5
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#11d817c52026-09-30
  • R23-11rel:R23-11#5421592e2026-10-14
  • R24-11rel:R24-11#8f08b1d52026-10-14
  • R25-11rel:R25-11#8f08b1d52026-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_00638] Upstream: RS_AP_00139, RS_AP_00119, RS_Diag_04169

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

用法:类 ara::diag::GenericDataIdentifier([SWS_DM_00638])的同步方法 Offer 用于在 Diagnostic Management (DM) 中注册通用数据标识符处理程序。通过此调用,DM 被授权将针对相关数据标识符的传入诊断请求(Request Messages)转发给该处理程序([SWS_DM_00638])。该函数不接收输入参数,并同步返回指示成功或错误的 ara::core::Result<void>([SWS_DM_00638])。

错误处理:该方法声明带有 noexcept,并保证完全的异常安全性(exception safe)([SWS_DM_00638])。可能出现的错误通过 ara::core::Result 报告。如果处理程序先前已被提供,该函数返回具有回滚语义的错误码 DiagOfferErrc::kAlreadyOffered([SWS_DM_00638])。这对应于常规错误枚举 DiagErrc::kAlreadyOffered([SWS_DM_00514])。

并发性与限制:该函数被指定为非线程安全(not thread-safe)([SWS_DM_00638])。因此,必须对同一实例上的调用保护免受并发访问。由于没有为 GenericDataIdentifier 指定单独的注销方法,服务提供推测可能与处理程序实例的生命周期绑定(解释)。 问题 Q-7c64a5bd308464a8 (未决)

交互作用:该流程遵循 Diagnostic Management 贯穿始终的提供模式。类似的接口可见于类型特定的数据标识符([SWS_DM_00599])、通用例程([SWS_DM_00557])以及通用 UDS 服务([SWS_DM_00619])。

本使用说明由 AI 系统生成。

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

Header-Datei#include "ara/diag/generic_data_identifier.h"
Scopeclass ara::diag::GenericDataIdentifier
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_00638
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00638@rel:R25-11#be32b35a
Content hash
be32b35a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00638
Status: valid/unmigrated Version: rel:R25-11#1ea7c5d4 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_00638@rel:R25-11#1ea7c5d4
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#d9e8c1292026-09-30
  • R19-11rel:R19-11#34f18c6b2026-10-14
  • R20-11rel:R20-11#f2c3beea2026-10-14
  • R21-11rel:R21-11#a7b6c9862026-10-14
  • R22-11rel:R22-11#533034aa2026-10-14
  • R23-11rel:R23-11#b980ade42026-10-14
  • R24-11rel:R24-11#198e42702026-10-14
  • R25-11rel:R25-11#1ea7c5d42026-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

函数 Read [SWS_DM_00636] Upstream: RS_AP_00138, RS_AP_00119, RS_Diag_04169, RS_Diag_04170, RS_ Diag_04172

virtual ara::core::Future< OperationOutput > Read (std::uint16_t data Identifier, const MetaInfo &metaInfo, CancellationHandler cancellation Handler) noexcept=0;

Called for ReadDataByIdentifier request for this DiagnosticDataIdentifier.

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

使用

一旦针对相关数据标识符接收到 ReadDataByIdentifier(UDS 0x22)的诊断请求,就会调用类 ara::diag::GenericDataIdentifier 的方法 Read [SWS_DM_00636]。作为参数,该函数接收数字标识 dataIdentifier、上下文 metaInfo 以及 cancellationHandler。通过 cancellationHandler,应用程序可以使用 IsCanceled 查询取消状态,或通过 SetNotifier 为已取消的会话注册通知函数 [SWS_DM_00636]。结果通过 ara::core::Future<OperationOutput> 异步提供,在成功的情况下返回有效载荷数据(OperationOutput)[SWS_DM_00636]。

错误处理

发生错误时,Future 通过 DiagUdsNrcErrc 提供符合 ISO 14229-1 的 UDS 否定返回值 (NRC) [SWS_DM_00636]。如果接口尚未或不再通过 offer() 提供,则 Diagnostic Management (DM) 独立响应 NRC 0x94 (ResourceTemporarilyNotAvailable) [SWS_DM_01257]。如果达到配置的 Response Pending 消息限制,服务器将中止处理并响应 NRC 0x10 (generalReject) [SWS_DM_00369]。

并发性与交互

该方法被声明为 noexcept 且异常安全 [SWS_DM_00636]。其线程安全性是有条件的:实现是否必须是线程安全的,由在构造函数中传递的 ConcurrencyType 控制 [SWS_DM_00636]。如果 readWrite 处于 kConcurrent,DM 允许并发触发读取和写入访问,否则(kNotConcurrent)调用按顺序进行 [SWS_DM_00939]。与 [SWS_DM_00640] 等特定接口不同,GenericDataIdentifier 通过传递的 ID 灵活覆盖通用 DID 范围 [SWS_DM_00636]。

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

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

Header-Datei#include "ara/diag/generic_data_identifier.h"
Scopeclass ara::diag::GenericDataIdentifier
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
dataIdentifierthe corresponding DataIdentifier
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_00636
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00636@rel:R25-11#b532bac4
Content hash
b532bac4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00636
Status: valid/unmigrated Version: rel:R25-11#cfd80198 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_00636@rel:R25-11#cfd80198
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#339b63522026-09-30
  • R19-11rel:R19-11#f8a15c312026-10-14
  • R20-11rel:R20-11#5e9a44792026-10-14
  • R21-11rel:R21-11#34887de02026-10-14
  • R22-11rel:R22-11#91d437d52026-10-14
  • R23-11rel:R23-11#6625968e2026-10-14
  • R24-11rel:R24-11#430ea0f32026-10-14
  • R25-11rel:R25-11#cfd801982026-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_00639] Upstream: RS_Diag_04169

void StopOffer () noexcept;

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

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

用法与调用上下文

类 ara::diag::GenericDataIdentifier 的成员函数 StopOffer 用于停用将来自 Diagnostic Management (DM) 的传入请求消息转发给相应实例 [SWS_DM_00639]。调用通过头文件 #include "ara/diag/generic_data_identifier.h" [SWS_DM_00639] 中的接口同步进行。该函数的签名为 void StopOffer() noexcept;,不接收任何传入参数且不返回返回值 [SWS_DM_00639]。

错误处理与并发

规范将 StopOffer 定义为异常安全 (exception safe),并通过标识符 noexcept 保证不发生异常 [SWS_DM_00639]。未针对此操作预设特定的错误代码、错误反应或向 DET 或 DEM 发送的消息。在并发方面,该方法被归类为非线程安全 (not thread-safe) [SWS_DM_00639]。因此,同一实例上的并行调用必须由调用方进行同步。解读:在最终停止转发之前,Diagnostic Management 中已开始的请求应当仍会被正常处理。 问题 Q-94a464dc832c055c (未决)

诊断模块中的交互

撤回服务提供的模式在诊断模块中被标准化且一致使用。类似的 StopOffer 方法还存在于例如:

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

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

Header-Datei#include "ara/diag/generic_data_identifier.h"
Scopeclass ara::diag::GenericDataIdentifier
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_00639
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00639@rel:R25-11#3c626d08
Content hash
3c626d08
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00639
Status: valid/unmigrated Version: rel:R25-11#9225c34d 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_00639@rel:R25-11#9225c34d
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#0466e7b52026-09-30
  • R19-11rel:R19-11#e360cf692026-10-14
  • R20-11rel:R20-11#1bc0f5cd2026-10-14
  • R21-11rel:R21-11#3b09d7582026-10-14
  • R22-11rel:R22-11#77376b4a2026-10-14
  • R23-11rel:R23-11#6009f72f2026-10-14
  • R24-11rel:R24-11#d3d4a13c2026-10-14
  • R25-11rel:R25-11#9225c34d2026-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

函数 Write [SWS_DM_00637] Upstream: RS_AP_00138, RS_AP_00119, RS_Diag_04169, RS_Diag_04170

virtual ara::core::Future< void > Write (std::uint16_t dataIdentifier, ara::core::Span< const std::uint8_t > requestData, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept;

Called for WriteDataByIdentifier request for this DiagnosticDataIdentifier.

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

一旦接收到服务 WriteDataByIdentifier (0x2E) 的 UDS 请求,Diagnostic Management 就会调用类 ara::diag::GenericDataIdentifier 的方法 Write [SWS_DM_00637]。调用的前提条件是支持所请求的数据标识符,并且相应的诊断会话以及安全级别允许执行 [SWS_DM_00186],[SWS_DM_00415],[SWS_DM_00416]。

使用以下参数进行调用 [SWS_DM_00637]:

  • dataIdentifier:要写入的数据标识符的 16 位标识。
  • requestData:包含不带 DID 前缀的请求原始数据的 ara::core::Span。该缓冲区保持有效,直到关联的 Promise 被满足或处理被中止。
  • metaInfo:诊断请求的附加元数据。
  • cancellationHandler:用于通过 IsCanceled 监视会话的提前中止,并通过 SetNotifier 注册中止通知。

执行以异步方式进行并返回 ara::core::Future<void> [SWS_DM_00637]。在成功处理时,Promise 被满足并带有用于肯定响应消息的 void。如果发生错误,Future 必须通过 DiagUdsNrcErrc 使用符合 ISO 14229-1 的匹配 UDS 否定返回值 (NRC) 来完成 [SWS_DM_00637]。该方法被声明为 noexcept,并且必须以异常安全的方式实现 [SWS_DM_00637]。

关于并发性,线程安全性是有条件的:Write 是否必须实现为线程安全,取决于在构造函数中实例化时传递的 ConcurrencyType [SWS_DM_00637]。读取和写入访问的并行执行通过标志 readWrite 控制 [SWS_DM_00939]。

本文字由 AI 创建。所有信息均完全基于 Release R25-11 规范。

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

Header-Datei#include "ara/diag/generic_data_identifier.h"
Scopeclass ara::diag::GenericDataIdentifier
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
dataIdentifierthe corresponding DataIdentifier
requestDataContent of request message (without DataIdentifier). 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 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_00637
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00637@rel:R25-11#51c7008d
Content hash
51c7008d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00637
Status: valid/unmigrated Version: rel:R25-11#b7a94afa 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_00637@rel:R25-11#b7a94afa
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#889963442026-09-30
  • R19-11rel:R19-11#8d85d1592026-10-14
  • R20-11rel:R20-11#701ab1d02026-10-14
  • R21-11rel:R21-11#10093f0c2026-10-14
  • R22-11rel:R22-11#9b15c55f2026-10-14
  • R23-11rel:R23-11#a7e012442026-10-14
  • R24-11rel:R24-11#9c761e5e2026-10-14
  • R25-11rel:R25-11#b7a94afa2026-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_01651] Upstream: RS_AP_00147

GenericDataIdentifier & operator= (GenericDataIdentifier &)=delete;

GenericDataIdentifier shall be a single not assignable instance.

Header-Datei#include "ara/diag/generic_data_identifier.h"
Scopeclass ara::diag::GenericDataIdentifier

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

Record
AUTOSAR/AP/record/SWS_DM_01651
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01651@rel:R25-11#47515625
Content hash
47515625
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01651
Status: valid/unmigrated Version: rel:R25-11#9b814f4a 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_01651@rel:R25-11#9b814f4a
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#0a92f77c2026-09-30
  • R23-11rel:R23-11#1cfb26532026-10-14
  • R24-11rel:R24-11#211cc0882026-10-14
  • R25-11rel:R25-11#9b814f4a2026-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_01652] Upstream: RS_AP_00147

GenericDataIdentifier & operator= (GenericDataIdentifier &&)=delete;

Move assignment operator of GenericDataIdentifier.

Header-Datei#include "ara/diag/generic_data_identifier.h"
Scopeclass ara::diag::GenericDataIdentifier

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

Record
AUTOSAR/AP/record/SWS_DM_01652
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01652@rel:R25-11#0a6458b2
Content hash
0a6458b2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01652
Status: valid/unmigrated Version: rel:R25-11#7c21b544 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_01652@rel:R25-11#7c21b544
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#5c58a4142026-09-30
  • R23-11rel:R23-11#1428a6912026-10-14
  • R24-11rel:R24-11#7c21b5442026-10-14
  • R25-11rel:R25-11#7c21b5442026-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

函数 ~GenericDataIdentifier [SWS_DM_00635] Upstream: RS_AP_00134, RS_Diag_04169

virtual ~GenericDataIdentifier () noexcept;

Destructor of class GenericDataIdentifier .

Header-Datei#include "ara/diag/generic_data_identifier.h"
Scopeclass ara::diag::GenericDataIdentifier
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_00635
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00635@rel:R25-11#3da476f5
Content hash
3da476f5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00635
Status: valid/unmigrated Version: rel:R25-11#fc24e0db 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_00635@rel:R25-11#fc24e0db
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#882197f52026-09-30
  • R19-11rel:R19-11#ae023e7c2026-10-14
  • R20-11rel:R20-11#6892d8702026-10-14
  • R21-11rel:R21-11#cf811fb72026-10-14
  • R22-11rel:R22-11#0ec9aa792026-10-14
  • R23-11rel:R23-11#924c98d82026-10-14
  • R24-11rel:R24-11#fc24e0db2026-10-14
  • R25-11rel:R25-11#fc24e0db2026-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