类 ara::tsync::TsyncErrorDomain
[SWS_TS_00904] Upstream: RS_AP_00130 , RS_AP_00122 , RS_AP_00127 , RS_AP_00154 , RS_AP_00150
class TsyncErrorDomain final : public ara::core::ErrorDomain {...};
Defines a class representing the Time Synchronization error domain.
用户指南人工智能生成 封装时间同步的错误域,并将描述性文本和 C++ 异常与错误代码相对应。
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 0cbe92e308a4
来源
未决问题(1)
摘要 详细
封装时间同步的错误域,并将描述性文本和 C++ 异常与错误代码相对应。
错误域 ara::tsync::TsyncErrorDomain 将文本描述分配给时间同步的错误代码,并将其连接到平台的错误处理系统([SWS_TS_00906] )。它提供了用于标识和消息查询的方法,并允许将错误转换为特定的 C++ 异常([SWS_TS_00908] )。所有读取操作以及构造均以线程安全方式实现。如果在工具链中禁用了异常支持,则无法通过该域抛出异常。
更多 ›
上下文
类 ara::tsync::TsyncErrorDomain 定义了 AUTOSAR Adaptive Platform 中时间同步功能集群(Time Synchronization,tsync)的错误域。作为通用错误域 ara::core::ErrorDomain 的具体体现,它构成了平台级错误处理机制与模块的时间特定错误状态之间的桥梁。它将枚举 Errc([SWS_TS_01266] )的错误代码进行一一映射,并为发生的同步问题提供文本及语义描述。通过成员函数 Name(),该类为域提供了一个固定的字符串标识符([SWS_TS_00906] )。典型的交互伙伴包括生成错误的模块 tsync 的组件和接口、ara::core 的错误对象,以及必须查询时间信息并分析或转发错误状态的应用程序。
生命周期
该类的实例通过无参构造函数 TsyncErrorDomain() 进行初始化([SWS_TS_00905] )。该构造函数被指定为异常安全(exception safe)和线程安全(thread-safe)([SWS_TS_00905] )。解释:该对象在实践中应该作为长寿命的全局实例提供,因为 AUTOSAR Adaptive Platform 中的错误域在进程运行期内一直保持,并且不具有可变的状态数据。 问题 Q-1e9a43ce9dd340d2 (未决) 在实例化之后,该对象不具有可变的生命周期阶段或内部状态转换。通过 Name()([SWS_TS_00906] )和 Message()([SWS_TS_00907] )进行的所有读取访问均被定义为异常安全和线程安全,因此该实例可以由多个线程并发且无需同步地进行查询。
使用路径
在正常运行流程中,一旦模块 tsync 的操作失败或需要对错误状态进行评估,该错误域就会发挥作用。错误主要通过类型别名 Errc 进行标识,该别名指向枚举 TsyncErrc([SWS_TS_01266] )。为了进行诊断或记录日志,软件组件会使用相应的错误码调用函数 Message(),以获取作为指向字符串的常量指针形式的关联文本消息([SWS_TS_00907] )。此外,还可以通过 Name() 获取该域的标识字符串([SWS_TS_00906] )。
如果错误不作为值传递,而是要在传统异常处理框架下传播,则使用成员函数 ThrowAsException()([SWS_TS_00908] )。该调用接收一个类型为 ara::core::ErrorCode 的对象,据此创建类型 TsyncException 的新实例——也可通过类内部别名 Exception 访问([SWS_TS_01267] )——并将其作为 C++ 异常抛出([SWS_TS_00908] )。下面的流程阐明了这一使用路径。
通过 ThrowAsException 抛出异常 应用 TsyncErrorDomain TsyncException ThrowAsException(errorCode) 根据 errorCode 创建 Instanz erzeugt throw TsyncException Fehlerbehandlung (catch)
时序图:通过 ThrowAsException 触发异常的流程。来源:[SWS_TS_00908] 、[SWS_TS_01267] 。
错误场景
该域的错误范围通过枚举 Errc 表示([SWS_TS_01266] )。错误码被传递给 Message(),该函数始终以异常安全且线程安全的方式返回关联的消息([SWS_TS_00907] )。在使用 ThrowAsException() 时,根据定义,该函数被视为非异常安全的(not exception safe),因为它会中止正常控制流的执行并触发 C++ 异常([SWS_TS_00908] )。
一个关键的边界条件涉及编译器和工具链配置:如果编译过程中禁用了 C++ 异常,根据平台规范,ThrowAsException() 将不参与重载解析([SWS_TS_00908] )。因此,在没有异常支持的特定部署环境中,应用程序必须依赖基于结果对象的值返回机制,且不得调用异常生成功能。
本文由 AI 基于 AUTOSAR Adaptive R25-11 规范生成。
分组依据 类别 历史
成员图 类图 Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.
G
nara__tsync__TsyncErrorDomain367
TsyncErrorDomain
+ TsyncErrorDomain()
+ Message()
+ Name()
+ ThrowAsException()
nara__core__ErrorDomain335
ErrorDomain
nara__tsync__TsyncErrorDomain367->nara__core__ErrorDomain335
详细视图 此版本没有元素数据
构造函数和析构函数 Constructs a new TsyncErrorDomain object.
TsyncErrorDomain () noexcept;
方法 Returns the message associated with errorCode.
const char * Message (CodeType errorCode) const noexcept override;
Returns a string constant associated with TsyncErrorDomain.
const char * Name () const noexcept override;
Creates a new instance of TsyncException from errorCode and throws it as a C++ exception. As per SWS_CORE_10304 this function does not participate in overload resolution when C++ exceptions are disabled in the compiler toolchain.
类型别名 Alias for the error code value enumeration
Alias for the exception base class
点击条目以查看其关系。
基类 派生类 使用 被使用于 继承 自此版本起移除 用于 此类中无关联 函数 AI 评注 打开类页面 无法加载类页面。 调整顺序 调整宽度 调整大纲宽度 章节 阅读时间 SWS 引用 图表 放回中间 调整顺序或拖到标题栏 取消停靠 – 在内容中显示 移到中间栏 作为标签停靠到标题栏 元素 AI 模型 打开审计档案 档案 打开简短版本 打开中等版本 打开完整版本 恢复默认视图 已恢复默认视图 撤销 关闭详细视图 签名 基本信息 值 截至所选版本的最后一次更改 之后的下一次更改 单击:选择版本 无法放在此处:拖到标题栏可停靠,拖到中间栏可取消停靠。 新增 已更改 未更改 已移除 未包含 更改 内容无变化 首次出现于 移除于 没有可用的版本数据。 正在加载版本数据 … 文本 此版本未收录措辞 悬停或单击单元格:与所选版本比较 · 单击版本标题:选择版本 选择版本 属性 版本 元素 只有一个版本有措辞 PDF 中存在,原文尚未导入 首次采集原文 自 {rel} 起未更改 版本颜色 最早版本 最新版本
方法文档
const char * Message (CodeType errorCode) const noexcept override;
Returns the message associated with errorCode.
用户指南
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 73e9c63939b3
来源
未决问题(1)
使用
类ara::tsync::TsyncErrorDomain的方法Message用于针对传入的错误代码同步获取文本错误描述[SWS_TS_00907] 。它通过头文件#include "ara/tsync/tsync_error_domain.h"提供。作为输入参数,该函数接受类型为CodeType的errorCode,并返回指向相应消息的常量字符串指针(const char *)[SWS_TS_00907] 。
错误处理与并发
该接口保证完全的异常安全性(exception safe),并声明为noexcept,因此可以确保调用在不产生 C++ 异常的情况下执行[SWS_TS_00907] 。此外,该函数被指定为thread-safe,可以放心地从多个线程并发调用[SWS_TS_00907] 。理解:返回的const char *可能指向不可变的静态内存,因此调用方无需手动释放内存。 问题 Q-933f88e4fde03016 (未决)
相互作用
作为重写的方法(override),该函数融入了 AUTOSAR Adaptive 的统一错误模型中[SWS_TS_00907] 。类似地,来自头文件#include "apext/tsync/fvm_error_domain.h"的apext::tsync::TsyncFvmErrorDomain也实现了同名的Message函数,用于在相同的线程安全和异常安全性保证下解析特定于域的错误文本[SWS_TS_14210] 。
本使用说明基于规范自动生成。
Header-Datei #include "ara/tsync/tsync_error_domain.h" Scope class ara::tsync::TsyncErrorDomain Exception-Sicherheit exception safe Thread-Sicherheit thread-safe
Parameter (in)
Parameter Beschreibung errorCode The error code number.
Rückgabewert
Typ Beschreibung const char * The message associated with the error code.
Status: valid/unmigrated
Version: rel:R25-11#16ac395e
Versionshistorie & Revisions (1 transition, 4 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_TS_00907@rel:R25-11#16ac395e
Point-in-Time History:
Release:
R25-11 (Current / Active) R23-11 R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (4):
R25-11 rel:R25-11#fb6984b62026-09-30 Inspect R23-11 rel:R23-11#92c825fc2026-10-14 Inspect R24-11 rel:R24-11#16ac395e2026-10-14 Inspect R25-11 rel:R25-11#16ac395e2026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
const char * Name () const noexcept override;
Returns a string constant associated with TsyncErrorDomain.
用户指南
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 86c0a1bb7869
来源
未决问题(1)
用法与调用上下文
类ara::tsync::TsyncErrorDomain的成员函数Name()返回指向标识错误域的常量字符串的指针[SWS_TS_00906] 。该函数需要头文件ara/tsync/tsync_error_domain.h,采用同步调用且不接受任何参数[SWS_TS_00906] 。返回值为类型const char * [SWS_TS_00906] 。理解:由于返回值定义为字符串常量,该内存区域可能具有静态生命周期,调用方既不得修改也不得释放它。 问题 Q-f9cb9d4986d49755 (未决)
错误处理与并发
该方法声明为noexcept,并被指定为具备异常安全性(“exception safe”),从而保证不会抛出异常[SWS_TS_00906] 。对于此调用,不存在特定的错误代码、DET 或 DEM 消息。关于并发行为,该函数被归类为线程安全(“thread-safe”)[SWS_TS_00906] 。因此,可以从多个执行上下文中并行进行调用,而无需外部同步。
协作与相关要求
通过标记override,该函数重写了模块ts中用于域命名的标准化接口[SWS_TS_00906] 。相关的错误域apext::tsync::TsyncFvmErrorDomain实现了相同的设计模式,其来自apext/tsync/fvm_error_domain.h的函数Name()同样以同步、线程安全和异常安全的方式提供相应的标识符[SWS_TS_14209] 。
本使用说明由 AI 生成。所有信息均完全基于 Release R25-11 的规范。
Header-Datei #include "ara/tsync/tsync_error_domain.h" Scope class ara::tsync::TsyncErrorDomain Exception-Sicherheit exception safe Thread-Sicherheit thread-safe
Rückgabewert
Status: valid/unmigrated
Version: rel:R25-11#a90a2e3e
Versionshistorie & Revisions (1 transition, 4 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_TS_00906@rel:R25-11#a90a2e3e
Point-in-Time History:
Release:
R25-11 (Current / Active) R23-11 R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (4):
R25-11 rel:R25-11#c1284f782026-09-30 Inspect R23-11 rel:R23-11#54a3df7c2026-10-14 Inspect R24-11 rel:R24-11#2c121e8a2026-10-14 Inspect R25-11 rel:R25-11#a90a2e3e2026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
void ThrowAsException (const ara::core::ErrorCode &errorCode) const noexcept(false) override;
Creates a new instance of TsyncException from errorCode and throws it as a C++ exception. 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 · 温度: 不可控 · 提示词: 4179c9d54811
来源
未决问题(1)
使用
类ara::tsync::TsyncErrorDomain的成员函数ThrowAsException根据传入的参数errorCode同步创建TsyncException的新实例,并将其作为 C++ 异常([SWS_TS_00908] )抛出。该函数没有返回值(void),并通过头文件ara/tsync/tsync_error_domain.h提供。
错误处理与异常安全性
该方法使用noexcept(false)声明,并被指定为 not exception safe ([SWS_TS_00908] )。理解:该分类的原因可能在于该函数按设计会触发异常,从而脱离常规控制流。 问题 Q-cde17219378516c1 (未决) 不会返回特定的错误代码,而是通过抛出的异常对象进行传递。
并发性与限制
该函数被归类为 thread-safe ([SWS_TS_00908] ),因此可以安全地从并发线程中调用。一项重要限制涉及工具链:根据[SWS_CORE_10304] ,如果在编译器工具链中停用了 C++ 异常,则ThrowAsException不参与重载解析(overload resolution)。
相互作用
该行为符合 AUTOSAR Adaptive 中错误域的统一样式。在apext::tsync::TsyncFvmErrorDomain([SWS_TS_14211] )中可以找到直接对应的功能,其中ThrowAsException抛出apext::tsync::TsyncFvmException,并且同样遵循来自[SWS_CORE_10304] 的规定。
本使用说明基于 AUTOSAR Adaptive Release R25-11 规范。
实现者指南即将推出(复杂度 I1)
Header-Datei #include "ara/tsync/tsync_error_domain.h" Scope class ara::tsync::TsyncErrorDomain Exception-Sicherheit not exception safe Thread-Sicherheit thread-safe
Parameter (in)
Parameter Beschreibung errorCode The error to throw.
Rückgabewert
Status: valid/unmigrated
Version: rel:R25-11#627a4cdd
Versionshistorie & Revisions (1 transition, 4 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_TS_00908@rel:R25-11#627a4cdd
Point-in-Time History:
Release:
R25-11 (Current / Active) R23-11 R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (4):
R25-11 rel:R25-11#b956a8742026-09-30 Inspect R23-11 rel:R23-11#52fe73302026-10-14 Inspect R24-11 rel:R24-11#627a4cdd2026-10-14 Inspect R25-11 rel:R25-11#627a4cdd2026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
TsyncErrorDomain () noexcept;
Constructs a new TsyncErrorDomain object.
用户指南
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 2dee9c422a64
来源
未决问题(1)
本使用说明基于规范自动生成。
实现者指南即将推出(复杂度 I1)
Header-Datei #include "ara/tsync/tsync_error_domain.h" Scope class ara::tsync::TsyncErrorDomain Exception-Sicherheit exception safe Thread-Sicherheit thread-safe
Status: valid/unmigrated
Version: rel:R25-11#db2535d3
Versionshistorie & Revisions (1 transition, 4 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_TS_00905@rel:R25-11#db2535d3
Point-in-Time History:
Release:
R25-11 (Current / Active) R23-11 R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (4):
R25-11 rel:R25-11#fc141cdf2026-09-30 Inspect R23-11 rel:R23-11#c63893f02026-10-14 Inspect R24-11 rel:R24-11#db2535d32026-10-14 Inspect R25-11 rel:R25-11#db2535d32026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
类型别名文档
using Errc = TsyncErrc ;
Alias for the error code value enumeration
Status: valid/unmigrated
Version: rel:R25-11#5f14392b
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_TS_01266@rel:R25-11#5f14392b
Point-in-Time History:
Release:
R25-11 (Current / Active) R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (3):
R25-11 rel:R25-11#079a906f2026-09-30 Inspect R24-11 rel:R24-11#5f14392b2026-10-14 Inspect R25-11 rel:R25-11#5f14392b2026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
using Exception = TsyncException ;
Alias for the exception base class
Status: valid/unmigrated
Version: rel:R25-11#1b160d53
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_TS_01267@rel:R25-11#1b160d53
Point-in-Time History:
Release:
R25-11 (Current / Active) R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (3):
R25-11 rel:R25-11#857684a62026-09-30 Inspect R24-11 rel:R24-11#1b160d532026-10-14 Inspect R25-11 rel:R25-11#1b160d532026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
gemini-3.8-flash-low· 2026-10-13 · 德文原文