DEENESPTFRRUARHIKOZHNL

类 ara::diag::Conversation

[SWS_DM_00693] Upstream: RS_Diag_04166, RS_Diag_04169

class Conversation final {...};

Conversation interface.

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

用户指南人工智能生成

实现活动诊断通道的监控以及对诊断会话和安全等级的控制。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 1824b6dbecd2 来源 未决问题(2)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

实现活动诊断通道的监控以及对诊断会话和安全等级的控制。

类 ara::diag::Conversation 代表一个诊断通信通道,用于监控活动状态、诊断会话和安全等级,以及重置为默认会话 [SWS_DM_00692] [SWS_DM_00701]。应用程序仅通过静态查找函数以引用方式获取实例,因为自定义实例化以及复制和移动操作均已删除 [SWS_DM_02090]。虽然只读状态查询可以线程安全地执行,但回调注册和会话重置需要外部同步。

上下文

类 ara::diag::Conversation 代表外部诊断测试仪与 Adaptive Platform 之间通信通道的接口 SWS Diagnostics §8.2 “Conversation”。它作为应用程序与内部 Diagnostic Management (DM) 之间的纽带,以理解和控制正在进行的诊断活动。通过其实例,Adaptive 应用程序可以深入了解当前连接状态 [SWS_DM_00694]、活动诊断会话 [SWS_DM_00696]、安全等级 [SWS_DM_00698] 以及通道的标识特征 [SWS_DM_00700]。

diag_kontext app Adaptive Anwendung conv ara::diag::Conversation app->conv GetConversation() / Statusabfragen conv->app Notifier-Callbacks dm 诊断管理 conv->dm ResetToDefaultSession() dm->conv Verwaltung & Lebenszyklus

上下文图:ara::diag::Conversation 在应用程序与 Diagnostic Management 之间的集成。来源:[SWS_DM_00692]、[SWS_DM_00782]、SWS Diagnostics §8.2 “Conversation”。

生命周期

ara::diag::Conversation 的实例完全由 Diagnostic Management 守护进程实例化和管理。排除了应用程序手动创建、复制或移动:复制构造函数 [SWS_DM_02090] 和移动构造函数 [SWS_DM_02092] 以及赋值运算符 [SWS_DM_02091] [SWS_DM_02093] 均已删除 (=delete)。因此,被引用对象的生命周期推测与诊断子系统的运行时状态直接挂钩。 问题 Q-f8deca481d5b76e1 (未决)

对现有实例的访问仅通过静态查询函数进行。使用 GetAllConversations() 可以检索对所有已配置连接的引用 [SWS_DM_00782],而 GetCurrentActiveConversations() 返回当前活动通道的列表,其活动状态对应于 kActive [SWS_DM_00783]。此外,可通过 GetConversation(metaInfo) 根据正在进行的诊断请求的元数据解析出特定连接 [SWS_DM_00692]。

在并发方面,对状态和标识符的所有只读访问均被规范为线程安全 [SWS_DM_00694] [SWS_DM_00696] [SWS_DM_00698]。相反,注册通知回调以及重置会话被视为非线程安全 (not thread-safe) [SWS_DM_00695] [SWS_DM_00701],需要应用程序端进行同步。

使用路径

典型使用场景包括确定连接、注册通知函数以及有针对性地监控或操纵会话状态:

  • 获取引用:当诊断请求到达时,使用 GetConversation(metaInfo) 获取关联的实例 [SWS_DM_00692]。
  • 设置状态监控:通过注册方法 SetActivityNotifier() [SWS_DM_00695] [SWS_DM_02126]、SetDiagnosticSessionNotifier() [SWS_DM_00697] [SWS_DM_02127] 和 SetSecurityLevelNotifier() [SWS_DM_00699] [SWS_DM_02128],应用程序在发生更改时收到通知。重复调用会覆盖先前注册的回调。
  • 查询状态:可以使用 GetDiagnosticSession() [SWS_DM_00696] 或 GetDiagnosticSecurityLevel() [SWS_DM_00698] 同步确定当前状态。通过 GetDiagnosticSessionShortName() [SWS_DM_00707] 和 GetDiagnosticSecurityLevelShortName() [SWS_DM_00708],可以将枚举解析为可读的简短标识符。
  • 重置会话:若逻辑需要中止或回退到基本状态,ResetToDefaultSession() 会将通道重置回默认会话 [SWS_DM_00701]。
ara::diag::Conversation 的使用流程应用ConversationDiagnosticManagementUse Case: 连接终止GetConversation(metaInfo)Result<Conversation&>Use Case: Callback-Registrierung & StatusabfrageSetDiagnosticSessionNotifier(notifier)Result<void>GetDiagnosticSession()Result<SessionControlType>Use Case: SitzungssteuerungResetToDefaultSession()执行会话切换Result<void>

时序图:用于注册通知器、状态查询和会话重置的典型交互顺序。来源:[SWS_DM_00692]、[SWS_DM_00697]、[SWS_DM_00696]、[SWS_DM_00701]。

错误场景

ara::diag::Conversation 的方法通过 ara::core::Result 发出错误信号。如果 Diagnostic Management 的基本功能暂时不可用,则 GetConversation()、GetActivityStatus()、GetDiagnosticSession()、GetDiagnosticSecurityLevel() 和 GetConversationIdentifier() 失败并带有错误码 DiagErrc::kServiceNotAvailable [SWS_DM_00692] [SWS_DM_00694] [SWS_DM_00696] [SWS_DM_00698] [SWS_DM_00700]。调用遵循回滚语义且无副作用。

对于字符串转换函数 GetDiagnosticSessionShortName() [SWS_DM_00707] 和 GetDiagnosticSecurityLevelShortName() [SWS_DM_00708],传入未知或无效的枚举值会导致错误 DiagErrc::kInvalidArgument。规范中未为通知器注册方法以及 ResetToDefaultSession() 定义标准化错误码 [SWS_DM_00701]。

本指南完全基于 AUTOSAR Adaptive 规范 R25-11。

成员图

类图

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

G nara__diag__Conversation235 Conversation + Conversation() + operator=() + GetActivityStatus() + GetAllConversations() + GetConversation() + GetConversationIdentifier() + GetCurrentActiveConversations() + GetDiagnosticSecurityLevel() + GetDiagnosticSecurityLevelShortName() + GetDiagnosticSession() + GetDiagnosticSessionShortName() + ResetToDefaultSession() + SetActivityNotifier() + SetDiagnosticSessionNotifier() + SetSecurityLevelNotifier()

详细视图

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

构造函数和析构函数

Conversation 函数 2

Copy constructor of conversation is deleted.

重载 Conversation 2
Conversation (const Conversation &)=delete; SWS_DM_02090
Conversation (Conversation &&)=delete; SWS_DM_02092

方法

Represents the status of an active conversation.

ara::core::Result< ActivityStatusType > GetActivityStatus () noexcept;

Get all possible conversations.

static ara::core::Vector< std::reference_wrapper< Conversation > > Get AllConversations () noexcept;

Get one conversation based on given MetaInfo.

static ara::core::Result< Conversation & > GetConversation (const Meta Info &metaInfo) noexcept;

Getter for the current identification properties of the active conversation.

Get all currently active conversations.

static ara::core::Vector< std::reference_wrapper< Conversation > > Get CurrentActiveConversations () noexcept;

Represents the current active diagnostic SecurityLevel of an active conversation.

ara::core::Result< SecurityLevelType > GetDiagnosticSecurityLevel () noexcept;

Converts the given diagnostic SecurityLevel into the ShortName.

Represents the current active diagnostic session of an active conversation.

ara::core::Result< SessionControlType > GetDiagnosticSession () noexcept;

Converts the given diagnostic session into the ShortName.

ara::core::Result< ara::core::StringView > GetDiagnosticSessionShort Name (SessionControlType session) noexcept;

Method to reset the current session to default session.

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

Register a notifier function which is called if the activity is changed. A consecutive call of this method will overwrite the previous registered notifier.

ara::core::Result< void > SetActivityNotifier (ActivityStatusType Notifier notifier) noexcept;

Register a notifier function which is called if the Session is changed. A consecutive call of this method will overwrite the previous registered notifier.

ara::core::Result< void > SetDiagnosticSessionNotifier (SessionControl TypeNotifier notifier) noexcept;

Register a notifier function which is called if the SecurityLevel is changed. A consecutive call of this method will overwrite the previous registered notifier.

ara::core::Result< void > SetSecurityLevelNotifier (SecurityLevelType Notifier notifier) noexcept;

运算符

operator= 函数 2

Copy assignment operator of conversation is deleted.

重载 = 2
Conversation & operator= (const Conversation &)=delete; SWS_DM_02091
Conversation & operator= (Conversation &&)=delete; SWS_DM_02093

类型别名

Register a notifier function which is called if the activity is changed.

using ActivityStatusTypeNotifier = std::function<void(ActivityStatus Type)>;

Register a notifier function which is called if the SecurityLevel is changed.

using SecurityLevelTypeNotifier = std::function<void(SecurityLevel Type)>;

Register a notifier function which is called if the Session is changed.

using SessionControlTypeNotifier = std::function<void(SessionControl Type)>;

嵌套类型

方法文档

函数 Conversation [SWS_DM_02090] Upstream: RS_AP_00134

Conversation (const Conversation &)=delete;

Copy constructor of conversation is deleted.

Header-Datei#include "ara/diag/conversation.h"
Scopeclass ara::diag::Conversation

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

Record
AUTOSAR/AP/record/SWS_DM_02090
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02090@rel:R25-11#ebdc899f
Content hash
ebdc899f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02090
Status: valid/unmigrated Version: rel:R25-11#4794c95c Versionshistorie & Revisions (1 transition)
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_02090@rel:R25-11#4794c95c
Point-in-Time History:
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

函数 Conversation [SWS_DM_02092] Upstream: RS_AP_00134

Conversation (Conversation &&)=delete;

Move constructor of conversation is deleted.

Header-Datei#include "ara/diag/conversation.h"
Scopeclass ara::diag::Conversation

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

Record
AUTOSAR/AP/record/SWS_DM_02092
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02092@rel:R25-11#e17f026f
Content hash
e17f026f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02092
Status: valid/unmigrated Version: rel:R25-11#c1133833 Versionshistorie & Revisions (1 transition)
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_02092@rel:R25-11#c1133833
Point-in-Time History:
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

函数 GetActivityStatus [SWS_DM_00694] Upstream: RS_AP_00139, RS_Diag_04169

ara::core::Result< ActivityStatusType > GetActivityStatus () noexcept;

Represents the status of an active conversation.

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

Rückgabewert

TypBeschreibung
ara::core::Result<ActivityStatusType >the activity status of the conversation

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_00694
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00694@rel:R25-11#1532abf2
Content hash
1532abf2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00694
Status: valid/unmigrated Version: rel:R25-11#ed7817d4 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_00694@rel:R25-11#ed7817d4
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#2a044ec12026-09-30
  • R19-11rel:R19-11#5bb1402e2026-10-14
  • R20-11rel:R20-11#572f5ddc2026-10-14
  • R21-11rel:R21-11#572f5ddc2026-10-14
  • R22-11rel:R22-11#bd60d8fa2026-10-14
  • R23-11rel:R23-11#46b965a92026-10-14
  • R24-11rel:R24-11#3d1f91b12026-10-14
  • R25-11rel:R25-11#ed7817d42026-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

函数 GetAllConversations [SWS_DM_00782] Upstream: RS_Diag_04166, RS_Diag_04169, RS_Diag_04209

static ara::core::Vector< std::reference_wrapper< Conversation > > Get AllConversations () noexcept;

Get all possible conversations.

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

Rückgabewert

TypBeschreibung
ara::core::Vector<std::reference_wrapper<Conversation > >A Vector of all possible Conversation objects

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

Record
AUTOSAR/AP/record/SWS_DM_00782
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00782@rel:R25-11#aebcbaa2
Content hash
aebcbaa2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00782
Status: valid/unmigrated Version: rel:R25-11#d611d124 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_00782@rel:R25-11#d611d124
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#d2c5059b2026-09-30
  • R19-11rel:R19-11#5b89e7fd2026-10-14
  • R20-11rel:R20-11#a48e4d862026-10-14
  • R21-11rel:R21-11#657f3de32026-10-14
  • R22-11rel:R22-11#fde570342026-10-14
  • R23-11rel:R23-11#3933ca7f2026-10-14
  • R24-11rel:R24-11#afddc99e2026-10-14
  • R25-11rel:R25-11#d611d1242026-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

函数 GetConversation [SWS_DM_00692] Upstream: RS_AP_00139, RS_Diag_04169, RS_Diag_04170

static ara::core::Result< Conversation & > GetConversation (const Meta Info &metaInfo) noexcept;

Get one conversation based on given MetaInfo.

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

Parameter (in)

ParameterBeschreibung
metaInfoMetaInfo of the request.

Rückgabewert

TypBeschreibung
ara::core::Result<Conversation & >Conversation object 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_00692
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00692@rel:R25-11#46819223
Content hash
46819223
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00692
Status: valid/unmigrated Version: rel:R25-11#56f84ccd 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_00692@rel:R25-11#56f84ccd
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#435614992026-09-30
  • R19-11rel:R19-11#842bac5e2026-10-14
  • R20-11rel:R20-11#c12542fc2026-10-14
  • R21-11rel:R21-11#b2bba1dd2026-10-14
  • R22-11rel:R22-11#069f33cc2026-10-14
  • R23-11rel:R23-11#36f823122026-10-14
  • R24-11rel:R24-11#02c9dc132026-10-14
  • R25-11rel:R25-11#56f84ccd2026-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

函数 GetConversationIdentifier [SWS_DM_00700] Upstream: RS_AP_00139, RS_Diag_04169

ara::core::Result< ConversationIdentifierType > GetConversation Identifier () noexcept;

Getter for the current identification properties of the active conversation.

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

Rückgabewert

TypBeschreibung
ara::core::Result<ConversationIdentifierType >Returns the conversation information

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_00700
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00700@rel:R25-11#07e6b396
Content hash
07e6b396
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00700
Status: valid/unmigrated Version: rel:R25-11#4e415079 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_00700@rel:R25-11#4e415079
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#126118842026-09-30
  • R19-11rel:R19-11#b95f93e22026-10-14
  • R20-11rel:R20-11#67ff974f2026-10-14
  • R21-11rel:R21-11#67ff974f2026-10-14
  • R22-11rel:R22-11#46ec30932026-10-14
  • R23-11rel:R23-11#1ae0af2f2026-10-14
  • R24-11rel:R24-11#2e3acc272026-10-14
  • R25-11rel:R25-11#4e4150792026-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

函数 GetCurrentActiveConversations [SWS_DM_00783] Upstream: RS_Diag_04166, RS_Diag_04169, RS_Diag_04209

static ara::core::Vector< std::reference_wrapper< Conversation > > Get CurrentActiveConversations () noexcept;

Get all currently active conversations.

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

Rückgabewert

TypBeschreibung
ara::core::Vector<std::reference_wrapper<Conversation > >A Vector of all currently active (GetActivityStatus() == kActive) Conversation objects.

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

Record
AUTOSAR/AP/record/SWS_DM_00783
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00783@rel:R25-11#f4815470
Content hash
f4815470
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00783
Status: valid/unmigrated Version: rel:R25-11#0836aea7 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_00783@rel:R25-11#0836aea7
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f90567b82026-09-30
  • R19-11rel:R19-11#f673e9752026-10-14
  • R20-11rel:R20-11#50e9815d2026-10-14
  • R21-11rel:R21-11#2b04ffb12026-10-14
  • R22-11rel:R22-11#297e1edb2026-10-14
  • R23-11rel:R23-11#f13cae9f2026-10-14
  • R24-11rel:R24-11#4274a6302026-10-14
  • R25-11rel:R25-11#0836aea72026-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

函数 GetDiagnosticSecurityLevel [SWS_DM_00698] Upstream: RS_AP_00139, RS_Diag_04169, RS_Diag_04208

ara::core::Result< SecurityLevelType > GetDiagnosticSecurityLevel () noexcept;

Represents the current active diagnostic SecurityLevel of an active conversation.

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

使用

类 ara::diag::Conversation 的方法 GetDiagnosticSecurityLevel 用于同步确定诊断会话中当前处于活动状态的安全级别(AUTOSAR_AP_SWS_Diagnostics §8.9.3.2.2.6 “GetDiagnosticSecurityLevel”、[SWS_DM_00698])。它通过头文件 #include "ara/diag/conversation.h" 提供,不接受任何传入参数,并使用说明符 noexcept 声明。

该函数提供 ara::core::Result<SecurityLevelType> 作为返回类型。在成功的情况下,该对象直接包含活动连接 [SWS_DM_00698] 当前安全状态的枚举值。

错误处理与并发

如果查询失败,该方法将返回带有错误码 DiagErrc::kServiceNotAvailable 的 ara::core::Result [SWS_DM_00698]。在应用回滚语义的情况下,这表明 Diagnostic Management(DM)的基本功能在调用时刻不可用。在执行安全性方面,GetDiagnosticSecurityLevel 被归类为线程安全及异常安全 [SWS_DM_00698],因此允许来自不同线程的并发调用。

相互作用

解读:调用通常可能发生在执行受保护的诊断活动之前,以比对是否存在所需权限级别。 问题 Q-8c056d4c5199524d (未决)对于后续处理或诊断输出,所确定的 SecurityLevelType 可通过方法 GetDiagnosticSecurityLevelShortName(AUTOSAR_AP_SWS_Diagnostics §8.9.3.2.2.7 “GetDiagnosticSecurityLevelShortName”、[SWS_DM_00708])转换为关联的符号短名称(shortName 作为 ara::core::StringView)。

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

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

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

Rückgabewert

TypBeschreibung
ara::core::Result<SecurityLevelType >Returns the current SecurityLevel

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_00698
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00698@rel:R25-11#9683a886
Content hash
9683a886
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00698
Status: valid/unmigrated Version: rel:R25-11#f7a1e8de 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_00698@rel:R25-11#f7a1e8de
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#628e5fed2026-09-30
  • R19-11rel:R19-11#9fed8b1c2026-10-14
  • R20-11rel:R20-11#c70e66042026-10-14
  • R21-11rel:R21-11#3fddfcd12026-10-14
  • R22-11rel:R22-11#fb7b24702026-10-14
  • R23-11rel:R23-11#d0084dcd2026-10-14
  • R24-11rel:R24-11#1251fd382026-10-14
  • R25-11rel:R25-11#f7a1e8de2026-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

函数 GetDiagnosticSecurityLevelShortName [SWS_DM_00708] Upstream: RS_Diag_04169, RS_Diag_04208

ara::core::Result< ara::core::StringView > GetDiagnosticSecurityLevel ShortName (SecurityLevelType securityLevel) noexcept;

Converts the given diagnostic SecurityLevel into the ShortName.

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

使用

来自头文件 ara/diag/conversation.h 的同步方法 ara::diag::Conversation::GetDiagnosticSecurityLevelShortName 将传入的类型为 SecurityLevelType 的安全级别解析为已配置短名称(DiagnosticSecurityLevel.shortName)的标识符 [SWS_DM_00708]。该调用将结果作为 ara::core::Result<ara::core::StringView> 返回。

错误处理

在出错时,该函数返回错误码 DiagErrc::kInvalidArgument [SWS_DM_00708]。Diagnostic Server 的实例据此根据两个条件验证参数值:

  • 如果将锁定状态 kLocked 作为实参 securityLevel 传入,则 Diagnostic Server 必须返回 kInvalidArgument [SWS_DM_01259]。
  • 如果传入的值与 DiagnosticContributionSet 中根据计算 ((DiagnosticSecurityAccess.requestSeedId + 1) / 2) 得出的任何已配置条目都不匹配,则该调用同样会因 kInvalidArgument 而失败 [SWS_DM_01260]。

并发性与限制

该方法声明为 noexcept,并被指定为异常安全(exception safe)和线程安全(thread-safe)[SWS_DM_00708]。由于指定的线程安全性,即使在存在并发诊断活动时,该调用也应是安全的,而无需应用程序端进行互斥同步。 问题 Q-b851a473c2d836b7 (未决)在访问被引用的字符串之前,应用程序必须检查 ara::core::Result 是否包含错误。

本使用说明为自动生成。所有依据均来自针对 Release R25-11 的 AUTOSAR Adaptive Platform 规范。

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

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

Parameter (in)

ParameterBeschreibung
securityLevelSecurity level enum the shortname shall be returned for.

Rückgabewert

TypBeschreibung
ara::core::Result<ara::core::StringView >ara::core::Result<ara::core::StringView> the SecurityLevel as shortName; DiagnosticSecurityLevel.shortName.

Fehler

FehlercodeBeschreibung
DiagErrc::kInvalidArgumentrollback_semantics e.g. kPreFailed with internal debouncing

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

Record
AUTOSAR/AP/record/SWS_DM_00708
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00708@rel:R25-11#8bc9f7d9
Content hash
8bc9f7d9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00708
Status: valid/unmigrated Version: rel:R25-11#3e07bb5e Versionshistorie & Revisions (1 transition, 7 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_00708@rel:R25-11#3e07bb5e
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#ad3cc17f2026-09-30
  • R20-11rel:R20-11#b852d3862026-10-14
  • R21-11rel:R21-11#618fb0662026-10-14
  • R22-11rel:R22-11#4879f23d2026-10-14
  • R23-11rel:R23-11#488bb9ba2026-10-14
  • R24-11rel:R24-11#bce583e52026-10-14
  • R25-11rel:R25-11#3e07bb5e2026-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

函数 GetDiagnosticSession [SWS_DM_00696] Upstream: RS_AP_00139, RS_Diag_04169, RS_Diag_04208

ara::core::Result< SessionControlType > GetDiagnosticSession () noexcept;

Represents the current active diagnostic session of an active conversation.

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

Rückgabewert

TypBeschreibung
ara::core::Result<SessionControlType >the current session

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_00696
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00696@rel:R25-11#1173837a
Content hash
1173837a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00696
Status: valid/unmigrated Version: rel:R25-11#43ed0f51 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_00696@rel:R25-11#43ed0f51
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#d12e41e92026-09-30
  • R19-11rel:R19-11#0f787e1f2026-10-14
  • R20-11rel:R20-11#4ee06c722026-10-14
  • R21-11rel:R21-11#980ebaf22026-10-14
  • R22-11rel:R22-11#5a23cab62026-10-14
  • R23-11rel:R23-11#e3c9e4282026-10-14
  • R24-11rel:R24-11#043ec2502026-10-14
  • R25-11rel:R25-11#43ed0f512026-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

函数 GetDiagnosticSessionShortName [SWS_DM_00707] Upstream: RS_Diag_04169, RS_Diag_04208

ara::core::Result< ara::core::StringView > GetDiagnosticSessionShort Name (SessionControlType session) noexcept;

Converts the given diagnostic session into the ShortName.

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

Parameter (in)

ParameterBeschreibung
sessionDiagnostic session the shortname shall be returned for.

Rückgabewert

TypBeschreibung
ara::core::Result<ara::core::StringView >ara::core::Result<ara::core::StringView> the session as shortName; DiagnosticSession.shortName.

Fehler

FehlercodeBeschreibung
DiagErrc::kInvalidArgumentrollback_semantics e.g. kPreFailed with internal debouncing

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

Record
AUTOSAR/AP/record/SWS_DM_00707
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00707@rel:R25-11#b1575b88
Content hash
b1575b88
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00707
Status: valid/unmigrated Version: rel:R25-11#ec692072 Versionshistorie & Revisions (1 transition, 7 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_00707@rel:R25-11#ec692072
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#382520262026-09-30
  • R20-11rel:R20-11#8e2625812026-10-14
  • R21-11rel:R21-11#633a4a682026-10-14
  • R22-11rel:R22-11#8d9fdc682026-10-14
  • R23-11rel:R23-11#68d2b3682026-10-14
  • R24-11rel:R24-11#687ae1a02026-10-14
  • R25-11rel:R25-11#ec6920722026-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

函数 ResetToDefaultSession [SWS_DM_00701] Upstream: RS_Diag_04006, RS_Diag_04166, RS_Diag_04169, RS_Diag_04209

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

Method to reset the current session to default session.

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

方法 ara::diag::Conversation::ResetToDefaultSession 允许 Adaptive Application 将诊断会话显式重置为默认会话(Default Session)[SWS_DM_00701]。

使用

调用通过头文件 #include "ara/diag/conversation.h" 在 ara::diag::Conversation 的实例上无参数进行 [SWS_DM_00701]。调用该方法时,Diagnostic Server 实例首先完成当前请求,此后才将该会话的诊断会话切换为 Default Session [SWS_DM_00842]。

错误处理与并发

  • 返回值与错误:该函数返回一个 ara::core::Result<void> [SWS_DM_00701]。未预设标准化错误码;Interpretation:Result 中的任何错误都可能反映 Diagnostic Server 在任务处理中的厂商特定问题。 问题 Q-9f780f4ef7991bf4 (未决)
  • 线程安全:该函数是异常安全的(noexcept),但被指定为非线程安全(not thread-safe)[SWS_DM_00701]。因此,对同一会话对象的并行调用必须由调用应用进行协调。

相互作用

该方法通过有针对性的状态控制对会话接口的信息特征进行了补充 AUTOSAR_AP_SWS_Diagnostics §7 “Diagnostic Conversation Interface”。它确保在修改会话状态之前有序终止现有诊断请求 [SWS_DM_00842]。

本使用说明自动生成,完全基于 AUTOSAR Adaptive R25-11 的规范文档。

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

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

Rückgabewert

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

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_00701
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00701@rel:R25-11#d437e92f
Content hash
d437e92f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00701
Status: valid/unmigrated Version: rel:R25-11#c03208e0 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_00701@rel:R25-11#c03208e0
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#54ef57a92026-09-30
  • R19-11rel:R19-11#cba5e6552026-10-14
  • R20-11rel:R20-11#576381052026-10-14
  • R21-11rel:R21-11#576381052026-10-14
  • R22-11rel:R22-11#3b3097d22026-10-14
  • R23-11rel:R23-11#945d0ca32026-10-14
  • R24-11rel:R24-11#5966beb72026-10-14
  • R25-11rel:R25-11#c03208e02026-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

函数 SetActivityNotifier [SWS_DM_00695] Upstream: RS_AP_00139, RS_Diag_04169

ara::core::Result< void > SetActivityNotifier (ActivityStatusType Notifier notifier) noexcept;

Register a notifier function which is called if the activity is changed. A consecutive call of this method will overwrite the previous registered notifier.

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

使用

方法 ara::diag::Conversation::SetActivityNotifier 用于注册通知函数(notifier),该函数在诊断会话的活动状态每次发生更改时都会被调用 [SWS_DM_00695]。声明通过头文件 #include "ara/diag/conversation.h" 在类 ara::diag::Conversation 的作用域内进行 AUTOSAR_AP_SWS_Diagnostics §8.9.3.2.2.11 “SetActivityNotifier”。在同一实例上再次或连续调用将完全覆盖先前注册的通知器 [SWS_DM_00695],[SWS_DM_01355]。

错误处理与并发

返回值定型为 ara::core::Result<void>,并返回成功或错误状态;但该接口未定义标准化错误码 [SWS_DM_00695]。该方法声明为 noexcept 且为异常安全(exception safe)。

在线程安全方面,该函数被归类为非线程安全(not thread-safe)[SWS_DM_00695]。如果从多个线程访问同一会话实例,则必须在应用端同步注册调用。

生命周期交互

会话实例由 Diagnostic Server 提供,其中并行会话的最大数量通过 maxConversations 配置 [SWS_DM_00840]。当诊断会话的生命周期结束时,Diagnostic Server 将活动状态设置为 kInactive [SWS_DM_00843]。这可能会向注册的通知器指示活动诊断通信的结束。 问题 Q-93c30267eb100ed7 (未决)

本文由 AI 系统生成并经过编辑审核。

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

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

Parameter (in)

ParameterBeschreibung
notifiernotifier function to be called

Rückgabewert

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

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_00695
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00695@rel:R25-11#32776885
Content hash
32776885
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00695
Status: valid/unmigrated Version: rel:R25-11#1015a6c7 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_00695@rel:R25-11#1015a6c7
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#5eecbfa02026-09-30
  • R19-11rel:R19-11#c2cf431a2026-10-14
  • R20-11rel:R20-11#6973db082026-10-14
  • R21-11rel:R21-11#483f11df2026-10-14
  • R22-11rel:R22-11#dafc31d62026-10-14
  • R23-11rel:R23-11#996aadb12026-10-14
  • R24-11rel:R24-11#8248ea3f2026-10-14
  • R25-11rel:R25-11#1015a6c72026-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

函数 SetDiagnosticSessionNotifier [SWS_DM_00697] Upstream: RS_AP_00139, RS_Diag_04169, RS_Diag_04208

ara::core::Result< void > SetDiagnosticSessionNotifier (SessionControl TypeNotifier notifier) noexcept;

Register a notifier function which is called if the Session is changed. A consecutive call of this method will overwrite the previous registered notifier.

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

函数 SetDiagnosticSessionNotifier 属于类 ara::diag::Conversation,并通过头文件 #include "ara/diag/conversation.h" 提供 [SWS_DM_00697]。它允许应用注册一个在每次诊断会话(Session)切换时触发的通知器函数。

使用与调用语义

调用在 ara::diag::Conversation 的实例上同步进行,同时传递类型为 SessionControl TypeNotifier 的参数 notifier [SWS_DM_00697]。连续或重复的方法调用将完全覆盖先前注册的通知器 AUTOSAR_AP_SWS_Diagnostics §8.9.3.2.2.12 “SetDiagnosticSessionNotifier”。

返回值与错误处理

作为返回值,该接口返回一个 ara::core::Result<void>,其要么确认成功注册,要么包含一个错误对象 [SWS_DM_00697]。规范未为此调用定义标准化错误码;因此发生的错误可能归因于实现特定的验证。 问题 Q-1ac7eebee90e3c22 (未决)

并发性与限制

本使用说明自动生成。它完全基于 AUTOSAR Adaptive Release R25-11 的规范文档。

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

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

Parameter (in)

ParameterBeschreibung
notifiernotifier function to be called

Rückgabewert

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

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_00697
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00697@rel:R25-11#2233ae99
Content hash
2233ae99
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00697
Status: valid/unmigrated Version: rel:R25-11#07e4c466 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_00697@rel:R25-11#07e4c466
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#4962fbb22026-09-30
  • R19-11rel:R19-11#0f2677902026-10-14
  • R20-11rel:R20-11#aef2058a2026-10-14
  • R21-11rel:R21-11#aef2058a2026-10-14
  • R22-11rel:R22-11#b2727dc92026-10-14
  • R23-11rel:R23-11#91ac768a2026-10-14
  • R24-11rel:R24-11#22154ba92026-10-14
  • R25-11rel:R25-11#07e4c4662026-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

函数 SetSecurityLevelNotifier [SWS_DM_00699] Upstream: RS_AP_00139, RS_Diag_04169, RS_Diag_04208

ara::core::Result< void > SetSecurityLevelNotifier (SecurityLevelType Notifier notifier) noexcept;

Register a notifier function which is called if the SecurityLevel is changed. A consecutive call of this method will overwrite the previous registered notifier.

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

使用

方法 ara::diag::Conversation::SetSecurityLevelNotifier 用于注册一个回调函数,一旦诊断会话的安全级别(SecurityLevel)发生更改,该回调函数就会收到通知 [SWS_DM_00699]。它通过头文件 ara/diag/conversation.h 声明 AUTOSAR_AP_SWS_Diagnostics §8.9.3.2.2.13 “SetSecurityLevelNotifier”。它接收待调用的函数 notifier 作为参数。再次调用该方法将完全覆盖先前注册的通知器函数 [SWS_DM_00699]。

语义与返回值

该函数定义为 noexcept,并被指定为异常安全(exception safe)[SWS_DM_00699]。作为返回类型,它返回 ara::core::Result<void>,其要么不返回值,要么返回发生的错误 [SWS_DM_00699]。

错误处理

规范未为 SetSecurityLevelNotifier 定义标准化错误码 [SWS_DM_00699]。因此,在 ara::core::Result 中可能返回的错误可能是厂商特定的,或者是底层平台运行时引起的。 问题 Q-c8dd53e9d661cc78 (未决)

并发性与限制

在线程安全方面,该方法被明确归类为 not thread-safe [SWS_DM_00699]。因此,对 ara::diag::Conversation 同一实例的并行访问必须在调用方同步。此外,在当前文档版本中,该 API 定义具有状态 DRAFT AUTOSAR_AP_SWS_Diagnostics §8.9.3.2.2.13 “SetSecurityLevelNotifier”。

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

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

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

Parameter (in)

ParameterBeschreibung
notifiernotifier function to be called

Rückgabewert

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

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_00699
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_00699@rel:R25-11#05e2cbc7
Content hash
05e2cbc7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_00699
Status: valid/unmigrated Version: rel:R25-11#1a953b3c 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_00699@rel:R25-11#1a953b3c
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#bd832bbe2026-09-30
  • R19-11rel:R19-11#955a893e2026-10-14
  • R20-11rel:R20-11#e175a4872026-10-14
  • R21-11rel:R21-11#965f1c762026-10-14
  • R22-11rel:R22-11#377ba2182026-10-14
  • R23-11rel:R23-11#a5a017ec2026-10-14
  • R24-11rel:R24-11#a280e19e2026-10-14
  • R25-11rel:R25-11#1a953b3c2026-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_02091] Upstream: RS_AP_00134

Conversation & operator= (const Conversation &)=delete;

Copy assignment operator of conversation is deleted.

Header-Datei#include "ara/diag/conversation.h"
Scopeclass ara::diag::Conversation

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

Record
AUTOSAR/AP/record/SWS_DM_02091
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02091@rel:R25-11#5f0d9487
Content hash
5f0d9487
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02091
Status: valid/unmigrated Version: rel:R25-11#c1fa5c07 Versionshistorie & Revisions (1 transition)
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_02091@rel:R25-11#c1fa5c07
Point-in-Time History:
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_02093] Upstream: RS_AP_00134

Conversation & operator= (Conversation &&)=delete;

Move assignment operator of conversation is deleted.

Header-Datei#include "ara/diag/conversation.h"
Scopeclass ara::diag::Conversation

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

Record
AUTOSAR/AP/record/SWS_DM_02093
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02093@rel:R25-11#bcb7603d
Content hash
bcb7603d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02093
Status: valid/unmigrated Version: rel:R25-11#917ef331 Versionshistorie & Revisions (1 transition)
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_02093@rel:R25-11#917ef331
Point-in-Time History:
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

类型别名文档

类型别名 ActivityStatusTypeNotifier [SWS_DM_02126] Upstream: RS_AP_00139, RS_Diag_04169

using ActivityStatusTypeNotifier = std::function<void(ActivityStatus Type)>;

Register a notifier function which is called if the activity is changed.

Header-Datei#include "ara/diag/conversation.h"
Scopeclass ara::diag::Conversation
SymbolActivityStatusTypeNotifier
Thread-Sicherheitnot thread-safe

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

Record
AUTOSAR/AP/record/SWS_DM_02126
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02126@rel:R25-11#4fcffe11
Content hash
4fcffe11
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02126
Status: valid/unmigrated Version: rel:R25-11#9d0d103a Versionshistorie & Revisions (1 transition)
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_02126@rel:R25-11#9d0d103a
Point-in-Time History:
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

类型别名 SecurityLevelTypeNotifier [SWS_DM_02128] Upstream: RS_AP_00139, RS_Diag_04169, RS_Diag_04208

using SecurityLevelTypeNotifier = std::function<void(SecurityLevel Type)>;

Register a notifier function which is called if the SecurityLevel is changed.

Header-Datei#include "ara/diag/conversation.h"
Scopeclass ara::diag::Conversation
SymbolSecurityLevelTypeNotifier
Thread-Sicherheitnot thread-safe

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

Record
AUTOSAR/AP/record/SWS_DM_02128
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02128@rel:R25-11#7c84357e
Content hash
7c84357e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02128
Status: valid/unmigrated Version: rel:R25-11#bf178d8f Versionshistorie & Revisions (1 transition)
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_02128@rel:R25-11#bf178d8f
Point-in-Time History:
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

类型别名 SessionControlTypeNotifier [SWS_DM_02127] Upstream: RS_AP_00139, RS_Diag_04169, RS_Diag_04208

using SessionControlTypeNotifier = std::function<void(SessionControl Type)>;

Register a notifier function which is called if the Session is changed.

Header-Datei#include "ara/diag/conversation.h"
Scopeclass ara::diag::Conversation
SymbolSessionControlTypeNotifier
Thread-Sicherheitnot thread-safe

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

Record
AUTOSAR/AP/record/SWS_DM_02127
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02127@rel:R25-11#fcc8ea28
Content hash
fcc8ea28
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02127
Status: valid/unmigrated Version: rel:R25-11#09cac05a Versionshistorie & Revisions (1 transition)
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_02127@rel:R25-11#09cac05a
Point-in-Time History:
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