DEENESPTFRRUARHIKOZHNL

类 ara::diag::ClientAuthenticationHandle

[SWS_DM_01145] Upstream: RS_Diag_04251

class ClientAuthenticationHandle final {...};

Definition of the ClientAuthenticationHandle which is returned to the application when an AuthenticationState is set by the application.

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

用户指南人工智能生成

管理动态诊断权限、会话定时器以及诊断客户端身份验证的撤销。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: ceee534cb2db 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

管理动态诊断权限、会话定时器以及诊断客户端身份验证的撤销。

类 ara::diag::ClientAuthenticationHandle 供应用程序用于管理诊断客户端的活动身份验证会话 [SWS_DM_01206]。通过该句柄,应用程序可配置动态访问列表并刷新客户端的不活动定时器 [SWS_DM_01213]。该对象遵循严格的移动语义且不可复制,并在诊断管理不可用时通过 DiagErrc::kServiceNotAvailable 报告错误。通过调用 Revoke,可随时受控地撤销已授予的角色和附加权限。

上下文

API 类 ara::diag::ClientAuthenticationHandle 定义在头文件 ara/diag/client_authentication_handle.h 中 [SWS_DM_01145]。它充当核心控制对象,一旦客户端通过身份验证或其默认角色被临时覆盖,便由 Diagnostic Server 实例提供给诊断应用程序 AUTOSAR_AP_SWS_Diagnostics §7.3.2.3.3 “ClientAuthenticationHandle”。

在系统启动时,客户端默认处于状态 kDeAuthenticated [SWS_DM_01205],并具有预配置的默认角色 [SWS_DM_01204]。当应用程序调用 ara::diag::ClientAuthentication::Authenticate 时,Diagnostic Server 会将客户端置于状态 kAuthenticated 并返回一个 ara::diag::ClientAuthenticationHandle [SWS_DM_01206]。同样,在调用 ara::diag::ClientAuthentication::OverrideDefaultRoles 以临时调整角色时,也会生成这样一个句柄 [SWS_DM_01209]。应用程序通过该句柄控制身份验证状态和动态访问列表(DynamicAccessList),该列表为已通过身份验证的客户端授予超出诊断提取(Diagnostic Extract)之外的诊断资源附加访问权限 AUTOSAR_AP_SWS_Diagnostics §7.3.2.3.3 “ClientAuthenticationHandle”。

diag_auth_context Anwendung Anwendung ClientAuthenticationHandle ClientAuthenticationHandle Anwendung->ClientAuthenticationHandle steuert Zugriff DiagnosticServer DiagnosticServer ClientAuthenticationHandle->DiagnosticServer aktualisiert Sitzung DiagnoseClient DiagnoseClient DiagnoseClient->DiagnosticServer sendet UDS-Anfragen

上下文图:应用程序、ClientAuthenticationHandle 与 Diagnostic Server 的交互。来源:[SWS_DM_01206]、[SWS_DM_01209]、AUTOSAR_AP_SWS_Diagnostics §7.3.2.3.3 “ClientAuthenticationHandle”

生命周期

ara::diag::ClientAuthenticationHandle 的实例化通常由 Diagnostic Server 的工厂方法在 Authenticate [SWS_DM_01206] 或 OverrideDefaultRoles [SWS_DM_01209] 的过程中执行。此外,该类还提供了一个无参默认构造函数 [SWS_DM_01146];以这种方式创建的对象大概充当未绑定的占位符,直到通过移动赋值向其转移活动句柄。 问题 Q-74f44c072616cce9 (未决)

在所有权方面,该类实现了严格的移动语义:移动构造函数 [SWS_DM_01148] 和移动赋值运算符 [SWS_DM_01149] 被定义为 noexcept = default。复制已被完全禁止,因为复制构造函数 [SWS_DM_01150] 和复制赋值运算符 [SWS_DM_01151] 已被删除(=delete)。实例的释放通过析构函数 ~ClientAuthenticationHandle() [SWS_DM_01147] 进行。

在并发性方面,默认构造函数被指定为线程安全(thread-safe)[SWS_DM_01146]。相比之下,析构函数 [SWS_DM_01147] 以及所有修改状态的方法调用均被标明为非线程安全(not thread-safe)[SWS_DM_01152]、[SWS_DM_01153]、[SWS_DM_01154]、[SWS_DM_01155]。因此,对同一句柄的并发访问需要应用程序端进行同步。

使用路径

运行时的典型流程包括配置动态权限、维持授权以及受控终止:

  1. 获取句柄:应用程序向 ara::diag::ClientAuthentication 发起身份验证并接收句柄实例 [SWS_DM_01206]。
  2. 设置或扩展访问列表:应用程序通过方法 Set 完全替换诊断会话的动态访问列表 [SWS_DM_01153]、[SWS_DM_01213]。或者,Append 将附加的诊断模式追加到现有访问列表中 [SWS_DM_01152] AUTOSAR_AP_SWS_Diagnostics §7.3.2.3.4 “DynamicAccessList Creation and Update”。
  3. 刷新活动状态:在默认会话中处于不活动状态时,不活动超时到期后可能会自动回退到 kDeAuthenticated [SWS_DM_01210]。通过调用 Refresh,应用程序可延长由 Authenticate 或 OverrideDefaultRoles 启动的定时器 [SWS_DM_01155] AUTOSAR_AP_SWS_Diagnostics §7.3.2.3.3 “ClientAuthenticationHandle”。
  4. 撤销权限:应用程序使用 Revoke 显式取消客户端的身份验证,删除关联的 DynamicAccessList 并重置被覆盖的默认角色 [SWS_DM_01154]。
通过 ClientAuthenticationHandle 进行身份验证和访问控制应用ClientAuthenticationClientAuthenticationHandleDiagnosticServerUse Case: 身份验证和句柄提供Authenticate(roles)将状态设置为 kAuthenticatedClientAuthenticationHandleUse Case: 权限配置和定时器更新Set(dynamicAccessList)DynamicAccessList ersetzenResult<void>Refresh()Inaktivitaetstimer zuruecksetzenResult<void>Use Case: SitzungsbeendigungRevoke()kDeAuthenticated & Rechte loeschenResult<void>

时序图:通过句柄进行身份验证、权限管理与撤销的流程。来源:[SWS_DM_01206]、[SWS_DM_01153]、[SWS_DM_01155]、[SWS_DM_01154]

错误场景

操作方法 Set [SWS_DM_01153]、Append [SWS_DM_01152]、Refresh [SWS_DM_01155] 和 Revoke [SWS_DM_01154] 各自返回 ara::core::Result<void>,并被声明为 noexcept 以及异常安全(exception safe)。

如果由于 Diagnostic Manager 的核心功能当前不可用而导致通信或执行失败,调用将返回错误代码 DiagErrc::kServiceNotAvailable [SWS_DM_01152]、[SWS_DM_01153]、[SWS_DM_01154]、[SWS_DM_01155]。在这种情况下,回滚语义生效,从而使客户端的身份验证状态或访问列表中不会残留不一致的部分更改。

基于诊断接口的 AUTOSAR Adaptive R25-11 规范。

成员图

类图

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

G nara__diag__ClientAuthenticationHandle939 ClientAuthenticationHandle + ClientAuthenticationHandle() + ~ClientAuthenticationHandle() + Append() + Refresh() + Revoke() + Set() + operator=()

详细视图

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

构造函数和析构函数

Constructor of ClientAuthenticationHandle.

重载 ClientAuthenticationHandle 3
ClientAuthenticationHandle () noexcept; SWS_DM_01146
ClientAuthenticationHandle (ClientAuthenticationHandle &&other) noexcept=default; SWS_DM_01148
ClientAuthenticationHandle (ClientAuthenticationHandle const &other)=delete; SWS_DM_01150

Destructor of ClientAuthenticationHandle.

方法

Append 函数

This function is used by the application to append a DynamicAccessList to the already existing DynamicAccessList of a Diagnostic Conversation.

ara::core::Result< void > Append (DiagnosticServiceDynamicAccessList dynamicAccessList) noexcept;
Refresh 函数

This function is used by the application to refresh the timer that was started by Authenticate or OverrideDefaultRoles. If both Methods were previously called, both timers are refreshed.

ara::core::Result< void > Refresh () noexcept;
Revoke 函数

This function is used by the application to de-authenticate a client, and also to clear the Dynamic AccessList and any overridden defaults.

ara::core::Result< void > Revoke () noexcept;
Set 函数

This function is used by the application to set/replace a DynamicAccessList of a Diagnostic Conversation.

ara::core::Result< void > Set (DiagnosticServiceDynamicAccessList dynamicAccessList) noexcept;

运算符

operator= 函数 2

Move assignment operator of ClientAuthenticationHandle.

重载 = 2
auto operator= (ClientAuthenticationHandle &&other) & noexcept -> ClientAuthenticationHandle & =default; SWS_DM_01149
auto operator= (ClientAuthenticationHandle const &other) -> Client AuthenticationHandle &=delete; SWS_DM_01151

方法文档

函数 Append [SWS_DM_01152] Upstream: RS_Diag_04251

ara::core::Result< void > Append (DiagnosticServiceDynamicAccessList dynamicAccessList) noexcept;

This function is used by the application to append a DynamicAccessList to the already existing DynamicAccessList of a Diagnostic Conversation.

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

应用程序使用类 ara::diag::ClientAuthenticationHandle 的方法 Append 将动态访问列表(dynamicAccessList)追加到活动诊断会话的已有 DynamicAccessList 中 [SWS_DM_01152]。该接口通过头文件 ara/diag/client_authentication_handle.h 提供 AUTOSAR_AP_SWS_Diagnostics §8.6.1.1.3.1 “Append”。

该调用以同步方式执行,并指定为 noexcept [SWS_DM_01152]。该函数接收 DiagnosticServiceDynamicAccessList 作为输入参数。返回类型 ara::core::Result<void> 指示成功完成,或者在发生错误时传递错误码 DiagErrc::kServiceNotAvailable [SWS_DM_01152]。后者表明 Diagnostic Management 的基本功能当前不可用。对于这种错误情况适用回滚语义,从而保留访问列表的先前状态 [SWS_DM_01152]。

关于并发性,该操作被视为异常安全(exception safe),但被明确归类为非线程安全(not thread-safe)[SWS_DM_01152]。因此,在对同一句柄对象进行并行访问时,推测可能需要由调用方应用程序进行外部同步。 问题 Q-f0da9a0538a86a16 (未决)

此使用说明自动生成,且完全基于 AUTOSAR R25-11 的规范数据。

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

Header-Datei#include "ara/diag/client_authentication_handle.h"
Scopeclass ara::diag::ClientAuthenticationHandle
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
dynamicAccessListThe DynamicAccessList to be appended in the client.

Rückgabewert

TypBeschreibung
ara::core::Result< void >Returns nothing or an error.

Fehler

FehlercodeBeschreibung
DiagErrc::kServiceNotAvailablerollback_semantics The call cannot be executed, because essential DM functionality is currently not available.

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

Record
AUTOSAR/AP/record/SWS_DM_01152
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01152@rel:R25-11#dbb0c159
Content hash
dbb0c159
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01152
Status: valid/unmigrated Version: rel:R25-11#760cf1a2 Versionshistorie & Revisions (1 transition, 6 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_01152@rel:R25-11#760cf1a2
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#5fbe369d2026-09-30
  • R21-11rel:R21-11#fe6687392026-10-14
  • R22-11rel:R22-11#4d5753f62026-10-14
  • R23-11rel:R23-11#85d630192026-10-14
  • R24-11rel:R24-11#e44623a72026-10-14
  • R25-11rel:R25-11#760cf1a22026-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

函数 ClientAuthenticationHandle [SWS_DM_01146] Upstream: RS_Diag_04251

ClientAuthenticationHandle () noexcept;

Constructor of ClientAuthenticationHandle.

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

同步默认构造函数 [SWS_DM_01146] 创建类 ara::diag::ClientAuthenticationHandle 的实例。该调用不接受任何传入参数且不提供返回值。该函数被声明为 noexcept,并被指定为线程安全 (thread-safe) 以及异常安全 [SWS_DM_01146],因此在创建过程中不会出现错误代码或异常。

所创建对象的传递与生命周期受以下限制:

在整个系统中,Diagnostic Server 通常通过 Authenticate [SWS_DM_01142] 或 OverrideDefaultRoles [SWS_DM_01141] 提供绑定到客户端的活动句柄 (AUTOSAR_AP_SWS_Diagnostics §7.3.2.3.3 “ClientAuthenticationHandle”)。因此,通过默认构造函数创建的实例可用作未绑定的占位符,仅在随后的移动赋值 [SWS_DM_01149] 后才接收有效句柄以控制访问列表。 问题 Q-ce182402bd1d4072 (未决)

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

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

Header-Datei#include "ara/diag/client_authentication_handle.h"
Scopeclass ara::diag::ClientAuthenticationHandle
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

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

Record
AUTOSAR/AP/record/SWS_DM_01146
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01146@rel:R25-11#2c480f96
Content hash
2c480f96
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01146
Status: valid/unmigrated Version: rel:R25-11#e53f888a Versionshistorie & Revisions (1 transition, 6 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_01146@rel:R25-11#e53f888a
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#343d84612026-09-30
  • R21-11rel:R21-11#382fc8b12026-10-14
  • R22-11rel:R22-11#1b1476a42026-10-14
  • R23-11rel:R23-11#ae2414252026-10-14
  • R24-11rel:R24-11#2fa9197f2026-10-14
  • R25-11rel:R25-11#e53f888a2026-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

函数 ClientAuthenticationHandle [SWS_DM_01148] Upstream: RS_Diag_04251

ClientAuthenticationHandle (ClientAuthenticationHandle &&other) noexcept=default;

Move constructor of ClientAuthenticationHandle.

Header-Datei#include "ara/diag/client_authentication_handle.h"
Scopeclass ara::diag::ClientAuthenticationHandle
Exception-Sicherheitexception safe

Parameter (in)

ParameterBeschreibung
otherObject to move-construct from

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

Record
AUTOSAR/AP/record/SWS_DM_01148
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01148@rel:R25-11#c8fffcfe
Content hash
c8fffcfe
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01148
Status: valid/unmigrated Version: rel:R25-11#61fab40f Versionshistorie & Revisions (1 transition, 6 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_01148@rel:R25-11#61fab40f
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#398da6ac2026-09-30
  • R21-11rel:R21-11#4ded0cd12026-10-14
  • R22-11rel:R22-11#6906c58f2026-10-14
  • R23-11rel:R23-11#9b4b55cb2026-10-14
  • R24-11rel:R24-11#ce30ca042026-10-14
  • R25-11rel:R25-11#61fab40f2026-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

函数 ClientAuthenticationHandle [SWS_DM_01150] Upstream: RS_Diag_04251

ClientAuthenticationHandle (ClientAuthenticationHandle const &other)=delete;

Copy constructor of ClientAuthenticationHandle cannot be used.

Header-Datei#include "ara/diag/client_authentication_handle.h"
Scopeclass ara::diag::ClientAuthenticationHandle

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

Record
AUTOSAR/AP/record/SWS_DM_01150
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01150@rel:R25-11#353b4f83
Content hash
353b4f83
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01150
Status: valid/unmigrated Version: rel:R25-11#5c00c5f2 Versionshistorie & Revisions (1 transition, 6 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_01150@rel:R25-11#5c00c5f2
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#b2ba2b412026-09-30
  • R21-11rel:R21-11#be3428ad2026-10-14
  • R22-11rel:R22-11#7ad065b42026-10-14
  • R23-11rel:R23-11#f8cce9ac2026-10-14
  • R24-11rel:R24-11#5c00c5f22026-10-14
  • R25-11rel:R25-11#5c00c5f22026-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

函数 Refresh [SWS_DM_01155] Upstream: RS_Diag_04251

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

This function is used by the application to refresh the timer that was started by Authenticate or OverrideDefaultRoles. If both Methods were previously called, both timers are refreshed.

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

类 ara::diag::ClientAuthenticationHandle(头文件 #include "ara/diag/client_authentication_handle.h")的方法 Refresh 用于应用程序延长活动的认证或角色定时器(AUTOSAR_AP_SWS_Diagnostics §8.6.1.1.3.2 “Refresh”)。它会重置先前由 Authenticate 或 OverrideDefaultRoles 启动的定时器。如果先前调用了这两个方法,则通过该调用会同时续订这两个定时器 [SWS_DM_01155]。

该同步调用(解释:直接返回,无异步 Future)在应用程序于成功完成 Authenticate 或 OverrideDefaultRoles 后从 Diagnostic Server 获取的 ClientAuthenticationHandle 现有实例上无参数执行(AUTOSAR_AP_SWS_Diagnostics §7.3.2.3.3 “ClientAuthenticationHandle”)。 问题 Q-b07e81ff4629ada7 (未决)该函数被声明为 noexcept 且为异常安全(exception safe),但被指定为非线程安全(not thread-safe)[SWS_DM_01155]。因此,同一实例上的并发调用必须由调用方进行同步。

如果操作失败,该函数通过 ara::core::Result<void> 返回错误代码 DiagErrc::kServiceNotAvailable [SWS_DM_01155]。这通过回滚语义指示调用无法执行,因为 Diagnostic Management (DM) 的基本功能当前不可用 [SWS_DM_01155]。

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

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

Header-Datei#include "ara/diag/client_authentication_handle.h"
Scopeclass ara::diag::ClientAuthenticationHandle
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Rückgabewert

TypBeschreibung
ara::core::Result< void >Returns nothing or an error.

Fehler

FehlercodeBeschreibung
DiagErrc::kServiceNotAvailablerollback_semantics The call cannot be executed, because essential DM functionality is currently not available.

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

Record
AUTOSAR/AP/record/SWS_DM_01155
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01155@rel:R25-11#b47c9c3e
Content hash
b47c9c3e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01155
Status: valid/unmigrated Version: rel:R25-11#336ea0d5 Versionshistorie & Revisions (1 transition, 6 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_01155@rel:R25-11#336ea0d5
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#b5659ac02026-09-30
  • R21-11rel:R21-11#f05c61ca2026-10-14
  • R22-11rel:R22-11#2739c0e72026-10-14
  • R23-11rel:R23-11#ebcd83152026-10-14
  • R24-11rel:R24-11#aa896f602026-10-14
  • R25-11rel:R25-11#336ea0d52026-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

函数 Revoke [SWS_DM_01154] Upstream: RS_Diag_04251

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

This function is used by the application to de-authenticate a client, and also to clear the Dynamic AccessList and any overridden defaults.

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

类 ara::diag::ClientAuthenticationHandle 的同步方法 Revoke(SWS Diagnostics §8.6.1.1.3.3 “Revoke”)用于让应用程序取消先前已验证身份的诊断客户端的身份验证,并完全丢弃其动态访问列表(DynamicAccessList)和被覆盖的默认角色([SWS_DM_01154]、[SWS_DM_01216])。

该函数没有传入参数,并返回一个 ara::core::Result<void>([SWS_DM_01154])。在成功的情况下,客户端的身份验证状态将被终止。如果 Diagnostic Manager 的基本功能在调用时不可用,则操作失败并以回滚语义返回错误 DiagErrc::kServiceNotAvailable([SWS_DM_01154])。

在并发性方面,该接口被指定为异常安全(exception safe),但非线程安全(not thread-safe)([SWS_DM_01154])。解释:因此,当从多个线程并发访问同一句柄实例时,调用方应用程序推测必须确保外部同步。 问题 Q-8781261c9a2f5f8e (未决)

在整个流程中,在成功进行身份验证或覆盖默认角色后,ClientAuthenticationHandle 的实例由诊断服务器实例提供给应用程序(SWS Diagnostics §7.3.2.3.3 “ClientAuthenticationHandle”)。虽然活动的句柄除了撤销之外还允许替换([SWS_DM_01213])或扩展([SWS_DM_01215])DynamicAccessList,但 Revoke 将最终终止客户端的这些权限。

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

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

Header-Datei#include "ara/diag/client_authentication_handle.h"
Scopeclass ara::diag::ClientAuthenticationHandle
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Rückgabewert

TypBeschreibung
ara::core::Result< void >Returns nothing or an error.

Fehler

FehlercodeBeschreibung
DiagErrc::kServiceNotAvailablerollback_semantics The call cannot be executed, because essential DM functionality is currently not available.

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

Record
AUTOSAR/AP/record/SWS_DM_01154
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01154@rel:R25-11#fbb82d20
Content hash
fbb82d20
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01154
Status: valid/unmigrated Version: rel:R25-11#d654e83e Versionshistorie & Revisions (1 transition, 6 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_01154@rel:R25-11#d654e83e
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#0fc0c68f2026-09-30
  • R21-11rel:R21-11#341b16582026-10-14
  • R22-11rel:R22-11#b81da6112026-10-14
  • R23-11rel:R23-11#4f5f61352026-10-14
  • R24-11rel:R24-11#6d88b2f82026-10-14
  • R25-11rel:R25-11#d654e83e2026-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

函数 Set [SWS_DM_01153] Upstream: RS_Diag_04251

ara::core::Result< void > Set (DiagnosticServiceDynamicAccessList dynamicAccessList) noexcept;

This function is used by the application to set/replace a DynamicAccessList of a Diagnostic Conversation.

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

类 ara::diag::ClientAuthenticationHandle 的同步方法 Set([SWS_DM_01153])用于让应用程序在 Diagnostic Server 中为诊断会话或已验证身份的客户端设置或完全替换动态访问列表(DynamicAccessList)([SWS_DM_01213])。Diagnostic Manager 为每个已验证身份的客户端维护这样一个 DynamicAccessList,该列表可以在 Diagnostic Extract 中存储的配置之外,赋予客户端对诊断资源的附加访问权限(AUTOSAR_AP_SWS_Diagnostics §7.3.2.3.3 “ClientAuthenticationHandle”)。

在使用时,以下方面至关重要:

  • 调用上下文和参数:该函数在 ara::diag::ClientAuthenticationHandle 的实例上调用(在 #include "ara/diag/client_authentication_handle.h" 中声明)。如果先前已成功完成 ara::diag::ClientAuthentication::Authenticate([SWS_DM_01206])或 ara::diag::ClientAuthentication::OverrideDefaultRoles([SWS_DM_01209]),则会向应用程序提供这样一个句柄实例。作为唯一的传入参数,传递类型为 DiagnosticServiceDynamicAccessList 的 dynamicAccessList,用于定义新的访问列表([SWS_DM_01153])。
  • 返回值和错误处理:该方法指定为 noexcept 并返回一个 ara::core::Result<void>。它采用回滚语义工作:如果由于关键 DM 功能当前不可用而无法执行调用,则该调用以错误码 DiagErrc::kServiceNotAvailable 失败([SWS_DM_01153])。关于异常处理,该方法被归类为异常安全(exception safe)。
  • 并发性:该操作被显式定义为非线程安全(not thread-safe)([SWS_DM_01153])。如果从多个线程并发对同一句柄实例进行调用,则必要的同步由应用程序负责。

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

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

Header-Datei#include "ara/diag/client_authentication_handle.h"
Scopeclass ara::diag::ClientAuthenticationHandle
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
dynamicAccessListThe new DynamicAccessList to be set in the client.

Rückgabewert

TypBeschreibung
ara::core::Result< void >Returns nothing or an error.

Fehler

FehlercodeBeschreibung
DiagErrc::kServiceNotAvailablerollback_semantics The call cannot be executed, because essential DM functionality is currently not available.

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

Record
AUTOSAR/AP/record/SWS_DM_01153
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01153@rel:R25-11#00ae5ed5
Content hash
00ae5ed5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01153
Status: valid/unmigrated Version: rel:R25-11#6e0f3d93 Versionshistorie & Revisions (1 transition, 6 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_01153@rel:R25-11#6e0f3d93
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#850c01d82026-09-30
  • R21-11rel:R21-11#4dff11b12026-10-14
  • R22-11rel:R22-11#5a0f43622026-10-14
  • R23-11rel:R23-11#768f7ce22026-10-14
  • R24-11rel:R24-11#bac10bed2026-10-14
  • R25-11rel:R25-11#6e0f3d932026-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_01149] Upstream: RS_Diag_04251

auto operator= (ClientAuthenticationHandle &&other) & noexcept -> ClientAuthenticationHandle & =default;

Move assignment operator of ClientAuthenticationHandle.

Header-Datei#include "ara/diag/client_authentication_handle.h"
Scopeclass ara::diag::ClientAuthenticationHandle
Exception-Sicherheitexception safe

Parameter (in)

ParameterBeschreibung
otherObject to move-assign from.

Rückgabewert

TypBeschreibung
ClientAuthenticationHandleClientAuthenticationHandle& Reference to self.

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

Record
AUTOSAR/AP/record/SWS_DM_01149
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01149@rel:R25-11#064b19c4
Content hash
064b19c4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01149
Status: valid/unmigrated Version: rel:R25-11#6d429c60 Versionshistorie & Revisions (1 transition, 6 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_01149@rel:R25-11#6d429c60
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#825bafd02026-09-30
  • R21-11rel:R21-11#6b6602162026-10-14
  • R22-11rel:R22-11#7c114d032026-10-14
  • R23-11rel:R23-11#f26ac2222026-10-14
  • R24-11rel:R24-11#13552b832026-10-14
  • R25-11rel:R25-11#6d429c602026-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_01151] Upstream: RS_Diag_04251

auto operator= (ClientAuthenticationHandle const &other) -> Client AuthenticationHandle &=delete;

Copy assignment operator of CancellationHandler cannot be used.

Header-Datei#include "ara/diag/client_authentication_handle.h"
Scopeclass ara::diag::ClientAuthenticationHandle

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

Record
AUTOSAR/AP/record/SWS_DM_01151
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01151@rel:R25-11#c66f2174
Content hash
c66f2174
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01151
Status: valid/unmigrated Version: rel:R25-11#41e0cc7a Versionshistorie & Revisions (1 transition, 6 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_01151@rel:R25-11#41e0cc7a
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#e7f217352026-09-30
  • R21-11rel:R21-11#e234b1652026-10-14
  • R22-11rel:R22-11#8556e28c2026-10-14
  • R23-11rel:R23-11#114f1c5c2026-10-14
  • R24-11rel:R24-11#41e0cc7a2026-10-14
  • R25-11rel:R25-11#41e0cc7a2026-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

函数 ~ClientAuthenticationHandle [SWS_DM_01147] Upstream: RS_Diag_04251

~ClientAuthenticationHandle () noexcept;

Destructor of ClientAuthenticationHandle.

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

用法与语义

函数 ~ClientAuthenticationHandle() 是类 ara::diag::ClientAuthenticationHandle 的析构函数,通过头文件 ara/diag/client_authentication_handle.h 声明([SWS_DM_01147]、AUTOSAR_AP_SWS_Diagnostics §8.6.1.1.1.3 “Destructor”)。它不接收任何传入参数且不提供返回值。调用通常在对象生命周期结束时隐式发生。解释:在此过程中,句柄内部绑定的客户端身份验证的所有资源推测都应被释放。 问题 Q-ea8f47232fd9951f (未决)

错误处理与异常安全性

该析构函数声明为 noexcept,并显式指定为 exception safe([SWS_DM_01147])。因此,在销毁对象期间不会引发 C++ 异常,也不会返回特定的错误码,从而保证清理过程无错误地完成。

并发性与限制

根据规范,销毁 ClientAuthenticationHandle 被归类为 not thread-safe([SWS_DM_01147])。调用方应用程序必须确保在执行析构函数期间,没有其他线程并行访问同一实例。

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

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

Header-Datei#include "ara/diag/client_authentication_handle.h"
Scopeclass ara::diag::ClientAuthenticationHandle
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_01147
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01147@rel:R25-11#3c1b1d50
Content hash
3c1b1d50
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01147
Status: valid/unmigrated Version: rel:R25-11#b9cd7178 Versionshistorie & Revisions (1 transition, 6 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_01147@rel:R25-11#b9cd7178
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#f9cc0a482026-09-30
  • R21-11rel:R21-11#3b91d66c2026-10-14
  • R22-11rel:R22-11#cca9279f2026-10-14
  • R23-11rel:R23-11#4de7c36f2026-10-14
  • R24-11rel:R24-11#0092ff1b2026-10-14
  • R25-11rel:R25-11#b9cd71782026-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