类 ara::diag::DiagUdsNrcErrorDomain
[SWS_DM_00529] Upstream: RS_AP_00119
class DiagUdsNrcErrorDomain final : public ara::core::ErrorDomain {...};
Error domain for errors originating from several diagnostic classes.
用户指南人工智能生成 提供 UDS 特定的 Negative Response Code,用于诊断功能中的标准化错误处理。
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: ee46722aaae6
来源
未决问题(1)
摘要 详细
提供 UDS 特定的 Negative Response Code,用于诊断功能中的标准化错误处理。
错误域 ara::diag::DiagUdsNrcErrorDomain 封装了来自诊断处理的错误码,并将其映射到标准化的 UDS 错误值 [SWS_DM_00529] 。当外部诊断处理器返回相应错误时,Diagnostic Server 据此推导出一个 1 字节 NRC,并向测试仪发送 UDS 否定响应 [SWS_DM_02060] 。作为一项重要约束条件,派生出的 NRC 值必须严格在 0x01 和 0xFE 之间的取值范围内。
更多 ›
上下文
类 ara::diag::DiagUdsNrcErrorDomain 代表源自不同诊断类的错误的标准错误域(AUTOSAR_AP_SWS_Diagnostics §8.12.3 “Class: DiagUdsNrcErrorDomain” )。作为基类 ara::core::ErrorDomain 的特化 [SWS_DM_00529] ,它构成了应用端诊断处理与 UDS 协议(Unified Diagnostic Services)之间的基本纽带。在 AUTOSAR Adaptive Platform 内部,它在外部诊断处理器或软件应用程序与 Diagnostic Server(Diagnostic Management, DM)之间进行协调。如果外部诊断处理器在执行命令时报告属于该域的错误,Diagnostic Server Instance 会对其进行针对性评估 [SWS_DM_02060] 。此外,在读取数据元素失败时,该域还会与可配置环境条件的检查进行交互 [SWS_DM_00970] 。
生命周期
ara::diag::DiagUdsNrcErrorDomain 的实例化通过默认构造函数 constexpr DiagUdsNrcErrorDomain() noexcept 进行 [SWS_DM_00532] 。该构造函数被指定为异常安全且线程安全 [SWS_DM_00532] 。由于 constexpr 设计以及无状态错误域的性质,其实例通常推测作为不可变的全进程对象提供(解释)。 问题 Q-72b7b9c623c1efe0 (未决) 构成性的检查方法 Name() [SWS_DM_00533] 和 Message() [SWS_DM_00534] 也是线程安全且异常安全的。由于该对象不管理可变状态,因此其生命周期绑定到诊断应用程序的整个运行时上下文,并允许无限制的并发读取访问。
使用路径
典型使用路径描述了在服务执行期间诊断错误的指示和转换:
外部诊断处理器执行诊断功能并检测到错误条件。
应用程序使用类型 Errc(DiagUdsNrcErrc 的别名)[SWS_DM_00530] 创建带有域 ara::diag::DiagUdsNrcErrorDomain 错误码的 ara::core::Result,并将其返回给 Diagnostic Server Instance [SWS_DM_02060] 。
Diagnostic Server Instance 接收返回值并识别出存在错误域 ara::diag::DiagUdsNrcErrorDomain [SWS_DM_02060] 。
DM 从错误码 DiagUdsNrcErrc 中派生出 UDS-NRC,例如通过 static_cast 转换为 1 字节 NRC 值 [SWS_DM_02059] 。
Diagnostic Server 使用携带派生 NRC 值的 UDS 否定响应(negative response )回复请求的诊断测试仪 [SWS_DM_02060] 。
UDS-NRC 的派生与传输 应用 Diagnostic Server 诊断客户端 带有 DiagUdsNrcErrorDomain 的 Result 识别 DiagUdsNrcErrorDomain 的错误 从 DiagUdsNrcErrc 派生 NRC(static_cast) 带有派生 NRC (0x01-0xFE) 的否定响应(Negative Response)
时序图:在诊断执行出错时 UDS-NRC 的派生与传递。来源:[SWS_DM_02059] 、[SWS_DM_02060] 。
对多 DID 请求适用特殊处理:尽管结果中出现 ara::diag::DiagUdsNrcErrorDomain 的错误指示外部诊断处理器针对单个元素失败,但只要活动会话中支持至少一个 DID,在请求多个 DID 时仍可导致肯定的总体响应(AUTOSAR_AP_SWS_Diagnostics §7.3 “Multi-DID-Requests” )。
错误场景
在使用和通过 ara::diag::DiagUdsNrcErrorDomain 转发错误时,适用严格的取值边界和行为规范:
有效范围: 从 DiagUdsNrcErrc 派生的允许 UDS-NRC 值仅在 0x01 到 0xFE 的范围内 [SWS_DM_02059] 。
环境条件故障: 当检索 dataElement 失败且外部处理器报告 ara::diag::DiagUdsNrcErrorDomain 的错误时,DM 将表达式 DiagnosticEnvConditionFormulaPart 评估为未满足,并发出 Log-and-Trace 消息 [SWS_DM_00970] 。
异常处理: 方法 ThrowAsException() 将 ErrorCode 转换为类型为 Exception(DiagUdsNrcException 的别名)的相应异常 [SWS_DM_00531] 、[SWS_DM_00535] 。该操作被声明为非异常安全;在禁用 C++ 异常时,它不参与重载解析 [SWS_DM_00535] 。
消息解析: 方法 Message() 为传入的每个错误码提供描述性文本字符串,并保证绝不返回 nullptr [SWS_DM_00534] 。
本指南基于 AUTOSAR Adaptive R25-11 规范,并总结了对错误域 DiagUdsNrcErrorDomain 的要求。
分组依据 类别 历史
成员图 类图 Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.
G
nara__diag__DiagUdsNrcErrorDomain838
DiagUdsNrcErrorDomain
+ DiagUdsNrcErrorDomain()
+ Message()
+ Name()
+ ThrowAsException()
nara__core__ErrorDomain335
ErrorDomain
nara__diag__DiagUdsNrcErrorDomain838->nara__core__ErrorDomain335
详细视图 此版本没有元素数据
构造函数和析构函数 Default constructor .
constexpr DiagUdsNrcErrorDomain () noexcept;
方法 Translate an error code value into a text message.
Return the "shortname" ApApplicationErrorDomain.SN of this error domain.
const char * Name () const noexcept override;
Throw the exception type corresponding to the given ErrorCode. 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} 起未更改 版本颜色 最早版本 最新版本
方法文档
constexpr DiagUdsNrcErrorDomain () noexcept;
用户指南
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 50f42aa82863
来源
未决问题(1)
本使用说明基于 AUTOSAR AP R25-11 规范自动生成。
实现者指南即将推出(复杂度 I2)
Header-Datei #include "ara/diag/diag_uds_nrc_error_domain.h" Scope class ara::diag::DiagUdsNrcErrorDomain Exception-Sicherheit exception safe Thread-Sicherheit thread-safe
Status: valid/unmigrated
Version: rel:R25-11#a752b0f3
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_DM_00532@rel:R25-11#a752b0f3
Point-in-Time History:
Release:
R25-11 (Current / Active) R20-11 R21-11 R22-11 R23-11 R24-11 R19-11
View Snapshot
Recorded Revisions (7):
R25-11 rel:R25-11#977e80ee2026-09-30 Inspect R20-11 rel:R20-11#634577552026-10-14 Inspect R21-11 rel:R21-11#176ed8112026-10-14 Inspect R22-11 rel:R22-11#75b8ab432026-10-14 Inspect R23-11 rel:R23-11#2ee9ffd72026-10-14 Inspect R24-11 rel:R24-11#a752b0f32026-10-14 Inspect R25-11 rel:R25-11#a752b0f32026-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 * Message (ara::core::ErrorDomain::CodeType errorCode) const noexcept override;
Translate an error code value into a text message.
用户指南
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 8d40cc1d5cea
来源
未决问题(1)
本文档由 AI 系统基于 AUTOSAR AP Release R25-11 规范生成。
实现者指南即将推出(复杂度 I1)
Header-Datei #include "ara/diag/diag_uds_nrc_error_domain.h" Scope class ara::diag::DiagUdsNrcErrorDomain Exception-Sicherheit exception safe Thread-Sicherheit thread-safe
Parameter (in)
Parameter Beschreibung errorCode the error code value
Rückgabewert
Typ Beschreibung const char * the text message, never nullptr
Status: valid/unmigrated
Version: rel:R25-11#6b53063e
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_DM_00534@rel:R25-11#6b53063e
Point-in-Time History:
Release:
R25-11 (Current / Active) R20-11 R21-11 R22-11 R23-11 R24-11 R19-11
View Snapshot
Recorded Revisions (7):
R25-11 rel:R25-11#8a8793612026-09-30 Inspect R20-11 rel:R20-11#19a020cc2026-10-14 Inspect R21-11 rel:R21-11#19a020cc2026-10-14 Inspect R22-11 rel:R22-11#7a997a492026-10-14 Inspect R23-11 rel:R23-11#7d31b4782026-10-14 Inspect R24-11 rel:R24-11#6b53063e2026-10-14 Inspect R25-11 rel:R25-11#6b53063e2026-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;
Return the "shortname" ApApplicationErrorDomain.SN of this error domain.
用户指南
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 0056a3709625
来源
未决问题(1)
使用
类 ara::diag::DiagUdsNrcErrorDomain 的成员函数 Name 返回该特定诊断错误域的短名称(ApApplicationErrorDomain.SN)[SWS_DM_00533] 。该调用为同步调用,并通过头文件 ara/diag/diag_uds_nrc_error_domain.h 进行声明。该方法不接受传入参数,并返回指向以空字符结尾的字符串的 const char * 类型指针 [SWS_DM_00533] 。
错误处理
该函数被声明为 noexcept,并具有 exception safe 特性 [SWS_DM_00533] 。它不抛出异常,也不返回错误代码。接口设计中未预设查询失败的情况,因此不存在单独的错误消息。
并发性与限制
根据规范,Name 被归类为 thread-safe [SWS_DM_00533] 。它可以重入且在没有外部同步机制的情况下由多个线程并发调用。所引用的字符串应该表示静态分配的数据,因此该指针在应用程序的整个生命周期内应保持有效且不变。 问题 Q-d4a4d28af7a9c2df (未决) 对于该调用不存在特殊的顺序条件。
相互作用
该操作实现了诊断上下文中 AUTOSAR Adaptive 错误域的统一名称查询。它在结构上对应于相关错误域的同名接口,例如 ara::diag::DiagErrorDomain::Name [SWS_DM_00521] 、ara::diag::DiagOfferErrorDomain::Name [SWS_DM_00993] 、ara::diag::DiagReportingErrorDomain::Name [SWS_DM_01000] 以及 ara::diag::DiagSovdErrorDomain::Name [SWS_DM_01813] 。它主要用于为诊断客户端或日志记录组件清晰可读地标识来自 UDS-NRC 环境的错误。
此使用说明基于 AUTOSAR 规范自动生成。
实现者指南即将推出(复杂度 I1)
Header-Datei #include "ara/diag/diag_uds_nrc_error_domain.h" Scope class ara::diag::DiagUdsNrcErrorDomain Exception-Sicherheit exception safe Thread-Sicherheit thread-safe
Rückgabewert
Status: valid/unmigrated
Version: rel:R25-11#59ca0669
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_DM_00533@rel:R25-11#59ca0669
Point-in-Time History:
Release:
R25-11 (Current / Active) R20-11 R21-11 R22-11 R23-11 R24-11 R19-11
View Snapshot
Recorded Revisions (7):
R25-11 rel:R25-11#14ef88e02026-09-30 Inspect R20-11 rel:R20-11#dabaebdf2026-10-14 Inspect R21-11 rel:R21-11#dabaebdf2026-10-14 Inspect R22-11 rel:R22-11#97c1ed802026-10-14 Inspect R23-11 rel:R23-11#e4436c322026-10-14 Inspect R24-11 rel:R24-11#7a1309a22026-10-14 Inspect R25-11 rel:R25-11#59ca06692026-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;
Throw the exception type corresponding to the given ErrorCode. 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 · 温度: 不可控 · 提示词: e2f3a36037be
来源
本使用说明基于 AUTOSAR Adaptive R25-11 规范自动生成。
实现者指南即将推出(复杂度 I2)
Header-Datei #include "ara/diag/diag_uds_nrc_error_domain.h" Scope class ara::diag::DiagUdsNrcErrorDomain Exception-Sicherheit not exception safe Thread-Sicherheit thread-safe
Parameter (in)
Parameter Beschreibung errorCode the ErrorCode instance
Rückgabewert
Status: valid/unmigrated
Version: rel:R25-11#072d4b3e
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_DM_00535@rel:R25-11#072d4b3e
Point-in-Time History:
Release:
R25-11 (Current / Active) R20-11 R21-11 R22-11 R23-11 R24-11 R19-11
View Snapshot
Recorded Revisions (7):
R25-11 rel:R25-11#33286a632026-09-30 Inspect R20-11 rel:R20-11#857157f32026-10-14 Inspect R21-11 rel:R21-11#857157f32026-10-14 Inspect R22-11 rel:R22-11#e21631582026-10-14 Inspect R23-11 rel:R23-11#743044802026-10-14 Inspect R24-11 rel:R24-11#258997652026-10-14 Inspect R25-11 rel:R25-11#072d4b3e2026-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 = DiagUdsNrcErrc ;
Alias for the error code value enumeration.
Status: valid/unmigrated
Version: rel:R25-11#e59a05b9
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_DM_00530@rel:R25-11#e59a05b9
Point-in-Time History:
Release:
R25-11 (Current / Active) R20-11 R21-11 R22-11 R23-11 R24-11 R19-11
View Snapshot
Recorded Revisions (7):
R25-11 rel:R25-11#bd12ba0b2026-09-30 Inspect R20-11 rel:R20-11#4d2013242026-10-14 Inspect R21-11 rel:R21-11#26ea44862026-10-14 Inspect R22-11 rel:R22-11#ffb2ee2c2026-10-14 Inspect R23-11 rel:R23-11#e59a05b92026-10-14 Inspect R24-11 rel:R24-11#e59a05b92026-10-14 Inspect R25-11 rel:R25-11#e59a05b92026-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 = DiagUdsNrcException ;
Alias for the exception base class.
Status: valid/unmigrated
Version: rel:R25-11#e658cd3a
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_DM_00531@rel:R25-11#e658cd3a
Point-in-Time History:
Release:
R25-11 (Current / Active) R20-11 R21-11 R22-11 R23-11 R24-11 R19-11
View Snapshot
Recorded Revisions (7):
R25-11 rel:R25-11#5abedaad2026-09-30 Inspect R20-11 rel:R20-11#6907f50d2026-10-14 Inspect R21-11 rel:R21-11#6907f50d2026-10-14 Inspect R22-11 rel:R22-11#d36d27212026-10-14 Inspect R23-11 rel:R23-11#e658cd3a2026-10-14 Inspect R24-11 rel:R24-11#e658cd3a2026-10-14 Inspect R25-11 rel:R25-11#e658cd3a2026-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 · 德文原文