DEENESPTFRRUARHIKOZHNL

命名空间 ara::com

用户指南人工智能生成

为 AUTOSAR Adaptive 中的面向服务的通信提供基类型、错误域和接口。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 9676f1a12dfa 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

为 AUTOSAR Adaptive 中的面向服务的通信提供基类型、错误域和接口。

该命名空间通过 Proxy 连接服务使用者并通过 Skeleton 连接服务提供者(ARAComAPI §7.6 “meta-model to Implementation”),为面向服务的通信提供核心构件。交互包括异步服务搜索、通过 Future 返回的方法调用,以及通过定义状态进行的事件订阅([SWS_CM_00310])。核心职责包括正确解析实例标识符,以及遵守配置的样本配额与发送间隔([SWS_CM_10432])。

上下文

命名空间 ara::com 为 AUTOSAR Adaptive Platform 内的面向服务的通信(Communication Management)提供核心类型与机制。架构模型严格区分服务使用者与服务提供者:在使用者端(R-Port),客户端应用程序通过生成的 Proxy 实例进行交互(ARAComAPI §7.6 “meta-model to Implementation”),而服务提供者在服务器端通过 Skeleton 实现公开其功能(ARAComAPI §6.2 “Definition of BatteryState”)。

技术中间件(Binding)在 Proxy 与 Skeleton 之间进行调解。InstanceIdentifier 用于识别和区分各个服务实例,并通过 InstanceIdentifierContainer 管理具体实例的集合([SWS_CM_00319])。该平台支持多绑定场景,在这些场景中,抽象模型标识符被解析为技术 Binding 和实例的列表(ARAComAPI §6.6 “InstanceIdentifier Resolution”)。

client Client (ara::com Proxy) binding Communication Management (Binding / Middleware) client->binding Dienstsuche / Methodenaufruf / Event-Abonnement binding->client Future 兑现 / 事件交付 skeleton Server (ara::com Skeleton) binding->skeleton Dispatch / Methodenaufruf skeleton->binding Methodenantwort / Event-Bereitstellung

上下文图:服务通信中 Proxy、中间件 Binding 与 Skeleton 之间的相互协作。来源:ARAComAPI §7.6 “meta-model to Implementation”、ARAComAPI §6.6 “InstanceIdentifier Resolution”、[SWS_CM_10432]。

生命周期

在 ara::com 中,服务和通信连接遵循明确定义的状态模型。常规服务可用性通过具有值 kAvailable 和 kNotAvailable 的枚举 ServiceState 表示([SWS_CM_01071])。可通过已注册的 ServiceStateHandler 监控状态变化([SWS_CM_01072])。

对于事件(Event)和字段,SubscriptionState 控制具有状态 kNotSubscribed、kSubscriptionPending 和 kSubscribed 的订阅生命周期([SWS_CM_00310])。状态转换被异步报告给 SubscriptionStateChangeHandler([SWS_CM_00311])。从 kNotSubscribed 到 kSubscriptionPending 的转换推测是通过向底层传输 Binding 发送订阅请求而立即发生的。 问题 Q-60f7ecdf5768217a (未决)

在服务实现端,MethodCallProcessingMode 控制传入方法调用的并发性:kPoll 用于手动轮询,kEvent 用于并发、事件驱动的处理,而 kEventSingleThread 用于单线程中的顺序处理([SWS_CM_00301])。样本管理(Samples)在发送端使用 SampleAllocateePtr 来优化分配(例如通过共享内存的零拷贝方法)([SWS_CM_00308]、ARAComAPI §6.18 “Event Allocate/Send sample Binding implementer hint”),在接收端使用 SamplePtr([SWS_CM_10432])。

使用路径

使用服务的典型流程包括以下步骤:

  1. 服务搜索:使用者启动对兼容服务实例的搜索。在可用时,中间件通过 FindServiceHandler 传递包含已找到句柄的 ServiceHandleContainer,以及可用于停止正在运行的搜索的 FindServiceHandle([SWS_CM_00383]、[SWS_CM_00304])。
  2. Proxy 实例化:使用匹配的句柄在客户端本地创建 Proxy 实例(ARAComAPI §6.3 “Handling of optional data elements on Skeleton side”)。
  3. 方法调用:方法调用重载方法包装器类的括号运算符。传递输入参数,且调用返回一个封装输出参数的 ara::com::Future(ARAComAPI §6.10 “Adjust Method Class”、ARAComAPI §6.12 “Adjust Method Class”)。
  4. 结果处理:客户端同步或异步获取结果(例如通过 get()),并在访问可选字段元素前检查其是否存在(ARAComAPI §6.3 “Handling of optional data elements on Skeleton side”)。
  5. 事件接收:已订阅 Event、字段或触发器的传入数据通过已注册的回调进行处理,例如 EventReceiveHandler([SWS_CM_00309])、FieldReceiveHandler([SWS_CM_11615])或 TriggerReceiveHandler([SWS_CM_00351])。
Service-Interaktion von Dienstsuche bis ErgebnisabfrageAnwendung (Client)ProxySkeleton (Server)Use Case: 服务搜索与实例化FindServiceHandler registrierenServiceHandleContainer liefernProxy(handle) erzeugenUse Case: 方法调用与 FutureMethodenaufruf()Service-Aufruf weiterleiten返回 ara::com::FutureErgebnis bereitstellenFuture::get() aufrufenErgebnisdaten liefern

时序图:从服务搜索经由带 Future 的方法调用到结果获取的调用顺序。来源:[SWS_CM_00383]、[SWS_CM_00304]、ARAComAPI §6.3 “Handling of optional data elements on Skeleton side”、ARAComAPI §6.10 “Adjust Method Class”。

错误场景

通信子系统中的错误条件通过 ComErrorDomain 和 ComErrc 中的错误代码进行映射([SWS_CM_10432])。通过 GetComErrorDomain() 访问域([SWS_CM_11334]),而具体错误通过 MakeErrorCode()([SWS_CM_11335])实例化。在异常情况下抛出 ComException。

典型的错误场景包括:

  • 服务可用性:对未提供服务的调用会导致 ComErrc::kServiceNotOffered 或 ComErrc::kServiceNotAvailable([SWS_CM_10432])。
  • 配置与实例解析错误:若标识符无法映射到 InstanceIdentifier,系统会报告 ComErrc::kInstanceIDNotResolvable([SWS_CM_10432]、ARAComAPI §6.6 “InstanceIdentifier Resolution”)。
  • 资源与订阅限制:若应用程序持有的 SamplePtr 实例多于在 Subscribe() 中约定的数量,则会发生 ComErrc::kMaxSamplesExceeded([SWS_CM_10432])。若重新订阅时最大样本数量出现偏差,会导致 ComErrc::kMaxSampleCountNotRealizable([SWS_CM_10432])。
  • 协议与时序条件:发生网络错误或安全通信错误时,报告 ComErrc::kCommunicationFailure。若低于发送间隔,传输将以 ComErrc::kMinimumSendIntervalViolationError 失败([SWS_CM_10432])。
  • 字段处理:未初始化的字段值会导致 ComErrc::kFieldValueNotInitialized,缺失的 Set-Handler 会导致 ComErrc::kFieldSetHandlerNotSet([SWS_CM_10432])。

本指南基于 AUTOSAR Adaptive Platform Release R25-11 的规范。

主题图

KI-gestützte Gruppierung auf Basis der Records und Spezifikationsauszüge; keine Gliederung aus der AUTOSAR-Spezifikation.

类图

Abgerundete Rahmen = Namespace- bzw. Klassen-Scopes; hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); graue Boxen = namespace-fremde bzw. externe Basisklassen. Klicken öffnet die jeweilige Klassen- bzw. cppreference-Seite.

G cluster_ns ara::com nara__com__ComErrorDomain ComErrorDomain next_ara__core__ErrorDomain ara::core::ErrorDomain nara__com__ComErrorDomain->next_ara__core__ErrorDomain nara__com__ComException ComException next_ara__core__Exception ara::core::Exception nara__com__ComException->next_ara__core__Exception nara__com__FindServiceHandle «struct» FindServiceHandle nara__com__InstanceIdentifier InstanceIdentifier nara__com__SamplePtr SamplePtr nara__com__ServiceIdentifierType ServiceIdentifierType nara__com__ServiceVersionType ServiceVersionType

详细视图

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

Fehlerbehandlung

Defines a class representing the Communication error domain.

继承自 ara::core::ErrorDomain

Defines a class for exceptions to be thrown by the API.

继承自 ara::core::Exception

Returns a reference to the ara::com::ComErrorDomain object

constexpr const ara::core::ErrorDomain & GetComErrorDomain () noexcept;

Creates an instance of ara::core::ErrorCode

ComErrc 枚举

Defines the error codes for the ara::com::ComErrorDomain

enum class ComErrc : ara::core::ErrorDomain::CodeType {...};

Dienstidentität

Unique identifier of a specific AdaptivePlatformServiceInstance, to distinguish different instances of exactly the same service

Specifies a Service Identifier The exact type may be overridden by the Communication Management software provider

Specifies a Service Version

Holds a list of ara::com::InstanceIdentifiers. The assigned data type is allowed to be changed by the Communication Management software provider, but must adhere to [container.requirements.general] and [sequence.reqmts] requirements as per [30] A ara::core::Vector ([SWS_CORE_01301]) for example fulfills these requirements.

using InstanceIdentifierContainer = ara::core::Vector<Instance Identifier>;

Dienstsuche

The exact definition of ara::com::FindServiceHandle is Communication Management implementation specific

FindServiceHandler 类型别名

Callback function invoked if service availability changes. It takes as input parameter a handle container containing handles for all matching service instances and a ara::com:: FindServiceHandle which can be used to invoke StopFindService() from within the ara::com::FindServiceHandler.

using FindServiceHandler = std::function<void(ServiceHandle Container<T>, FindServiceHandle)>;

Holds a list of service handles and is used as a return value of any of the FindService() methods) • [SWS_CM_00122] • [SWS_CM_00622] . The assigned data type is allowed to be changed by the Communication Management software provider, but must adhere to [container.requirements.general] and [sequence.reqmts] requirements as per [30]. A ara::core::Vector ([SWS_CORE_ 01301]) for example fulfills these requirements.

using ServiceHandleContainer = ara::core::Vector<T>;

Datenempfang

Emulates a std::unique_ptr to an event sample. The ara::com::SamplePtr behaves as a std::unique_ptr as long as the event/ field is subscrib ≙ std::unique_ptr

The subscription state of an event.

enum class SubscriptionState : std::uint8_t {...};
EventReceiveHandler 类型别名

Callback function invoked if new event data arrives for an event. The event receiver must provide the function implementation which is not required to be re-entrant. Usage of std::function is recommended but not mandatory. ≙ std::function

using EventReceiveHandler = std::function<void()>;
FieldReceiveHandler 类型别名

Callback function invoked if a new notification arrives for a field. The field receiver must provide the function implementation which is not required to be re-entrant. Usage of std::function is recommended but not mandatory. ≙ std::function

using FieldReceiveHandler = std::function<void()>;
SampleAllocateePtr 类型别名

Pointer to an allocated (by Communication Management) data sample. The implementation is allowed to be changed by the Communication Management software provider.

using SampleAllocateePtr = std::unique_ptr<T>;

Callback function invoked if ara::com::SubscriptionState of an event has changed.

using SubscriptionStateChangeHandler = std::function<void(Subscription State)>;

A function wrapper for the handler function that gets called in case a new trigger arrives for an event. The trigger receiver must provide the function implementation which is not required to be re-entrant. Usage of std::function is recommended but not mandatory. ≙ std::function

using TriggerReceiveHandler = std::function<void()>;

Dienstzustand

Processing modes for the service implementation.

enum class MethodCallProcessingMode : std::uint8_t {...};

The state of the service from GetServiceState()

enum class ServiceState : std::uint8_t {...};
ServiceStateHandler 类型别名

Functor used as input arguments for any of the SetServiceStateChangeHandler() methods: • [SWS_CM_01074] • [SWS_CM_01076]

using ServiceStateHandler = std::function<void(ServiceState)>;

枚举

枚举 ComErrc [SWS_CM_10432] Upstream: RS_AP_00130, RS_AP_00122, RS_AP_00127

enum class ComErrc :         ara::core::ErrorDomain::CodeType {...};

Defines the error codes for the ara::com::ComErrorDomain

Header-Datei#include "ara/com/com_error_domain.h"
Forwarding-Header#include "ara/com/com_fwd.h"
Scopenamespace ara::com
SymbolComErrc
Basistypara::core::ErrorDomain::CodeType

Werte

EnumeratorBeschreibung
kServiceNotAvailable=1 Service is not available after being previously offered via Offer
Service()
kMaxSamplesExceeded=2 Application holds more ara::com::SamplePtrs than commited in Subscribe() Samples were possibly skipped.
kCommunicationFailure=3 The network binding reported a recoverable communications error or a secure communication failure
kFieldValueNotInitialized=6 Field value has yet not been initialized via Update() (see [SWS_CM_00128]
kFieldSetHandlerNotSet=7 Field SetHandler has not been registered via RegisterSet Handler()
kServiceNotOffered= 11 Service has not yet been offered via OfferService()
kInstanceIDNotResolvable= 15 The ara::core::InstanceSpecifier is valid but could not be resolved/mapped to an existing ara::com:: InstanceIdentifier
kMaxSampleCountNotRealizable= 16 Provided maxSampleCount for event re-subscription does not match the maxSampleCount for the current subscription
kUnknownApplicationError= 22 A remote service returned an unconfigured application error.
kMinimumSendIntervalViolationError= 23 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.
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 67f5508c5e1b 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

根据 [SWS_CM_10432],枚举 ComErrc 针对符合 EXP ARAComAPI §2 “Recoverable Errors” 的可恢复错误(Recoverable Errors)定义了 ara::com::ComErrorDomain 的标准化错误代码。它在通信管理的同步和异步 API 的返回类型(如 ara::core::Result 或 ara::core::Future)中传输,以在客户端或服务器上下文中精确指示功能错误原因。

枚举项涵盖了服务生命周期和数据传输过程中的特定错误情况:

  • 服务生命周期与绑定:kServiceNotOffered 表示服务尚未通过 OfferService() 提供([SWS_CM_00101]),而 kServiceNotAvailable 则指示其在此期间丢失。当无法解析 InstanceSpecifier 时,将发生 kInstanceIDNotResolvable([SWS_CM_00118])。
  • 事件与样本订阅:kMaxSamplesExceeded 针对超出承诺的 SamplePtr 配额发出警告,而 kMaxSampleCountNotRealizable 在通过 [SWS_CM_00141] 重新订阅时报告不匹配的值。
  • 字段与传输:kFieldValueNotInitialized 指示在 Update() 之前缺少初始化([SWS_CM_00119]),kFieldSetHandlerNotSet 指示缺少 setter 处理器。本地网络问题(例如在通过 [SWS_CM_00721] 发送触发时)会导致 kCommunicationFailure([SWS_CM_10517])。此外,kMinimumSendIntervalViolationError 针对时钟速率违规进行处理,kUnknownApplicationError 则针对意外的服务器错误进行处理([SWS_CM_10432])。

作为纯枚举类型,ComErrc 没有自身的状态;因此,在调用线程中对错误值的读取和比较操作应该是并发安全的。 问题 Q-013822ee5711df2b (未决)实际的错误检查由应用程序在评估相应结果对象后负责。

本文由 AI 创建并整理。

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

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

Record
AUTOSAR/AP/record/SWS_CM_10432
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_10432@rel:R25-11#a9411e68
Content hash
a9411e68
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_10432
Status: valid/unmigrated Version: rel:R25-11#a1bb25ac 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_10432@rel:R25-11#a1bb25ac
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#0540727f2026-09-30
  • R19-11rel:R19-11#e85687322026-10-14
  • R20-11rel:R20-11#d76a076f2026-10-14
  • R21-11rel:R21-11#bba466f32026-10-14
  • R22-11rel:R22-11#defb05652026-10-14
  • R23-11rel:R23-11#6109561d2026-10-14
  • R24-11rel:R24-11#75455b1d2026-10-14
  • R25-11rel:R25-11#a1bb25ac2026-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

枚举 MethodCallProcessingMode [SWS_CM_00301] Upstream: RS_CM_00211

enum class MethodCallProcessingMode :               std::uint8_t {...};

Processing modes for the service implementation.

Header-Datei#include "ara/com/types.h"
Forwarding-Header#include "ara/com/com_fwd.h"
Scopenamespace ara::com
SymbolMethodCallProcessingMode
Basistypstd::uint8_t

Werte

EnumeratorBeschreibung
kPollPolling mode
kEventEvent driven and concurrent mode
kEventSingleThreadEvent driven, sequential mode
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: ef6d7e9a36c3 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

枚举 ara::com::MethodCallProcessingMode 定义了服务实例上传入方法调用的处理模式 [SWS_CM_00301]。它作为参数传递给骨架类的构造函数,其中指定了默认值 ara::com::MethodCallProcessingMode::kEvent [SWS_CM_00130]、[SWS_CM_00152]、[SWS_CM_00153]。

枚举项控制服务方法的并发性和执行上下文 [SWS_CM_00301]:

  • kPoll:轮询模式。来自服务使用者的传入调用不会自动执行。服务实现通过调用 ProcessNextMethodCall() 主动控制其执行 [SWS_CM_00199]。挂起的方法在此调用的上下文中同步处理。这确保了在服务侧对线程和上下文切换的完全控制 ARAComAPI §6.3.3 “Event Buffering Approaches”。
  • kEvent:用于并行处理传入调用的事件驱动并发模式。
  • kEventSingleThread:用于单独执行方法调用的事件驱动顺序模式。

错误处理和限制:

  • 如果向骨架构造函数传递了无效模式,则会发生违规 WrongMethodCallProcessingModeViolation [SWS_CM_00130]、[SWS_CM_00153]。
  • 在以 kEvent 构造的骨架上调用 ProcessNextMethodCall() 也会导致 WrongMethodCallProcessingModeViolation [SWS_CM_00199](解读:这应该同样适用于 kEventSingleThread,因为该方法仅适用于 kPoll)。 问题 Q-bcd9f07119db44fb (未决)

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

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

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

Record
AUTOSAR/AP/record/SWS_CM_00301
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00301@rel:R25-11#d1a997c8
Content hash
d1a997c8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00301
Status: valid/unmigrated Version: rel:R25-11#80be2356 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_00301@rel:R25-11#80be2356
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#0d3dccbc2026-09-30
  • R19-11rel:R19-11#25b194492026-10-14
  • R20-11rel:R20-11#25b194492026-10-14
  • R21-11rel:R21-11#0ad7b7102026-10-14
  • R22-11rel:R22-11#0ad7b7102026-10-14
  • R23-11rel:R23-11#6f47e07b2026-10-14
  • R24-11rel:R24-11#80be23562026-10-14
  • R25-11rel:R25-11#80be23562026-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

枚举 ServiceState [SWS_CM_01071]

enum class ServiceState :            std::uint8_t {...};

The state of the service from GetServiceState()

Header-Datei#include "ara/com/types.h"
Forwarding-Header#include "ara/com/com_fwd.h"
Scopenamespace ara::com
SymbolServiceState
Basistypstd::uint8_t

Werte

EnumeratorBeschreibung
kNotAvailable=0 Service is not available
kAvailable=1 Service is available

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

Record
AUTOSAR/AP/record/SWS_CM_01071
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_01071@rel:R25-11#ef721d10
Content hash
ef721d10
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_01071
Status: valid/unmigrated Version: rel:R25-11#b7ec2dcd 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_01071@rel:R25-11#b7ec2dcd
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#8a4f13912026-09-30
  • R22-11rel:R22-11#e2b5988f2026-10-14
  • R23-11rel:R23-11#e2b5988f2026-10-14
  • R24-11rel:R24-11#e3fd192b2026-10-14
  • R25-11rel:R25-11#b7ec2dcd2026-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

枚举 SubscriptionState [SWS_CM_00310] Upstream: RS_CM_00103, RS_CM_00104, RS_CM_00106

enum class SubscriptionState :              std::uint8_t {...};

The subscription state of an event.

Header-Datei#include "ara/com/types.h"
Forwarding-Header#include "ara/com/com_fwd.h"
Scopenamespace ara::com
SymbolSubscriptionState
Basistypstd::uint8_t

Werte

EnumeratorBeschreibung
kSubscribedSubscription is active
kNotSubscribedSubscription is not active
kSubscriptionPendingSubscription is pending
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: c356f26fdfb2 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

枚举 SubscriptionState [SWS_CM_00310] 在命名空间 ara::com 中基于类型 std::uint8_t 表示订阅的当前状态。它定义了三种不同的状态:

  • kNotSubscribed:订阅处于未激活状态。
  • kSubscriptionPending:订阅仍在进行中,或者在发生故障后正在恢复连接。
  • kSubscribed:订阅处于激活状态。

方法 GetSubscriptionState() 用于同步查询,该方法在Proxy Event [SWS_CM_00316]、Proxy Field [SWS_CM_11604] 和Trigger [SWS_CM_01105] 以及Skeleton Trigger [SWS_CM_01109] 上提供。所有这些查询函数均声明为 noexcept,并确保完全的异常安全性。

为了对状态变化做出异步响应,应用程序可以通过 SetSubscriptionStateChangeHandler() 注册类型为 SubscriptionStateChangeHandler 的回调 [SWS_CM_00311] [SWS_CM_00333]。如果传入了无效或空的处理程序,则会发生违规 InvalidHandlerViolation [SWS_CM_00333]。注销通过 UnsetSubscriptionStateChangeHandler() 执行 [SWS_CM_00334]。此外,通过带有 ExecutorT 的模板重载,还可以指定回调的执行上下文 [SWS_CM_11354]。

在Proxy实例的生命周期中,SubscriptionState 与自动更新紧密结合:如果服务实例发生故障,方法调用将失败,并且 GetSubscriptionState() 会针对先前订阅的Event返回 kSubscriptionPending ARAComAPI §6.1 “Auto Updating of Proxy Instance”。一旦服务实例通过Service Discovery再次可达,Communication Management就会透明地更新连接;随后 GetSubscriptionState() 自动再次返回 kSubscribed AUTOSAR_AP_EXP_ARAComAPI §5.3.5.2。在此过程中,无需手动重新创建Proxy或重新订阅。

本文本由AI生成,用作AUTOSAR规范的参考性补充。

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

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

Record
AUTOSAR/AP/record/SWS_CM_00310
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00310@rel:R25-11#18427882
Content hash
18427882
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00310
Status: valid/unmigrated Version: rel:R25-11#7680ddc8 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_00310@rel:R25-11#7680ddc8
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#316fa4842026-09-30
  • R19-11rel:R19-11#783a62a12026-10-14
  • R20-11rel:R20-11#783a62a12026-10-14
  • R21-11rel:R21-11#149257f62026-10-14
  • R22-11rel:R22-11#149257f62026-10-14
  • R23-11rel:R23-11#27673e7a2026-10-14
  • R24-11rel:R24-11#7680ddc82026-10-14
  • R25-11rel:R25-11#7680ddc82026-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

类型别名

类型别名 EventReceiveHandler [SWS_CM_00309] Upstream: RS_CM_00203, RS_AP_00114, RS_AP_00120

using EventReceiveHandler = std::function<void()>;

Callback function invoked if new event data arrives for an event. The event receiver must provide the function implementation which is not required to be re-entrant. Usage of std::function is recommended but not mandatory.

Header-Datei#include "ara/com/types.h"
Scopenamespace ara::com
SymbolEventReceiveHandler

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

Record
AUTOSAR/AP/record/SWS_CM_00309
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00309@rel:R25-11#449340ec
Content hash
449340ec
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00309
Status: valid/unmigrated Version: rel:R25-11#223e8e61 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_00309@rel:R25-11#223e8e61
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#7b6d05552026-09-30
  • R19-11rel:R19-11#395af5f02026-10-14
  • R20-11rel:R20-11#395af5f02026-10-14
  • R21-11rel:R21-11#db7e05e52026-10-14
  • R22-11rel:R22-11#395af5f02026-10-14
  • R23-11rel:R23-11#2779dae62026-10-14
  • R24-11rel:R24-11#dcc5017d2026-10-14
  • R25-11rel:R25-11#223e8e612026-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

类型别名 FieldReceiveHandler [SWS_CM_11615] Upstream: RS_CM_00203, RS_AP_00114, RS_AP_00120

using FieldReceiveHandler = std::function<void()>;

Callback function invoked if a new notification arrives for a field. The field receiver must provide the function implementation which is not required to be re-entrant. Usage of std::function is recommended but not mandatory.

Header-Datei#include "ara/com/types.h"
Scopenamespace ara::com
SymbolFieldReceiveHandler

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

Record
AUTOSAR/AP/record/SWS_CM_11615
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11615@rel:R25-11#c4a2550f
Content hash
c4a2550f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11615
Status: valid/unmigrated Version: rel:R25-11#799baa76 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_11615@rel:R25-11#799baa76
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#cfafcfd52026-09-30
  • R24-11rel:R24-11#fae206d62026-10-14
  • R25-11rel:R25-11#799baa762026-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

类型别名 FindServiceHandler [SWS_CM_00383] Upstream: RS_CM_00102

using FindServiceHandler = std::function<void(ServiceHandle Container<T>, FindServiceHandle)>;

Callback function invoked if service availability changes. It takes as input parameter a handle container containing handles for all matching service instances and a ara::com:: FindServiceHandle which can be used to invoke StopFindService() from within the ara::com::FindServiceHandler.

Header-Datei#include "ara/com/types.h"
Scopenamespace ara::com
SymbolFindServiceHandler

Template-Parameter

ParameterBeschreibung
TData type of data sample
Siehe auch: [SWS_CM_00125]

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

Record
AUTOSAR/AP/record/SWS_CM_00383
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00383@rel:R25-11#e9775896
Content hash
e9775896
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00383
Status: valid/unmigrated Version: rel:R25-11#4bb13392 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_00383@rel:R25-11#4bb13392
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#5bc754b22026-09-30
  • R19-11rel:R19-11#e9374da52026-10-14
  • R20-11rel:R20-11#e9374da52026-10-14
  • R21-11rel:R21-11#e9374da52026-10-14
  • R22-11rel:R22-11#10a374092026-10-14
  • R23-11rel:R23-11#40b111b32026-10-14
  • R24-11rel:R24-11#29b459892026-10-14
  • R25-11rel:R25-11#4bb133922026-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

类型别名 InstanceIdentifierContainer [SWS_CM_00319] Upstream: RS_CM_00101, RS_CM_00102, RS_AP_00114, RS_AP_00122

using InstanceIdentifierContainer = ara::core::Vector<Instance Identifier>;

Holds a list of ara::com::InstanceIdentifiers. The assigned data type is allowed to be changed by the Communication Management software provider, but must adhere to [container.requirements.general] and [sequence.reqmts] requirements as per [30] A ara::core::Vector ([SWS_CORE_01301]) for example fulfills these requirements.

Literaturverzeichnis SWS CommunicationManagement: [30] ISO/IEC 14882:2014, Information technology – Programming languages – C++ – www.iso.org

Header-Datei#include "ara/com/types.h"
Scopenamespace ara::com
SymbolInstanceIdentifierContainer

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

Record
AUTOSAR/AP/record/SWS_CM_00319
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00319@rel:R25-11#a05a89fc
Content hash
a05a89fc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00319
Status: valid/unmigrated Version: rel:R25-11#fa8d6921 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_00319@rel:R25-11#fa8d6921
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#ef7a629e2026-09-30
  • R19-11rel:R19-11#a868f3472026-10-14
  • R20-11rel:R20-11#92724e662026-10-14
  • R21-11rel:R21-11#431357ea2026-10-14
  • R22-11rel:R22-11#2ac28cb72026-10-14
  • R23-11rel:R23-11#bc0629c32026-10-14
  • R24-11rel:R24-11#e851c8ff2026-10-14
  • R25-11rel:R25-11#fa8d69212026-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

类型别名 SampleAllocateePtr [SWS_CM_00308] Upstream: RS_CM_00201

using SampleAllocateePtr = std::unique_ptr<T>;

Pointer to an allocated (by Communication Management) data sample. The implementation is allowed to be changed by the Communication Management software provider.

The precondition defined in [SWS_CM_00086] must be fulfilled. Otherwise it is considered a violation.

Header-Datei#include "ara/com/types.h"
Scopenamespace ara::com
SymbolSampleAllocateePtr

Template-Parameter

ParameterBeschreibung
TData type of data sample

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

Record
AUTOSAR/AP/record/SWS_CM_00308
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00308@rel:R25-11#f8c4d8d7
Content hash
f8c4d8d7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00308
Status: valid/unmigrated Version: rel:R25-11#039f8d79 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_00308@rel:R25-11#039f8d79
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#adf0f02d2026-09-30
  • R19-11rel:R19-11#5ad593f62026-10-14
  • R20-11rel:R20-11#5ad593f62026-10-14
  • R21-11rel:R21-11#5ad593f62026-10-14
  • R22-11rel:R22-11#5ad593f62026-10-14
  • R23-11rel:R23-11#2153a31d2026-10-14
  • R24-11rel:R24-11#039f8d792026-10-14
  • R25-11rel:R25-11#039f8d792026-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

类型别名 ServiceHandleContainer [SWS_CM_00304] Upstream: RS_CM_00102

using ServiceHandleContainer = ara::core::Vector<T>;

Holds a list of service handles and is used as a return value of any of the FindService() methods) • [SWS_CM_00122] • [SWS_CM_00622] . The assigned data type is allowed to be changed by the Communication Management software provider, but must adhere to [container.requirements.general] and [sequence.reqmts] requirements as per [30]. A ara::core::Vector ([SWS_CORE_ 01301]) for example fulfills these requirements.

Literaturverzeichnis SWS CommunicationManagement: [30] ISO/IEC 14882:2014, Information technology – Programming languages – C++ – www.iso.org

Header-Datei#include "ara/com/types.h"
Scopenamespace ara::com
SymbolServiceHandleContainer

Template-Parameter

ParameterBeschreibung
Tservice handle

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

Record
AUTOSAR/AP/record/SWS_CM_00304
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00304@rel:R25-11#108a622a
Content hash
108a622a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00304
Status: valid/unmigrated Version: rel:R25-11#6d2b7cf6 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_00304@rel:R25-11#6d2b7cf6
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#7afe7d372026-09-30
  • R19-11rel:R19-11#5e4ae44f2026-10-14
  • R20-11rel:R20-11#f25f37592026-10-14
  • R21-11rel:R21-11#be1867dc2026-10-14
  • R22-11rel:R22-11#5d1adbf22026-10-14
  • R23-11rel:R23-11#156ff0142026-10-14
  • R24-11rel:R24-11#19b088802026-10-14
  • R25-11rel:R25-11#6d2b7cf62026-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

类型别名 ServiceStateHandler [SWS_CM_01072]

using ServiceStateHandler = std::function<void(ServiceState)>;

Functor used as input arguments for any of the SetServiceStateChangeHandler() methods: • [SWS_CM_01074] • [SWS_CM_01076]

Header-Datei#include "ara/com/types.h"
Scopenamespace ara::com
SymbolServiceStateHandler

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

Record
AUTOSAR/AP/record/SWS_CM_01072
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_01072@rel:R25-11#e11728aa
Content hash
e11728aa
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_01072
Status: valid/unmigrated Version: rel:R25-11#6c72f419 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_01072@rel:R25-11#6c72f419
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#c869ffc22026-09-30
  • R22-11rel:R22-11#152adeba2026-10-14
  • R23-11rel:R23-11#152adeba2026-10-14
  • R24-11rel:R24-11#720d0f2a2026-10-14
  • R25-11rel:R25-11#6c72f4192026-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

类型别名 SubscriptionStateChangeHandler [SWS_CM_00311] Upstream: RS_CM_00103, RS_CM_00104, RS_CM_00106

using SubscriptionStateChangeHandler = std::function<void(Subscription State)>;

Callback function invoked if ara::com::SubscriptionState of an event has changed.

Header-Datei#include "ara/com/types.h"
Scopenamespace ara::com
SymbolSubscriptionStateChangeHandler
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: e8a7f7be42ec 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

命名空间ara::com中的类型别名SubscriptionStateChangeHandler在头文件ara/com/types.h中被声明为std::function<void(SubscriptionState)>([SWS_CM_00311])。它指定了应用程序自定义回调的函数签名,一旦已订阅代理事件的ara::com::SubscriptionState发生更改,就会触发该回调([SWS_CM_00311]、EXP_ARAComAPI §5.3 “Proxy Class API’s”)。调用时,新的订阅状态作为参数直接传递;未规定返回值([SWS_CM_00311])。

处理程序的注册通过相应代理类的方法SetSubscriptionStateChangeHandler()执行(EXP_ARAComAPI §5.3.1 “Proxy Class API’s”、EXP_ARAComAPI §5.3 “Proxy Class API’s”)。该操作返回一个ara::core::Result<void>(EXP_ARAComAPI §5.3 “Proxy Class API’s”),应用程序开发人员可以通过它同步检查注册期间可能出现的错误。通过根据[SWS_CM_00334]调用UnsetSubscriptionStateChangeHandler(),可以有针对性地移除已注册的回调(EXP_ARAComAPI §1 “Introduction”、EXP_ARAComAPI §5.3.1 “Proxy Class API’s”)。

关于执行流程和并发性,状态通知是异步进行的。处理程序的调用推测可能发生在通信基础设施的线程上下文中(解释)。 问题 Q-8dda0cd4de0070bf (未决)因此,回调的实现必须快速返回,并且必须构建为可重入或线程安全的。该处理程序的交互紧密融入事件订阅的生命周期中,特别是与Subscribe()、Unsubscribe()和GetSubscriptionState()结合时(EXP_ARAComAPI §5.3.1 “Proxy Class API’s”)。

本文由 AI 生成;它不能替代阅读规范。

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

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

Record
AUTOSAR/AP/record/SWS_CM_00311
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00311@rel:R25-11#d72291bd
Content hash
d72291bd
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00311
Status: valid/unmigrated Version: rel:R25-11#21ac17ff 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_00311@rel:R25-11#21ac17ff
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#ee97a2592026-09-30
  • R19-11rel:R19-11#e22ba4e32026-10-14
  • R20-11rel:R20-11#e22ba4e32026-10-14
  • R21-11rel:R21-11#e22ba4e32026-10-14
  • R22-11rel:R22-11#e22ba4e32026-10-14
  • R23-11rel:R23-11#5878c7452026-10-14
  • R24-11rel:R24-11#287ce5e32026-10-14
  • R25-11rel:R25-11#21ac17ff2026-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

类型别名 TriggerReceiveHandler [SWS_CM_00351] Upstream: RS_CM_00203, RS_AP_00114, RS_AP_00120

using TriggerReceiveHandler = std::function<void()>;

A function wrapper for the handler function that gets called in case a new trigger arrives for an event. The trigger receiver must provide the function implementation which is not required to be re-entrant. Usage of std::function is recommended but not mandatory.

Header-Datei#include "ara/com/types.h"
Scopenamespace ara::com
SymbolTriggerReceiveHandler

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

Record
AUTOSAR/AP/record/SWS_CM_00351
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00351@rel:R25-11#7473004f
Content hash
7473004f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00351
Status: valid/unmigrated Version: rel:R25-11#fc6a9105 Versionshistorie & Revisions (1 transition, 6 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_00351@rel:R25-11#fc6a9105
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#7e62cd342026-09-30
  • R21-11rel:R21-11#4d5accb82026-10-14
  • R22-11rel:R22-11#7e2a7c042026-10-14
  • R23-11rel:R23-11#9b69b1902026-10-14
  • R24-11rel:R24-11#f8c62c622026-10-14
  • R25-11rel:R25-11#fc6a91052026-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

自由函数文档

函数 GetComErrorDomain [SWS_CM_11334] Upstream: RS_AP_00120, RS_AP_00130

constexpr const ara::core::ErrorDomain & GetComErrorDomain () noexcept;

Returns a reference to the ara::com::ComErrorDomain object

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

使用

命名空间 ara::com 中的全局函数 GetComErrorDomain 提供对错误域对象 ara::com::ComErrorDomain 的引用 [SWS_CM_11334]。该声明通过头文件 ara/com/com_error_domain.h 引入,并作为同步且无参数的调用进行 SWS CommunicationManagement §8.12.3.1.1 “GetComErrorDomain”。作为返回值,该函数提供类型为 const ara::core::ErrorDomain& 的常量引用,该引用表示系统中的通信错误域。

错误处理与异常安全性

该接口被显式声明为 noexcept,并被视为异常安全(exception safe)[SWS_CM_11334]。由于函数调用总是成功的,因此不会发生运行时错误。因此,调用者无需为函数调用本身设置错误处理。规范中未为此检索定义特定的错误码、反馈通道或发往DET或DEM的报告。

并发性与交互

得益于带有 constexpr 和 noexcept 的声明,该函数推测是无状态、无副作用且完全可重入和线程安全的;推测它也可以在编译时执行。 问题 Q-21aafe1fdcb5997b (未决)提供的错误域在整个系统中用作参考实例,以根据其所属域来验证来自Communication Management操作的错误码,并将其与其他错误源区分开来 [SWS_CM_11334]。

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

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

Header-Datei#include "ara/com/com_error_domain.h"
Scopenamespace ara::com
Exception-Sicherheitexception safe

Rückgabewert

TypBeschreibung
const ara::core::ErrorDomain &Reference to the ara::com::ComErrorDomain object

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

Record
AUTOSAR/AP/record/SWS_CM_11334
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11334@rel:R25-11#2efaf157
Content hash
2efaf157
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11334
Status: valid/unmigrated Version: rel:R25-11#540ecd6a 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_11334@rel:R25-11#540ecd6a
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#84138e222026-09-30
  • R20-11rel:R20-11#6ab718532026-10-14
  • R21-11rel:R21-11#86c8bf622026-10-14
  • R22-11rel:R22-11#d0609f3d2026-10-14
  • R23-11rel:R23-11#93b5f2792026-10-14
  • R24-11rel:R24-11#8fd9abb62026-10-14
  • R25-11rel:R25-11#540ecd6a2026-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

函数 MakeErrorCode [SWS_CM_11335] Upstream: RS_AP_00120, RS_AP_00121, RS_AP_00130

constexpr ara::core::ErrorCode MakeErrorCode (ara::com::ComErrc code, ara::core::ErrorDomain::SupportDataType data) noexcept;

Creates an instance of ara::core::ErrorCode

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

辅助函数ara::com::MakeErrorCode用于创建ara::core::ErrorCode的实例([SWS_CM_11335]、SWS CommunicationManagement §8.12.3.1.2 “MakeErrorCode”)。它在命名空间ara::com中通过头文件#include "ara/com/com_error_domain.h"声明。作为输入参数,它接收类型为ara::com::ComErrc的错误号code以及类型为ara::core::ErrorDomain::SupportDataType的厂商自定义附加数据data,并同步返回相应的错误对象。

关于执行安全性,该函数被指定为noexcept,并被明确归类为异常安全(“exception safe”)([SWS_CM_11335])。该辅助函数未规定通过 DET 或 DEM 发送运行时消息,因为其纯粹用于构造错误对象。由于声明为constexpr和noexcept,该函数推测无副作用且是可重入的,从而也允许在编译时以及从并发上下文中进行调用。 问题 Q-43f118920f402d86 (未决)

该架构模式遵循 Adaptive AUTOSAR 的全平台错误模型,并类似地为相邻功能域提供:针对端到端保护存在函数ara::com::e2e::MakeErrorCode([SWS_CM_12511]、SWS CommunicationManagement §8.15.2.1.2 “MakeErrorCode”),而针对安全功能则提供了apext::com::secoc::MakeErrorCode([SWS_CM_12522]、SWS CommunicationManagement §C.2.2.1.2 “MakeErrorCode”)。

该文本由 AI 生成,用作参考指引。

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

Header-Datei#include "ara/com/com_error_domain.h"
Scopenamespace ara::com
Exception-Sicherheitexception safe

Parameter (in)

ParameterBeschreibung
codeError code number.
dataVendor defined data associated with the error

Rückgabewert

TypBeschreibung
ara::core::ErrorCodeAn ara::core::ErrorCode object.

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

Record
AUTOSAR/AP/record/SWS_CM_11335
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11335@rel:R25-11#3ec199fd
Content hash
3ec199fd
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11335
Status: valid/unmigrated Version: rel:R25-11#ed0a7b5c 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_11335@rel:R25-11#ed0a7b5c
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#e57005e72026-09-30
  • R20-11rel:R20-11#3105d5f82026-10-14
  • R21-11rel:R21-11#14964c692026-10-14
  • R22-11rel:R22-11#d4a3decc2026-10-14
  • R23-11rel:R23-11#abab96942026-10-14
  • R24-11rel:R24-11#555364d52026-10-14
  • R25-11rel:R25-11#ed0a7b5c2026-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