DEENESPTFRRUARHIKOZHNL

类 ara::diag::ClientAuthentication

[SWS_DM_01132] Upstream: RS_Diag_04251

class ClientAuthentication final {...};

Interface for the application to inform the Diagnostic Server instance about the authentication states and the user roles that are currently authenticated.

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

用户指南人工智能生成

供应用程序向 Diagnostic Server 报告认证状态和活动用户角色。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 426d68eb26e1 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

供应用程序向 Diagnostic Server 报告认证状态和活动用户角色。

该接口允许应用程序向 Diagnostic Server 通报诊断客户端的认证状态及活动用户角色 [SWS_DM_01132]。通过诸如 Authenticate 或 OverrideDefaultRoles 的调用来控制状态转换,并提供用于管理动态访问列表的句柄 [SWS_DM_01206]。因超时引起的状态变化可通过通知程序进行异步监控。由于该类非线程安全且不允许复制,因此应用程序内的访问必须同步进行。

上下文

类 ara::diag::ClientAuthentication 用作应用程序的核心接口,以向 Diagnostic Server 实例通知认证状态和当前已认证的用户角色 [SWS_DM_01132]、SWS Diagnostics, 第129页。有三个主要参与方参与此交互:

  • 应用程序 (Application):执行认证检查——无论是利用 Diagnostic Server 的接口还是通过应用自身的机制——并将用户角色传输给 Diagnostic Server [SWS_DM_01142]。
  • Diagnostic Server / Diagnostic Manager:管理诊断会话,并基于角色和认证状态强制执行对诊断资源的访问权限 [SWS_DM_01206]。
  • 诊断客户端:向电子控制单元发送诊断请求的外部测试仪或 SOVD 客户端 [SWS_DM_01210]、[SWS_DM_01470]。

ClientAuthentication 的实例数量由模型元素 DiagnosticExternalAuthenticationIdentification 确定 SWS Diagnostics, 第129页。如果最终的源地址在编译时未知,该元素允许针对具有固定源地址的客户端或通过地址范围配置认证 SWS Diagnostics, 第129页。解释:运行时根据这些源地址范围将诊断客户端分配给 ClientAuthentication 的具体实例。对于 SOVD 客户端,Diagnostic Server 在通过 ara::diag::SovdAuthorization::ValidateAuthorization 验证授权令牌时直接向应用程序传递一个 ClientAuthentication 对象 [SWS_DM_01470]。 问题 Q-6cc7e791e678def2 (未决)

Application Application ClientAuthentication ClientAuthentication Application->ClientAuthentication Get / Authenticate DiagnosticServer DiagnosticServer ClientAuthentication->DiagnosticServer Zustandsmeldung DiagnosticClient DiagnosticClient DiagnosticClient->DiagnosticServer Diagnoseanfrage

上下文图:认证接口的交互伙伴。来源:[SWS_DM_01132]、[SWS_DM_01202]、[SWS_DM_01470]、SWS Diagnostics, 第129页

生命周期

应用程序通过 ara::diag::ExternalAuthentication::Get 的重载方法 [SWS_DM_01202] 或在 SOVD 令牌验证的上下文中 [SWS_DM_01470] 获取 ClientAuthentication 的实例。该类具有严格的所有权语义:复制构造函数 [SWS_DM_01139] 和复制赋值运算符 [SWS_DM_01140] 已被删除(=delete)。移动操作(移动构造函数 [SWS_DM_01137] 和移动赋值运算符 [SWS_DM_01138])预定义为默认并声明为 noexcept。析构函数同样为 noexcept [SWS_DM_01136]。所有成员函数以及析构函数均非线程安全(not thread-safe)[SWS_DM_01136]、[SWS_DM_01141]、[SWS_DM_01142]、[SWS_DM_01143]、[SWS_DM_01144]。

认证状态通过枚举类型 DiagnosticAuthState 表示 [SWS_DM_01133]:

  • kDeAuthenticated (0x00):没有诊断客户端经过认证。系统启动时,客户端默认处于该状态 [SWS_DM_01205]。此时,其属性 isDefault 配置为 TRUE 的角色(DiagnosticAuthRole)被视作默认角色 [SWS_DM_01204]、[SWS_DM_01134]。通过 OverrideDefaultRoles 可以为指定的超时时间临时覆盖这些默认角色 [SWS_DM_01141]、[SWS_DM_01209]。
  • kAuthenticated (0x01):诊断客户端已通过认证。通过调用 Authenticate 达到此状态,从而激活 Diagnostic Server 中传递的用户角色 [SWS_DM_01142]、[SWS_DM_01206]。

如果在默认会话中客户端在最后一次传输确认(TransmitConfirmation)后未发送进一步的请求并且不活动时间到期 [SWS_DM_01210],或者发生 S3 超时 [SWS_DM_01144]、[SWS_DM_02077],将触发从 kAuthenticated 自动转换回 kDeAuthenticated。

kDeAuthenticated kDeAuthenticated kDeAuthenticated->kDeAuthenticated OverrideDefaultRoles() kAuthenticated kAuthenticated kDeAuthenticated->kAuthenticated Authenticate() kAuthenticated->kDeAuthenticated Inaktivitaet / S3-Timeout

状态图:客户端认证的生命周期与状态转换。来源:[SWS_DM_01133]、[SWS_DM_01204]、[SWS_DM_01205]、[SWS_DM_01206]、[SWS_DM_01209]、[SWS_DM_01210]

使用路径

管理客户端认证的常规流程包括以下步骤:

  1. 注册通知程序:应用程序使用 SetNotifier 注册类型为 ClientAuthenticationSetNotifier(std::function<void(DiagnosticAuthState)>)的回调函数 [SWS_DM_01144]、[SWS_DM_02077]。借此,当发生状态转换(例如因不活动或 S3 超时而转换至 kDeAuthenticated)时,应用程序会收到通知 [SWS_DM_01144]。再次调用将覆盖先前设置的通知程序 [SWS_DM_01144]。
  2. 查询状态:通过方法 GetState(),应用程序可以同步查询客户端当前的认证状态 [SWS_DM_01143]。
  3. 报告认证:一旦认证成功完成,应用程序将调用带有要激活的用户角色(ara::core::Vector<DiagnosticAuthRole>)的 Authenticate [SWS_DM_01142]、[SWS_DM_01134]。Diagnostic Server 将状态设置为 kAuthenticated 并返回一个 ClientAuthenticationHandle [SWS_DM_01206]。
  4. 管理访问权限:通过获取的 ClientAuthenticationHandle,应用程序可以为客户端配置动态访问列表(DynamicAccessList)[SWS_DM_01213]、SWS Diagnostics, 第132页。同时,使用该句柄会刷新客户端的不活动时间窗口 SWS Diagnostics, 第133页。

如果客户端处于状态 kDeAuthenticated,则应用程序可以改为调用 OverrideDefaultRoles(defaultRoles, timeout) 来临时激活备用标准角色;成功时该调用同样会返回一个 ClientAuthenticationHandle [SWS_DM_01141]、[SWS_DM_01209]。

身份验证流程和权限管理ApplicationClientAuthenticationDiagnosticServerSetNotifier(notifier)Result<void>Authenticate(userRoles)设置状态 kAuthenticated 和角色Bestaetigung & HandleResult<ClientAuthenticationHandle>optClient-Inaktivitaet in Standard-Session / S3-TimeoutWechsel zu kDeAuthenticatednotifier(kDeAuthenticated)

时序图:身份验证期间的调用与通知流程。来源:[SWS_DM_01142]、[SWS_DM_01144]、[SWS_DM_01206]、[SWS_DM_01210]

错误场景

方法 Authenticate、OverrideDefaultRoles 和 GetState 将其返回值封装在 ara::core::Result 中返回,并被规范为异常安全(exception safe)以及 noexcept [SWS_DM_01141]、[SWS_DM_01142]、[SWS_DM_01143]。发生错误时将报告以下标准化错误代码:

对于 SetNotifier,未定义标准化的错误代码 [SWS_DM_01144]。作为基本前置条件,OverrideDefaultRoles 要求客户端在调用时处于状态 kDeAuthenticated [SWS_DM_01209]。

本指南基于 AUTOSAR Adaptive R25-11 规范(模块 diag),专为 autodocs 编制。

成员图

类图

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

G nara__diag__ClientAuthentication678 ClientAuthentication + ClientAuthentication() + ~ClientAuthentication() + Authenticate() + GetState() + OverrideDefaultRoles() + SetNotifier() + operator=()

详细视图

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

构造函数和析构函数

Move constructor of ClientAuthentication.

重载 ClientAuthentication 2
ClientAuthentication (ClientAuthentication &&other) noexcept=default; SWS_DM_01137
ClientAuthentication (ClientAuthentication const &other)=delete; SWS_DM_01139

Destructor of ClientAuthentication.

~ClientAuthentication () noexcept;

方法

This function is used by the application to report the authenticated state to the Diagnostic Server instance. The authentication could be either done using the Authentication interfaces of the Diagnostic Server instance, or through other means in the application.

GetState 函数

This function is used by the application to query the current authentication state of the diagnostic client.

ara::core::Result< DiagnosticAuthState > GetState () const noexcept;

This method is used by the application to temporarily change the default AuthenticationRole for a Diagnostic Server Instance. The diagnostic services allowed in the passed defaultRoles are now accessible to the tester for a time period defined in the parameter timeout.

This function is used by the application to set a Notifier function that shall be called by the Diagnostic Server instance when an Authentication Status Change occurs. This may be used, e.g, to notify the application when a transition to kDeAuthenticated state occurred due to an S3 timeout. A consecutive call of this method will overwrite the previous registered notifier.

ara::core::Result< void > SetNotifier (ClientAuthenticationSetNotifier notifier) noexcept;

运算符

operator= 函数 2

Move assignment operator of ClientAuthentication.

重载 = 2
auto operator= (ClientAuthentication &&other) & noexcept -> Client Authentication & =default; SWS_DM_01138
auto operator= (ClientAuthentication const &other) -> Client Authentication &=delete; SWS_DM_01140

类型别名

Notifier Function that is called by the Diagnostic Server instance when an Authentication Status Change Occurs. This may be used, for e.g, to notify the application when a transition to kDeAuthenticated State occurred due to an S3 timeout.

using ClientAuthenticationSetNotifier = std::function<void(Diagnostic AuthState)>;
DiagnosticAuthRole 类型别名

The supported values for the Diagnostic Authentication roles are specified in the Diagnostic Extract.

using DiagnosticAuthRole = ara::core::String;

枚举

Possible values of the Authentication State of the client.

enum class DiagnosticAuthState : std::uint8_t {...};

方法文档

函数 Authenticate [SWS_DM_01142] Upstream: RS_Diag_04251

ara::core::Result< ClientAuthenticationHandle > Authenticate (ara::core::Vector< DiagnosticAuthRole > userRoles) noexcept;

This function is used by the application to report the authenticated state to the Diagnostic Server instance. The authentication could be either done using the Authentication interfaces of the Diagnostic Server instance, or through other means in the application.

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

使用与调用

应用程序调用函数 ara::diag::ClientAuthentication::Authenticate,以向 Diagnostic Server 实例告知诊断客户端的成功身份验证 [SWS_DM_01142]。这可以在通过 Diagnostic Server 的接口完成身份验证之后进行,也可以通过应用程序专有机制进行 [SWS_DM_01142]。

该函数接收 userRoles(类型为 ara::core::Vector<DiagnosticAuthRole>)作为输入参数。成功调用后,该实例的身份验证状态更改为 kAuthenticated,并且传入的用户角色被牢固采纳 [SWS_DM_01206]。它返回一个 ara::core::Result<ClientAuthenticationHandle> 作为返回值 [SWS_DM_01142]。由于直接提供了一个 Result 对象,因此推测处理在调用上下文中同步进行。 问题 Q-dae22c82694f2103 (未决)

错误处理与并发

该方法声明为 noexcept 并被视为异常安全(exception safe)[SWS_DM_01142]。如果因 Diagnostic Manager 的基本功能在调用时不可用而发生错误,则该操作以回滚语义失败,并在 Result 对象中返回 DiagErrc::kServiceNotAvailable [SWS_DM_01142]。

在并发性方面,该方法明确指定为 not thread-safe [SWS_DM_01142]。因此,在同一个 ClientAuthentication 对象上的并行调用是不允许的,必须由应用程序进行同步。

交互和生命周期

获取的 ClientAuthenticationHandle 使应用程序能够为已验证身份的客户端定义或扩展 DynamicAccessList [SWS_DM_01142]。此外,该调用还会启动或引用客户端的不活动监控:如果在默认会话状态下成功完成身份验证后,在 authenticationTimeout 持续时间内未发生进一步的 UDS 请求,则 Diagnostic Server 实例会自动将客户端重置回 kDeAuthenticated [SWS_DM_01210]。为了防止此超时,应用程序可以通过句柄的方法 Refresh 更新定时器 [SWS_DM_01155]。

此文本由 AI 基于 AUTOSAR 规范生成。

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

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

Parameter (in)

ParameterBeschreibung
userRolesThe user roles to set on the diagnostic client

Rückgabewert

TypBeschreibung
ara::core::Result< ClientAuthenticationHandle >A handler of the Authentication State, which can be used by the application to set or extend the DynamicAccessList

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_01142
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01142@rel:R25-11#46ae5437
Content hash
46ae5437
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01142
Status: valid/unmigrated Version: rel:R25-11#17cf8f55 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_01142@rel:R25-11#17cf8f55
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#ffd39a4b2026-09-30
  • R21-11rel:R21-11#6f17bd9a2026-10-14
  • R22-11rel:R22-11#1579f1692026-10-14
  • R23-11rel:R23-11#3b67657b2026-10-14
  • R24-11rel:R24-11#575f1e5f2026-10-14
  • R25-11rel:R25-11#17cf8f552026-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

函数 ClientAuthentication [SWS_DM_01137] Upstream: RS_Diag_04251

ClientAuthentication (ClientAuthentication &&other) noexcept=default;

Move constructor of ClientAuthentication.

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication
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_01137
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01137@rel:R25-11#f21c37f5
Content hash
f21c37f5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01137
Status: valid/unmigrated Version: rel:R25-11#3462794e 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_01137@rel:R25-11#3462794e
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#581961172026-09-30
  • R21-11rel:R21-11#f373d3152026-10-14
  • R22-11rel:R22-11#afdb12682026-10-14
  • R23-11rel:R23-11#5682468c2026-10-14
  • R24-11rel:R24-11#d6bf1b932026-10-14
  • R25-11rel:R25-11#3462794e2026-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

函数 ClientAuthentication [SWS_DM_01139] Upstream: RS_Diag_04251

ClientAuthentication (ClientAuthentication const &other)=delete;

Copy constructor of ClientAuthentication cannot be used.

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication

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

Record
AUTOSAR/AP/record/SWS_DM_01139
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01139@rel:R25-11#80bb1556
Content hash
80bb1556
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01139
Status: valid/unmigrated Version: rel:R25-11#8625245a 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_01139@rel:R25-11#8625245a
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#ab1768822026-09-30
  • R21-11rel:R21-11#1fb6defa2026-10-14
  • R22-11rel:R22-11#74808a772026-10-14
  • R23-11rel:R23-11#1b61e7822026-10-14
  • R24-11rel:R24-11#8625245a2026-10-14
  • R25-11rel:R25-11#8625245a2026-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

函数 GetState [SWS_DM_01143] Upstream: RS_Diag_04251

ara::core::Result< DiagnosticAuthState > GetState () const noexcept;

This function is used by the application to query the current authentication state of the diagnostic client.

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

Rückgabewert

TypBeschreibung
ara::core::Result<DiagnosticAuthState >The Authentication State of the Diagnostic Client or 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_01143
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01143@rel:R25-11#a997e918
Content hash
a997e918
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01143
Status: valid/unmigrated Version: rel:R25-11#608570f4 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_01143@rel:R25-11#608570f4
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#84da2c3e2026-09-30
  • R21-11rel:R21-11#d78810992026-10-14
  • R22-11rel:R22-11#fed2aecc2026-10-14
  • R23-11rel:R23-11#275163122026-10-14
  • R24-11rel:R24-11#23ca48ab2026-10-14
  • R25-11rel:R25-11#608570f42026-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

函数 OverrideDefaultRoles [SWS_DM_01141] Upstream: RS_Diag_04251

ara::core::Result< ClientAuthenticationHandle > OverrideDefaultRoles (ara::core::Vector< DiagnosticAuthRole > defaultRoles, std::chrono::milliseconds timeout) noexcept;

This method is used by the application to temporarily change the default AuthenticationRole for a Diagnostic Server Instance. The diagnostic services allowed in the passed defaultRoles are now accessible to the tester for a time period defined in the parameter timeout.

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

借助类 ara::diag::ClientAuthentication 的同步方法 OverrideDefaultRoles,应用程序可以临时覆盖诊断客户端的默认身份验证角色(defaultRoles)[SWS_DM_01141]。为传入的角色所启用的诊断服务在参数 timeout 中定义的时间段内可供测试仪使用 [SWS_DM_01141]。此操作的前提条件是客户端处于状态 kDeAuthenticated [SWS_DM_01209]。解释:如果调用未在状态 kDeAuthenticated 下发生,则角色覆盖可能会被拒绝或保持无效,因为规范仅针对该初始状态规定了行为。 问题 Q-81189f2c2fe0f301 (未决)

成功执行后,该方法会在 ara::core::Result 内向应用程序返回 ClientAuthenticationHandle 的实例 [SWS_DM_01141], [SWS_DM_01209]。如果由于 Diagnostic Manager 的基本功能当前不可用而无法执行调用,则返回错误码 DiagErrc::kServiceNotAvailable [SWS_DM_01141]。该函数声明为 noexcept 且异常安全(exception safe)[SWS_DM_01141]。

对于并发性以及与其他组件的交互,适用以下规定:

此使用说明根据 AUTOSAR 规范自动创建。

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

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

Parameter (in)

ParameterBeschreibung
defaultRolesThe default roles requested by the application, to be set on the diagnostic client
timeoutThe timeout until which the override request is active

Rückgabewert

TypBeschreibung
ara::core::Result< ClientAuthenticationHandle >Operation result

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_01141
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01141@rel:R25-11#1f329dd8
Content hash
1f329dd8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01141
Status: valid/unmigrated Version: rel:R25-11#21bca5df 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_01141@rel:R25-11#21bca5df
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#852a402e2026-09-30
  • R21-11rel:R21-11#135b2de82026-10-14
  • R22-11rel:R22-11#70389b8e2026-10-14
  • R23-11rel:R23-11#e73e64042026-10-14
  • R24-11rel:R24-11#94dc59742026-10-14
  • R25-11rel:R25-11#21bca5df2026-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

函数 SetNotifier [SWS_DM_01144] Upstream: RS_Diag_04251

ara::core::Result< void > SetNotifier (ClientAuthenticationSetNotifier notifier) noexcept;

This function is used by the application to set a Notifier function that shall be called by the Diagnostic Server instance when an Authentication Status Change occurs. This may be used, e.g, to notify the application when a transition to kDeAuthenticated state occurred due to an S3 timeout. A consecutive call of this method will overwrite the previous registered notifier.

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

使用

类 ara::diag::ClientAuthentication 的方法 [SWS_DM_01144] 供应用程序注册 ClientAuthenticationSetNotifier 类型的回调函数。一旦客户端的身份验证状态发生变化,Diagnostic Server 实例就会调用该函数 [SWS_DM_01144]。这使应用程序能够立即对状态转换做出反应,例如在 S3 服务器超时后自动转换为状态 kDeAuthenticated [SWS_DM_01211],或者由于客户端处于非活动状态而发生超时 [SWS_DM_01210]。

错误处理与返回值

该函数返回一个 ara::core::Result<void>,并被声明为 noexcept 以及异常安全(exception safe)[SWS_DM_01144]。未指定标准化错误代码 [SWS_DM_01144];推测在常规运行中,Result 对象始终返回成功(void)。 问题 Q-0d7d43cc37d57944 (未决)

并发性与交互

关于线程安全性,该方法被指定为“not thread-safe”[SWS_DM_01144]。因此,不得从未受保护的并发线程对同一实例进行调用。此外,注册遵循覆盖行为:再次调用 SetNotifier 将完全替换先前注册的 Notifier [SWS_DM_01144]。该行为符合 Diagnostic Management 中统一的注册模式,类似于针对 [SWS_DM_00615] (CancellationHandler)、[SWS_DM_00745] (Indicator) 和 [SWS_DM_00755] (OperationCycle) 的定义。

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

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

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

Parameter (in)

ParameterBeschreibung
notifierThe notifier to call on state transition

Rückgabewert

TypBeschreibung
ara::core::Result< void >Returns void.

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

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

Record
AUTOSAR/AP/record/SWS_DM_01144
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01144@rel:R25-11#5e984cd8
Content hash
5e984cd8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01144
Status: valid/unmigrated Version: rel:R25-11#ddcf5d80 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_01144@rel:R25-11#ddcf5d80
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#bb5bb9422026-09-30
  • R21-11rel:R21-11#fec80c112026-10-14
  • R22-11rel:R22-11#2ece489f2026-10-14
  • R23-11rel:R23-11#7f1d62332026-10-14
  • R24-11rel:R24-11#107e99362026-10-14
  • R25-11rel:R25-11#ddcf5d802026-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_01138] Upstream: RS_Diag_04251

auto operator= (ClientAuthentication &&other) & noexcept -> Client Authentication & =default;

Move assignment operator of ClientAuthentication.

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

Parameter (in)

ParameterBeschreibung
otherObject to move-assign from.

Rückgabewert

TypBeschreibung
ClientAuthenticationClientAuthentication& Reference to self.

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

Record
AUTOSAR/AP/record/SWS_DM_01138
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01138@rel:R25-11#4956a27b
Content hash
4956a27b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01138
Status: valid/unmigrated Version: rel:R25-11#76277668 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_01138@rel:R25-11#76277668
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#f0894f262026-09-30
  • R21-11rel:R21-11#1107ed262026-10-14
  • R22-11rel:R22-11#9d8e860b2026-10-14
  • R23-11rel:R23-11#a3ca32ee2026-10-14
  • R24-11rel:R24-11#2d04d62d2026-10-14
  • R25-11rel:R25-11#762776682026-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_01140] Upstream: RS_Diag_04251

auto operator= (ClientAuthentication const &other) -> Client Authentication &=delete;

Copy assignment operator of ClientAuthentication cannot be used.

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication

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

Record
AUTOSAR/AP/record/SWS_DM_01140
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01140@rel:R25-11#5161aaaa
Content hash
5161aaaa
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01140
Status: valid/unmigrated Version: rel:R25-11#83c48e25 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_01140@rel:R25-11#83c48e25
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#2a4783d52026-09-30
  • R21-11rel:R21-11#f986a5382026-10-14
  • R22-11rel:R22-11#666e2c0b2026-10-14
  • R23-11rel:R23-11#9111a09e2026-10-14
  • R24-11rel:R24-11#41a505672026-10-14
  • R25-11rel:R25-11#83c48e252026-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

函数 ~ClientAuthentication [SWS_DM_01136] Upstream: RS_Diag_04251

~ClientAuthentication () noexcept;

Destructor of ClientAuthentication.

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

类 ara::diag::ClientAuthentication 的析构函数 [SWS_DM_01136] 用于释放并干净地销毁 Diagnostics 管理中的客户端身份验证实例。该函数在头文件 #include "ara/diag/client_authentication.h" 中定义,并在对象生命周期结束时同步调用(AUTOSAR_AP_SWS_Diagnostics §8.5.1.2.1.2 “Destructor”)。

使用和执行属性适用以下规定:

  • 调用与参数:作为析构函数,~ClientAuthentication() 既无输入参数也无返回值。
  • 错误与异常安全性:该操作被指定为 noexcept 与 exception safe [SWS_DM_01136];在销毁对象时保证不会引发异常。
  • 并发性:该调用被明确归类为 not thread-safe。因此,销毁对象的操作不得与针对同一实例的其他方法调用并发进行。

该元素实现了上游需求 RS_Diag_04251(AUTOSAR_AP_SWS_Diagnostics §8.5.1.2.1.2 “Destructor”)。Interpretation:在销毁实例之前,应用程序活跃的身份验证或通信过程可能必须有序终止,以避免由于缺乏线程安全性而导致的未定义行为。 问题 Q-cedd6f523eb2c1c3 (未决)

本文档由 AI 生成,用作编辑性使用说明。

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

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication
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_01136
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01136@rel:R25-11#09f17652
Content hash
09f17652
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01136
Status: valid/unmigrated Version: rel:R25-11#ebd2efb0 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_01136@rel:R25-11#ebd2efb0
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#5066950d2026-09-30
  • R21-11rel:R21-11#aa8b145e2026-10-14
  • R22-11rel:R22-11#e03e0f452026-10-14
  • R23-11rel:R23-11#a62b91a92026-10-14
  • R24-11rel:R24-11#393bc96e2026-10-14
  • R25-11rel:R25-11#ebd2efb02026-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

枚举文档

枚举 DiagnosticAuthState [SWS_DM_01133] Upstream: RS_Diag_04251

enum class DiagnosticAuthState :                std::uint8_t {...};

Possible values of the Authentication State of the client.

Header-Datei#include "ara/diag/client_authentication.h"
Forwarding-Header#include "ara/diag/diag_fwd.h"
Scopeclass ara::diag::ClientAuthentication
SymbolDiagnosticAuthState
Basistypstd::uint8_t

Werte

EnumeratorBeschreibung
kDeAuthenticated= 0x00 No Diagnostic Clients are currently authenticated.
kAuthenticated= 0x01 A Diagnostic Client is currently authenticated.

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

Record
AUTOSAR/AP/record/SWS_DM_01133
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01133@rel:R25-11#35ff072b
Content hash
35ff072b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01133
Status: valid/unmigrated Version: rel:R25-11#be2431b9 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_01133@rel:R25-11#be2431b9
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#ecdc884c2026-09-30
  • R21-11rel:R21-11#9ee5449e2026-10-14
  • R22-11rel:R22-11#9ee5449e2026-10-14
  • R23-11rel:R23-11#e21d94c52026-10-14
  • R24-11rel:R24-11#e21d94c52026-10-14
  • R25-11rel:R25-11#be2431b92026-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

类型别名文档

类型别名 ClientAuthenticationSetNotifier [SWS_DM_02077] Upstream: RS_Diag_04251

using ClientAuthenticationSetNotifier = std::function<void(Diagnostic AuthState)>;

Notifier Function that is called by the Diagnostic Server instance when an Authentication Status Change Occurs. This may be used, for e.g, to notify the application when a transition to kDeAuthenticated State occurred due to an S3 timeout.

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication
SymbolClientAuthenticationSetNotifier
Thread-Sicherheitnot thread-safe

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

Record
AUTOSAR/AP/record/SWS_DM_02077
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02077@rel:R25-11#9ec53dce
Content hash
9ec53dce
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02077
Status: valid/unmigrated Version: rel:R25-11#9f8e8d05 Versionshistorie & Revisions (1 transition, 3 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_02077@rel:R25-11#9f8e8d05
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#00399c222026-09-30
  • R24-11rel:R24-11#b4d6fb532026-10-14
  • R25-11rel:R25-11#9f8e8d052026-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

类型别名 DiagnosticAuthRole [SWS_DM_01134] Upstream: RS_Diag_04251

using DiagnosticAuthRole = ara::core::String;

The supported values for the Diagnostic Authentication roles are specified in the Diagnostic Extract.

Header-Datei#include "ara/diag/client_authentication.h"
Scopeclass ara::diag::ClientAuthentication
SymbolDiagnosticAuthRole

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

Record
AUTOSAR/AP/record/SWS_DM_01134
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01134@rel:R25-11#5658ed1c
Content hash
5658ed1c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01134
Status: valid/unmigrated Version: rel:R25-11#10bed2cf 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_01134@rel:R25-11#10bed2cf
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#ecb176b92026-09-30
  • R21-11rel:R21-11#d3a529062026-10-14
  • R22-11rel:R22-11#7d6be0912026-10-14
  • R23-11rel:R23-11#7e7656532026-10-14
  • R24-11rel:R24-11#eb0bd58b2026-10-14
  • R25-11rel:R25-11#10bed2cf2026-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