函数 Message [SWS_SM_81249] Upstream: RS_AP_00119, RS_AP_00159
const char * Message (CodeType errorCode) const noexcept override;
Returns the message associated with the error code.
成员函数 ara::sm::SmErrorDomain::Message 用于同步确定分配给 State Management 错误域特定错误码的文本错误消息 [SWS_SM_81249]。它在头文件 ara/sm/sm_error_domain.h 中、类 ara::sm::SmErrorDomain 的作用域内声明,并在规范中具有状态 DRAFT AUTOSAR_AP_SWS_StateManagement §8.1.3.2.2.1 “Message”。
该接口具有以下参数和返回值 [SWS_SM_81249]:
- Parameter:类型为
CodeType的errorCode接收数值错误编号,以请求其关联的文本消息。 - 返回值:指向与传入错误代码关联的错误消息的
const char *类型指针。
针对执行,在并发性和异常处理方面适用严格的保证:该函数被指定为 thread-safe 和 exception safe,并以标识符 noexcept 声明 [SWS_SM_81249]。因此,可以从任意线程安全调用它,而无需同步锁或 try-catch 块。
在 AUTOSAR Adaptive 的错误管理框架中,该方法重写了基础错误域的虚函数。Interpretation:由于返回值被定义为不带分配接口的 const char *,该指针通常预计指向在整个进程运行期间保持有效的静态字符串字面量。 问题 Q-03fc170f18f910b4 (未决)
该提示由 AI 基于 AUTOSAR Adaptive R25-11 规范生成。
实现者指南即将推出(复杂度 I1)
| Header-Datei | #include "ara/sm/sm_error_domain.h" |
|---|---|
| Scope | class ara::sm::SmErrorDomain |
| 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. |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_SM_81249- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_SM_81249@rel:R25-11#5f8256b0- Content hash
5f8256b0- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_StateManagement.pdf#nameddest=SWS_SM_81249
Status: valid/unmigrated
Version: rel:R25-11#b28e7125
Versionshistorie & Revisions (1 transition)
- 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_SM_81249@rel:R25-11#b28e7125
Requirement Text as-of this release:
Curation Decisions:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
|---|---|---|---|---|
| 2026-08-13 | tool | none → valid/unmigrated | mechanically 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 · 德文原文