函数 Create [SWS_SM_81014] Upstream: RS_SM_00402
static ara::core::Result< S2RSatellite > Create () noexcept;
Creation of an conneting directly to S2RHub within the current machine.
使用
静态工厂方法 ara::sm::s2r::S2RSatellite::Create 用于在同一台机器内同步实例化一个卫星端,以便直接连接到 S2RHub([SWS_SM_81014])。该调用不接收任何参数,并返回一个 ara::core::Result<S2RSatellite>,成功时其提供创建的卫星端对象([SWS_SM_81014])。
错误处理
如果配置中的开关“Force IAM switch”设置为 true,则调用失败并返回错误码 ara::sm::SmErrc::kAuthenticationRequired([SWS_SM_00716])。在这种情况下,必须强制改用构造函数 ara::sm::s2r::S2RSatellite::S2RSatellite([SWS_SM_81014])。此外,如果在调用时 ARA 运行时环境未初始化,则会引发 AraNotInitialized-Violation([SWS_SM_81014])。
并发性与边界条件
该函数被指定为线程安全以及异常安全,并声明为 noexcept([SWS_SM_81014])。因此,可以安全地从并发应用上下文中调用它。
相互作用
S2RSatellite 的实例用于支持 S2R 的应用中,以处理挂起模式之前和之后的通知(SWS StateManagement §7.5.2 “S2R Satellite”)。实例化成功后,应用通过 Offer 在 Hub 上注册([SWS_SM_00710])。在销毁对象之前,必须调用 StopOffer 进行注销([SWS_SM_00713])。Interpretation:方法 Create 预计主要用于未对卫星端强制执行 IAM 认证的应用场景。 问题 Q-fc41980edcb3f61a (未决)
本使用说明由 AI 创建。
实现者指南即将推出(复杂度 I1)
| Header-Datei | #include "ara/sm/s2r/S2RSatellite.h" |
|---|---|
| Scope | class ara::sm::s2r::S2RSatellite |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | thread-safe |
| Verletzungen (Violations) | AraNotInitialized- Violation message that is sent in case a constructor or function Violation checks for an initialized ara and identifies that ara is not initialized. |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Result< S2RSatellite > | a result that contains either a object or an error. |
Fehler
| Fehlercode | Beschreibung |
|---|---|
| ara::sm::SmErrc::kAuthenticationRequired | rollback_semantics S2R Satellite requires IAM authentication. ara::sm::s2r:: S2RSatellite::S2RSatellite has to be used instead. |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_SM_81014- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_SM_81014@rel:R25-11#22e2b056- Content hash
22e2b056- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_StateManagement.pdf#nameddest=SWS_SM_81014
Status: valid/unmigrated
Version: rel:R25-11#cd8a5e9e
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_SM_81014@rel:R25-11#cd8a5e9e
Requirement Text as-of this release:
Curation Decisions:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
|---|---|---|---|---|
| 2026-08-13 | tool | none → valid/unmigrated | mechanically 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 · 德文原文