DEENESPTFRRUARHIKOZHNL

namespace apext::sm

User GuideAI-GENERATED

Enables hardware-level coordination of operating system power states and autonomous wake-up in State Management.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 8273631beee4 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Enables hardware-level coordination of operating system power states and autonomous wake-up in State Management.

The namespace apext::sm provides normative platform extension interfaces to coordinate power states between AUTOSAR Adaptive State Management and the host operating system SWS StateManagement §C.1 “Header: apext/sm/power_state_interface.h”. Linux-specific low-power modes are mapped in a typed manner via the enumeration apext::sm::PowerState [SWS_SM_71002]. In addition, the callback apext::sm::WakeUpHandler enables the operating system to trigger an autonomous exit from sleep states in State Management without an upstream control application [SWS_SM_71004], whereby this call is not designed to be thread-safe.

Context

The namespace apext::sm provides normative platform extension interfaces (Platform Extension Interfaces) for the functional cluster State Management within the AUTOSAR Adaptive Platform SWS StateManagement §C.1 “Header: apext/sm/power_state_interface.h”. While standard interfaces of State Management primarily serve to coordinate application states, function groups, and execution modes across model boundaries, apext::sm addresses hardware-level coupling. The extension interfaces are designed to be used or provided by OEMs or integrators to extend the platform's functionality and to realize a coordinated interaction with the underlying operating system (OS) SWS StateManagement §C.1 “Header: apext/sm/power_state_interface.h”.

A central component of the namespace is the class PowerStateInterface, which serves to coordinate power states with the operating system. Concurrently, the header apext/sm/power_state_interface.h defines typed enumerations and callback aliases that act as a link between operating system drivers, external wake-up sources, and internal state management. In addition to the operating system, these interfaces are conceptually related to the Controller of State Management as well as to higher-level entities such as SMControlApplication or Update and Configuration Management (UCM), which can also influence state transitions SWS StateManagement §7.7.15.1 “Autonomous wake-up from suspend state”.

OS Betriebssystem (Kernel) ApextSM apext::sm (PowerStateInterface, WakeUpHandler) OS->ApextSM Signalisiert Wake-up Setzt PowerState SMController State Management (Controller) ApextSM->SMController Autonomer Aufruf (WakeUpHandler) SMControlApp SMControlApplication / UCM SMControlApp->SMController Explizite Requests (RequestUpdateSession)

Context diagram: Interaction of operating system, apext::sm interfaces, and State Management. Sources: SWS StateManagement §7.7.15.1 “Autonomous wake-up from suspend state”, SWS StateManagement §C.1 “Header: apext/sm/power_state_interface.h”.

Lifecycle

The lifecycle in the context of apext::sm is characterized by the discrete power states modeled in the enumeration apext::sm::PowerState based on std::uint32_t [SWS_SM_71002]. These states are derived directly from the kernel perspective of Linux operating systems:

  • kPmSuspendToIdle (= 1): Derived from state PM_SUSPEND_TO_IDLE [SWS_SM_71002].
  • kPmSuspendToRam (= 2): Derived from state PM_SUSPEND_TO_RAM [SWS_SM_71002].
  • kPmHibernation (= 3): Derived from state PM_HIBERNATION (suspend-to-disk) [SWS_SM_71002].
  • kPmOff (= 4): Derived from state PM_OFF (complete shutdown) [SWS_SM_71002].

Interpretation: The class PowerStateInterface is likely to serve as the primary anchor point through which the integrator queries these target states or transmits them to the host operating system. Question Q-800acae699828764 (open) During the dwell time in a low-power state such as kPmSuspendToRam, normal processing is suspended until a wake-up event initiates the transition back to the active operating mode.

Usage Path

A central use case of the namespace is the autonomous wake-up of the overall system from a sleep state (Autonomous wake-up from suspend state) SWS StateManagement §7.7.15.1 “Autonomous wake-up from suspend state”. While a SMControlApplication can explicitly request exiting the suspend-to-RAM mode, State Management is additionally capable of reacting autonomously to wake-up signals.

If the operating system signals a wake-up event via the interface apext::sm::WakeUpHandler—provided it is implemented—State Management independently initiates a wake-up sequence SWS StateManagement §7.7.15.1 “Autonomous wake-up from suspend state”. apext::sm::WakeUpHandler is a function alias of type std::function<void(void)> [SWS_SM_71004]. By invoking this handler, State Management transitions the Controller state machine from its suspend state to the state LeaveSuspend modeled specifically for this purpose [SWS_SM_CONSTR_00036]. In this state, the controller mandatorily executes the action item LeaveSuspendToRam, whereby regular platform activity is resumed without prior intervention of a control application [SWS_SM_CONSTR_00037], SWS StateManagement §7.7.15.1 “Autonomous wake-up from suspend state”.

Autonomous wake-up from suspend-to-RAMBetriebssystemapext::sm::WakeUpHandlerState Management (Controller)Use Case: Triggering the wake-up signalWake-up signalisierenAufruf operator()Use Case: Autonomous state transitionState transition to LeaveSuspendExecuting ActionListItem LeaveSuspendToRamNormalbetrieb aktiv

Sequence diagram: Process of autonomous wake-up via the WakeUpHandler. Sources: SWS StateManagement §7.7.15.1 “Autonomous wake-up from suspend state”, [SWS_SM_71004], [SWS_SM_CONSTR_00036], [SWS_SM_CONSTR_00037].

Error Scenarios

When using and integrating apext::sm, system-specific constraints and concurrency risks must be considered:

  • Missing thread safety: According to the specification, the invocation type apext::sm::WakeUpHandler is explicitly not thread-safe (not thread-safe) [SWS_SM_71004]. If the operating system or an interrupt context triggers multiple or parallel signals, the integrator must provide suitable synchronization mechanisms to prevent data races and inconsistent state transitions in State Management.
  • Unimplemented handler: If the WakeUpHandler is not implemented in the target system, no autonomous wake-up via the operating system can take place; in this case, the system remains in the sleep state until external requests (e.g. by UCM via RequestUpdateSession) or explicit application requests arrive SWS StateManagement §7.7.15.1 “Autonomous wake-up from suspend state”.
  • Modeling error in the manifest: If state LeaveSuspend for Controller is missing in the deployment manifest [SWS_SM_CONSTR_00036] or does not contain the mandatory element LeaveSuspendToRam [SWS_SM_CONSTR_00037], the automated transition fails and the platform cannot properly resume operation after the sleep state.

This guide is based on the AUTOSAR Adaptive Platform R25-11 specification. All contents were validated against the normative Platform Extension Interfaces for State Management.

Topic map

Types and constants

2

Class diagram

Abgerundete Rahmen = Namespace- bzw. Klassen-Scopes; hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); graue Boxen = namespace-fremde bzw. externe Basisklassen. Klicken öffnet die jeweilige Klassen- bzw. cppreference-Seite.

G cluster_ns apext::sm napext__sm__PowerStateInterface PowerStateInterface

Detail view

Select an entry in the outline.

Classes

class for power state coordination with OS

Types and constants

PowerState enumeration

Power State Enumeration.

enum class PowerState : std::uint32_t {...};
WakeUpHandler type alias

WakeUpHandler function.

using WakeUpHandler = std::function<void(void)>;

Enumerations

enumeration PowerState [SWS_SM_71002] Upstream: RS_SM_00402

enum class PowerState :         std::uint32_t {...};

Power State Enumeration.

Header-Datei#include "apext/sm/power_state_interface.h"
Forwarding-Header#include "apext/sm/sm_fwd.h"
Scopenamespace apext::sm
SymbolPowerState
Basistypstd::uint32_t

Werte

EnumeratorBeschreibung
kPmSuspendToIdle=1 Derived from Linux Power State PM_SUSPEND_TO_IDLE (Kernel view)
kPmSuspendToRam=2 Derived from Linux Power State PM_SUSPEND_TO_RAM (Kernel view)
kPmHibernation=3 Derived from Linux Power State PM_HIBERNATION (Kernel view)
kPmOff=4 Derived from Linux Power State PM_OFF (Kernel view)

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

Record
AUTOSAR/AP/record/SWS_SM_71002
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_SM_71002@rel:R25-11#4f68e3fd
Content hash
4f68e3fd
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_StateManagement.pdf#nameddest=SWS_SM_71002
Status: valid/unmigrated Version: rel:R25-11#4f68e3fd 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_71002@rel:R25-11#4f68e3fd
Point-in-Time History:
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

Type aliases

type alias WakeUpHandler [SWS_SM_71004] Upstream: RS_SM_00402

using WakeUpHandler = std::function<void(void)>;

WakeUpHandler function.

Header-Datei#include "apext/sm/power_state_interface.h"
Scopenamespace apext::sm
SymbolWakeUpHandler
Thread-Sicherheitnot thread-safe

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

Record
AUTOSAR/AP/record/SWS_SM_71004
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_SM_71004@rel:R25-11#29968d23
Content hash
29968d23
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_StateManagement.pdf#nameddest=SWS_SM_71004
Status: valid/unmigrated Version: rel:R25-11#29968d23 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_71004@rel:R25-11#29968d23
Point-in-Time History:
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