DEENESPTFRRUARHIKOZHNL

类 ara::shwa::Platform

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_01101] 原文尚未导入 Upstream: RS_SHWA_00018

class Platform final {...};

Die Spezifikation definiert diesen Klassentyp mit der gezeigten Schnittstelle.

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

用户指南人工智能生成

用作确定可用硬件加速平台及其关联设备的入口点。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 60e95dec807e 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用作确定可用硬件加速平台及其关联设备的入口点。

类 ara::shwa::Platform 用作在 AUTOSAR Safe Hardware Acceleration (SWS SafeHardwareAcceleration §1 “Scope of Document”) 集群中探测硬件加速器的中央入口点。通过静态工厂方法获取可用的平台实例后,应用程序调用 GetDevices() 以确定用于并行计算任务的关联加速器设备 ([AP_SWS_SHWA_01108])。由于默认构造函数已被删除且方法非线程安全,因此必须通过工厂方法获取实例,并在并发访问时由应用程序端进行同步。

上下文

类 ara::shwa::Platform 构成了 AUTOSAR Adaptive Platform 的 Safe Hardware Acceleration (SHWA) Functional Cluster 的中央入口点 (SWS SafeHardwareAcceleration §1 “Scope of Document”)。该集群的目标是为 Adaptive Applications 和其他 Functional Cluster 提供用于使用硬件加速器的标准化、可移植且安全的接口 (SWS SafeHardwareAcceleration §4.1 “Functional Overview”)。SHWA 集群负责在符合汽车安全规范的前提下执行并行计算操作、加速器上的错误检测与纠正,以及监控硬件的工作状态 (SWS SafeHardwareAcceleration §4.1 “Functional Overview”)。

在集群架构中,Platform 代表上层硬件平台,通过它访问特定的执行单元 (Device) (SWS SafeHardwareAcceleration §7 “High Level Design of Safe Hardware Acceleration in an Adaptive Platform”)。Adaptive Application 与该平台交互,以确定现有的加速器设备,这些设备与队列(Queues)和缓冲区(Buffers)协同工作,并行处理计算密集型任务 (SWS SafeHardwareAcceleration §7 “High Level Design of Safe Hardware Acceleration in an Adaptive Platform”)。

生命周期

ara::shwa::Platform 的生命周期遵循受控的实例化方式。默认构造函数被显式删除 ([AP_SWS_SHWA_01102]),使得应用程序无法在没有上下文的情况下创建平台对象。初始化只能通过静态工厂方法 GetPlatforms() 进行 ([AP_SWS_SHWA_01107])。

提供的实例支持完整的值语义和移动语义:

解释:由于所有复制和移动运算符都被声明为平凡的默认实现,Platform 可能被设计为驱动程序上下文的轻量级代理或描述符。 问题 Q-d136569f5adb1a20 (未决)在并发方面,该类的方法被显式指定为非线程安全 (not thread-safe) ([AP_SWS_SHWA_01107], [AP_SWS_SHWA_01108])。如果跨线程使用实例,则必须在应用程序端对调用进行同步。

使用路径

将 ara::shwa::Platform 集成到应用程序中遵循固定的步骤顺序:

  1. 应用程序调用静态工厂方法 ara::shwa::Platform::GetPlatforms() 以查询所有可用的平台实例 ([AP_SWS_SHWA_01107])。
  2. 应用程序从返回的结果向量中选择所需的平台实例。
  3. 在该实例上调用方法 GetDevices(),以查询关联的硬件加速器 ([AP_SWS_SHWA_01108])。
  4. 生成的 Device 对象随后用于创建队列和缓冲区,以便在硬件上执行计算操作 (SWS SafeHardwareAcceleration §7 “High Level Design of Safe Hardware Acceleration in an Adaptive Platform”)。
平台与设备探测应用ara::shwa::PlatformInstanz: PlatformGetPlatforms()Result<Vector<Platform>>altErfolgGetDevices()Result<Vector<Device>>Fehler (kResourceBusy / kRuntime)执行错误处理

时序图:平台查询以及随后确定可用加速器设备的典型流程。来源:[AP_SWS_SHWA_01107]、[AP_SWS_SHWA_01108]、SWS SafeHardwareAcceleration §7 “High Level Design of Safe Hardware Acceleration in an Adaptive Platform”。

错误场景

ara::shwa::Platform 的操作被声明为 noexcept,且不抛出 C++ 异常 ([AP_SWS_SHWA_01107], [AP_SWS_SHWA_01108])。错误情况通过返回值 ara::core::Result 的错误类型进行传递。针对 GetPlatforms() 和 GetDevices(),均指定了以下错误代码:

  • ShwaErrorCode::kResourceBusy:请求的操作无法执行,因为相关硬件或软件资源当前已被占用 ([AP_SWS_SHWA_01107], [AP_SWS_SHWA_01108])。
  • ShwaErrorCode::kRuntime:发生了常规运行时错误 ([AP_SWS_SHWA_01107], [AP_SWS_SHWA_01108])。对于该错误,未规定回滚语义 (no_rollback_semantics),因此内部状态不会自动重置,应用程序必须对该过程进行处理。

本类指南针对 AUTOSAR Adaptive Platform Release R25-11 根据 Safe Hardware Acceleration 模块的规范进行编撰。

成员图

构造函数和析构函数

1

运算符

1

详细视图

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

构造函数和析构函数

Platform 函数 3

Die Spezifikation definiert diese Deklaration mit der in der Signatur ausgewiesenen Semantik.

重载 Platform 3
Platform ()=delete; AP_SWS_SHWA_01102
Platform (Platform &&ptfm) noexcept=default; AP_SWS_SHWA_01105
Platform (Platform const &ptfm) noexcept=default; AP_SWS_SHWA_01103

方法

GetDevices 函数

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

ara::core::Result< ara::core::Vector< Device > > GetDevices () noexcept;

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

static ara::core::Result< ara::core::Vector< Platform > > GetPlatforms () noexcept;

运算符

operator= 函数 2

Stellt die in der Signatur ausgewiesene Index- beziehungsweise Zuweisungsoperation bereit.

重载 = 2
Platform & operator= (const Platform &ptfm) noexcept=default; AP_SWS_SHWA_01104
Platform & operator= (Platform &&ptfm) noexcept=default; AP_SWS_SHWA_01106

详细信息

函数 Platform [AP_SWS_SHWA_01102] Upstream: RS_SHWA_00018

Platform ()=delete;

Die Spezifikation definiert diese Deklaration mit der in der Signatur ausgewiesenen Semantik.

Scopeclass ara::shwa::Platform

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

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

函数 Platform [AP_SWS_SHWA_01105] Upstream: RS_SHWA_00018

Platform (Platform &&ptfm) noexcept=default;

Die Spezifikation definiert diese Deklaration mit der in der Signatur ausgewiesenen Semantik.

Scopeclass ara::shwa::Platform
Exception Safetyexception safe

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_01105
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_01105@rel:R25-11#d1acc3d5
Content hash
d1acc3d5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_01105
Status: valid/unmigrated Version: rel:R25-11#55be7f30 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_01105@rel:R25-11#55be7f30
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= [AP_SWS_SHWA_01104] Upstream: RS_SHWA_00018

Platform & operator= (const Platform &ptfm) noexcept=default;

Stellt die in der Signatur ausgewiesene Index- beziehungsweise Zuweisungsoperation bereit.

Scopeclass ara::shwa::Platform
Exception Safetyexception safe

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_01104
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_01104@rel:R25-11#02610439
Content hash
02610439
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_01104
Status: valid/unmigrated Version: rel:R25-11#4f68176d 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_01104@rel:R25-11#4f68176d
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= [AP_SWS_SHWA_01106] Upstream: RS_SHWA_00018

Platform & operator= (Platform &&ptfm) noexcept=default;

Stellt die in der Signatur ausgewiesene Index- beziehungsweise Zuweisungsoperation bereit.

Scopeclass ara::shwa::Platform
Exception Safetyexception safe

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

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

函数 Platform [AP_SWS_SHWA_01103] Upstream: RS_SHWA_00018

Platform (Platform const &ptfm) noexcept=default;

Die Spezifikation definiert diese Deklaration mit der in der Signatur ausgewiesenen Semantik.

Scopeclass ara::shwa::Platform
Exception Safetyexception safe

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

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

函数 GetDevices [AP_SWS_SHWA_01108] Upstream: RS_SHWA_00018, RS_SHWA_00007

ara::core::Result< ara::core::Vector< Device > > GetDevices () noexcept;

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

Scopeclass ara::shwa::Platform
Thread Safetynot thread-safe rollback_semantics ShwaErrorCode::k Runtime General runtime error no_rollback_semantics
Exception Safetyexception safe
ErrorsShwaErrorCode::k ResourceBusy The operation could not be performed because the resource is currently busy

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

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

函数 GetPlatforms [AP_SWS_SHWA_01107] Upstream: RS_SHWA_00018, RS_SHWA_00007

static ara::core::Result< ara::core::Vector< Platform > > GetPlatforms () noexcept;

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

Scopeclass ara::shwa::Platform
Thread Safetynot thread-safe rollback_semantics ShwaErrorCode::k Runtime General runtime error no_rollback_semantics
Exception Safetyexception safe
ErrorsShwaErrorCode::k ResourceBusy The operation could not be performed because the resource is currently busy

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

Record
AUTOSAR/AP/record/AP_SWS_SHWA_01107
Status
valid/unmigrated
Version
AUTOSAR/AP/record/AP_SWS_SHWA_01107@rel:R25-11#744019cf
Content hash
744019cf
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_SafeHardwareAcceleration.pdf#nameddest=AP_SWS_SHWA_01107
Status: valid/unmigrated Version: rel:R25-11#5546e8ef 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_01107@rel:R25-11#5546e8ef
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