DEENESPTFRRUARHIKOZHNL

类 ara::diag::SecurityAccess

[SWS_DM_00761] Upstream: RS_Diag_04005

class SecurityAccess {...};

DiagnosticSecurityAccessInterface.

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

用户指南人工智能生成

用于为诊断安全访问提供并验证种子和密钥值。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 1943cee6c64f 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用于为诊断安全访问提供并验证种子和密钥值。

类 ara::diag::SecurityAccess 用于根据 UDS 服务 0x27([SWS_DM_00762])实现特定于应用的安全诊断访问。通过 Offer() 激活后,处理程序接收提供种子的请求并异步验证传递的密钥值([SWS_DM_00766])。作为一个不可复制且不可移动的实例,该接口要求在构造函数中显式配置并发行为,而处理错误则通过标准化 UDS 返回码报告给诊断系统([SWS_DM_00765])。

上下文

类 ara::diag::SecurityAccess 在 AUTOSAR Adaptive 中代表用于实现 UDS 服务 0x27(SecurityAccess)的接口。它充当内部 Diagnostic Management(DM)与自适应应用的特定于应用的身份验证逻辑之间的纽带。当外部诊断测试仪请求安全相关诊断操作时,它会根据 ISO 14229-1 向车辆发送相应的诊断消息(AUTOSAR_AP_SWS_Diagnostics §4.1 “Limitations of sub-functions of 0x19 ReadDTCInformation”)。Diagnostic Management 接收这些请求,并将种子请求及密钥比较转发给 ara::diag::SecurityAccess 的已注册实例([SWS_DM_00766])。

SecurityAccessKontext client 诊断客户端 dm Diagnostic Management (DM) client->dm UDS-Service 0x27 secacc ara::diag::SecurityAccess dm->secacc 转发 app Adaptive Applikation secacc->app Vererbung / Handler

上下文图:ara::diag::SecurityAccess 在诊断测试仪、Diagnostic Management 与应用程序之间的归位。来源:[SWS_DM_00762], [SWS_DM_00766], AUTOSAR_AP_SWS_Diagnostics §4.1 “Limitations of sub-functions of 0x19 ReadDTCInformation”

生命周期

实例化通过构造函数在指定 ara::core::InstanceSpecifier 以及并发行为 concurrencyType 的情况下进行([SWS_DM_00762])。实例标识符将该对象链接到一个端口原型,该端口原型必须由 DiagnosticSecurityLevelInterface 进行类型化([SWS_DM_00762])。参数 concurrencyType 强制规定方法调用必须以线程安全(kConcurrent)还是非线程安全(kNotConcurrent)方式进行处理([SWS_DM_00762])。

关于所有权语义,该类被设计为单例:复制构造函数([SWS_DM_01617])和复制赋值运算符([SWS_DM_01615])以及移动构造函数([SWS_DM_01618])和移动赋值运算符([SWS_DM_01616])均被删除(=delete)。创建后,该实例处于非活动状态,直到通过 Offer() 在 DM 中注册([SWS_DM_00766])。在终止前,StopOffer() 停用请求转发([SWS_DM_00767])。解释:StopOffer() 应始终在该对象通过虚析构函数([SWS_DM_00763])销毁之前被调用,以确保在 DM 中取消注册正在运行的请求。 问题 Q-3bbb715f727e373a (未决)

使用路径

派生处理程序实现的典型使用流程包括以下步骤:

  1. 激活:应用程序实例化派生类并调用 Offer(),以激活 DM 对诊断请求的转发([SWS_DM_00766])。
  2. 种子提供:当用于生成种子的诊断请求到达时,DM 调用方法 GetSeed([SWS_DM_00764])。应用程序处理传入的 securityAccessDataRecord,考虑 cancellationHandler,并通过 ara::core::Future<ara::core::Vector<std::uint8_t>> 异步返回计算出的种子([SWS_DM_00764])。传入数据跨度的缓冲区在 Promise 兑现或取消之前一直保持有效([SWS_DM_00764])。
  3. 密钥验证:一旦诊断测试仪发送计算出的密钥,DM 便会调用 CompareKey([SWS_DM_00765])。应用程序检查参数 key 并通过 ara::core::Future<KeyCompareResultType> 异步传输结果([SWS_DM_00765])。
  4. 停用:为了结束诊断操作,应用程序调用 StopOffer()([SWS_DM_00767])。
通过 SecurityAccess 进行安全认证的流程应用ara::diag::SecurityAccess诊断管理Use Case: AktivierungOffer()Dienst registrierenResult<void>Result<void>Use Case: Seed anfordernGetSeed(securityAccessDataRecord, metaInfo, cancellationHandler)Seed generierenFuture<Vector<uint8_t>> (Seed)Use Case: 验证密钥CompareKey(key, metaInfo, cancellationHandler)检查密钥Future<KeyCompareResultType>Use Case: DeaktivierungStopOffer()Dienst deregistrieren

时序图:从激活经由 GetSeed 和 CompareKey 到停用的交互周期。来源:[SWS_DM_00764], [SWS_DM_00765], [SWS_DM_00766], [SWS_DM_00767]

错误场景

使用 ara::diag::SecurityAccess 时指定了多个错误层级:

  • 构造函数和模型违规:如果模型中的 InstanceSpecifier 无法解析或未引用 PortPrototype,则报告 InstanceSpecifierMappingIntegrityViolation([SWS_DM_00762])。如果引用的端口未由 DiagnosticSecurityLevelInterface 类型化,则存在 PortInterfaceMappingViolation([SWS_DM_00762])。如果在运行时缺少匹配的建模进程,则发生 ProcessMappingViolation;如果在进程内多次使用相同标识符,则触发 InstanceSpecifierAlreadyInUseViolation([SWS_DM_00762])。
  • 提供时的状态错误:在服务提供已处于活动状态时再次调用 Offer() 将失败,并返回具有回滚语义的错误 DiagOfferErrc::kAlreadyOffered([SWS_DM_00766])。
  • 负面 UDS 响应:如果种子生成或密钥验证失败,应用程序必须通过 DiagUdsNrcErrc 报告符合 ISO 14229-1 的合适否定响应码(NRC)([SWS_DM_00764], [SWS_DM_00765])。
  • 诊断连接中止:通过参数 cancellationHandler,应用程序可以使用 IsCanceled() 检查会话是否已中止,或者通过 SetNotifier() 注册用于中止的通知函数([SWS_DM_00764], [SWS_DM_00765])。
  • 失败尝试的持久化:在每次更改安全级别的尝试失败后,Diagnostic Management 都需要持久化存储计数器,以便在篡改或复位后依然保留(AUTOSAR_AP_SWS_Diagnostics §4.1 “Limitations of sub-functions of 0x19 ReadDTCInformation”, [SWS_DM_00479])。

本指南基于 AUTOSAR Adaptive R25-11 规范,并总结了对类 ara::diag::SecurityAccess 的要求。

成员图

类图

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

G nara__diag__SecurityAccess583 SecurityAccess + SecurityAccess() + operator=() + ~SecurityAccess() + CompareKey() + GetSeed() + Offer() + StopOffer()

详细视图

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

构造函数和析构函数

Constructor of SecurityAccess.

重载 SecurityAccess 3
explicit SecurityAccess (const ara::core::InstanceSpecifier &specifier, ConcurrencyType concurrencyType) noexcept; SWS_DM_00762
SecurityAccess (SecurityAccess &)=delete; SWS_DM_01617
SecurityAccess (SecurityAccess &&) noexcept=delete; SWS_DM_01618

Destructor of SecurityAccess .

virtual ~SecurityAccess () noexcept;

方法

CompareKey 函数

This method is called, when a diagnostic request has been finished, to notify about the outcome.

virtual ara::core::Future< KeyCompareResultType > CompareKey (ara::core::Span< const std::uint8_t > key, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept=0;
GetSeed 函数

Called for any request messsage.

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

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

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

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

void StopOffer () noexcept;

运算符

operator= 函数 2

SecurityAccess shall be a single not assignable instance.

重载 = 2

方法文档

函数 CompareKey [SWS_DM_00765] Upstream: RS_AP_00138, RS_Diag_04005, RS_Diag_04170, RS_AP_00119

virtual ara::core::Future< KeyCompareResultType > CompareKey (ara::core::Span< const std::uint8_t > key, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept=0;

This method is called, when a diagnostic request has been finished, to notify about the outcome.

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

使用

来自类 ara::diag::SecurityAccess [SWS_DM_00765] 的纯虚方法 CompareKey 由应用程序端实现,以便在 UDS 服务 0x27(SecurityAccess)中验证客户端传输的密钥 SWS Diagnostics §7.3.2.8.9 “Service 0x27 – SecurityAccess”。它与 GetSeed 一起构成了符合 ISO 14229-1 的静态种子-密钥机制的基础 [SWS_DM_00863]。

该函数的参数包括:

  • key:指向待检查密钥数据的 ara::core::Span<const std::uint8_t>。该缓冲区保持有效,直到关联的 Promise 被满足或通过 cancellationHandler 取消处理 [SWS_DM_00765]。
  • metaInfo:传入诊断请求的元信息 [SWS_DM_00765]。
  • cancellationHandler:允许通过 cancellationHandler.IsCanceled 查询取消状态,并在会话取消时通过 cancellationHandler.SetNotifier 注册通知函数 [SWS_DM_00765]。

检查结果通过 ara::core::Future<KeyCompareResultType> 异步提供 [SWS_DM_00765]。

错误处理与交互

如果密钥比对失败或在处理期间发生错误,则必须在 Future 中通过 DiagUdsNrcErrc 传递符合 ISO 14229-1 的合适否定响应码(NRC)[SWS_DM_00765]。若请求的子功能未针对 CompareKey 进行配置,则使用 NRC 0x12(kSubFunctionNotSupported)应答该请求 [SWS_DM_00363]。Diagnostic Server 会对失败尝试进行计数 [SWS_DM_00270],并将其与阈值进行比较 [SWS_DM_00271]。

如果安全访问成功解锁,服务器会在内部更新安全级别 [SWS_DM_00846],重置失败尝试计数器 [SWS_DM_00270],并向 IdsM 报告安全事件 SEV_UDS_SECURITY_ACCESS_SUCCESSFUL [SWS_DM_02019]。

并发性与限制

该接口声明为 noexcept 且为异常安全(exception safe)[SWS_DM_00765]。线程安全是有条件的(conditional):实现是否必须为线程安全,取决于在 SecurityAccess 的构造函数中传入的 ConcurrencyType [SWS_DM_00765]。

本使用说明由 AI 基于 AUTOSAR 规范生成。

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

Header-Datei#include "ara/diag/security_access.h"
Scopeclass ara::diag::SecurityAccess
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
keyThe key to be validated. 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< KeyCompareResultType >Result of the key validation.

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_00765
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00765@rel:R25-11#d50be081
Content hash
d50be081
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00765
Status: valid/unmigrated Version: rel:R25-11#fcff65aa 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_00765@rel:R25-11#fcff65aa
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#d4d3823f2026-09-30
  • R19-11rel:R19-11#4bf18d9e2026-10-14
  • R20-11rel:R20-11#52ff58612026-10-14
  • R21-11rel:R21-11#42d7f4462026-10-14
  • R22-11rel:R22-11#94736e912026-10-14
  • R23-11rel:R23-11#cbc123ea2026-10-14
  • R24-11rel:R24-11#e09a76d52026-10-14
  • R25-11rel:R25-11#fcff65aa2026-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

函数 GetSeed [SWS_DM_00764] Upstream: RS_AP_00138, RS_Diag_04005, RS_Diag_04170, RS_AP_00119

virtual ara::core::Future< ara::core::Vector< std::uint8_t > > GetSeed (ara::core::Span< const std::uint8_t > securityAccessDataRecord, const MetaInfo &metaInfo, CancellationHandler cancellationHandler) noexcept=0;

Called for any request messsage.

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

使用

一旦接收到针对服务 0x27 SecurityAccess 的 UDS 请求,且传输的子功能值与配置的 requestSeedId 匹配,纯虚方法 ara::diag::SecurityAccess::GetSeed 就会被诊断服务器实例调用 [SWS_DM_00863]。这是根据 ISO 14229-1 符合标准地实现服务 0x27 的一部分 [SWS_DM_00236]。

该调用通过参数 securityAccessDataRecord(作为 ara::core::Span)传入诊断客户端提供的有效载荷数据,在 metaInfo 中传入上下文信息,并传入一个类型为 CancellationHandler 的对象 [SWS_DM_00764]。若客户端未发送数据,则传入空的 data span [SWS_DM_00863]。传入的数据保持有效,直到关联的 Promise 被满足或处理被取消 [SWS_DM_00764]。

异步语义与并发性

该函数异步返回一个包含所生成种子的 ara::core::Future<ara::core::Vector<std::uint8_t>> [SWS_DM_00764]。通过 cancellationHandler,应用程序可以借助 IsCanceled 检查会话是否已取消,或通过 SetNotifier 注册通知 [SWS_DM_00764]。根据 ISO 14229-1 的静态种子机制也必须在应用程序端于 GetSeed 中实现 SWS Diagnostics §7.3.2.8.9 “Service 0x27 – SecurityAccess”。

在并发性方面,该方法是有条件线程安全的:实现是否必须为线程安全,取决于传递给 SecurityAccess 构造函数的 ConcurrencyType SWS Diagnostics §8.24.2.1.3.2 “GetSeed”。

错误处理

如果无法确定有效种子,则必须通过 DiagUdsNrcErrc 使用符合 ISO 14229-1 的相应否定响应码(NRC)完成 Future [SWS_DM_00764]。该接口声明为 noexcept 且为异常安全 [SWS_DM_00764]。

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

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

Header-Datei#include "ara/diag/security_access.h"
Scopeclass ara::diag::SecurityAccess
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
securityAccessDataRecordSecurity Access payload, 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<ara::core::Vector<std::uint8_t > >provided seed

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_00764
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00764@rel:R25-11#429f14e1
Content hash
429f14e1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00764
Status: valid/unmigrated Version: rel:R25-11#78b36e49 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_00764@rel:R25-11#78b36e49
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#2e6ffe502026-09-30
  • R19-11rel:R19-11#ec261d632026-10-14
  • R20-11rel:R20-11#d20d81e72026-10-14
  • R21-11rel:R21-11#9f3e5c3f2026-10-14
  • R22-11rel:R22-11#b2714bed2026-10-14
  • R23-11rel:R23-11#cb771e7d2026-10-14
  • R24-11rel:R24-11#e4519bf42026-10-14
  • R25-11rel:R25-11#78b36e492026-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_00766] Upstream: RS_AP_00139, RS_Diag_04005, RS_AP_00119

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

使用

头文件 ara/diag/security_access.h 中的方法 ara::diag::SecurityAccess::Offer ([SWS_DM_00766]) 允许 Diagnostic Manager (DM) 将传入的请求消息 (Request Messages) 转发给已注册的安全访问处理程序。该调用为同步进行,不带传入参数,并返回 ara::core::Result<void>。

错误处理

在出错时,返回对象提供一个错误代码。如果该服务已在实例上注册,则返回 DiagOfferErrc::kAlreadyOffered ([SWS_DM_00766])。该函数声明为 noexcept 并保证异常安全(exception safe)。

并发性与限制

该接口被指定为非线程安全 (not thread-safe) ([SWS_DM_00766])。对同一实例的并发调用必须由应用程序进行同步。解读:如果不事先撤回提供,多次未经协调的调用应当始终会被以 kAlreadyOffered 拒绝。 问题 Q-848ccd3c78403eea (未决)

相互作用

通过 Offer 提供功能遵循 AUTOSAR Adaptive 诊断的统一步骤激活模式,正如同样为 ServiceValidation ([SWS_DM_00776]) 或 DoIPGroupIdentification ([SWS_DM_00725]) 定义的那样。尽管名称与通信接口相同,但这属于诊断特有的实现,不得与 ara::com 混淆 (SWS Diagnostics §7.3.4.1.2 “Monitors”)。

本文由 AI 基于 AUTOSAR 规范 R25-11 生成。

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

Header-Datei#include "ara/diag/security_access.h"
Scopeclass ara::diag::SecurityAccess
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_00766
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00766@rel:R25-11#5bab1c13
Content hash
5bab1c13
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00766
Status: valid/unmigrated Version: rel:R25-11#00210900 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_00766@rel:R25-11#00210900
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#56ad395b2026-09-30
  • R19-11rel:R19-11#d015c3bb2026-10-14
  • R20-11rel:R20-11#5653979a2026-10-14
  • R21-11rel:R21-11#d5a352932026-10-14
  • R22-11rel:R22-11#4dd706ea2026-10-14
  • R23-11rel:R23-11#898492102026-10-14
  • R24-11rel:R24-11#6e0b7b5e2026-10-14
  • R25-11rel:R25-11#002109002026-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

函数 SecurityAccess [SWS_DM_00762] Upstream: RS_AP_00137, RS_Diag_04005, RS_AP_00170, RS_AP_00171, RS_AP_00172, RS_AP_00173

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

Constructor of SecurityAccess.

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

使用

显式构造函数以同步且异常安全([SWS_DM_00762])的方式初始化 ara::diag::SecurityAccess 的实例。它接收对 ara::core::InstanceSpecifier 的引用以及 ConcurrencyType 作为参数。参数 specifier 必须引用由 DiagnosticSecurityLevelInterface 定型的建模 PortPrototype。通过 concurrencyType 确定该接口的回调方法是以并发(kConcurrent)还是非并发(kNotConcurrent)方式处理。

错误处理

该函数声明带有 noexcept([SWS_DM_00762])。建模配置错误时可能会发生以下违反规则的情况:

  • InstanceSpecifierMappingIntegrityViolation:InstanceSpecifier无法在执行上下文中解析,或未指向PortPrototype。
  • PortInterfaceMappingViolation:引用的 PortPrototype 未被类型化为 DiagnosticSecurityLevelInterface。
  • ProcessMappingViolation:在运行时不存在与实例标识符匹配的已建模进程。
  • InstanceSpecifierAlreadyInUseViolation:InstanceSpecifier 在进程内已被使用。

Interpretation:此类违规的发生可能会在框架内部导致运行时中止或安全处理,因为构造函数不通过返回值报告错误码。 问题 Q-de6e36dc7947326e (未决)

并发性与限制

构造函数本身被指定为线程安全([SWS_DM_00762])。拷贝和移动构造函数以及关联的赋值运算符已被显式删除([SWS_DM_01617],[SWS_DM_01618],[SWS_DM_01615],[SWS_DM_01616]);因此实例既不能被拷贝也不能被移动。构造函数传递的 concurrencyType 决定了是否必须以线程安全的方式提供虚方法 GetSeed([SWS_DM_00764])和 CompareKey([SWS_DM_00765])。而析构函数则不是线程安全的([SWS_DM_00763])。

相互作用

实例化后,应用程序必须调用 Offer([SWS_DM_00766]),以便 Diagnostic Server (DM) 转发服务 0x27(SWS Diagnostics §7.3.2.8.9 “Service 0x27 – SecurityAccess”,[SWS_DM_00236])的传入 UDS 请求。在子功能匹配时,服务器将请求转发给 GetSeed([SWS_DM_00863])。可以通过 StopOffer([SWS_DM_00767])再次停用转发。

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

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

Header-Datei#include "ara/diag/security_access.h"
Scopeclass ara::diag::SecurityAccess
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 referenced by a pingViolation DiagnosticSecurityLevelPortMapping needs to be typed by a DiagnosticSecurityLevelInterface. 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 DiagnosticSecurityLevelInterface.
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_00762
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00762@rel:R25-11#ef427f26
Content hash
ef427f26
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00762
Status: valid/unmigrated Version: rel:R25-11#d28cef1a 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_00762@rel:R25-11#d28cef1a
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#043c5c7d2026-09-30
  • R19-11rel:R19-11#7b2a44bb2026-10-14
  • R20-11rel:R20-11#7227b8b52026-10-14
  • R21-11rel:R21-11#7227b8b52026-10-14
  • R22-11rel:R22-11#63feab942026-10-14
  • R23-11rel:R23-11#00b457c22026-10-14
  • R24-11rel:R24-11#9298af8d2026-10-14
  • R25-11rel:R25-11#d28cef1a2026-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

函数 SecurityAccess [SWS_DM_01617] Upstream: RS_AP_00147

SecurityAccess (SecurityAccess &)=delete;

SecurityAccess shall be a single not copy-able instance.

Header-Datei#include "ara/diag/security_access.h"
Scopeclass ara::diag::SecurityAccess

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

Record
AUTOSAR/AP/record/SWS_DM_01617
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01617@rel:R25-11#a0ed6537
Content hash
a0ed6537
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01617
Status: valid/unmigrated Version: rel:R25-11#d3831de3 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_01617@rel:R25-11#d3831de3
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#3fb7c46d2026-09-30
  • R23-11rel:R23-11#50f56be22026-10-14
  • R24-11rel:R24-11#177a95552026-10-14
  • R25-11rel:R25-11#d3831de32026-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

函数 SecurityAccess [SWS_DM_01618] Upstream: RS_AP_00147

SecurityAccess (SecurityAccess &&) noexcept=delete;

Move constructor of SecurityAccess.

Header-Datei#include "ara/diag/security_access.h"
Scopeclass ara::diag::SecurityAccess

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

Record
AUTOSAR/AP/record/SWS_DM_01618
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01618@rel:R25-11#0f9d79e5
Content hash
0f9d79e5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01618
Status: valid/unmigrated Version: rel:R25-11#99b5fc60 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_01618@rel:R25-11#99b5fc60
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#b7a6da4b2026-09-30
  • R23-11rel:R23-11#f9d976f12026-10-14
  • R24-11rel:R24-11#99b5fc602026-10-14
  • R25-11rel:R25-11#99b5fc602026-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_00767] Upstream: RS_Diag_04005

void StopOffer () noexcept;

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

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

使用

类 ara::diag::SecurityAccess(头文件 ara/diag/security_access.h)的成员函数 StopOffer 用于停用将传入的请求消息从 Diagnostic Management (DM) 转发到该实例 [SWS_DM_00767]。该调用同步执行,不接受任何参数,且没有返回值(void)[SWS_DM_00767]。

错误处理

该函数被声明为 noexcept,并归类为异常安全(exception safe)[SWS_DM_00767]。既不报告错误代码也不报告 C++ 异常;接口规范中未预设注销过程中的错误行为或异常状态 [SWS_DM_00767]。

并发性与限制

根据规范,StopOffer 不是线程安全的(not thread-safe)[SWS_DM_00767]。如果 Adaptive Application 的多个线程并发访问 ara::diag::SecurityAccess 的同一实例,则必须对调用进行外部同步。

相互作用

该方法是 DM 领域跨模块功能模式的一部分。类似的 StopOffer 方法存在于许多其他诊断服务中,例如:

尽管命名借用了 ara::com 中的服务提供,但它是用于控制 ara::diag 内部消息流的独立诊断实现 AUTOSAR_AP_SWS_Diagnostics §7.3.4.1.2 “Monitors”。

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

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

Header-Datei#include "ara/diag/security_access.h"
Scopeclass ara::diag::SecurityAccess
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_00767
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00767@rel:R25-11#fbd0f92c
Content hash
fbd0f92c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00767
Status: valid/unmigrated Version: rel:R25-11#942cb137 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_00767@rel:R25-11#942cb137
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f72493482026-09-30
  • R19-11rel:R19-11#78ac458e2026-10-14
  • R20-11rel:R20-11#d7a868c22026-10-14
  • R21-11rel:R21-11#84fad67f2026-10-14
  • R22-11rel:R22-11#8e125bd42026-10-14
  • R23-11rel:R23-11#70d9a1082026-10-14
  • R24-11rel:R24-11#4b26aa9f2026-10-14
  • R25-11rel:R25-11#942cb1372026-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_01615] Upstream: RS_AP_00147

SecurityAccess & operator= (SecurityAccess &)=delete;

SecurityAccess shall be a single not assignable instance.

Header-Datei#include "ara/diag/security_access.h"
Scopeclass ara::diag::SecurityAccess

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

Record
AUTOSAR/AP/record/SWS_DM_01615
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01615@rel:R25-11#e34a033b
Content hash
e34a033b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01615
Status: valid/unmigrated Version: rel:R25-11#860bde59 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_01615@rel:R25-11#860bde59
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#b9674d212026-09-30
  • R23-11rel:R23-11#2062081c2026-10-14
  • R24-11rel:R24-11#860bde592026-10-14
  • R25-11rel:R25-11#860bde592026-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_01616] Upstream: RS_AP_00147

SecurityAccess & operator= (SecurityAccess &&)=delete;

Move assignment operator of SecurityAccess.

Header-Datei#include "ara/diag/security_access.h"
Scopeclass ara::diag::SecurityAccess

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

Record
AUTOSAR/AP/record/SWS_DM_01616
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01616@rel:R25-11#d45d1577
Content hash
d45d1577
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01616
Status: valid/unmigrated Version: rel:R25-11#7c8f632b 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_01616@rel:R25-11#7c8f632b
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#362e1d632026-09-30
  • R23-11rel:R23-11#340c00fd2026-10-14
  • R24-11rel:R24-11#7c8f632b2026-10-14
  • R25-11rel:R25-11#7c8f632b2026-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

函数 ~SecurityAccess [SWS_DM_00763] Upstream: RS_AP_00134, RS_Diag_04005

virtual ~SecurityAccess () noexcept;

Destructor of SecurityAccess .

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

虚析构函数 ~SecurityAccess [SWS_DM_00763] 终止 Diagnostics 模块 AUTOSAR_AP_SWS_Diagnostics §8.24.2.1.1.3 “Destructor” 中服务类 ara::diag::SecurityAccess 实例的生命周期。该接口通过头文件 #include "ara/diag/security_access.h" 提供 [SWS_DM_00763]。执行以同步方式进行,该函数既不接受传入参数,也不提供返回值 [SWS_DM_00763]。

在错误处理方面,该操作被归类为 exception safe 并声明为 noexcept [SWS_DM_00763]。因此它不会抛出异常。规范中未针对对象的销毁定义特定的错误码以及向开发或诊断错误管理器(DET 或 DEM)发送的错误报告 [SWS_DM_00763]。

关于并发性,该函数被明确划分为 not thread-safe [SWS_DM_00763]。绝不允许在对同一实例调用其他方法的同时销毁该对象。作为解读:在销毁之前,可能必须有序完成该实例所有正在运行的诊断及安全访问活动,因为并发访问会导致未定义行为。 问题 Q-12c13e3eebd9e574 (未决)

在与平台的交互中,该函数用于实现上游需求 RS_AP_00134 和 RS_Diag_04005 AUTOSAR_AP_SWS_Diagnostics §8.24.2.1.1.3 “Destructor”。

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

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

Header-Datei#include "ara/diag/security_access.h"
Scopeclass ara::diag::SecurityAccess
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_00763
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00763@rel:R25-11#289b5d85
Content hash
289b5d85
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00763
Status: valid/unmigrated Version: rel:R25-11#8b163b56 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_00763@rel:R25-11#8b163b56
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#98bb90f72026-09-30
  • R19-11rel:R19-11#1b925c952026-10-14
  • R20-11rel:R20-11#fdb51c102026-10-14
  • R21-11rel:R21-11#5d5e7b7a2026-10-14
  • R22-11rel:R22-11#c67efa4a2026-10-14
  • R23-11rel:R23-11#fccf37df2026-10-14
  • R24-11rel:R24-11#8b163b562026-10-14
  • R25-11rel:R25-11#8b163b562026-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