DEENESPTFRRUARHIKOZHNL

类 ara::com::e2e::ComE2EErrorDomain

[SWS_CM_12503] Upstream: RS_AP_00122, RS_AP_00127, RS_AP_00130

class ComE2EErrorDomain final :              public ara::core::ErrorDomain {...};

Defines a class representing the E2E error domain

Header-Datei#include "ara/com/e2e/e2e_error_domain.h"
Forwarding-Header#include "ara/com/com_fwd.h"
Scopenamespace ara::com::e2e
Basisklasse(n)ara::core::ErrorDomain
Unique IDAs per ara::com::e2e::ComE2EErrorDomain in [SWS_CORE_90023]

用户指南人工智能生成

定义 Adaptive 通信中端到端保护校验错误的错误域。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: bfe73c7b7e47 来源 未决问题(2)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

定义 Adaptive 通信中端到端保护校验错误的错误域。

类 ara::com::e2e::ComE2EErrorDomain 定义了 AUTOSAR Adaptive 通信管理中端到端保护错误的错误域,并分配枚举 ComE2EErrc 的错误代码([SWS_CM_12504])。如果服务器端 E2E 校验失败,则会在错误响应中传输该域的 ara::core::ErrorCode,并在客户端通过 ara::core::Result 提供([SWS_CM_00033])。这个无状态、异常安全的类允许选择基于值的错误处理或通过 ThrowAsException() 进行错误处理,其中在禁用 C++ 编译器异常时该异常方法不可用([SWS_CM_12509])。

上下文

类 ara::com::e2e::ComE2EErrorDomain 为 AUTOSAR Adaptive Platform 的通信管理(ara::com)内部的端到端保护(E2E)定义错误域。它从基类 ara::core::ErrorDomain 最终派生(final),并封装在消息 E2E 验证期间发生的特定于域的错误。

在通信模型中,ComE2EErrorDomain 充当受 E2E 保护的交互中错误状态的核心标识符和转换器。通过类型别名 Errc([SWS_CM_12504])和 Exception([SWS_CM_12505]),该错误域将类型特定的枚举 ComE2EErrc 以及派生的异常类型 ComE2EException 绑定到 ara::core 的错误特定生态系统中。如果服务器运行时环境在通过 E2E_check([SWS_CM_90421])校验方法请求时检测到保护故障,则会传输 E2E 错误响应。根据 [SWS_CM_00033],该响应消息的有效负载传输域 ara::com::e2e::ComE2EErrorDomain 的 ara::core::ErrorCode,其错误值对应于 E2E_check 的结果(AUTOSAR_AP_SWS_CommunicationManagement §7.4.1.2.4 “Payload of the E2E Error Response”)。在客户端,该错误在移除 E2E 头部([SWS_CM_90475])后被反序列化([SWS_CM_90476]、[SWS_CM_10473]),并作为 ara::core::Result 内的错误状态传递给应用程序(AUTOSAR_AP_SWS_CommunicationManagement §7.4.1.2.5 “Deserializing the payload”)。

ComE2EContext ComE2EErrorDomain ComE2EErrorDomain ErrorDomain ErrorDomain ComE2EErrorDomain->ErrorDomain erbt von ComE2EErrc ComE2EErrc ComE2EErrorDomain->ComE2EErrc Alias Errc ComE2EException ComE2EException ComE2EErrorDomain->ComE2EException Alias Exception ErrorCode ErrorCode ErrorCode->ComE2EErrorDomain referenziert

上下文图:ComE2EErrorDomain 嵌入到 ara::core 和 ara::com 的类型系统中。来源:[SWS_CM_12504]、[SWS_CM_12505]、[SWS_CM_12506]、[SWS_CM_00033]。

生命周期

实例对象通过默认构造函数 constexpr ComE2EErrorDomain() noexcept 创建([SWS_CM_12506])。通过标记为 constexpr,错误域可以在编译时即构造完成。它通常可能作为不可变的进程级单例提供,从而使对该域的引用在整个程序运行期间保持有效。 问题 Q-bd1ba0230650e246 (未决)由于该类声明为 final,因此不允许进一步派生。

该类不管理任何可变状态,并提供完全的异常安全性([SWS_CM_12506])。检查方法 Name()([SWS_CM_12507])和 Message()([SWS_CM_12508])声明为 const 以及 noexcept。因此,跨多个执行线程的并发读取访问可确保线程安全且无需同步开销。

使用路径

典型的使用路径在失败的 E2E 校验的传输和客户端评估框架下进行:

  1. 校验与错误生成:在接收到受 E2E 保护的请求时,服务器通过 E2E_check 执行验证([SWS_CM_90421])。如果该校验失败,中间件将序列化错误响应,其有效负载包含带有 ara::com::e2e::ComE2EErrorDomain 的 ara::core::ErrorCode([SWS_CM_00033])。
  2. 传输与反序列化:在客户端,在协议处理并移除保护头部([SWS_CM_90475])之后,对有效负载进行反序列化([SWS_CM_90476])。通信框架以 ara::core::Result 形式提供结果,该结果封装了传输的错误代码([SWS_CM_10473]、AUTOSAR_AP_SWS_CommunicationManagement §7.4.1.2.5 “Deserializing the payload”)。
  3. 错误诊断:Adaptive Application 检查 ara::core::Result。对于错误记录,Name() 提供域的标识符([SWS_CM_12507]),而 Message() 返回具体数值代码的人类可读文本([SWS_CM_12508])。
  4. 错误处理:应用程序既可以基于值评估错误,也可以在启用异常处理时通过 ThrowAsException() 触发类型特定的异常([SWS_CM_12509])。
方法调用时的 E2E 错误处理流程ClientApplicationara::com MiddlewareServerMethodenaufruf absenden转发带有 E2E 头的请求执行 E2E_checkE2E-Fehler erkannt带有 ErrorCode (ComE2EErrorDomain) 的错误响应移除头部并反序列化有效负载传递带有 ErrorCode 的 ara::core::ResultaltFehlerauswertung durch Applikation查询 Message() 以获取错误文本Ausnahmebehandlung aktiviertThrowAsException() wirft ComE2EException

时序图:方法调用期间 E2E 错误的传输和处理。来源:[SWS_CM_00033]、[SWS_CM_90421]、[SWS_CM_90475]、[SWS_CM_90476]、[SWS_CM_10473]、[SWS_CM_12509]。

错误场景

如果验证期间发生 E2E 错误,则通过枚举 ComE2EErrc 识别该错误,该枚举可通过类的类型别名 Errc 获取([SWS_CM_12504])。ComE2EErrc 中的错误代码应直接对应于 E2E_check 的定义结果值。 问题 Q-07fc2c01567ac537 (未决)

为了通过 C++ 异常传递错误,方法 ThrowAsException() 实例化类型为 ara::com::e2e::ComE2EException(别名 Exception,[SWS_CM_12505])的异常并将其抛出([SWS_CM_12509])。该方法声明为 noexcept(false)。如果在编译器工具链中禁用了 C++ 异常,则根据 [SWS_CM_12509],ThrowAsException() 不参与重载解析。因此,在没有异常支持的系统中,必须强制通过对 ara::core::Result 和 ara::core::ErrorCode 的基于值的检查来执行错误处理。

本指南基于 AUTOSAR Adaptive R25-11 规范自动生成。

成员图

构造函数和析构函数

1

类型别名

2

类图

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

G nara__com__e2e__ComE2EErrorDomain501 ComE2EErrorDomain + ComE2EErrorDomain() + Message() + Name() + ThrowAsException() nara__core__ErrorDomain335 ErrorDomain nara__com__e2e__ComE2EErrorDomain501->nara__core__ErrorDomain335

详细视图

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

构造函数和析构函数

Constructs a new ara::com::e2e::ComE2EErrorDomain object

constexpr ComE2EErrorDomain () noexcept;

方法

Message 函数

Returns the message associated with errorCode

const char * Message (CodeType errorCode) const noexcept override;
Name 函数

Returns a string constant associated with the ara::com::e2e::ComE2EErrorDomain

const char * Name () const noexcept override;

Creates a new instance of ara::com::e2e::ComE2EException from errorCode and throws it. As per [SWS_CORE_10304], this function does not participate in overload resolution when C++ exceptions are disabled in the compiler toolchain.

void ThrowAsException (const ara::core::ErrorCode &errorCode) const noexcept(false) override;

类型别名

Errc 类型别名

Alias for the error code value enumeration

using Errc = ComE2EErrc;
Exception 类型别名

Alias for the exception base class

方法文档

函数 ComE2EErrorDomain [SWS_CM_12506] Upstream: RS_AP_00120, RS_AP_00130

constexpr ComE2EErrorDomain () noexcept;

Constructs a new ara::com::e2e::ComE2EErrorDomain object

Header-Datei#include "ara/com/e2e/e2e_error_domain.h"
Scopeclass ara::com::e2e::ComE2EErrorDomain
Exception-Sicherheitexception safe

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

Record
AUTOSAR/AP/record/SWS_CM_12506
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_12506@rel:R25-11#a61d7701
Content hash
a61d7701
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_12506
Status: valid/unmigrated Version: rel:R25-11#a62d5b05 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_12506@rel:R25-11#a62d5b05
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#d712101a2026-09-30
  • R22-11rel:R22-11#2403535e2026-10-14
  • R23-11rel:R23-11#87f9b8242026-10-14
  • R24-11rel:R24-11#e5169c462026-10-14
  • R25-11rel:R25-11#a62d5b052026-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

函数 Message [SWS_CM_12508] Upstream: RS_AP_00120, RS_AP_00121, RS_AP_00130

const char * Message (CodeType errorCode) const noexcept override;

Returns the message associated with errorCode

Header-Datei#include "ara/com/e2e/e2e_error_domain.h"
Scopeclass ara::com::e2e::ComE2EErrorDomain
Exception-Sicherheitexception safe

Parameter (in)

ParameterBeschreibung
errorCodeThe error code number.

Rückgabewert

TypBeschreibung
const char *The message associated with the errorCode

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

Record
AUTOSAR/AP/record/SWS_CM_12508
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_12508@rel:R25-11#0b96be9a
Content hash
0b96be9a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_12508
Status: valid/unmigrated Version: rel:R25-11#32e2efef 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_12508@rel:R25-11#32e2efef
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#b21127012026-09-30
  • R22-11rel:R22-11#295fdf5d2026-10-14
  • R23-11rel:R23-11#bb3bdd142026-10-14
  • R24-11rel:R24-11#9ddb48eb2026-10-14
  • R25-11rel:R25-11#32e2efef2026-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

函数 Name [SWS_CM_12507] Upstream: RS_AP_00120, RS_AP_00130

const char * Name () const noexcept override;

Returns a string constant associated with the ara::com::e2e::ComE2EErrorDomain

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

类 ara::com::e2e::ComE2EErrorDomain([SWS_CM_12507])的成员函数 Name 以同步方式且无传入参数被调用。它用于唯一定位该错误域,并返回一个指向静态字符串常量(const char *)的指针,该常量代表 E2E 通信错误域的名称([SWS_CM_12507])。接口声明通过头文件 ara/com/e2e/e2e_error_domain.h 提供([SWS_CM_12507])。

在错误处理方面,该函数被指定为 noexcept 和 exception safe([SWS_CM_12507])。因此,它不会抛出异常,在运行时也不会失败;对于此调用,未规定特定的错误码或错误处理机制。

在并发性和边界条件方面,不存在特殊的调用或生命周期限制。由于该方法仅读取不可变字符串,因此其实现很可能是完全可重入的,并且对于来自任意线程的并发调用都是安全的。 问题 Q-c8158d40c80ce9c5 (未决)

在架构协作中,该方法遵循平台范围内标准化的全局唯一错误域标识符规定(AUTOSAR_AP_SWS_CommunicationManagement §Änderungshistorie “Added unique ErrorDomain identifiers”)。在相关的错误域中也可以找到类似的结构,例如 ara::com::ComErrorDomain([SWS_CM_11331])或 apext::com::secoc::ComSecOcFvmErrorDomain([SWS_CM_12518])。

本使用说明由 AI 生成,基于 AUTOSAR 规范 R25-11 的有效负载。

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

Header-Datei#include "ara/com/e2e/e2e_error_domain.h"
Scopeclass ara::com::e2e::ComE2EErrorDomain
Exception-Sicherheitexception safe

Rückgabewert

TypBeschreibung
const char *As per ara::com::e2e::ComE2EErrorDomain in [SWS_ CORE_90023]

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

Record
AUTOSAR/AP/record/SWS_CM_12507
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_12507@rel:R25-11#6041c994
Content hash
6041c994
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_12507
Status: valid/unmigrated Version: rel:R25-11#76bee0a8 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_12507@rel:R25-11#76bee0a8
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#82490fb52026-09-30
  • R22-11rel:R22-11#d1c7c1b62026-10-14
  • R23-11rel:R23-11#e2230dff2026-10-14
  • R24-11rel:R24-11#2bcb3cdb2026-10-14
  • R25-11rel:R25-11#76bee0a82026-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

函数 ThrowAsException [SWS_CM_12509] Upstream: RS_AP_00120, RS_AP_00121, RS_AP_00130

void ThrowAsException (const ara::core::ErrorCode &errorCode) const noexcept(false) override;

Creates a new instance of ara::com::e2e::ComE2EException from errorCode and throws it. As per [SWS_CORE_10304], this function does not participate in overload resolution when C++ exceptions are disabled in the compiler toolchain.

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

根据 [SWS_CM_12509],错误域 ara::com::e2e::ComE2EErrorDomain 的成员函数 ThrowAsException 用于将传入的类型为 ara::core::ErrorCode 的错误码 errorCode 封装为类型为 ara::com::e2e::ComE2EException 的类型化 C++ 异常并同步触发。该函数没有返回值(void),并通过头文件 ara/com/e2e/e2e_error_domain.h 提供(AUTOSAR_AP_SWS_CommunicationManagement §8.15.3.2.2.3 “ThrowAsException”)。

错误处理与边界条件

该方法声明为 noexcept(false),并显式指定为非异常安全(“not exception safe”),因为其常规执行流程即为抛出异常。[SWS_CORE_10304] 定义了一项编译器层面的重要边界条件:若在编译器的工具链中禁用了 C++ 异常,则该函数不参与重载解析。因此,调用方必须确保目标系统支持并启用了基于异常的错误处理。

相互作用

Interpretation:作为被重写的方法(override),该函数可能是 AUTOSAR Adaptive 多态错误域机制的一部分,用于将通用错误码转换为特定的异常对象。 问题 Q-f1777f936e0fdac0 (未决)在通信管理的相关错误域中可以找到类似函数:根据 [SWS_CM_11333],ComErrorDomain::ThrowAsException 抛出 ara::com::ComException(AUTOSAR_AP_SWS_CommunicationManagement §8.12.4.2.2.3 “ThrowAsException”),而根据 [SWS_CM_12520],ComSecOcFvmErrorDomain::ThrowAsException 实例化并抛出 apext::com::secoc::ComSecOcFvmException(AUTOSAR_AP_SWS_CommunicationManagement §C.2.3.2.2.3 “ThrowAsException”)。

本文由 AI 基于 AUTOSAR Adaptive Release R25-11 规范生成。

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

Header-Datei#include "ara/com/e2e/e2e_error_domain.h"
Scopeclass ara::com::e2e::ComE2EErrorDomain
Exception-Sicherheitnot exception safe

Parameter (in)

ParameterBeschreibung
errorCodeThe error to throw.

Rückgabewert

TypBeschreibung
None

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

Record
AUTOSAR/AP/record/SWS_CM_12509
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_12509@rel:R25-11#be5cb25e
Content hash
be5cb25e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_12509
Status: valid/unmigrated Version: rel:R25-11#6800d5fd 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_12509@rel:R25-11#6800d5fd
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#9edd60642026-09-30
  • R22-11rel:R22-11#5a8987a42026-10-14
  • R23-11rel:R23-11#dba786162026-10-14
  • R24-11rel:R24-11#c360ebbc2026-10-14
  • R25-11rel:R25-11#6800d5fd2026-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

类型别名文档

类型别名 Errc [SWS_CM_12504] Upstream: RS_AP_00120, RS_AP_00130

using Errc = ComE2EErrc;

Alias for the error code value enumeration

Header-Datei#include "ara/com/e2e/e2e_error_domain.h"
Scopeclass ara::com::e2e::ComE2EErrorDomain
SymbolErrc

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

Record
AUTOSAR/AP/record/SWS_CM_12504
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_12504@rel:R25-11#7ae57bee
Content hash
7ae57bee
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_12504
Status: valid/unmigrated Version: rel:R25-11#af4a83f4 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_12504@rel:R25-11#af4a83f4
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#0b22d3802026-09-30
  • R22-11rel:R22-11#02f85fce2026-10-14
  • R23-11rel:R23-11#8d5411e82026-10-14
  • R24-11rel:R24-11#af4a83f42026-10-14
  • R25-11rel:R25-11#af4a83f42026-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

类型别名 Exception [SWS_CM_12505] Upstream: RS_AP_00120, RS_AP_00130

using Exception = ComE2EException;

Alias for the exception base class

Header-Datei#include "ara/com/e2e/e2e_error_domain.h"
Scopeclass ara::com::e2e::ComE2EErrorDomain
SymbolException

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

Record
AUTOSAR/AP/record/SWS_CM_12505
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_12505@rel:R25-11#a17af7d1
Content hash
a17af7d1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_12505
Status: valid/unmigrated Version: rel:R25-11#3abf347f 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_12505@rel:R25-11#3abf347f
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#1e7de5be2026-09-30
  • R22-11rel:R22-11#4730f6b22026-10-14
  • R23-11rel:R23-11#fbe99c782026-10-14
  • R24-11rel:R24-11#3abf347f2026-10-14
  • R25-11rel:R25-11#3abf347f2026-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