DEENESPTFRRUARHIKOZHNL

类 ara::diag::MultipleCondition

[SWS_DM_01730] Upstream: RS_Diag_04192

class MultipleCondition final {...};

Class for multiple condition operations.

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

用户指南人工智能生成

允许通过句柄经由通用接口设置和查询多个诊断条件。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 2f3f3f7d9426 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

允许通过句柄经由通用接口设置和查询多个诊断条件。

类 ara::diag::MultipleCondition 用于通过数字句柄([SWS_DM_01730])经由通用端口接口对多个诊断条件进行集中查询和更新。应用程序通过 InstanceSpecifier 实例化该对象,并通过 SetCondition 和 GetCondition 有针对性地控制条件([SWS_DM_01729])。作为重要的约束条件,该类既不可复制也不可移动,且其析构函数不是线程安全的。此外,模型中所有被寻址的条件都必须通过端口映射进行一致配置,以避免初始化和运行时错误。

上下文

类 ara::diag::MultipleCondition 允许 Adaptive 应用程序通过通用接口对多个诊断条件进行集中管理和修改([SWS_DM_01730])。在功能和语义上,它提供与单个条件相同的功能,但通过标识句柄(AUTOSAR_AP_SWS_Diagnostics 第237页)扩展了操作的定向寻址能力。每个受管理的诊断条件(DiagnosticCondition)在模型中都需要通过 DiagnosticMultipleConditionPortMapping 与类型适当的端口进行链接([SWS_DM_01727]、AUTOSAR_AP_SWS_Diagnostics 第237页)。寻址通过类型 ConditionHandleType 进行;若不存在显式的 overrideId 值,Diagnostic Management (DM) 会按短名称的字母顺序从 0x010000 开始分配递增的数值([SWS_DM_01735])。

MultipleConditionContext App Adaptive Anwendung MC ara::diag::MultipleCondition App->MC steuert / fragt ab DM 诊断管理 MC->DM 通过端口进行状态同步

上下文图:ara::diag::MultipleCondition 在 Adaptive 应用程序与 Diagnostic Management 之间的嵌入关系。来源:[SWS_DM_01727]、[SWS_DM_01728]、AUTOSAR_AP_SWS_Diagnostics 第237页

生命周期

实例通过构造函数 MultipleCondition 并传入 ara::core::InstanceSpecifier 创建([SWS_DM_01727])。创建过程是线程安全的,并声明为 noexcept([SWS_DM_01727])。该对象与其局部作用域具有严格绑定:复制和移动操作均已删除;复制构造函数([SWS_DM_02072])、移动构造函数([SWS_DM_02071])、复制赋值运算符([SWS_DM_02073])和移动赋值运算符([SWS_DM_02074])均不可用(=delete)。

析构函数 ~MultipleCondition() 显式指定为非线程安全([SWS_DM_01737])。因此,应用程序必须确保在销毁之前完成对该对象的所有并发访问。对于常规方法调用,适用有条件的线程安全性([SWS_DM_01728]、[SWS_DM_01729])。Interpretation:由于根据 [SWS_DM_01727] 构造函数签名不接受显式并发参数,所需的 ConcurrencyType 大概通过清单中底层的端口模型来确定。 问题 Q-f29def512a68aae9 (未决)

使用路径

与诊断条件交互的典型流程包括以下步骤:

  1. 初始化:应用程序指定目标端口并实例化该类([SWS_DM_01727])。
  2. 设置状态:应用程序使用 SetCondition(conditionHandle, condition) 传递指定条件的状态更改,并检查生成的 ara::core::Result<void>([SWS_DM_01729])。
  3. 查询状态:通过 GetCondition(conditionHandle) 异步请求寻址条件的当前状态,作为 ara::core::Future<ConditionType>([SWS_DM_01728])。
  4. 资源释放:离开作用域时,析构函数有序拆卸接口([SWS_DM_01737])。
ara::diag::MultipleCondition 的典型使用流程应用MultipleConditionDiagnosticManagementUse Case: InitialisierungMultipleCondition(specifier)Use Case: Zustand setzenSetCondition(handle, condition)Bedingungszustand aktualisierenBestaetigungResult<void>Use Case: Zustand abfragenGetCondition(handle)Zustand anfordernConditionTypeFuture<ConditionType>Use Case: Bereinigung~MultipleCondition()

时序图:通过 MultipleCondition 管理条件时的调用与响应模式。来源:[SWS_DM_01727]、[SWS_DM_01728]、[SWS_DM_01729]、[SWS_DM_01737]

错误场景

在使用时,须区分建模引起的构建错误和功能运行时错误:

  • 设计违规([SWS_DM_01727]): 如果解析 InstanceSpecifier 失败,或者其未指向 PortPrototype,则会报告 InstanceSpecifierMappingIntegrityViolation。如果端口未类型化为 DiagnosticMultipleConditionInterface,则会发生 PortInterfaceMappingViolation。如果进程缺少建模的对应项,则会产生 ProcessMappingViolation。如果在进程中多次实例化同一个 InstanceSpecifier,则会导致 InstanceSpecifierAlreadyInUseViolation。
  • 方法调用时的运行时错误:\n 若向 SetCondition([SWS_DM_01729])或 GetCondition([SWS_DM_01728])传递了不允许的参数或无效句柄,方法将返回错误 DiagErrc::kInvalidArgument。如果 Diagnostic Management 的基本功能暂时无法访问,GetCondition 将以 DiagErrc::kServiceNotAvailable 确认调用([SWS_DM_01728])。

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

成员图

类图

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

G nara__diag__MultipleCondition516 MultipleCondition + MultipleCondition() + operator=() + ~MultipleCondition() + GetCondition() + SetCondition()

详细视图

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

构造函数和析构函数

Constructor of MultipleCondition Class.

重载 MultipleCondition 3
explicit MultipleCondition (const ara::core::InstanceSpecifier &specifier) noexcept; SWS_DM_01727
MultipleCondition (MultipleCondition &&) noexcept=delete; SWS_DM_02071
MultipleCondition (MultipleCondition &)=delete; SWS_DM_02072

Destructor of class Condition .

~MultipleCondition () noexcept;

方法

Get condition state of the requested condition.

ara::core::Future< ConditionType > GetCondition (ConditionHandleType conditionHandle) noexcept;

Set condition state of the requested condition.

ara::core::Result< void > SetCondition (ConditionHandleType condition Handle, ConditionType condition) noexcept;

运算符

operator= 函数 2

Copy assignment operator of MultipleCondition.

重载 = 2

方法文档

函数 GetCondition [SWS_DM_01728] Upstream: RS_AP_00139, RS_Diag_04192

ara::core::Future< ConditionType > GetCondition (ConditionHandleType conditionHandle) noexcept;

Get condition state of the requested condition.

Header-Datei#include "ara/diag/multiple_condition.h"
Scopeclass ara::diag::MultipleCondition
Exception-Sicherheitexception safe
Thread-Sicherheitconditional whether the function has to be implemented thread safe or non-thread safe is determined by the ConcurrencyType given in the constructor

Parameter (in)

ParameterBeschreibung
conditionHandleIdentifies the requested condition

Rückgabewert

TypBeschreibung
ara::core::Future<ConditionType >the current condition

Fehler

FehlercodeBeschreibung
DiagErrc::kInvalidArgumentrollback_semantics e.g. kPreFailed with internal debouncing
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_01728
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01728@rel:R25-11#81883708
Content hash
81883708
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01728
Status: valid/unmigrated Version: rel:R25-11#1021a13e Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_01728@rel:R25-11#1021a13e
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#ffd9efe62026-09-30
  • R23-11rel:R23-11#cefb75d12026-10-14
  • R24-11rel:R24-11#e36eef822026-10-14
  • R25-11rel:R25-11#1021a13e2026-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

函数 MultipleCondition [SWS_DM_01727] Upstream: RS_AP_00137, RS_Diag_04192, RS_AP_00170, RS_AP_00171, RS_AP_00172, RS_AP_00173

explicit MultipleCondition (const ara::core::InstanceSpecifier &specifier) noexcept;

Constructor of MultipleCondition Class.

Header-Datei#include "ara/diag/multiple_condition.h"
Scopeclass ara::diag::MultipleCondition
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Verletzungen (Violations)InstanceSpeci- InstanceSpecifier either cannot be resolved in the model in the fierMappingIn- context of your executable, or it refers to a model element other tegrityViolation than a PortPrototype. PortInterfaceMap- A PortPrototype that is referenced by a pingViolation DiagnosticMultipleConditionPortMapping needs to be typed by a DiagnosticMultipleConditionInterface. ProcessMappingVio- Matching InstanceRef exists, but no matching (modelled) Process lation found that matches the (runtime) process. InstanceSpecifier- Violation message that is sent in case a constructor in the ara AlreadyInUseViola- framework was called with an InstanceSpecifier already in use in tion this process.

Parameter (in)

ParameterBeschreibung
specifierInstanceSpecifier to a PortPrototype of a DiagnosticMultipleConditionInterface

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

Record
AUTOSAR/AP/record/SWS_DM_01727
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01727@rel:R25-11#023c66a7
Content hash
023c66a7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01727
Status: valid/unmigrated Version: rel:R25-11#65e51852 Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_01727@rel:R25-11#65e51852
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#2c9de7bb2026-09-30
  • R23-11rel:R23-11#3179b5462026-10-14
  • R24-11rel:R24-11#8f45ca0e2026-10-14
  • R25-11rel:R25-11#65e518522026-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

函数 MultipleCondition [SWS_DM_02071] Upstream: RS_AP_00147

MultipleCondition (MultipleCondition &&) noexcept=delete;

Move constructor of MultipleCondition.

Header-Datei#include "ara/diag/multiple_condition.h"
Scopeclass ara::diag::MultipleCondition

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

Record
AUTOSAR/AP/record/SWS_DM_02071
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02071@rel:R25-11#e29b5496
Content hash
e29b5496
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02071
Status: valid/unmigrated Version: rel:R25-11#73d20be9 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_02071@rel:R25-11#73d20be9
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#05fd4e5b2026-09-30
  • R24-11rel:R24-11#73d20be92026-10-14
  • R25-11rel:R25-11#73d20be92026-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

函数 MultipleCondition [SWS_DM_02072] Upstream: RS_AP_00147

MultipleCondition (MultipleCondition &)=delete;

Copy constructor of MultipleCondition.

Header-Datei#include "ara/diag/multiple_condition.h"
Scopeclass ara::diag::MultipleCondition

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

Record
AUTOSAR/AP/record/SWS_DM_02072
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02072@rel:R25-11#03846e76
Content hash
03846e76
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02072
Status: valid/unmigrated Version: rel:R25-11#1739c435 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_02072@rel:R25-11#1739c435
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#5a4143a82026-09-30
  • R24-11rel:R24-11#1739c4352026-10-14
  • R25-11rel:R25-11#1739c4352026-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

函数 SetCondition [SWS_DM_01729] Upstream: RS_AP_00139, RS_Diag_04192

ara::core::Result< void > SetCondition (ConditionHandleType condition Handle, ConditionType condition) noexcept;

Set condition state of the requested condition.

Header-Datei#include "ara/diag/multiple_condition.h"
Scopeclass ara::diag::MultipleCondition
Exception-Sicherheitexception safe
Thread-Sicherheitconditional whether the function has to be implemented thread safe or non-thread safe is determined by the ConcurrencyType given in the constructor

Parameter (in)

ParameterBeschreibung
conditionHandleIdentifies the requested condition
conditioncurrent condition

Rückgabewert

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

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_01729
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01729@rel:R25-11#4a1ff765
Content hash
4a1ff765
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01729
Status: valid/unmigrated Version: rel:R25-11#465faec8 Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_01729@rel:R25-11#465faec8
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#0d9cc8512026-09-30
  • R23-11rel:R23-11#fd3bc3f32026-10-14
  • R24-11rel:R24-11#b9d84d0f2026-10-14
  • R25-11rel:R25-11#465faec82026-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_02073] Upstream: RS_AP_00147

MultipleCondition & operator= (MultipleCondition &)=delete;

Copy assignment operator of MultipleCondition.

Header-Datei#include "ara/diag/multiple_condition.h"
Scopeclass ara::diag::MultipleCondition

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

Record
AUTOSAR/AP/record/SWS_DM_02073
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02073@rel:R25-11#7ecdf97a
Content hash
7ecdf97a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02073
Status: valid/unmigrated Version: rel:R25-11#694180d9 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_02073@rel:R25-11#694180d9
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#68cfe0ab2026-09-30
  • R24-11rel:R24-11#532b816e2026-10-14
  • R25-11rel:R25-11#694180d92026-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_02074] Upstream: RS_AP_00147

MultipleCondition & operator= (MultipleCondition &&)=delete;

Move assignment operator of MultipleCondition.

Header-Datei#include "ara/diag/multiple_condition.h"
Scopeclass ara::diag::MultipleCondition

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

Record
AUTOSAR/AP/record/SWS_DM_02074
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02074@rel:R25-11#5f373c0f
Content hash
5f373c0f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02074
Status: valid/unmigrated Version: rel:R25-11#2e913496 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_02074@rel:R25-11#2e913496
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#1378d07a2026-09-30
  • R24-11rel:R24-11#2e9134962026-10-14
  • R25-11rel:R25-11#2e9134962026-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

函数 ~MultipleCondition [SWS_DM_01737] Upstream: RS_AP_00134, RS_Diag_04192

~MultipleCondition () noexcept;

Destructor of class Condition .

Header-Datei#include "ara/diag/multiple_condition.h"
Scopeclass ara::diag::MultipleCondition
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_01737
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_01737@rel:R25-11#b7948ba6
Content hash
b7948ba6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01737
Status: valid/unmigrated Version: rel:R25-11#7547ee94 Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_01737@rel:R25-11#7547ee94
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#7e5bd5342026-09-30
  • R23-11rel:R23-11#19037ca62026-10-14
  • R24-11rel:R24-11#7547ee942026-10-14
  • R25-11rel:R25-11#7547ee942026-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