DEENESPTFRRUARHIKOZHNL

类 ara::shwa::Event

Diese Seite wurde vollständig KI-generiert auf Basis von SWS Safe Hardware Acceleration (R25-11) — kein offizieller AUTOSAR-Text und keine automatisch extrahierte API-Seite wie die übrigen Module. Als Interpretation gekennzeichnete Aussagen sind Schlussfolgerungen aus den Quellen.

[AP_SWS_SHWA_00601] 原文尚未导入 Upstream: RS_SHWA_00016

class Event final {...};

Die Spezifikation definiert diesen Klassentyp mit der gezeigten Schnittstelle.

Header-Datei#include "ara/shwa/event.h"
Scopenamespace ara::shwa

用户指南人工智能生成

将应用程序同步至关联或依赖的硬件加速器任务的完成。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: ca0070588ff8 来源 未决问题(2)
译自德文指南AI 生成gemini-3.8-flash-low · 2026-10-13 · 德文原文

将应用程序同步至关联或依赖的硬件加速器任务的完成。

类 ara::shwa::Event 用于在模块 shwa [AP_SWS_SHWA_00604] 中同步至硬件加速器任务的完成。在通过 Create() [AP_SWS_SHWA_00602] 完成线程安全的工厂创建后,通过非线程安全的方法(如 Wait() 或 WaitFor())执行阻塞式或限时等待。若在任务执行期间发生错误,则不会触发回滚语义,因此所使用的数据被视为被意外修改 [AP_SWS_SHWA_00604]。

上下文

类 ara::shwa::Event 在模块 shwa 内部充当硬件加速器任务的核心同步元素。其主要职责是同步至关联或依赖任务的完成 [AP_SWS_SHWA_00604]。交互方是协调异步加速器操作的调用方线程和应用程序组件。解释:由于该接口负责同步任务完成情况,单个 Event 对象可能封装了特定硬件执行的执行与同步信号。 问题 Q-b4aa1debd356c45c (未决)

生命周期

ara::shwa::Event 的实例通过静态工厂方法 Create() 创建,该方法返回 ara::core::Result<Event> [AP_SWS_SHWA_00602]。该创建路径是线程安全的(thread-safe),并且不抛出异常(noexcept,exception safe)[AP_SWS_SHWA_00602]。创建完成后,该对象处于活动运行状态,并支持依赖项查询以及同步操作。

在并发性方面,应用程序组件必须注意,所有实例方法以及同步调用均显式指定为非线程安全(not thread-safe)[AP_SWS_SHWA_00603]、[AP_SWS_SHWA_00604]、[AP_SWS_SHWA_00605]、[AP_SWS_SHWA_00606]。因此,多个线程并发访问同一事件实例或共享事件列表需要外部同步。对象的销毁遵循常规 C++ 生命周期;接口中不存在显式的关闭或释放方法。

使用路径

常规同步流程分为对象创建、可选的依赖项检查以及实际等待执行:

  1. 实例化:调用方调用 Create() 并检查返回的 ara::core::Result 是否成功 [AP_SWS_SHWA_00602]。
  2. 查询依赖项:通过 GetWaitList() 可以将依赖事件的列表作为 ara::core::Vector<Event> 读取 [AP_SWS_SHWA_00603]。推测 GetWaitList() 用于检查前置任务,该事件内部依赖于这些前置任务的完成。 问题 Q-ed01dc595c23ce28 (未决)
  3. 执行同步:有三种变体可用于同步:
    • 基于实例的通过 Wait() 进行的等待会阻塞,直到与该事件关联的任务完成 [AP_SWS_SHWA_00604]。
    • 通过 Wait(eventList) 静态等待一组事件会同步至 Event 对象的整个集合 [AP_SWS_SHWA_00605]。
    • 通过 WaitFor(ms) 进行限时静态等待将等待限制在以毫秒为单位的定义持续时间内 [AP_SWS_SHWA_00606]。
事件同步流程应用ara::shwa::EventUse Case: InstanziierungCreate()ara::core::Result<Event>Use Case: 依赖项检查(可选)GetWaitList()ara::core::Result<Vector<Event>>Use Case: Synchronisationalt阻塞等待实例Wait()ara::core::Result<void>zeitbegrenztes WartenWaitFor(ms)ara::core::Result<void>

时序图:从创建、依赖项查询到同步的典型流程。来源:[AP_SWS_SHWA_00602]、[AP_SWS_SHWA_00603]、[AP_SWS_SHWA_00604]、[AP_SWS_SHWA_00606]

错误场景

所有方法均使用 noexcept 声明,并通过返回类型 ara::core::Result 报告错误状态。在此过程中会出现特定的错误代码:

需要特别注意回滚语义:对于等待操作 Wait() 和 Wait(eventList),适用 no_rollback_semantics [AP_SWS_SHWA_00604]、[AP_SWS_SHWA_00605]。若在任务执行期间发生错误,则失败任务所使用的数据必须被视为被意外修改 [AP_SWS_SHWA_00604]、[AP_SWS_SHWA_00605]、[AP_SWS_SHWA_00606]。

本指南仅基于 Release R25-11 的 shwa 模块规范。

成员图

详细视图

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

方法

Create 函数

Erzeugt beziehungsweise liefert das in der Signatur beschriebene Objekt oder Ergebnis über den angegebenen Factory-Pfad.

static ara::core::Result< Event > Create () noexcept;

Liest die durch die Signatur bezeichnete Information oder Eigenschaft aus dem Objekt.

ara::core::Result< ara::core::Vector< Event > > GetWaitList () noexcept;
Wait 函数 2

Synchronisiert gemäß der Signatur auf den Abschluss assoziierter oder abhängiger Aufgaben; die zeitbegrenzte Variante begrenzt das Warten.

重载 Wait 2
static ara::core::Result< void > Wait (const ara::core::Vector< Event > &eventList) noexcept; AP_SWS_SHWA_00605
ara::core::Result< void > Wait () noexcept; AP_SWS_SHWA_00604
WaitFor 函数

Synchronisiert gemäß der Signatur auf den Abschluss assoziierter oder abhängiger Aufgaben; die zeitbegrenzte Variante begrenzt das Warten.

static ara::core::Result< void > WaitFor (const size_t ms) noexcept;

详细信息

函数 Create [AP_SWS_SHWA_00602] Upstream: RS_SHWA_00007, RS_SHWA_00016

static ara::core::Result< Event > Create () noexcept;

Erzeugt beziehungsweise liefert das in der Signatur beschriebene Objekt oder Ergebnis über den angegebenen Factory-Pfad.

Scopeclass ara::shwa::Event
Thread Safetythread-safe rollback_semantics
Exception Safetyexception safe
ErrorsShwaErrorCode::k Runtime General runtime error

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00602
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00602@rel:R25-11#d42e6eb7
Content hash
d42e6eb7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00602
Status: valid/unmigrated Version: rel:R25-11#257b2cab 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/AP_SWS_SHWA_00602@rel:R25-11#257b2cab
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

函数 GetWaitList [AP_SWS_SHWA_00603] Upstream: RS_SHWA_00007, RS_SHWA_00016

ara::core::Result< ara::core::Vector< Event > > GetWaitList () noexcept;

Liest die durch die Signatur bezeichnete Information oder Eigenschaft aus dem Objekt.

Scopeclass ara::shwa::Event
Thread Safetynot thread-safe rollback_semantics ShwaErrorCode::k Runtime General runtime error rollback_semantics
Exception Safetyexception safe
ErrorsShwaErrorCode::kEvent InvalidOperation Error related to events (e.g., invalid wait on event)

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00603
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00603@rel:R25-11#47562965
Content hash
47562965
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00603
Status: valid/unmigrated Version: rel:R25-11#3d013547 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/AP_SWS_SHWA_00603@rel:R25-11#3d013547
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

函数 Wait [AP_SWS_SHWA_00605] Upstream: RS_SHWA_00007, RS_SHWA_00016

static ara::core::Result< void > Wait (const ara::core::Vector< Event > &eventList) noexcept;

Synchronisiert gemäß der Signatur auf den Abschluss assoziierter oder abhängiger Aufgaben; die zeitbegrenzte Variante begrenzt das Warten.

Scopeclass ara::shwa::Event
Thread Safetynot thread-safe no_rollback_semantics ShwaErrorCode::k Runtime General runtime error. The data used within failed task execution should be considered as changed in unintended way no_rollback_semantics ShwaErrorCode::kTask ExecutionFailure Error during task execution. The data used within failed task execution should be considered as changed in unintended way no_rollback_semantics
Exception Safetyexception safe
ErrorsShwaErrorCode::kEvent InvalidOperation Error related to events (e.g., invalid wait on event)

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00605
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00605@rel:R25-11#4bb2f9de
Content hash
4bb2f9de
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00605
Status: valid/unmigrated Version: rel:R25-11#ab1e1fa9 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/AP_SWS_SHWA_00605@rel:R25-11#ab1e1fa9
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

函数 Wait [AP_SWS_SHWA_00604] Upstream: RS_SHWA_00007, RS_SHWA_00016

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

Synchronisiert gemäß der Signatur auf den Abschluss assoziierter oder abhängiger Aufgaben; die zeitbegrenzte Variante begrenzt das Warten.

Scopeclass ara::shwa::Event
Thread Safetynot thread-safe no_rollback_semantics ShwaErrorCode::k Runtime General runtime error. The data used within failed task execution should be considered as changed in unintended way no_rollback_semantics ShwaErrorCode::kTask ExecutionFailure Error during task execution. The data used within failed task execution should be considered as changed in unintended way no_rollback_semantics
Exception Safetyexception safe
ErrorsShwaErrorCode::kEvent InvalidOperation Error related to events (e.g., invalid wait on event)

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00604
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00604@rel:R25-11#304242f0
Content hash
304242f0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00604
Status: valid/unmigrated Version: rel:R25-11#52685e47 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/AP_SWS_SHWA_00604@rel:R25-11#52685e47
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

函数 WaitFor [AP_SWS_SHWA_00606] Upstream: RS_SHWA_00005, RS_SHWA_00007, RS_SHWA_00016

static ara::core::Result< void > WaitFor (const size_t ms) noexcept;

Synchronisiert gemäß der Signatur auf den Abschluss assoziierter oder abhängiger Aufgaben; die zeitbegrenzte Variante begrenzt das Warten.

Scopeclass ara::shwa::Event
Thread Safetynot thread-safe rollback_semantics ShwaErrorCode::k Runtime General runtime error. The data used within failed task execution should be considered as changed in unintended way no_rollback_semantics
Exception Safetyexception safe
ErrorsShwaErrorCode::kEvent InvalidOperation Error related to events (e.g., invalid wait on event) no_rollback_semantics ShwaErrorCode::kTask ExecutionFailure Error during task execution. The data used within failed task execution should be considered as changed in unintended way no_rollback_semantics ShwaErrorCode::kTimed Out Task execution timed-out. The data used within failed task execution should be considered as changed in unintended way

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_00606
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_00606@rel:R25-11#f5a2a02d
Content hash
f5a2a02d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_00606
Status: valid/unmigrated Version: rel:R25-11#2301dadd 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/AP_SWS_SHWA_00606@rel:R25-11#2301dadd
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