函数 RegisterWakeUpHandler [SWS_SM_71003] Upstream: RS_SM_00402
void RegisterWakeUpHandler (apext::sm::WakeUpHandler handler) noexcept; DIRECTION NOT handler -- DEFINED
Register wake-up handler function in the OS-Wrapper to inform SM about wake-up.
类 apext::sm::PowerStateInterface 的函数 RegisterWakeUpHandler 用于在 OS 封装层中注册类型为 apext::sm::WakeUpHandler 的回调函数,以通知 State Management (SM) 唤醒事件 [SWS_SM_71003]。该接口在头文件 #include "apext/sm/power_state_interface.h" 中定义,并满足上层需求 [RS_SM_00402] AUTOSAR_AP_SWS_StateManagement §C.1.2.1.1.1 “RegisterWakeUpHandler”。
用法与调用上下文
其声明为 void RegisterWakeUpHandler (apext::sm::WakeUpHandler handler) noexcept [SWS_SM_71003]。该调用同步执行,通过参数 handler 传递函数指针或回调。由于该函数没有返回值(void),因此它不提供关于注册是否完成的状态反馈 [SWS_SM_71003]。
错误处理与异常安全性
该接口被指定为异常安全(exception safe)并带有 noexcept 注解 [SWS_SM_71003]。因此调用方无需捕获 C++ 异常。未为该 API 定义特定的错误码、用于错误指示的返回值或发往诊断及错误管理器的消息 [SWS_SM_71003]。
并发性与限制
- 线程安全性:该函数被明确归类为非线程安全(
not-threadsafe)[SWS_SM_71003]。调用实例必须确保不会从未受保护的并发线程发起调用。Interpretation:适宜的做法是在唤醒事件发生之前,在 OS 封装层的顺序初始化阶段一次性完成注册。 问题 Q-268ab61374f98e7a (未决) - 开发状态:在 Release R25-11 中,该函数定义具有 DRAFT 状态 AUTOSAR_AP_SWS_StateManagement §C.1.2.1.1.1 “RegisterWakeUpHandler”,因此在未来的规范版本中可能会发生变更。
本使用说明是根据 R25-11 的 AUTOSAR 规范自动生成的。
实现者指南即将推出(复杂度 I1)
| Header-Datei | #include "apext/sm/power_state_interface.h" |
|---|---|
| Scope | class apext::sm::PowerStateInterface |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | not-threadsafe |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| None |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_SM_71003- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_SM_71003@rel:R25-11#6591bbb8- Content hash
6591bbb8- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_StateManagement.pdf#nameddest=SWS_SM_71003
Status: valid/unmigrated
Version: rel:R25-11#bc05c3e2
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_71003@rel:R25-11#bc05c3e2
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 · 德文原文