函数 Get [SWS_CM_11546] Upstream: RS_CM_00202, RS_CM_00203, RS_AP_00114, RS_AP_00122, RS_AP_00135, RS_AP_00145
T * Get () const noexcept;
Returns a pointer to the managed object.
用法与语义
函数 Get 是来自头文件 ara/com/service/sample_ptr.h [SWS_CM_11546] 的类 ara::com::SamplePtr 的无参数成员函数。它同步返回类型为 T* 的裸指针,指向该实例管理的对象 [SWS_CM_11546]。与提供 ara::core::Future [SWS_CM_00112] 的服务字段异步查询不同,此访问直接在调用线程中发生。
错误处理与边界条件
该方法被声明为 noexcept 并被指定为异常安全(exception safe)[SWS_CM_11546];不会通过 C++ 异常出现错误状态。如果该实例当前未管理任何对象,则返回的指针推测可能是 nullptr。 问题 Q-d850bd8ee144369a (未决)在进一步处理所引用的数据之前,必须确保 E2E 监督处于状态 ara::com::e2e::SMState::kValid 且配置文件的状态检查未产生错误 [SWS_CM_90422]。
相互协作与区分
在通信管理中,Get 用于对接收到的值(样本)进行直接数据访问,正如在样本管理框架中提供的那样 AUTOSAR_AP_EXP_ARAComAPI §10 “GetNewSamples”。该函数与其他 Get 操作有着明确的区别:
- 字段 Getter:代理上的服务字段检索通过
Get()完成,返回ara::core::Future[SWS_CM_00112],为此可以在服务器端注册处理程序 [SWS_CM_00114]。 - E2E 状态:字段 Getter 的监督状态通过
GetE2EStateMachineStateGetter单独确定 [SWS_CM_00145]。
本文字由 AI 生成,并基于 AUTOSAR 版本 R25-11。
实现者指南即将推出(复杂度 I2)
| Header-Datei | #include "ara/com/service/sample_ptr.h" |
|---|---|
| Scope | class ara::com::SamplePtr |
| Exception-Sicherheit | exception safe |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| T* | A pointer to the managed object |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_CM_11546- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_CM_11546@rel:R25-11#1c0dcfc1- Content hash
1c0dcfc1- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11546
Status: valid/unmigrated
Version: rel:R25-11#ff040cc4
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_CM_11546@rel:R25-11#ff040cc4
Recorded Revisions (3):
- R25-11
rel:R25-11#19683df22026-09-30 - R24-11
rel:R24-11#83411fd82026-10-14 - R25-11
rel:R25-11#ff040cc42026-10-14 active
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 · 德文原文