DEENESPTFRRUARHIKOZHNL

类 <SI-Namespace>::proxy::events::<Event>

用户指南人工智能生成

允许客户端应用程序订阅服务事件并以类型化方式接收新的数据样本。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 056774d8023a 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

允许客户端应用程序订阅服务事件并以类型化方式接收新的数据样本。

接口类 <SI-Namespace>::proxy::events::<Event> 允许 AUTOSAR Adaptive Platform 中的客户端应用程序通过模块 com 在消费者端接收服务事件。典型流程包括通过 Subscribe [SWS_CM_00141] 请求订阅、通过已注册的处理程序进行反应式通知,以及使用 GetNewSamples [SWS_CM_00701] 进行同步样本检索。在此过程中,同时持有的样本指针数量不得超过订阅时保留的数量,且在通过 Unsubscribe 注销之前必须释放所有引用。

上下文

C++ 类 <SI-Namespace>::proxy::events::<Event> 表示 AUTOSAR Adaptive Platform(Release R25-11)模块 com 中服务事件的消费者端接口。在面向服务的通信模式中,此生成的类充当服务器骨架所提供事件的本地代表。客户端应用程序使用该类的实例来订阅事件数据、接收来自通信网络传入的样本(Samples),并在消费者端管理其生命周期 AUTOSAR_AP_EXP_ARAComAPI 第10页。

该类的主要交互对象为:

  • 应用程序(Subscriber):通过 Subscribe [SWS_CM_00141] 发起事件订阅注册,留存用于数据接收以及状态变更的回调例程,并通过 GetNewSamples [SWS_CM_00701] 查询新样本。
  • Communication Management:通过底层中间件协调事件数据的传输,管理网络状态,并在新事件到达或状态发生变更时执行已注册的通知处理程序 [SWS_CM_00181], [SWS_CM_00333]。
  • 执行上下文(Executor):当使用重载的注册方法时,异步处理程序会在显式传入的上下文 ExecutorT 内执行 [SWS_CM_11354], [SWS_CM_11356], [SWS_CM_00100]。
EventKontext Anwendung 应用 ProxyEvent Proxy-Event Anwendung->ProxyEvent Subscribe / GetNewSamples ProxyEvent->Anwendung Handler-Aufruf CommunicationManagement Communication Management CommunicationManagement->ProxyEvent Ereignisdaten / Status

上下文图:应用程序、代理事件与 Communication Management 之间的交互关系。来源:[SWS_CM_00141], [SWS_CM_00181], AUTOSAR_AP_EXP_ARAComAPI 第10页

生命周期

作为顶层代理类的成员,<SI-Namespace>::proxy::events::<Event> 的实例化和销毁很可能与服务代理的生命周期紧密绑定。 问题 Q-6c591ea580278c12 (未决)创建之后,事件最初处于未订阅状态。当前订阅状态可随时通过 GetSubscriptionState 查询,该函数以 ara::com::SubscriptionState 的形式返回该状态 [SWS_CM_00316]。

向活动订阅状态的转换通过 Subscribe 发起,其中同时可用的最大缓存槽数通过 maxSampleCount 指定 [SWS_CM_00141]。若在调用时事件已处于状态 kSubscribed 或 kSubscriptionPending,且传入的值与当前值一致,则该调用不起任何作用 [SWS_CM_00141]。订阅的状态变更由 Communication Management 通过处理程序进行通报,该处理程序通过 SetSubscriptionStateChangeHandler [SWS_CM_00333] 注册,或附带执行上下文通过 SetSubscriptionStateChangeHandler [SWS_CM_11354] 注册。该注册可通过 UnsetSubscriptionStateChangeHandler 注销 [SWS_CM_00334] AUTOSAR_AP_EXP_ARAComAPI 第10页。

此外,该类还管理端到端保护(E2E)的状态。通过 GetE2EStateMachineState 可以获取 E2E 状态机的状态 ara::com::e2e::SMState,即在 GetNewSamples() 期间最后一次内部调用 E2E_Check() 时确定的状态 [SWS_CM_11554]。异常传输条件可通过处理程序进行监控,这些处理程序通过 SetTransportFaultConditionHandler [SWS_CM_00099] 或 [SWS_CM_00100] 设置,并通过 UnsetTransportFaultConditionHandler [SWS_CM_00105] 移除。

订阅的终止通过 Unsubscribe [SWS_CM_00151] AUTOSAR_AP_EXP_ARAComAPI 第10页 进行。若事件此时未处于订阅状态,则该方法不执行任何操作直接返回 [SWS_CM_00151]。所有成员函数均声明为 noexcept,并提供完整的异常安全性。

使用路径

使用代理事件的典型流程划分为以下连续阶段:

  1. 发起订阅:应用程序调用 Subscribe(maxSampleCount) [SWS_CM_00141],以预留入站样本的缓冲区大小。
  2. 配置通知:通过 SetReceiveHandler [SWS_CM_00181](或附带执行上下文通过 [SWS_CM_11356])注册一个无参数回调,当新事件到达时由 Communication Management 调用该回调。
  3. 获取并处理样本:在回调中,应用程序调用 GetNewSamples [SWS_CM_00701]。传入的具有签名 void(ara::com::SamplePtr<SampleType const>) 的 Callable f 顺序处理每个样本。此处 SampleType 对应于事件的类型特定有效负载类型 [SWS_CM_11401]。返回值以 ara::core::Result<std::size_t> 的形式提供传递给 f 的样本的确切数量 [SWS_CM_00701]。
  4. 监控缓存:应用程序可通过 GetFreeSampleCount [SWS_CM_00705] 检查本地缓存中未使用的槽位数量,以及早识别缓冲区瓶颈。
  5. 取消引用与注销:数据处理完成后,使用 UnsetReceiveHandler 停用接收触发器 [SWS_CM_00183],并通过 Unsubscribe 终止订阅 [SWS_CM_00151]。
事件订阅与样本处理应用Proxy-EventCommunication ManagementSubscribe(maxSampleCount)Abonnement anfordernSetReceiveHandler(handler)handler()GetNewSamples(f, maxNumberOfSamples)ara::core::Result<std::size_t>Unsubscribe()

时序图:订阅、通知、样本处理和注销的典型时序。来源:[SWS_CM_00141], [SWS_CM_00181], [SWS_CM_00701], [SWS_CM_00151]

错误场景

在使用该类时,可能会出现特定的错误码和运行时违规,这需要防御性检查:

  • 重新订阅时的配置错误:若在事件已订阅的情况下调用 Subscribe,且新的 maxSampleCount 与当前值不同,则调用失败并返回错误码 ComErrc::kMaxSampleCountNotRealizable [SWS_CM_00141]。在缺少权限时,系统拒绝执行并抛出 InsufficientPermissionsViolation [SWS_CM_00141]。
  • 超出缓冲区限制:若应用程序持有的 ara::com::SamplePtr 实例数量多于先前在 Subscribe 调用中所承诺的数量,则 GetNewSamples 返回错误码 ComErrc::kMaxSamplesExceeded;在这种情况下,数据样本可能已被丢弃 [SWS_CM_00701]。
  • 传入的处理程序无效:若在 SetReceiveHandler、SetSubscriptionStateChangeHandler 或 SetTransportFaultConditionHandler 中传入无效或为空(null)的可调用对象,则会触发 InvalidHandlerViolation([SWS_CM_00181], [SWS_CM_11356], [SWS_CM_00333], [SWS_CM_11354], [SWS_CM_00099], [SWS_CM_00100])。
  • 注销时残留样本:若在调用 Unsubscribe 之前未释放所有持有的 ara::com::SamplePtr,则会导致 DanglingSamplesViolation [SWS_CM_00151]。

本指南由 AI 基于 AUTOSAR R25-11 规范生成。

成员图

类图

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G n_SI_Namespace___proxy__events___Event_711 <Event> + SetTransportFaultConditionHandler() + UnsetTransportFaultConditionHandler() + GetE2EStateMachineState() + GetFreeSampleCount() + GetNewSamples() + GetSubscriptionState() + SetSubscriptionStateChangeHandler() + Subscribe() + UnsetSubscriptionStateChangeHandler() + Unsubscribe() + SetReceiveHandler() + UnsetReceiveHandler()

详细视图

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

方法

Returns the state of the specific event class, which was determined by the last run of E2E_Check() function invoked during the last call of GetNewSamples()

ara::com::e2e::SMState GetE2EStateMachineState () const noexcept;

Query Free Sample Slots

std::size_t GetFreeSampleCount () const noexcept;

Method to update the event cache.

template <typename F> ara::core::Result< std::size_t > GetNewSamples (F &&f, std::size_t max NumberOfSamples=std::numeric_limits< std::size_t >::max()) noexcept;

Query ara::com::SubscriptionState, as per [SWS_CM_00310].

ara::com::SubscriptionState GetSubscriptionState () const noexcept;

Set/Register the event receive handler

重载 SetReceiveHandler 2
void SetReceiveHandler (ara::com::EventReceiveHandler handler) noexcept; SWS_CM_00181
template <typename ExecutorT> void SetReceiveHandler (ara::com::EventReceiveHandler handler, ExecutorT &&executor) noexcept; SWS_CM_11356

Set ara::com::SubscriptionState change handler

重载 SetSubscriptionStateChangeHandler 2
void SetSubscriptionStateChangeHandler (ara::com::SubscriptionState ChangeHandler handler) noexcept; SWS_CM_00333
template <typename ExecutorT> void SetSubscriptionStateChangeHandler (ara::com::SubscriptionState ChangeHandler handler, ExecutorT &&executor) noexcept; SWS_CM_11354

Provides possibility to register a ara::com::e2e::TransportFaultConditionHandler for a given Proxy Event.

重载 SetTransportFaultConditionHandler 2
void SetTransportFaultConditionHandler (ara::com::e2e::TransportFault ConditionHandler handler) noexcept; SWS_CM_00099
template <typename ExecutorT> void SetTransportFaultConditionHandler (ara::com::e2e::TransportFault ConditionHandler handler, ExecutorT &&executor) noexcept; SWS_CM_00100
Subscribe 函数

Method to subscribe to a service event. If the Event is already in state kSubscribed or in state kSubscriptionPending at the time of the call, and the provided maxSampleCount value is the same as for the current subscription, the method shall return without action.

ara::core::Result< void > Subscribe (std::size_t maxSampleCount) noexcept;

Disable service event trigger

void UnsetReceiveHandler () noexcept;

Unset ara::com::SubscriptionState change handler

void UnsetSubscriptionStateChangeHandler () noexcept;

Provides the possibility to unregister a previously set ara::com::e2e:: TransportFaultConditionHandler for a given Proxy Event.

void UnsetTransportFaultConditionHandler () noexcept;

Method to unsubscribe from a service event. If the Event is not subscribed to at the time of the call, the method shall return without action.

void Unsubscribe () noexcept;

类型别名

SampleType 类型别名

As per [SWS_CM_11400]

using SampleType = <PSampleCppidt>;

方法文档

函数 GetE2EStateMachineState [SWS_CM_11554] Upstream: RS_CM_00224, RS_E2E_08534

ara::com::e2e::SMState GetE2EStateMachineState () const noexcept;

Returns the state of the specific event class, which was determined by the last run of E2E_Check() function invoked during the last call of GetNewSamples()

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h"
Scopeclass <SI-Namespace>::proxy::events::<Event>
Exception-Sicherheitexception safe

Rückgabewert

TypBeschreibung
ara::com::e2e::SMStateState of the specific event class
Siehe auch: [SWS_CM_90417]

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

Record
AUTOSAR/AP/record/SWS_CM_11554
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11554@rel:R25-11#8e827cd7
Content hash
8e827cd7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11554
Status: valid/unmigrated Version: rel:R25-11#4c81e570 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_11554@rel:R25-11#4c81e570
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#f9e478182026-09-30
  • R24-11rel:R24-11#5c2922c82026-10-14
  • R25-11rel:R25-11#4c81e5702026-10-14 active
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

函数 GetFreeSampleCount [SWS_CM_00705] Upstream: RS_CM_00202, RS_AP_00114, RS_AP_00120, RS_AP_00127, RS_AP_00128, RS_AP_00139

std::size_t GetFreeSampleCount () const noexcept;

Query Free Sample Slots

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h"
Scopeclass <SI-Namespace>::proxy::events::<Event>
Exception-Sicherheitexception safe

Rückgabewert

TypBeschreibung
std::size_tThe number of free/unused slots for event sample data in the local cache

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

Record
AUTOSAR/AP/record/SWS_CM_00705
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00705@rel:R25-11#bb0bb3ff
Content hash
bb0bb3ff
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00705
Status: valid/unmigrated Version: rel:R25-11#f96adb34 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_00705@rel:R25-11#f96adb34
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#2f7ed5962026-09-30
  • R19-11rel:R19-11#008f5d482026-10-14
  • R20-11rel:R20-11#e5d3f0782026-10-14
  • R21-11rel:R21-11#c65b737d2026-10-14
  • R22-11rel:R22-11#c65b737d2026-10-14
  • R23-11rel:R23-11#c65b737d2026-10-14
  • R24-11rel:R24-11#61ce58d62026-10-14
  • R25-11rel:R25-11#f96adb342026-10-14 active
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

函数 GetNewSamples [SWS_CM_00701] Upstream: RS_CM_00202, RS_AP_00114, RS_AP_00120, RS_AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00139

template <typename F> ara::core::Result< std::size_t > GetNewSamples (F &&f, std::size_t max NumberOfSamples=std::numeric_limits< std::size_t >::max()) noexcept;

Method to update the event cache.

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h"
Scopeclass <SI-Namespace>::proxy::events::<Event>
Exception-Sicherheitexception safe

Template-Parameter

ParameterBeschreibung
FFunctor which shall process the received samples

Parameter (in)

ParameterBeschreibung
fCallable ([[func.wrap]]) f with signature void(ara::com:: SamplePtr<SampleType const>)
maxNumberOfSamplesMaximum number of received data samples being processed in the function call.

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >• If successful: an ara::core::Result containing a ara:: core::Result::value_type i.e. a std::size_t the total number of data samples passed to f • If unsuccessful: an ara::core::Result containing an ara:: core::Result::error_type i.e. a corresponding ara:: com::ComErrc

Fehler

FehlercodeBeschreibung
ComErrc::kMaxSamplesExceededno_rollback_semantics Application holds more ara::com::SamplePtrs than commited in Subscribe() Samples were possibly skipped.

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

Record
AUTOSAR/AP/record/SWS_CM_00701
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00701@rel:R25-11#35ca15f3
Content hash
35ca15f3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00701
Status: valid/unmigrated Version: rel:R25-11#7a1e5108 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_00701@rel:R25-11#7a1e5108
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#35572f2e2026-09-30
  • R19-11rel:R19-11#a5b2b06e2026-10-14
  • R20-11rel:R20-11#d77236b02026-10-14
  • R21-11rel:R21-11#687f003e2026-10-14
  • R22-11rel:R22-11#687f003e2026-10-14
  • R23-11rel:R23-11#687f003e2026-10-14
  • R24-11rel:R24-11#a6b509202026-10-14
  • R25-11rel:R25-11#7a1e51082026-10-14 active
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

函数 GetSubscriptionState [SWS_CM_00316] Upstream: RS_CM_00106

ara::com::SubscriptionState GetSubscriptionState () const noexcept;
Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h"
Scopeclass <SI-Namespace>::proxy::events::<Event>
Exception-Sicherheitexception safe

Rückgabewert

TypBeschreibung
ara::com::SubscriptionStateThe state of the subscription.

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

Record
AUTOSAR/AP/record/SWS_CM_00316
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00316@rel:R25-11#e3537dc0
Content hash
e3537dc0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00316
Status: valid/unmigrated Version: rel:R25-11#755da336 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_00316@rel:R25-11#755da336
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#6bf8f8882026-09-30
  • R19-11rel:R19-11#cabe62962026-10-14
  • R20-11rel:R20-11#cabe62962026-10-14
  • R21-11rel:R21-11#cabe62962026-10-14
  • R22-11rel:R22-11#cabe62962026-10-14
  • R23-11rel:R23-11#4857a81f2026-10-14
  • R24-11rel:R24-11#3c50d0a12026-10-14
  • R25-11rel:R25-11#755da3362026-10-14 active
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

函数 SetReceiveHandler [SWS_CM_00181] Upstream: RS_CM_00203, RS_AP_00114, RS_AP_00120, RS_AP_00121

void SetReceiveHandler (ara::com::EventReceiveHandler handler) noexcept;

Set/Register the event receive handler

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 262c351f3d58 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

函数 SetReceiveHandler 用于在客户端作用域 <SI-Namespace>::proxy::events::<Event> 中注册针对到达事件 [SWS_CM_00181] 的回调处理程序。传入的参数为一个 ara::com::EventReceiveHandler,其被定义为无参函数,并在事件到达时由 Communication Management 调用 [SWS_CM_00181]。该函数没有返回值(void)[SWS_CM_00181]。

错误处理与异常行为

该操作被指定为 noexcept 且异常安全(exception safe)[SWS_CM_00181]。如果传入的 Callable 不存在或是 null,则被视为 InvalidHandlerViolation [SWS_CM_00181]。

执行上下文与协作

在 Proxy 接口中,SetReceiveHandler 属于与 UnsetReceiveHandler() 和 GetNewSamples() ARAComAPI §5.3.1 “Proxy Class API’s” 等调用并列的基础机制。如果处理程序应在给定的上下文中执行,则提供了带有 ExecutorT 的模板重载 [SWS_CM_11356](ARAComAPI 第10页)。

相同的通知方法也通过 [SWS_CM_00250](带上下文:[SWS_CM_00352])用于触发器,以及通过 [SWS_CM_11605](带上下文:[SWS_CM_11611])用于字段 ARAComAPI §4.2 “Means of Communication”。

本使用说明由 AI 基于 AUTOSAR Adaptive R25-11 规范生成。

实现者指南即将推出(复杂度 I2)

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h"
Scopeclass <SI-Namespace>::proxy::events::<Event>
Exception-Sicherheitexception safe
Verletzungen (Violations)InvalidHandlerVio- Provided Callable handler does not exist or is null lation

Parameter (in)

ParameterBeschreibung
handlerThe handler that shall be called by Communication Management upon event arrival. The EventReceiveHandler constitutes a function without parameters and has to use the f method of the specific Event class to access the retrieved event data. See [SWS_CM_00309] for its definition.

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CM_00181
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00181@rel:R25-11#fa8872c6
Content hash
fa8872c6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00181
Status: valid/unmigrated Version: rel:R25-11#bc1861fe 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_00181@rel:R25-11#bc1861fe
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#20b3d9582026-09-30
  • R19-11rel:R19-11#7d8bf15d2026-10-14
  • R20-11rel:R20-11#60f2a7dc2026-10-14
  • R21-11rel:R21-11#240b5a672026-10-14
  • R22-11rel:R22-11#ab46c35e2026-10-14
  • R23-11rel:R23-11#345270f22026-10-14
  • R24-11rel:R24-11#0dc195ca2026-10-14
  • R25-11rel:R25-11#bc1861fe2026-10-14 active
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

函数 SetReceiveHandler [SWS_CM_11356] Upstream: RS_CM_00211, RS_AP_00114, RS_AP_00120, RS_AP_00127, RS_AP_00128, RS_AP_00138

template <typename ExecutorT> void SetReceiveHandler (ara::com::EventReceiveHandler handler, ExecutorT &&executor) noexcept;

As per [SWS_CM_00181] but the method shall execute in a provided context

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h"
Scopeclass <SI-Namespace>::proxy::events::<Event>
Exception-Sicherheitexception safe
Verletzungen (Violations)InvalidHandlerVio- Provided Callable handler does not exist or is null lation

Template-Parameter

ParameterBeschreibung
ExecutorTAs per [SWS_CM_11360]

Parameter (in)

ParameterBeschreibung
handlerAs per [SWS_CM_00181]
executorAs per [SWS_CM_11360]

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CM_11356
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11356@rel:R25-11#bb737f37
Content hash
bb737f37
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11356
Status: valid/unmigrated Version: rel:R25-11#e20529b7 Versionshistorie & Revisions (1 transition, 7 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_11356@rel:R25-11#e20529b7
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#5d1f03342026-09-30
  • R20-11rel:R20-11#fec7d2902026-10-14
  • R21-11rel:R21-11#386272552026-10-14
  • R22-11rel:R22-11#386272552026-10-14
  • R23-11rel:R23-11#a1cf75c52026-10-14
  • R24-11rel:R24-11#0f9051a22026-10-14
  • R25-11rel:R25-11#e20529b72026-10-14 active
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

函数 SetSubscriptionStateChangeHandler [SWS_CM_00333] Upstream: RS_CM_00106

void SetSubscriptionStateChangeHandler (ara::com::SubscriptionState ChangeHandler handler) noexcept;

Set ara::com::SubscriptionState change handler

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: a54152e96424 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

命名空间 proxy::events::<Event> 中的方法 SetSubscriptionStateChangeHandler 注册一个回调函数,一旦事件的状态 ara::com::SubscriptionState 发生更改,Communication Management 就会调用该回调函数([SWS_CM_00333])。该函数被声明为 noexcept 并被视为异常安全([SWS_CM_00333])。

使用与异步语义

对 Subscribe() 的调用原则上是异步工作的;只有当注册的处理程序或 GetSubscriptionState() 返回状态 kSubscribed 时,成功的订阅才可被视为已完成([SWS_CM_12006])。如果订阅未立即生效(例如由于总线协议延迟),或者如果由于重启或网络错误导致服务器实例不可达,则使用 kSubscriptionPending 调用处理程序([SWS_CM_00313])。取消处理程序注册通过 UnsetSubscriptionStateChangeHandler() 进行(EXP ARAComAPI §5.3.1 “Proxy Class API’s”)。

错误处理与边界条件

如果未传递有效的回调对象或该对象为 null,则属于错误情况 InvalidHandlerViolation([SWS_CM_00333])。关于调用顺序,处理程序适宜在 Subscribe() 之前注册,以便可靠地捕获早期的状态转换。 问题 Q-3b9c25c6aa2d0a0f (未决)

交互与变体

为了在给定的线程或工作上下文中执行处理程序,提供了带有参数 ExecutorT 的重载模板变体([SWS_CM_11354])。并行接口存在于 Proxy 触发器([SWS_CM_01107])、Proxy 字段([SWS_CM_11607])以及 Skeleton 级别([SWS_CM_12008])。

基于 AUTOSAR R25-11 的人工智能生成使用说明。

实现者指南即将推出(复杂度 I2)

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h"
Scopeclass <SI-Namespace>::proxy::events::<Event>
Exception-Sicherheitexception safe
Verletzungen (Violations)InvalidHandlerVio- Provided Callable handler does not exist or is null lation

Parameter (in)

ParameterBeschreibung
handlerThe handler that shall be called by Communication Management when the ara::com::SubscriptionState of the event has changed.

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CM_00333
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00333@rel:R25-11#6e245bfa
Content hash
6e245bfa
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00333
Status: valid/unmigrated Version: rel:R25-11#dcf32e4c 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_00333@rel:R25-11#dcf32e4c
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#7e30b3f52026-09-30
  • R19-11rel:R19-11#ae3e84222026-10-14
  • R20-11rel:R20-11#32090fe52026-10-14
  • R21-11rel:R21-11#0c6444642026-10-14
  • R22-11rel:R22-11#b8f5d2782026-10-14
  • R23-11rel:R23-11#a0c415c22026-10-14
  • R24-11rel:R24-11#2a72383b2026-10-14
  • R25-11rel:R25-11#dcf32e4c2026-10-14 active
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

函数 SetSubscriptionStateChangeHandler [SWS_CM_11354] Upstream: RS_CM_00211, RS_AP_00114, RS_AP_00120, RS_AP_00127, RS_AP_00128, RS_AP_00138

template <typename ExecutorT> void SetSubscriptionStateChangeHandler (ara::com::SubscriptionState ChangeHandler handler, ExecutorT &&executor) noexcept;

As per [SWS_CM_00333] but the method shall execute in a provided context

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 5334daeddc44 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

模板成员函数 SetSubscriptionStateChangeHandler 在作用域 proxy::events::<Event> 中用于注册订阅状态更改(ara::com::SubscriptionState)的回调函数([SWS_CM_11354],AP EXP ARAComAPI §5.3.1 “Proxy Class API’s”)。与基础函数 [SWS_CM_00333] 相比,该处理程序不在 Communication Management 的内部上下文中执行,而是通过模板参数 ExecutorT 传递给提供的执行上下文 executor([SWS_CM_11360],AP EXP ARAComAPI §1.0 “SetSubscriptionState with ExecutorT”)。

参数与返回值

  • handler:要调用的 Callable,在事件的 ara::com::SubscriptionState 发生更改时得到通知([SWS_CM_00333])。
  • executor:根据 [SWS_CM_11360] 的执行上下文,处理程序应在其中被处理。
  • 返回值:该函数没有返回值(void)。

错误处理与执行

该函数被声明为 noexcept 并指定为异常安全(exception safe)。如果传入的 Callable handler 不存在或为 null,则会引发 InvalidHandlerViolation([SWS_CM_11354])。

相互作用

带有 ExecutorT 的上下文绑定状态监视模式同样存在于 Proxy 触发器([SWS_CM_01106])以及 Proxy 字段([SWS_CM_11608])。如果不需要移交给特定上下文,则可以使用变体 [SWS_CM_00333]。

本使用说明基于 AUTOSAR 规范 R25-11 自动生成。

实现者指南即将推出(复杂度 I3)

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h"
Scopeclass <SI-Namespace>::proxy::events::<Event>
Exception-Sicherheitexception safe
Verletzungen (Violations)InvalidHandlerVio- Provided Callable handler does not exist or is null lation

Template-Parameter

ParameterBeschreibung
ExecutorTAs per [SWS_CM_11360]

Parameter (in)

ParameterBeschreibung
handlerAs per [SWS_CM_00333]
executorAs per [SWS_CM_11360]

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CM_11354
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11354@rel:R25-11#d7b59b32
Content hash
d7b59b32
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11354
Status: valid/unmigrated Version: rel:R25-11#a42e5998 Versionshistorie & Revisions (1 transition, 7 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_11354@rel:R25-11#a42e5998
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#98929d192026-09-30
  • R20-11rel:R20-11#17b3a5402026-10-14
  • R21-11rel:R21-11#f500c0cd2026-10-14
  • R22-11rel:R22-11#f500c0cd2026-10-14
  • R23-11rel:R23-11#7e227a6e2026-10-14
  • R24-11rel:R24-11#65eecdd42026-10-14
  • R25-11rel:R25-11#a42e59982026-10-14 active
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

函数 SetTransportFaultConditionHandler [SWS_CM_00099] Upstream: RS_CM_00224, RS_E2E_08534

void SetTransportFaultConditionHandler (ara::com::e2e::TransportFault ConditionHandler handler) noexcept;

Provides possibility to register a ara::com::e2e::TransportFaultConditionHandler for a given Proxy Event.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: f1aa03e805b1 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

成员函数 SetTransportFaultConditionHandler 用于在 Proxy 事件([SWS_CM_00099])上注册类型为 ara::com::e2e::TransportFaultConditionHandler 的回调函数。通过此处理程序报告在通信绑定的传输层检测到的传输错误([SWS_CM_00211])。

使用与语义:

  • 调用与参数:该函数接收可调用处理程序对象 handler 且不提供返回值([SWS_CM_00099])。方法签名被声明为 noexcept([SWS_CM_00099])。
  • 传输的错误状态:注册的处理程序在发生错误时报告枚举 ara::com::e2e::TransportFaultCondition 的值,例如在底层传输通道丢弃样本时的 kSampleRejected([SWS_CM_00211])。
  • 执行上下文:对于异步执行,提供了带有附加执行器对象 ExecutorT&& executor 的模板重载([SWS_CM_00100])。

错误处理与边界条件:

  • 异常安全性:该函数被视为异常安全(exception safe)([SWS_CM_00099])。
  • 违规行为:如果传入的可调用对象不存在或为 null,则存在 InvalidHandlerViolation([SWS_CM_00099])。
  • 交互:用于注册 TransportFaultConditionHandler 的等效接口也存在于触发器([SWS_CM_00106])、字段通知器([SWS_CM_00109])和 Skeleton 方法([SWS_CM_00093])。

本使用说明基于 AUTOSAR 规范自动创建。

实现者指南即将推出(复杂度 I2)

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h"
Scopeclass <SI-Namespace>::proxy::events::<Event>
Exception-Sicherheitexception safe
Verletzungen (Violations)InvalidHandlerVio- Provided Callable handler does not exist or is null lation

Parameter (in)

ParameterBeschreibung
handlerHandler of type ara::com::e2e:: TransportFaultConditionHandler to be set

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CM_00099
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00099@rel:R25-11#00e574ec
Content hash
00e574ec
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00099
Status: valid/unmigrated Version: rel:R25-11#e31b701b 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_00099@rel:R25-11#e31b701b
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#019ce7992026-09-30
  • R24-11rel:R24-11#585ff7702026-10-14
  • R25-11rel:R25-11#e31b701b2026-10-14 active
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

函数 SetTransportFaultConditionHandler [SWS_CM_00100] Upstream: RS_CM_00224, RS_E2E_08534

template <typename ExecutorT> void SetTransportFaultConditionHandler (ara::com::e2e::TransportFault ConditionHandler handler, ExecutorT &&executor) noexcept;

Execution Context overload for hierarchicalnamespacelistlowerproxy::proxy:: events::eventname::SetTransportFaultConditionHandler for a given Proxy Event.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 45577c09ced5 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

模板函数 SetTransportFaultConditionHandler 在 Proxy 事件上注册类型为 ara::com::e2e::TransportFaultConditionHandler 的特定于应用程序的处理程序以及用户定义的执行器([SWS_CM_00100])。它代表了带有更少参数的基础函数的执行上下文重载([SWS_CM_00099])。

使用与参数:该方法在 <SI-Namespace>::proxy::events::<Event> 的实例上调用且不返回任何值(void)([SWS_CM_00100])。它接收要调用的处理程序(handler)并获取一个执行器对象(executor 作为万能引用 ExecutorT&&),任何对处理程序的异步执行都会在该对象的上下文中启动([SWS_CM_00100])。函数签名使用 noexcept 声明([SWS_CM_00100])。

错误处理:该操作被指定为 exception safe([SWS_CM_00100])。如果传入了无效或不存在的可调用对象(null),则存在形式为 InvalidHandlerViolation 的违规行为([SWS_CM_00100])。通过注册的处理程序报告检测到的传输错误,例如在底层传输实体丢弃传入数据样本时的 TransportFaultCondition::kSampleRejected([SWS_CM_00211])。

交互:虽然 [SWS_CM_00099] 在没有显式执行器的情况下进行注册,但此重载允许在所需的线程或任务上下文中执行([SWS_CM_00100])。带有执行器的类似重载可用于 Skeleton 方法([SWS_CM_00094])和 Skeleton 字段([SWS_CM_00097]),以及在 Proxy 端用于触发器([SWS_CM_00107])和字段通知器([SWS_CM_00110])。

本使用说明基于规范自动生成。

实现者指南即将推出(复杂度 I2)

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h"
Scopeclass <SI-Namespace>::proxy::events::<Event>
Exception-Sicherheitexception safe
Verletzungen (Violations)InvalidHandlerVio- Provided Callable handler does not exist or is null lation

Parameter (in)

ParameterBeschreibung
handlerHandler of type ara::com::e2e:: TransportFaultConditionHandler to be set
executorExecutor object in which any asynchronous computation spawn shall be invoked

Rückgabewert

TypBeschreibung
None
Siehe auch: [SWS_CM_00099]

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

Record
AUTOSAR/AP/record/SWS_CM_00100
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00100@rel:R25-11#8463df97
Content hash
8463df97
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00100
Status: valid/unmigrated Version: rel:R25-11#8df441ab 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_00100@rel:R25-11#8df441ab
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#bf7821ea2026-09-30
  • R24-11rel:R24-11#bf203b682026-10-14
  • R25-11rel:R25-11#8df441ab2026-10-14 active
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

函数 Subscribe [SWS_CM_00141] Upstream: RS_CM_00103

ara::core::Result< void > Subscribe (std::size_t maxSampleCount) noexcept;

Method to subscribe to a service event. If the Event is already in state kSubscribed or in state kSubscriptionPending at the time of the call, and the provided maxSampleCount value is the same as for the current subscription, the method shall return without action.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 7e840633f446 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

方法 Subscribe 根据 [SWS_CM_00141] 注册用于接收服务事件的 Proxy 元素。该调用具有异步性质:函数的返回仅确认 Communication Management 已接受注册请求(AUTOSAR_AP_EXP_ARAComAPI §5.3.5.2 “Monitoring Event Subscription”)。通过必选参数 maxSampleCount,应用程序明确告知其最多同时保留多少个事件样本,并藉此初始化本地接收缓冲区(AUTOSAR_AP_EXP_ARAComAPI 第40页)。

错误处理与边界条件

若调用时事件已处于状态 kSubscribed 或 kSubscriptionPending,且传入的值 maxSampleCount 与活动订阅一致,则该方法不执行任何操作直接成功返回([SWS_CM_00141])。反之,若在重新订阅时缓存大小不一致,则调用失败并在 ara::core::Result 中返回错误代码 ComErrc::kMaxSampleCountNotRealizable([SWS_CM_00141])。在缺少访问权限时,调用将被拒绝(InsufficientPermissionsViolation,依据 [SWS_CM_00141])。该签名声明为 noexcept 且被视为异常安全。

相互作用

预留的缓存容量限制了后续通过 GetNewSamples 进行的数据接收([SWS_CM_00701]);若应用程序持有的智能指针数量多于指定值,则会触发错误 ComErrc::kMaxSamplesExceeded([SWS_CM_10432])。虽然字段事件以相同方式通过 maxSampleCount 订阅([SWS_CM_11601]),但纯触发器事件不需要指定缓冲区大小([SWS_CM_00723])。

本文本根据规范和设计指南自动生成。

实现者指南即将推出(复杂度 I3)

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h"
Scopeclass <SI-Namespace>::proxy::events::<Event>
Exception-Sicherheitexception safe
Verletzungen (Violations)InsufficientPer- Refused by Grant Enforcement missionsViolation

Parameter (in)

ParameterBeschreibung
maxSampleCountThe cacheSize of the subscription.

Rückgabewert

TypBeschreibung
ara::core::Result< void >• If successful: an ara::core::Result containing a ara:: core::Result::value_type containing a void • If unsuccessful: an ara::core::Result containing an ara:: core::Result::error_type i.e. a corresponding ara:: com::ComErrc

Fehler

FehlercodeBeschreibung
ComErrc::kMaxSampleCountNotRealizablerollback_semantics Provided maxSampleCount for event re-subscription does not match the maxSampleCount for the current subscription

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

Record
AUTOSAR/AP/record/SWS_CM_00141
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00141@rel:R25-11#94b2ac18
Content hash
94b2ac18
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00141
Status: valid/unmigrated Version: rel:R25-11#fab10569 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_00141@rel:R25-11#fab10569
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#639e01622026-09-30
  • R19-11rel:R19-11#19cbb2e62026-10-14
  • R20-11rel:R20-11#42b50f0e2026-10-14
  • R21-11rel:R21-11#7783d2a22026-10-14
  • R22-11rel:R22-11#8604fb982026-10-14
  • R23-11rel:R23-11#c0e97b762026-10-14
  • R24-11rel:R24-11#9932adce2026-10-14
  • R25-11rel:R25-11#fab105692026-10-14 active
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

函数 UnsetReceiveHandler [SWS_CM_00183] Upstream: RS_CM_00203

void UnsetReceiveHandler () noexcept;

Disable service event trigger

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 51bbc4b93d81 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

函数 UnsetReceiveHandler 是作用域 <SI-Namespace>::proxy::events::<Event> 中事件包装器的一部分,并通过头文件 #include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h" 包含([SWS_CM_00183])。它不接受输入参数,也没有返回值(void)。通过调用该函数,此前使用 SetReceiveHandler 为服务事件注册的特定于应用层接收处理程序将被重新移除(EXP ARAComAPI §5.3.2 “RadarService Proxy Class Example”)。由此,接收方应用程序可以随时在事件驱动接收(“event-driven”)与使用 GetNewSamples() 的主动查询模式(“polling style”)之间切换(EXP ARAComAPI §5.3.2 “RadarService Proxy Class Example”)。

错误处理

该方法使用 noexcept 声明,并具有属性 exception safe([SWS_CM_00183])。它在运行时不抛出任何异常,也不返回特定的错误代码。

并发性与绑定

对于已注册的回调处理程序,由于 Communication Management 会序列化调用,因此它不需要是可重入的(EXP ARAComAPI §5.3.2 “RadarService Proxy Class Example”),而 UnsetReceiveHandler 会禁用用于接收后续通知的事件触发器([SWS_CM_00183])。在 DDS 绑定的上下文中,方法 UnsetReceiveHandler() 根据 [SWS_CM_11141] 按照规范 [SWS_CM_11026] 映射到相应的 DataReader。

相互作用

该函数与通过 SetReceiveHandler 进行的注册直接对应([SWS_CM_11140]、EXP ARAComAPI §5.3.1 “Proxy Class API’s”)。相关函数可在其他 Proxy 接口中找到:

  • 对于字段,作用域 <SI-Namespace>::proxy::fields::<Field> 中存在同名函数 UnsetReceiveHandler,它同样被定义为 noexcept 和 exception safe([SWS_CM_11606])。
  • 对于触发器,UnsetReceiveHandler 在作用域 <SI-Namespace>::proxy::triggers::<Trigger> 中可用,但不同的是它被声明为 not exception safe([SWS_CM_11614])。

本使用说明是基于 AUTOSAR 规范 Release R25-11 自动生成的。

实现者指南即将推出(复杂度 I1)

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h"
Scopeclass <SI-Namespace>::proxy::events::<Event>
Exception-Sicherheitexception safe

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CM_00183
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00183@rel:R25-11#a6528a02
Content hash
a6528a02
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00183
Status: valid/unmigrated Version: rel:R25-11#e2575812 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_00183@rel:R25-11#e2575812
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#25a6b80b2026-09-30
  • R19-11rel:R19-11#fd0581df2026-10-14
  • R20-11rel:R20-11#3f0ce8552026-10-14
  • R21-11rel:R21-11#28b9e8462026-10-14
  • R22-11rel:R22-11#28b9e8462026-10-14
  • R23-11rel:R23-11#668a18f72026-10-14
  • R24-11rel:R24-11#2c9f36f32026-10-14
  • R25-11rel:R25-11#e25758122026-10-14 active
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

函数 UnsetSubscriptionStateChangeHandler [SWS_CM_00334] Upstream: RS_CM_00106, RS_AP_00114, RS_AP_00120

void UnsetSubscriptionStateChangeHandler () noexcept;

Unset ara::com::SubscriptionState change handler

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 72320dd7a142 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

成员函数 UnsetSubscriptionStateChangeHandler 用于重置并注销此前在 Proxy 端为订阅状态更改(ara::com::SubscriptionState)设置的回调处理程序([SWS_CM_00334]、EXP ARAComAPI §1.0)。该函数是事件接口的组成部分,位于 proxy::events 下的应用特定命名空间中([SWS_CM_00334]、SWS CommunicationManagement §8.3.2.2.4.5 “UnsetSubscriptionStateChangeHandler”)。为了使用该函数,需要包含生成的 Proxy 头文件 <SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h([SWS_CM_00334])。调用同步进行,不接受任何参数,且不提供返回值([SWS_CM_00334])。

错误处理

根据规范,该函数使用标识符 noexcept 声明,并归类为异常安全(“exception safe”)([SWS_CM_00334])。在出错时它不会触发 C++ 异常,也不会返回错误码([SWS_CM_00334])。

并发性与交互

该函数与用于服务搜索和事件管理的其他 Proxy API(如 Subscribe()、Unsubscribe()、GetSubscriptionState() 和 SetSubscriptionStateChangeHandler())配合使用(EXP ARAComAPI §5.3.1 “Proxy Class API’s”)。解释:在调用之后,大概率不会再通过已注销的处理程序触发任何进一步的通知。 问题 Q-6173c01e6ca93876 (未决)在规范中,针对 Proxy Field([SWS_CM_11609]、SWS CommunicationManagement §8.3.3.2.4.5 “UnsetSubscriptionStateChangeHandler”)和 Trigger([SWS_CM_01108])以及在服务提供端(Skeleton)针对 Event([SWS_CM_12010])和 Trigger([SWS_CM_01112]),也定义了用于重置状态更改处理程序的对称对应物。

本使用说明自动创建,基于 R25-11 版本的 AUTOSAR Adaptive 规范。

实现者指南即将推出(复杂度 I2)

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h"
Scopeclass <SI-Namespace>::proxy::events::<Event>
Exception-Sicherheitexception safe

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CM_00334
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00334@rel:R25-11#6e476a49
Content hash
6e476a49
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00334
Status: valid/unmigrated Version: rel:R25-11#d651d646 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_00334@rel:R25-11#d651d646
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b959e8182026-09-30
  • R19-11rel:R19-11#39ef71622026-10-14
  • R20-11rel:R20-11#39ef71622026-10-14
  • R21-11rel:R21-11#39ef71622026-10-14
  • R22-11rel:R22-11#b7b5edfa2026-10-14
  • R23-11rel:R23-11#45ddf5232026-10-14
  • R24-11rel:R24-11#a6b5c2732026-10-14
  • R25-11rel:R25-11#d651d6462026-10-14 active
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

函数 UnsetTransportFaultConditionHandler [SWS_CM_00105] Upstream: RS_CM_00224, RS_E2E_08534

void UnsetTransportFaultConditionHandler () noexcept;

Provides the possibility to unregister a previously set ara::com::e2e:: TransportFaultConditionHandler for a given Proxy Event.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 91b2726516e3 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

命名空间 <SI-Namespace>::proxy::events::<Event> 中的函数 UnsetTransportFaultConditionHandler 用于注销先前为具体代理事件注册的 ara::com::e2e::TransportFaultConditionHandler [SWS_CM_00105]。函数声明通过头文件 <SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h 提供 AUTOSAR_AP_SWS_CommunicationManagement §8.3.2.2.1.3 “UnsetTransportFaultConditionHandler”。该调用不接受任何参数,且不返回值(void)。

错误处理与异常安全性

该函数使用标识符 noexcept 声明,并被规范为异常安全(exception safe)[SWS_CM_00105]。标准中既未定义特定的错误代码,也未定义向错误或诊断子系统的通知。

流程与边界条件

该调用应当是同步执行的,以便在事件层级上立即关闭 E2E 错误处理,例如当不再需要监视该事件时,或者在释放关联的代理对象之前(Interpretation)。 问题 Q-ff00695fff5407fe (未决)执行后,通信层不再通过该事件先前保存的回调来处理 E2E 传输错误。

相互作用

注销传输错误 Handler 遵循跨不同通信元素的统一模式:

  • 对于代理层级的字段通知器,使用函数 [SWS_CM_00126]。
  • 对于代理触发器,Handler 通过 [SWS_CM_00108] 注销。
  • 在 Skeleton 端,为服务接口的所有方法([SWS_CM_00095])以及字段的 Getter/Setter([SWS_CM_00098])提供了类似的接口。

本使用说明由 AI 基于 AUTOSAR 规范生成。

实现者指南即将推出(复杂度 I2)

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h"
Scopeclass <SI-Namespace>::proxy::events::<Event>
Exception-Sicherheitexception safe

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CM_00105
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00105@rel:R25-11#d580bb2f
Content hash
d580bb2f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00105
Status: valid/unmigrated Version: rel:R25-11#5d00ece2 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_00105@rel:R25-11#5d00ece2
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#cbff526c2026-09-30
  • R24-11rel:R24-11#0a8243012026-10-14
  • R25-11rel:R25-11#5d00ece22026-10-14 active
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

函数 Unsubscribe [SWS_CM_00151] Upstream: RS_CM_00104

void Unsubscribe () noexcept;

Method to unsubscribe from a service event. If the Event is not subscribed to at the time of the call, the method shall return without action.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: fb295b3ef414 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

方法 Unsubscribe() 在代理端终止服务事件的活动订阅([SWS_CM_00151]、EXP_ARAComAPI §5.5)。它在作用域 <SI-Namespace>::proxy::events::<Event> 中定义,并通过头文件 #include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h" 包含([SWS_CM_00151])。该函数不接受任何传入参数,且没有返回值(void)。如果在调用时该事件未被订阅,则方法直接返回而不执行任何操作([SWS_CM_00151])。

错误处理与异常安全性

该操作使用标识符 noexcept 声明,并被规范为异常安全([SWS_CM_00151])。如果在调用方法之前违反了 [SWS_CM_00085] 规定的前置条件,则规定违反应为 DanglingSamplesViolation([SWS_CM_00151])。

相互作用与相关接口

在网络层面上,终止订阅会触发 StopSubscribeEventgroup 类型的 SOME/IP 消息发送([SWS_CM_10378]、SWS_CommunicationManagement §7.2.1.2.6)。在代理接口内,Unsubscribe() 属于订阅管理方法组(EXP_ARAComAPI §5.3.1)。相同的取消订阅语义也适用于服务触发器([SWS_CM_00810]、EXP_ARAComAPI §4)以及 Field 通知([SWS_CM_11602])。

本使用说明自动生成。所有技术规定均基于所引用的 AUTOSAR 规范。

实现者指南即将推出(复杂度 I2)

Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h"
Scopeclass <SI-Namespace>::proxy::events::<Event>
Exception-Sicherheitexception safe
Verletzungen (Violations)DanglingSamplesVi- Precondition [SWS_CM_00085] has been violated. olation

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CM_00151
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00151@rel:R25-11#57aaae3a
Content hash
57aaae3a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00151
Status: valid/unmigrated Version: rel:R25-11#4a3ec37b 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_00151@rel:R25-11#4a3ec37b
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#e72177162026-09-30
  • R19-11rel:R19-11#aeb6a3702026-10-14
  • R20-11rel:R20-11#4ea795962026-10-14
  • R21-11rel:R21-11#4ea795962026-10-14
  • R22-11rel:R22-11#4ea795962026-10-14
  • R23-11rel:R23-11#8175f92c2026-10-14
  • R24-11rel:R24-11#3ccefaa42026-10-14
  • R25-11rel:R25-11#4a3ec37b2026-10-14 active
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

类型别名文档

类型别名 SampleType [SWS_CM_11401] Upstream: RS_CM_00103

using SampleType = <PSampleCppidt>;
Header-Datei#include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_proxy.h"
Scopeclass <SI-Namespace>::proxy::events::<Event>
SymbolSampleType

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

Record
AUTOSAR/AP/record/SWS_CM_11401
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11401@rel:R25-11#1de5bf9d
Content hash
1de5bf9d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11401
Status: valid/unmigrated Version: rel:R25-11#5ce42900 Versionshistorie & Revisions (1 transition, 5 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_11401@rel:R25-11#5ce42900
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#9606a74c2026-09-30
  • R22-11rel:R22-11#076d95632026-10-14
  • R23-11rel:R23-11#076d95632026-10-14
  • R24-11rel:R24-11#99e1a61e2026-10-14
  • R25-11rel:R25-11#5ce429002026-10-14 active
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