DEENESPTFRRUARHIKOZHNL

class ara::exec::StateClient

[SWS_EM_02275] Upstream: RS_EM_00101, RS_AP_00154, RS_AP_00150

class StateClient final {...};

ara::exec::StateClient is an interface of Execution Management that is used by State Management to request transitions between Function Group States or to perform other related operations. Class used to perform Function Group state management operation needed during lifetime of a Machine. State Management during its own lifetime will need to start and stop software, that is intended to run on a Machine managed by it. This can be achieved by performing state transition of a Function Group to which required software is assigned. Integrator will assign software to run in a particular state (of Function Group) and State Management can start it, by requesting Execution Management to perform state transition (of this Function Group) to the mentioned state. Execution Management will then start mentioned software and report transition result back to State Management. Please note that stopping software can be done in similar way (i.e. Function Group state transition, to a state in which software is not configured to be run).

Header-Datei#include "ara/exec/state_client.h"
Forwarding-Header#include "ara/exec/exec_fwd.h"
Scopenamespace ara::exec

User GuideKI-GENERIERT

Fordert beim Execution Management Zustandswechsel für Funktionsgruppen an, um Prozesse auf einer Machine zu steuern.
KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 3af3f18c3d39 Herkunft
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Fordert beim Execution Management Zustandswechsel für Funktionsgruppen an, um Prozesse auf einer Machine zu steuern.

Die Schnittstelle ara::exec::StateClient ermöglicht dem State Management das Anfordern von Zustandswechseln für Funktionsgruppen beim Execution Management, um die Ausführung zugeordneter Prozesse auf einer Machine zu steuern [SWS_EM_02278]. Bei der Erzeugung via Create() muss ein durchgehend gültiger Callback für unerwartete undefinierte Zustände registriert werden [SWS_EM_02276]. Neben asynchronen Zustandsübergängen bietet die nicht kopierbare Klasse Methoden zur Abfrage des Machine-Hochlaufergebnisses sowie zur Fehleranalyse bei Ausführungsfehlern [SWS_EM_02279], [SWS_EM_02542].

Kontext

Die Klasse ara::exec::StateClient bildet die Schnittstelle des Execution Management, über die das State Management Zustandsübergänge für Funktionsgruppen (Function Groups) anfordert und steuert. Das State Management verwendet diesen Client während der gesamten Betriebszeit einer Machine, um Prozesse gezielt zu starten oder zu beenden. Der Integrator weist Softwarekomponenten bestimmten Zuständen einer Funktionsgruppe zu. Möchte das State Management diese Software ausführen, fordert es über den StateClient beim Execution Management den Wechsel in den betreffenden Funktionsgruppenzustand an; das Stoppen erfolgt analog durch Übergang in einen Zustand, in dem die Software nicht aktiv sein soll [SWS_EM_02278].

StateClientContext StateManagement State Management StateClient ara::exec::StateClient (Client-Bibliothek) StateManagement->StateClient Aufrufe (Create, SetState) StateClient->StateManagement undefinedStateCallback (ExecutionErrorEvent) ExecutionManagement Execution Management (Dienst/Server) StateClient->ExecutionManagement IPC: Transition anfordern ExecutionManagement->StateClient IPC: Status / Transitionsergebnis

Kontextdiagramm: Zusammenspiel zwischen State Management, StateClient und Execution Management. Quellen: [SWS_EM_02276], [SWS_EM_02278]

Lebenszyklus

Instanzen von StateClient können entweder über den benannten Konstruktor Create() [SWS_EM_02276] als ara::core::Result<StateClient> oder über den regulären Konstruktor StateClient() [SWS_EM_02561] erzeugt werden. Beide Konstruktionspfade verlangen zwingend einen Callback-Parameter undefinedStateCallback vom Typ std::function<void(const ara::exec::ExecutionErrorEvent&)>. Dieser Callback wird durch die StateClient-Bibliothek ausgelöst, wenn eine Funktionsgruppe unerwartet und ohne vorherige Anforderung durch SetState() in einen undefinierten Zustand wechselt. Der Aufrufer muss sicherstellen, dass dieser Callback über die gesamte Lebensdauer der StateClient-Instanz aufrufbar bleibt, was insbesondere bei Objektbindungen via std::bind relevant ist [SWS_EM_02276], [SWS_EM_02561].

Kopieroperationen sind für StateClient explizit unterbunden: Sowohl der Kopierkonstruktor [SWS_EM_02565] als auch der Kopierzuweisungsoperator [SWS_EM_02568] sind gelöscht (=delete). Eine Übertragung des Besitzes ist ausschließlich über Move-Semantik via Move-Konstruktor [SWS_EM_02566] und Move-Zuweisung [SWS_EM_02567] möglich. Hinsichtlich der Nebenläufigkeit sind die fachlichen Methoden wie SetState(), GetExecutionError() und GetInitialMachineStateTransitionResult() sowie die Erzeugung threadsicher ausgelegt [SWS_EM_02276], [SWS_EM_02278], [SWS_EM_02279], [SWS_EM_02542]. Dagegen sind die Move-Operationen und der Destruktor ~StateClient() nicht threadsicher [SWS_EM_02277], [SWS_EM_02566], [SWS_EM_02567].

Nutzungspfad

Ein typischer Anwendungszyklus gliedert sich in Initialisierung, Abfrage des Hochlaufergebnisses, reguläre Zustandswechsel und Fehlerüberwachung:

  1. Erzeugung: Das State Management instanziiert StateClient unter Angabe eines gültigen Fehlersignalisierungs-Callbacks via Create() [SWS_EM_02276].
  2. Initiales Hochlaufergebnis abfragen: Mit GetInitialMachineStateTransitionResult() fordert das State Management das Ergebnis des initialen Zustandsübergangs in den Startup-Zustand an [SWS_EM_02279]. Da dieser Übergang genau einmal pro Lebenszyklus der Machine stattfindet, bleibt das gelieferte ara::core::Future<void> stabil und ändert sich bis zu einem Neustart nicht mehr.
  3. Zustandswechsel anfordern: Mittels SetState() beauftragt das State Management asynchrone Zustandsübergänge für einzelne Funktionsgruppen [SWS_EM_02278]. Die Methode kehrt sofort zurück und liefert ein ara::core::Future<void> zur Abfrage des Abschlusses. Sobald der Auftrag beim Execution Management eingegangen ist, wird er unabhängig von der weiteren Lebensdauer der aufrufenden Instanz ausgeführt.
  4. Fehlerzustände untersuchen: Gelangt eine Funktionsgruppe unerwartet in einen undefinierten Zustand, kann über GetExecutionError() der auslösende Ausführungsfehler in Form eines ara::exec::ExecutionErrorEvent ermittelt werden [SWS_EM_02542].
Typischer Nutzungsablauf mit ara::exec::StateClientState ManagementStateClientExecution ManagementCreate(undefinedStateCallback)Result<StateClient>Use Case: Initiales Hochlaufergebnis abfragenGetInitialMachineStateTransitionResult()Startup-Status anfragenStartup-ErgebnisFuture<void>Use Case: Zustandswechsel anfordernSetState(functionGroupState)Zustandsübergang einleitenFuture<void> (sofortige Rückgabe)Übergang abgeschlossenFuture-Ergebnis bereitgestelltUse Case: FehlerüberwachungoptUnerwarteter undefinierter ZustandundefinedStateCallback(ExecutionErrorEvent)GetExecutionError(functionGroupState)Result<ExecutionErrorEvent>

Sequenzdiagramm: Ablauf von Erzeugung, Startzustandsabfrage, asynchronem Zustandswechsel und Fehleranalyse. Quellen: [SWS_EM_02276], [SWS_EM_02279], [SWS_EM_02278], [SWS_EM_02542]

Fehlerszenarien

Die Operationen der Klasse kommunizieren Fehlschläge über Fehlercodes der ExecErrorDomain:

  • ExecErrc::kNoCommunication: Signalisiert Kommunikationsstörungen zum Execution Management, beispielsweise bei unterbrochener IPC-Verbindung. Tritt bei Create() [SWS_EM_02276], SetState() [SWS_EM_02278], GetInitialMachineStateTransitionResult() [SWS_EM_02279] sowie GetExecutionError() [SWS_EM_02542] auf. Die vorgesehene Wiederherstellung besteht im erneuten Aufruf.
  • ExecErrc::kInvalidArgument: Wird von Create() und StateClient() gemeldet, falls der übergebene Callback keine aufrufbare Funktion enthält [SWS_EM_02276], [SWS_EM_02561].
  • ExecErrc::kOperationCanceled: Zeigt bei SetState() an, dass ein laufender Übergang durch eine neuere Anforderung abgebrochen wurde [SWS_EM_02278]. Bei GetInitialMachineStateTransitionResult() tritt dieser Fehler auf, wenn der initiale Startübergang abgebrochen wurde, etwa durch eine unterbrochene Machine-Update-Sequenz [SWS_EM_02279].
  • ExecErrc::kInvalidTransition: Der angeforderte Zustandsübergang ist unzulässig, beispielsweise der Übergang in den Off-Zustand für MachineFG, oder der Zustand existiert nach einem Update nicht mehr [SWS_EM_02278].
  • ExecErrc::kInvalidMetaModelIdentifier: Der übergebene Zustand existiert nicht im verarbeiteten Manifest oder der Prozess besitzt kein Mapping auf die betreffende Funktionsgruppe [SWS_EM_02278], [SWS_EM_02542]. Tritt dieser Fehler bei GetInitialMachineStateTransitionResult() auf, fehlt dem Prozess das Mapping zu MachineFG, was auf ein Konfigurationsproblem hinweist [SWS_EM_02279].
  • ExecErrc::kOperationFailed: Der Übergang ist fehlgeschlagen [SWS_EM_02278]. Bei GetExecutionError() zeigt der Code an, dass sich die Funktionsgruppe nicht in einem undefinierten Zustand befindet und das Problem vermutlich bereits behoben wurde [SWS_EM_02542].
  • ExecErrc::kIntegrityOrAuthenticityCheckFailed und ExecErrc::kUnexpectedTermination: Spezifische Fehlschläge während SetState() infolge gescheiterter Integritätsprüfungen oder unerwarteter Prozessbeendigungen während der Transition [SWS_EM_02278].

Dieser Leitfaden basiert ausschließlich auf den Spezifikationsanforderungen von AUTOSAR Adaptive R25-11.

Mitgliederkarte

Klassendiagramm

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__exec__StateClient893 StateClient + StateClient() + operator=() + ~StateClient() + Create() + GetExecutionError() + GetInitialMachineStateTransitionResult() + SetState()

Detailansicht

Wähle in der Gliederung einen Eintrag aus.

Konstruktoren und Destruktor

StateClient function 3

Regular constructor for StateClient.

Überladungen StateClient 3
StateClient (std::function< void(const ara::exec::ExecutionErrorEvent &)> undefinedStateCallback) noexcept(false); SWS_EM_02561
StateClient (const StateClient &)=delete; SWS_EM_02565
StateClient (StateClient &&rval) noexcept; SWS_EM_02566
~StateClient function

noexcept destructor

~StateClient () noexcept;

Methoden

Create function

Named constructor for StateClient.

static ara::core::Result< StateClient > Create (std::function< void(const ara::exec::ExecutionErrorEvent &)> undefinedStateCallback) noexcept;

Returns the execution error which changed the Function Group of the given Function Group State to an Undefined Function Group State. This function will return with error and will not return an ExecutionErrorEvent object, if the Function Group is in a defined Function Group state again.

ara::core::Result< ara::exec::ExecutionErrorEvent > GetExecutionError (const ara::exec::FunctionGroupState &functionGroupState) noexcept;

Method to retrieve result of Machine State initial transition to Startup state.

ara::core::Future< void > GetInitialMachineStateTransitionResult () const noexcept;
SetState function

Method to request state transition for a single Function Group. This method will request Execution Management to perform state transition and return immediately. Returned ara::core::Future can be used to determine result of requested transition.

ara::core::Future< void > SetState (const FunctionGroupState &state) const noexcept;

Operatoren

operator= function 2

Intentional use of move assignment for StateClient.

Überladungen = 2
StateClient & operator= (StateClient &&rval) noexcept; SWS_EM_02567
StateClient & operator= (const StateClient &)=delete; SWS_EM_02568

Dokumentation der Methoden

function Create [SWS_EM_02276] Upstream: RS_EM_00101, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00139, RS_AP_00144, RS_AP_00159

static ara::core::Result< StateClient > Create (std::function< void(const ara::exec::ExecutionErrorEvent &)> undefinedStateCallback) noexcept;

Named constructor for StateClient.

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 86cbb8f72d61 Herkunft Offene Fragen (1)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Die statische Factory-Methode Create dient als Named Constructor zur Erzeugung einer Instanz von ara::exec::StateClient ([SWS_EM_02276]). Als zwingender Parameter wird undefinedStateCallback übergeben. Dieser Callback wird von der Client-Bibliothek ausgelöst, wenn eine Funktionsgruppe unerwartet – das heißt ohne vorherige Anforderung über SetState() – in einen undefinierten Zustand wechselt ([SWS_EM_02276]). Dabei werden die betroffene Funktionsgruppe und der Fehler über ein ExecutionErrorEvent an den Callback übermittelt.

Für Aufrufkontext und Lebensdauer gelten feste Rahmenbedingungen:

  • Die Funktion ist thread-safe, exception-safe und als noexcept deklariert ([SWS_EM_02276]).
  • Der übergebene undefinedStateCallback muss während der gesamten Lebensdauer der erzeugten StateClient-Instanz aufrufbar bleiben ([SWS_EM_02276]). Dies erfordert besondere Sorgfalt bei Bindungen an Objektinstanzen (beispielsweise mittels std::bind).

Die Instanziierung erfolgt synchron und liefert ein ara::core::Result<StateClient> zurück ([SWS_EM_02276]). Im Fehlerfall sind folgende Fehlercodes definiert:

  • ara::exec::ExecErrc::kInvalidArgument: Wird gemeldet, wenn das übergebene Argument keine aufrufbare Funktion enthält (Rollback-Semantik; Behebung durch Bereitstellung einer gültigen Funktion) ([SWS_EM_02276]).
  • ara::exec::ExecErrc::kNoCommunication: Signalisiert einen Kommunikationsfehler (No-Rollback-Semantik; Behebung durch erneuten Versuch) ([SWS_EM_02276]). Dies dürfte vermutlich auf einen fehlgeschlagenen Verbindungsaufbau zur Ausführungsumgebung zurückzuführen sein. Frage Q-c312c2b5e7c3c7d0 (offen)

Das Konstruktionsmuster entspricht strukturell dem Initialisierungsansatz verwandter Ausführungsclients wie ara::exec::ExecutionClient ([SWS_EM_02562]), der ebenfalls mit einem Pflicht-Callback über einen Named Constructor erzeugt wird.

Dieser Nutzungshinweis wurde automatisch generiert auf Basis der Spezifikationsdaten von AUTOSAR R25-11.

Implementer's Guide folgt (Komplexität I1)

Header-Datei#include "ara/exec/state_client.h"
Scopeclass ara::exec::StateClient
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
undefinedStateCallbackcallback to be invoked by StateClient library if a FunctionGroup changes its state unexpectedly to an Undefined Function Group State, i.e. without previous request by SetState(). The affected FunctionGroup and ExecutionError is provided as an argument to the callback in form of ExecutionErrorEvent. Lifetime: it is expected that undefinedStateCallback remains callable, during entire lifetime of the StateClient instance. This is especially important if, undefinedStateCallback is bound to an instance of a class (e.g. using std::bind).

Rückgabewert

TypBeschreibung
ara::core::Result< StateClient >a result that contains either a StateClient object or an error.

Fehler

FehlercodeBeschreibung
ara::exec::ExecErrc::kNoCommunicationno_rollback_semantics Communication error occurred. Recovery: try again
ara::exec::ExecErrc::kInvalidArgumentrollback_semantics Given undefinedStateCallback doesn’t contain a callable function. Recovery: change argument
Hinweise: This named constructor may call a private constructor defined by the developer.

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

Record
AUTOSAR/AP/record/SWS_EM_02276
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_EM_02276@rel:R25-11#4f8bba6e
Content hash
4f8bba6e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_ExecutionManagement.pdf#nameddest=SWS_EM_02276
Status: valid/unmigrated Version: rel:R25-11#e0c84a0f Versionshistorie & Revisions (1 transition, 8 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_EM_02276@rel:R25-11#e0c84a0f
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#4f8bba6e2026-09-30
  • R19-11rel:R19-11#de12c8242026-10-14
  • R20-11rel:R20-11#e48137012026-10-14
  • R21-11rel:R21-11#656a7fe92026-10-14
  • R22-11rel:R22-11#76c30edc2026-10-14
  • R23-11rel:R23-11#7c0d72972026-10-14
  • R24-11rel:R24-11#924d8c912026-10-14
  • R25-11rel:R25-11#e0c84a0f2026-10-14 active
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

function GetExecutionError [SWS_EM_02542] Upstream: RS_EM_00101, RS_AP_00120, RS_AP_00121, RS_AP_00128, RS_AP_00139, RS_AP_00159

ara::core::Result< ara::exec::ExecutionErrorEvent > GetExecutionError (const ara::exec::FunctionGroupState &functionGroupState) noexcept;

Returns the execution error which changed the Function Group of the given Function Group State to an Undefined Function Group State. This function will return with error and will not return an ExecutionErrorEvent object, if the Function Group is in a defined Function Group state again.

Header-Datei#include "ara/exec/state_client.h"
Scopeclass ara::exec::StateClient
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
functionGroupStateFunction Group State of interest.

Rückgabewert

TypBeschreibung
ara::core::Result<ara::exec::ExecutionErrorEvent >The execution error which changed the Function Group of the given Function Group State to an Undefined Function Group State.

Fehler

FehlercodeBeschreibung
ara::exec::ExecErrc::kOperationFailedrollback_semantics The Function Group of the given Function Group State is not in an Undefined Function Group State. Recovery: Function should only be called, if the given function group is in an undefined function group state. The problem has likely already been resolved.
ara::exec::ExecErrc::kNoCommunicationrollback_semantics if StateClient can’t communicate with Execution Management (e.g. IPC link is down). Recovery: Call function again
ara::exec::ExecErrc::kInvalidMetaModelIdentifierrollback_semantics The given Function Group State couldn’t be found in the Processed Manifest or Process does not have a mapping to the Function Group of the given Function Group State. Recovery: Call function with a different argument

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

Record
AUTOSAR/AP/record/SWS_EM_02542
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_EM_02542@rel:R25-11#7df954d3
Content hash
7df954d3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_ExecutionManagement.pdf#nameddest=SWS_EM_02542
Status: valid/unmigrated Version: rel:R25-11#6fdce36e 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_EM_02542@rel:R25-11#6fdce36e
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#7df954d32026-09-30
  • R20-11rel:R20-11#0deb34d02026-10-14
  • R21-11rel:R21-11#651408902026-10-14
  • R22-11rel:R22-11#a060de742026-10-14
  • R23-11rel:R23-11#936ca2392026-10-14
  • R24-11rel:R24-11#56ea53d02026-10-14
  • R25-11rel:R25-11#6fdce36e2026-10-14 active
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

function GetInitialMachineStateTransitionResult [SWS_EM_02279] Upstream: RS_EM_00101, RS_AP_00119, RS_AP_00120, RS_AP_00138, RS_AP_00128, RS_AP_00159

ara::core::Future< void > GetInitialMachineStateTransitionResult () const noexcept;

Method to retrieve result of Machine State initial transition to Startup state.

Header-Datei#include "ara/exec/state_client.h"
Scopeclass ara::exec::StateClient
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ara::core::Future< void >void if requested transition is successful, otherwise it returns Exec ErrorDomain error.

Fehler

FehlercodeBeschreibung
ara::exec::ExecErrc::kOperationCanceledrollback_semantics StateManagement may decide to cancel [SWS_EM_01023] transition and start specific startup sequence. This could happen for number of reasons and one of them could be interrupted Machine update sequence. Recovery: Call SetState again with initial state
ara::exec::ExecErrc::kOperationFailedrollback_semantics if transition to the requested Function Group state failed. Recovery: Call SetState again with initial state
ara::exec::ExecErrc::kNoCommunicationrollback_semantics if StateClient can’t communicate with Execution Management (e.g. IPC link is down). Recovery: Call function again
ara::exec::ExecErrc::kInvalidMetaModelIdentifierrollback_semantics Process does not have a mapping to MachineFG. Recovery: Indicates configuration problem (should never happen)
Hinweise: This method allows State Management to retrieve the result of a transition specified by [SWS_EM_01023] and [SWS_EM_02241]. Please note that this transition happens once per machine life cycle, thus the result delivered by this method shall not change (unless machine is started again). Please note that concerns about returned ara::core::Future from ara::exec:: StateClient::SetState apply for ara::exec::StateClient:: GetInitialMachineStateTransitionResult.

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

Record
AUTOSAR/AP/record/SWS_EM_02279
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_EM_02279@rel:R25-11#9c81ce29
Content hash
9c81ce29
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_ExecutionManagement.pdf#nameddest=SWS_EM_02279
Status: valid/unmigrated Version: rel:R25-11#54b9984c Versionshistorie & Revisions (1 transition, 8 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_EM_02279@rel:R25-11#54b9984c
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#9c81ce292026-09-30
  • R19-11rel:R19-11#ed225dc02026-10-14
  • R20-11rel:R20-11#cea035782026-10-14
  • R21-11rel:R21-11#3464ea3a2026-10-14
  • R22-11rel:R22-11#eb3f336b2026-10-14
  • R23-11rel:R23-11#ad5bc79d2026-10-14
  • R24-11rel:R24-11#ed46df4b2026-10-14
  • R25-11rel:R25-11#54b9984c2026-10-14 active
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

function SetState [SWS_EM_02278] Upstream: RS_EM_00101, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00138, RS_AP_00128, RS_AP_00159

ara::core::Future< void > SetState (const FunctionGroupState &state) const noexcept;

Method to request state transition for a single Function Group. This method will request Execution Management to perform state transition and return immediately. Returned ara::core::Future can be used to determine result of requested transition.

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: b3951f2f28ce Herkunft
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Die Methode SetState dient dazu, den Zustandsübergang für eine einzelne Funktionsgruppe beim Execution Management anzufordern [SWS_EM_02278]. Der Aufruf erfolgt asynchron: Die Methode stößt den Wechsel an und kehrt unmittelbar mit einem ara::core::Future<void> zurück, über das das Ergebnis der Transition ermittelt werden kann [SWS_EM_02278]. Als Parameter wird ein FunctionGroupState übergeben, der den Zielzustand innerhalb der Funktionsgruppe metamodellkonform identifiziert [SWS_EM_02278].

Schlägt die Transition fehl, liefert das Future einen Fehler aus der Exec-ErrorDomain [SWS_EM_02278]. Eine Rollback-Semantik greift bei ara::exec::ExecErrc::kInvalidTransition (z. B. bei verbotenen Übergängen wie dem Off-Zustand für MachineFG) und bei ara::exec::ExecErrc::kInvalidMetaModelIdentifier (bei fehlendem Mapping oder fehlender Definition im Manifest) [SWS_EM_02278]. Ohne Rollback-Semantik werden kOperationCanceled (durch neuere Anfrage verdrängt), kOperationFailed, kNoCommunication (IPC-Verbindung gestört), kIntegrityOrAuthenticityCheckFailed sowie kUnexpectedTermination gemeldet [SWS_EM_02278].

Die Methode ist thread-safe und exception safe (noexcept) [SWS_EM_02278]. Das zurückgegebene ara::core::Future hängt von der Lebensdauer der aufrufenden Instanz ab; das Execution Management verarbeitet die eingegangene Anforderung hingegen unabhängig von der Lebensdauer der StateClient-Instanz [SWS_EM_02278].

Im Zusammenspiel mit der Instanziierung über Create [SWS_EM_02276] bzw. den Konstruktor [SWS_EM_02561] fängt ein undefinedStateCallback unerwartete Zustandswechsel ab, die ohne vorherigen Aufruf von SetState eintreten. Das Ergebnis des anfänglichen Übergangs in den Startup-Zustand kann separat über GetInitialMachineStateTransitionResult abgefragt werden [SWS_EM_02279].

Dieser Text wurde von einer KI erstellt; die Richtigkeit wird von einem Editor geprüft.

Implementer's Guide folgt (Komplexität I1)

Header-Datei#include "ara/exec/state_client.h"
Scopeclass ara::exec::StateClient
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
staterepresenting meta-model definition of a state inside a specific Function Group. Execution Management will perform state transition from the current state to the state identified by this parameter.

Rückgabewert

TypBeschreibung
ara::core::Future< void >void if requested transition is successful, otherwise it returns Exec ErrorDomain error.

Fehler

FehlercodeBeschreibung
ara::exec::ExecErrc::kOperationCanceledno_rollback_semantics if transition to the requested Function Group state was cancelled by a newer request. Recovery: Try again (error is informative, does not indicate a problem)
ara::exec::ExecErrc::kOperationFailedno_rollback_semantics if transition to the requested Function Group state failed. Recovery: Try transition to another state
ara::exec::ExecErrc::kNoCommunicationno_rollback_semantics if StateClient can’t communicate with Execution Management (e.g. IPC link is down). Rovery: Try again
ara::exec::ExecErrc::kInvalidTransitionrollback_semantics if transition to the requested state is prohibited (e.g. Off state for MachineFG) or the requested Function Group State is invalid (e.g. does not exist anymore after a software update). Recovery: Eventually try transition to another state
ara::exec::ExecErrc::kIntegrityOrAuthenticityCheckFailedno_rollback_semantics if an integrity or authenticity check failed during state transition. Recovery: transition to another state
ara::exec::ExecErrc::kUnexpectedTerminationno_rollback_semantics One of the processes terminated in an unexpected way during the state transition. Recovery: transition to another state
ara::exec::ExecErrc::kInvalidMetaModelIdentifierrollback_semantics The given Function Group State couldn’t be found in the Processed Manifest or Process does not have a mapping to the Function Group of the requested Function Group State. Recovery: transition to another state
Hinweise: Asynchronous nature of ara::exec::StateClient::SetState makes the returned ara:: core::Future dependable on lifetime of the instance from which it was received. It is expected that once state change request is received by Execution Management, it will be processed independently of lifetime of the instance from which it was requested. Please note that the qualified short names representing Function Groups and Function Group States could be quite long. They can be replaced by implementation specific data types to speed up any checks that have to be performed by the ara::exec::StateClient:: SetState method. This is enabled by the ara::exec::FunctionGroupState data-type.

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

Record
AUTOSAR/AP/record/SWS_EM_02278
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_EM_02278@rel:R25-11#d775b6ca
Content hash
d775b6ca
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_ExecutionManagement.pdf#nameddest=SWS_EM_02278
Status: valid/unmigrated Version: rel:R25-11#af874de7 Versionshistorie & Revisions (1 transition, 8 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_EM_02278@rel:R25-11#af874de7
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#d775b6ca2026-09-30
  • R19-11rel:R19-11#8cf69c292026-10-14
  • R20-11rel:R20-11#a14424692026-10-14
  • R21-11rel:R21-11#b0e586f52026-10-14
  • R22-11rel:R22-11#2527e4232026-10-14
  • R23-11rel:R23-11#716a2bc42026-10-14
  • R24-11rel:R24-11#16e40bce2026-10-14
  • R25-11rel:R25-11#af874de72026-10-14 active
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

function StateClient [SWS_EM_02561] Upstream: RS_EM_00101, RS_AP_00114, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00151, RS_AP_00159

StateClient (std::function< void(const ara::exec::ExecutionErrorEvent &)> undefinedStateCallback) noexcept(false);

Regular constructor for StateClient.

Header-Datei#include "ara/exec/state_client.h"
Scopeclass ara::exec::StateClient
Exception-Sicherheitnot exception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
undefinedStateCallbackcallback to be invoked by StateClient library if a FunctionGroup changes its state unexpectedly to an Undefined Function Group State, i.e. without previous request by SetState(). The affected FunctionGroup and ExecutionError is provided as an argument to the callback in form of ExecutionErrorEvent Lifetime: it is expected that undefinedStateCallback remains callable, during entire lifetime of the StateClient instance. This is especially important if, undefinedStateCallback is bound to an instance of a class (e.g. using std::bind).

Fehler

FehlercodeBeschreibung
ara::exec::ExecErrc::kNoCommunicationno_rollback_semantics Communication error occurred. Recovery: try again
ara::exec::ExecErrc::kInvalidArgumentrollback_semantics Given undefinedStateCallback doesn’t contain a callable function. Recovery: change argument

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

Record
AUTOSAR/AP/record/SWS_EM_02561
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_EM_02561@rel:R25-11#e701fca1
Content hash
e701fca1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_ExecutionManagement.pdf#nameddest=SWS_EM_02561
Status: valid/unmigrated Version: rel:R25-11#3cf40e7b 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_EM_02561@rel:R25-11#3cf40e7b
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#e701fca12026-09-30
  • R23-11rel:R23-11#58978f772026-10-14
  • R24-11rel:R24-11#d3b259de2026-10-14
  • R25-11rel:R25-11#3cf40e7b2026-10-14 active
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

function StateClient [SWS_EM_02565] Upstream: RS_AP_00145, RS_EM_00103

StateClient (const StateClient &)=delete;

Suppress default copy construction for StateClient.

Header-Datei#include "ara/exec/state_client.h"
Scopeclass ara::exec::StateClient

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

Record
AUTOSAR/AP/record/SWS_EM_02565
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_EM_02565@rel:R25-11#8b4c0379
Content hash
8b4c0379
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_ExecutionManagement.pdf#nameddest=SWS_EM_02565
Status: valid/unmigrated Version: rel:R25-11#76bf0ec8 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_EM_02565@rel:R25-11#76bf0ec8
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#8b4c03792026-09-30
  • R23-11rel:R23-11#a637858c2026-10-14
  • R24-11rel:R24-11#76bf0ec82026-10-14
  • R25-11rel:R25-11#76bf0ec82026-10-14 active
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

function StateClient [SWS_EM_02566] Upstream: RS_AP_00145, RS_AP_00151, RS_EM_00103, RS_AP_00159

StateClient (StateClient &&rval) noexcept;

Intentional use of move constructor for StateClient.

Header-Datei#include "ara/exec/state_client.h"
Scopeclass ara::exec::StateClient
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
rvalreference to move

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

Record
AUTOSAR/AP/record/SWS_EM_02566
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_EM_02566@rel:R25-11#4caec6e7
Content hash
4caec6e7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_ExecutionManagement.pdf#nameddest=SWS_EM_02566
Status: valid/unmigrated Version: rel:R25-11#1e24d943 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_EM_02566@rel:R25-11#1e24d943
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#4caec6e72026-09-30
  • R23-11rel:R23-11#235f0aa12026-10-14
  • R24-11rel:R24-11#58fab2f32026-10-14
  • R25-11rel:R25-11#1e24d9432026-10-14 active
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

function operator= [SWS_EM_02567] Upstream: RS_AP_00145, RS_AP_00151, RS_EM_00103, RS_AP_00159

StateClient & operator= (StateClient &&rval) noexcept;

Intentional use of move assignment for StateClient.

Header-Datei#include "ara/exec/state_client.h"
Scopeclass ara::exec::StateClient
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Parameter (in)

ParameterBeschreibung
rvalreference to move

Rückgabewert

TypBeschreibung
StateClient &the new reference

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

Record
AUTOSAR/AP/record/SWS_EM_02567
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_EM_02567@rel:R25-11#a46b6229
Content hash
a46b6229
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_ExecutionManagement.pdf#nameddest=SWS_EM_02567
Status: valid/unmigrated Version: rel:R25-11#4f4cb0dc 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_EM_02567@rel:R25-11#4f4cb0dc
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#a46b62292026-09-30
  • R23-11rel:R23-11#960ab2862026-10-14
  • R24-11rel:R24-11#f17786252026-10-14
  • R25-11rel:R25-11#4f4cb0dc2026-10-14 active
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

function operator= [SWS_EM_02568] Upstream: RS_AP_00145, RS_EM_00103

StateClient & operator= (const StateClient &)=delete;

Suppress default copy assignment for StateClient.

Header-Datei#include "ara/exec/state_client.h"
Scopeclass ara::exec::StateClient

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

Record
AUTOSAR/AP/record/SWS_EM_02568
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_EM_02568@rel:R25-11#5db14cb9
Content hash
5db14cb9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_ExecutionManagement.pdf#nameddest=SWS_EM_02568
Status: valid/unmigrated Version: rel:R25-11#47d79fd3 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_EM_02568@rel:R25-11#47d79fd3
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#5db14cb92026-09-30
  • R23-11rel:R23-11#c40c9f462026-10-14
  • R24-11rel:R24-11#47d79fd32026-10-14
  • R25-11rel:R25-11#47d79fd32026-10-14 active
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

function ~StateClient [SWS_EM_02277] Upstream: RS_AP_00134, RS_AP_00145, RS_EM_00101

~StateClient () noexcept;

noexcept destructor

Header-Datei#include "ara/exec/state_client.h"
Scopeclass ara::exec::StateClient
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

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

Record
AUTOSAR/AP/record/SWS_EM_02277
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_EM_02277@rel:R25-11#53c37754
Content hash
53c37754
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_ExecutionManagement.pdf#nameddest=SWS_EM_02277
Status: valid/unmigrated Version: rel:R25-11#1097d76c Versionshistorie & Revisions (1 transition, 8 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_EM_02277@rel:R25-11#1097d76c
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#53c377542026-09-30
  • R19-11rel:R19-11#a750219c2026-10-14
  • R20-11rel:R20-11#be8e6c2d2026-10-14
  • R21-11rel:R21-11#8b1882202026-10-14
  • R22-11rel:R22-11#2e48894a2026-10-14
  • R23-11rel:R23-11#5ce3bed22026-10-14
  • R24-11rel:R24-11#a75a8bdb2026-10-14
  • R25-11rel:R25-11#1097d76c2026-10-14 active
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