类 <SI-Namespace>::proxy::methods::<Method>
[SWS_CM_00006] Upstream: RS_CM_00212 , RS_CM_00213 , RS_AP_00114
class <Method> final {...};
Service proxy method class, one for each ClientServerOperation ( ClientServerOperation.fireAndForget ==FALSE) defined in the ServiceInterface in the role method.
Header-Datei #include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h" Forwarding-Header #include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy/<SiShortname>_proxy_fwd.h" Scope namespace <SI-Namespace>::proxy::methods
用户指南人工智能生成 支持带返回值的服务方法的异步调用以及端到端状态检查。
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 90f1e995b658
来源
未决问题(2)
摘要 详细
支持带返回值的服务方法的异步调用以及端到端状态检查。
Proxy 方法类 <SI-Namespace>::proxy::methods::<Method> 允许客户端应用程序针对 ServiceInterface 中定义的客户端-服务器操作 [SWS_CM_00196] 执行带返回值的方法调用。调用通过 operator() 以非阻塞方式进行,它会立即返回一个 ara::core::Future,用于灵活地同步或异步查询结果 [SWS_CM_00196] 。此外,GetE2EStateMachineState() 允许读取关联端到端状态机的保护状态 [SWS_CM_00148] 。由于这些操作被指定为异常安全的,因此传输和运行时错误会通过 Future 并带有标准化错误码进行报告。
更多 ›
上下文
类 <SI-Namespace>::proxy::methods::<Method> 表示 AUTOSAR Adaptive 通信管理内部用于同步和异步方法调用的客户端接口。对于在 ServiceInterface 中声明且配置了属性 ClientServerOperation.fireAndForget == FALSE 的每个客户端-服务器操作,通信框架都会恰好生成一个作为方法角色的专用 Proxy 方法类。该类声明为 final 并通过头文件 #include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h" 包含 SWS Communication Management, 第39页 。直接交互方包括发起调用的客户端应用程序以及 Network Binding,后者将方法传输转发到远程服务实例并接收其反馈 [SWS_CM_00196] 。Proxy 方法接收调用参数并通过 ara::core::Future 对象封装异步流程,客户端通过该对象查询调用的完成情况和结果。
生命周期
<SI-Namespace>::proxy::methods::<Method> 的实例化是与上级服务 Proxy 联合进行的。解释:该方法类作为生成的 Proxy 对象的固定组成部分,应该与其一同实例化和销毁,因此用户无需单独分配该实例。在并发性方面,通过 operator() 进行的方法调用被设计为非阻塞的;该函数启动传输并立即返回给调用者 [SWS_CM_00196] 。该实例的一个核心状态是通过端到端机制 (E2E) 进行的保护。通过方法 GetE2EStateMachineState(),应用程序可以确定方法专用状态机 (ara::com::e2e::SMState) 的当前状态 [SWS_CM_00148] 。该状态由内部检查函数 E2E_Check() 确定,该函数在处理最后一次 operator() 调用期间执行 [SWS_CM_00148] , SWS Communication Management, 第55页 。解释:E2E 状态机的状态更新应该在响应消息到达并完成检查时异步生效。 问题 Q-283a9927420e2952 (未决) 问题 Q-546c9b1bceedef6b (未决)
使用路径
典型的调用顺序包括发起方法调用、同步等待结果以及随后的完整性检查:
触发调用: 客户端应用程序通过 operator() 并传入所声明的输入参数来调用函数对象 [SWS_CM_00196] , [SWS_CM_00191] 。
立即返回: 调用不会阻塞请求线程,而是立即返回一个 ara::core::Future<Output> 类型的对象 [SWS_CM_00196] 。
结果查询: 调用者可自主决定是进行同步等待(例如通过 Future 对象)还是异步监控调用的完成 [SWS_CM_00196] 。成功完成后,Future 会提供包含响应值的 Output 对象 [SWS_CM_00196] , [SWS_CM_99333] 。
检查 E2E 保护状态: 调用完成后,应用程序可以通过 GetE2EStateMachineState() 查询 E2E 状态机的状态,以确保数据传输的有效性 [SWS_CM_00148] 。
代理方法调用流程 Client methods::<Method> Future<Output> Server / Binding operator()(args) 传输方法调用 ara::core::Future<Output> Antwortdaten bereitstellen E2E_Check() aktualisiert E2E-Status get() / Ergebnis abfragen Output 或错误 GetE2EStateMachineState() ara::com::e2e::SMState
时序图:带 Future 异步返回以及后续 E2E 状态查询的方法调用的典型流程。来源:[SWS_CM_00196] , [SWS_CM_00148] 。
错误场景
操作 operator() 和 GetE2EStateMachineState() 被指定为异常安全的 (exception safe) 并使用 noexcept 声明 [SWS_CM_00148] , [SWS_CM_00196] 。因此,通信和提供错误不会通过 C++ 异常报告,而是通过生成的 ara::core::Future 对象传递,该对象在发生错误时会封装相应的 ara::core::FutureErrc 或错误码 [SWS_CM_00196] 。指定的错误原因包括:
CommunicationFailure:Network Binding 报告可恢复的通信错误或安全连接失败;在通信超时的情况下,这可能导致远程服务器处于不确定状态 [SWS_CM_00196] 。
ComErrc::kServiceNotAvailable:服务实例在先前提供后不再可达 [SWS_CM_00196] 。
ComErrc::kUnknownApplicationError:远程服务报告了未配置的应用程序错误 [SWS_CM_00196] 。
ComE2EErrc::kUnspecifiedE2EError:远程服务报告了未指定的端到端错误 [SWS_CM_00196] 。
ComErrc::kMinimumSendIntervalViolationError:调用请求的速度快于为接口元素配置的最小发送间隔 minimumSendInterval 所允许的速度 [SWS_CM_00196] 。
权限冲突 (InsufficientPermissionsViolation):如果调用者缺少必需的权限,Grant Enforcement 将拒绝执行 [SWS_CM_00196] 。
根据规范,为这些应用程序和通信错误定义了回滚语义 (rollback_semantics) [SWS_CM_00196] 。
本指南仅基于 AUTOSAR Adaptive Release R25-11 的规范要求。
分组依据 类别 历史
成员图 类图 Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.
G
n_SI_Namespace___proxy__methods___Method_320
<Method>
+ GetE2EStateMachineState()
+ operator()
详细视图 此版本没有元素数据
方法 Returns the state of the specific method class, which was determined by the last run of E2E_Check() function invoked during the last call of operator()
运算符 Initiate a method call (ClientServerOperation. fireAndForget ==FALSE). The method call will return immediately. The caller’s selection of a synchronous or asynchronous behavior to get the method output is achieved by the use of the returned ara::core::Future object which is used to query for method completion and result including possible error.
ara::core::Future < Output > operator() ( {<p-method-in-arg-derived-type-0toN>} {<p-method-in-arg-symbol-0toN>}) noexcept;
点击条目以查看其关系。
基类 派生类 使用 被使用于 继承 自此版本起移除 用于 此类中无关联 函数 AI 评注 打开类页面 无法加载类页面。 调整顺序 调整宽度 调整大纲宽度 章节 阅读时间 SWS 引用 图表 放回中间 调整顺序或拖到标题栏 取消停靠 – 在内容中显示 移到中间栏 作为标签停靠到标题栏 元素 AI 模型 打开审计档案 档案 打开简短版本 打开中等版本 打开完整版本 恢复默认视图 已恢复默认视图 撤销 关闭详细视图 签名 基本信息 值 截至所选版本的最后一次更改 之后的下一次更改 单击:选择版本 无法放在此处:拖到标题栏可停靠,拖到中间栏可取消停靠。 新增 已更改 未更改 已移除 未包含 更改 内容无变化 首次出现于 移除于 没有可用的版本数据。 正在加载版本数据 … 文本 此版本未收录措辞 悬停或单击单元格:与所选版本比较 · 单击版本标题:选择版本 选择版本 属性 版本 元素 只有一个版本有措辞 PDF 中存在,原文尚未导入 首次采集原文 自 {rel} 起未更改 版本颜色 最早版本 最新版本
方法文档
ara::com::e2e::SMState GetE2EStateMachineState () const noexcept;
Returns the state of the specific method class, which was determined by the last run of E2E_Check() function invoked during the last call of operator()
Header-Datei #include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h" Scope class <SI-Namespace>::proxy::methods::<Method> Exception-Sicherheit exception safe
Rückgabewert
Status: valid/unmigrated
Version: rel:R25-11#6f69a7c8
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_CM_00148@rel:R25-11#6f69a7c8
Point-in-Time History:
Release:
R25-11 (Current / Active) R20-11 R19-11
View Snapshot
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::Future < Output > operator() ( {<p-method-in-arg-derived-type-0toN>} {<p-method-in-arg-symbol-0toN>}) noexcept;
Initiate a method call (ClientServerOperation. fireAndForget ==FALSE). The method call will return immediately. The caller’s selection of a synchronous or asynchronous behavior to get the method output is achieved by the use of the returned ara::core::Future object which is used to query for method completion and result including possible error.
Header-Datei #include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h" Scope class <SI-Namespace>::proxy::methods::<Method> Exception-Sicherheit exception safe ComErrc::k no_rollback_semantics Verletzungen (Violations) InsufficientPer- Refused by Grant Enforcement missionsViolation
Parameter (in)
Parameter Beschreibung {<p-method-in-arg-symbol-0toN>} As per {<p-method-in-arg-symbol-0toN>} in [SWS_CM_00191]
Rückgabewert
Fehler
Fehlercode Beschreibung CommunicationFailure The network binding reported a recoverable communications error or a secure communication failure. In case of a communication timeout this could lead to an uncertain state on the remote server side. ComErrc::kUnknownApplicationError rollback_semantics A remote service returned an unconfigured application error. ComErrc::kServiceNotAvailable rollback_semantics Service is not available after being previously offered via Offer Service() ComE2EErrc::kUnspecifiedE2EError rollback_semantics A remote service returned an unspecified E2E error. ComErrc::kMinimumSendIntervalViolationError rollback_semantics Minimum Send Interval violation, because a transmission request for a service instance element (event, field or method call) was issued faster than allowed, i.e., the configured minimum send interval ServiceInterfaceDeploymentElement. minimumSendInterval for the service instance element has not yet expired.
Status: valid/unmigrated
Version: rel:R25-11#52e964c2
Versionshistorie & Revisions (1 transition, 8 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_00196@rel:R25-11#52e964c2
Point-in-Time History:
Release:
R25-11 (Current / Active) R19-11 R20-11 R21-11 R22-11 R23-11 R24-11
View Snapshot
Recorded Revisions (8):
R25-11 rel:R25-11#9ff3657d2026-09-30 Inspect R19-11 rel:R19-11#f1ab8f5a2026-10-14 Inspect R20-11 rel:R20-11#371fca132026-10-14 Inspect R21-11 rel:R21-11#3b7e8fe92026-10-14 Inspect R22-11 rel:R22-11#83f6c51d2026-10-14 Inspect R23-11 rel:R23-11#354539802026-10-14 Inspect R24-11 rel:R24-11#666c03b72026-10-14 Inspect R25-11 rel:R25-11#52e964c22026-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 · 德文原文