类 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" Scope namespace ara::diag
用户指南人工智能生成 允许通过句柄经由通用接口设置和查询多个诊断条件。
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 2f3f3f7d9426
来源
未决问题(1)
摘要 详细
允许通过句柄经由通用接口设置和查询多个诊断条件。
类 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 (未决)
使用路径
与诊断条件交互的典型流程包括以下步骤:
初始化: 应用程序指定目标端口并实例化该类([SWS_DM_01727] )。
设置状态: 应用程序使用 SetCondition(conditionHandle, condition) 传递指定条件的状态更改,并检查生成的 ara::core::Result<void>([SWS_DM_01729] )。
查询状态: 通过 GetCondition(conditionHandle) 异步请求寻址条件的当前状态,作为 ara::core::Future<ConditionType>([SWS_DM_01728] )。
资源释放: 离开作用域时,析构函数有序拆卸接口([SWS_DM_01737] )。
ara::diag::MultipleCondition 的典型使用流程 应用 MultipleCondition DiagnosticManagement Use Case: Initialisierung MultipleCondition(specifier) Use Case: Zustand setzen SetCondition(handle, condition) Bedingungszustand aktualisieren Bestaetigung Result<void> Use Case: Zustand abfragen GetCondition(handle) Zustand anfordern ConditionType Future<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 Destructor of class Condition .
方法 Get condition state of the requested condition.
Set condition state of the requested condition.
运算符 Copy assignment operator of MultipleCondition.
重载 = 2
点击条目以查看其关系。
基类 派生类 使用 被使用于 继承 自此版本起移除 用于 此类中无关联 函数 AI 评注 打开类页面 无法加载类页面。 调整顺序 调整宽度 调整大纲宽度 章节 阅读时间 SWS 引用 图表 放回中间 调整顺序或拖到标题栏 取消停靠 – 在内容中显示 移到中间栏 作为标签停靠到标题栏 元素 AI 模型 打开审计档案 档案 打开简短版本 打开中等版本 打开完整版本 恢复默认视图 已恢复默认视图 撤销 关闭详细视图 签名 基本信息 值 截至所选版本的最后一次更改 之后的下一次更改 单击:选择版本 无法放在此处:拖到标题栏可停靠,拖到中间栏可取消停靠。 新增 已更改 未更改 已移除 未包含 更改 内容无变化 首次出现于 移除于 没有可用的版本数据。 正在加载版本数据 … 文本 此版本未收录措辞 悬停或单击单元格:与所选版本比较 · 单击版本标题:选择版本 选择版本 属性 版本 元素 只有一个版本有措辞 PDF 中存在,原文尚未导入 首次采集原文 自 {rel} 起未更改 版本颜色 最早版本 最新版本
方法文档
ara::core::Future < ConditionType > GetCondition (ConditionHandleType conditionHandle) noexcept;
Get condition state of the requested condition.
Header-Datei #include "ara/diag/multiple_condition.h" Scope class ara::diag::MultipleCondition Exception-Sicherheit exception safe Thread-Sicherheit conditional whether the function has to be implemented thread safe or non-thread safe is determined by the ConcurrencyType given in the constructor
Parameter (in)
Parameter Beschreibung conditionHandle Identifies the requested condition
Rückgabewert
Fehler
Fehlercode Beschreibung 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.
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:
Release:
R25-11 (Current / Active) R23-11 R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (4):
R25-11 rel:R25-11#ffd9efe62026-09-30 Inspect R23-11 rel:R23-11#cefb75d12026-10-14 Inspect R24-11 rel:R24-11#e36eef822026-10-14 Inspect R25-11 rel:R25-11#1021a13e2026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
explicit MultipleCondition (const ara::core::InstanceSpecifier &specifier) noexcept;
Constructor of MultipleCondition Class.
Header-Datei #include "ara/diag/multiple_condition.h" Scope class ara::diag::MultipleCondition Exception-Sicherheit exception safe Thread-Sicherheit thread-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)
Parameter Beschreibung specifier InstanceSpecifier to a PortPrototype of a DiagnosticMultipleConditionInterface
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:
Release:
R25-11 (Current / Active) R23-11 R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (4):
R25-11 rel:R25-11#2c9de7bb2026-09-30 Inspect R23-11 rel:R23-11#3179b5462026-10-14 Inspect R24-11 rel:R24-11#8f45ca0e2026-10-14 Inspect R25-11 rel:R25-11#65e518522026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
MultipleCondition (MultipleCondition &&) noexcept=delete;
Move constructor of MultipleCondition.
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:
Release:
R25-11 (Current / Active) R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (3):
R25-11 rel:R25-11#05fd4e5b2026-09-30 Inspect R24-11 rel:R24-11#73d20be92026-10-14 Inspect R25-11 rel:R25-11#73d20be92026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
MultipleCondition (MultipleCondition &)=delete;
Copy constructor of MultipleCondition.
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:
Release:
R25-11 (Current / Active) R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (3):
R25-11 rel:R25-11#5a4143a82026-09-30 Inspect R24-11 rel:R24-11#1739c4352026-10-14 Inspect R25-11 rel:R25-11#1739c4352026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
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" Scope class ara::diag::MultipleCondition Exception-Sicherheit exception safe Thread-Sicherheit conditional whether the function has to be implemented thread safe or non-thread safe is determined by the ConcurrencyType given in the constructor
Parameter (in)
Parameter Beschreibung conditionHandle Identifies the requested condition condition current condition
Rückgabewert
Fehler
Fehlercode Beschreibung DiagErrc ::kInvalidArgumentrollback_semantics e.g. kPreFailed with internal debouncing
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:
Release:
R25-11 (Current / Active) R23-11 R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (4):
R25-11 rel:R25-11#0d9cc8512026-09-30 Inspect R23-11 rel:R23-11#fd3bc3f32026-10-14 Inspect R24-11 rel:R24-11#b9d84d0f2026-10-14 Inspect R25-11 rel:R25-11#465faec82026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
MultipleCondition & operator= (MultipleCondition &)=delete;
Copy assignment operator of MultipleCondition.
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:
Release:
R25-11 (Current / Active) R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (3):
R25-11 rel:R25-11#68cfe0ab2026-09-30 Inspect R24-11 rel:R24-11#532b816e2026-10-14 Inspect R25-11 rel:R25-11#694180d92026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
MultipleCondition & operator= (MultipleCondition &&)=delete;
Move assignment operator of MultipleCondition.
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:
Release:
R25-11 (Current / Active) R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (3):
R25-11 rel:R25-11#1378d07a2026-09-30 Inspect R24-11 rel:R24-11#2e9134962026-10-14 Inspect R25-11 rel:R25-11#2e9134962026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
~MultipleCondition () noexcept;
Destructor of class Condition .
Header-Datei #include "ara/diag/multiple_condition.h" Scope class ara::diag::MultipleCondition Exception-Sicherheit exception safe Thread-Sicherheit not thread-safe
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:
Release:
R25-11 (Current / Active) R23-11 R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (4):
R25-11 rel:R25-11#7e5bd5342026-09-30 Inspect R23-11 rel:R23-11#19037ca62026-10-14 Inspect R24-11 rel:R24-11#7547ee942026-10-14 Inspect R25-11 rel:R25-11#7547ee942026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
gemini-3.8-flash-low· 2026-10-13 · 德文原文