DEENESPTFRRUARHIKOZHNL

classe 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

Guide utilisateurGÉNÉRÉ PAR IA

Demande auprès de l'Execution Management des changements d'état pour des groupes de fonctions, afin de piloter des processus sur une Machine.
GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 3af3f18c3d39 Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

Demande auprès de l'Execution Management des changements d'état pour des groupes de fonctions, afin de piloter des processus sur une Machine.

L'interface ara::exec::StateClient permet au State Management de demander des changements d'état pour des groupes de fonctions auprès de l'Execution Management, afin de piloter l'exécution de processus assignés sur une Machine [SWS_EM_02278]. Lors de la création via Create(), un callback continuellement valide doit être enregistré pour les états indéfinis inattendus [SWS_EM_02276]. Outre des transitions d'état asynchrones, cette classe non copiable fournit des méthodes d'interrogation du résultat du démarrage de la Machine ainsi que d'analyse d'erreur lors d'erreurs d'exécution [SWS_EM_02279], [SWS_EM_02542].

Contexte

La classe ara::exec::StateClient constitue l'interface de l'Execution Management par laquelle le State Management demande et pilote les transitions d'état pour des groupes de fonctions (Function Groups). Le State Management utilise ce client pendant toute la durée de fonctionnement d'une Machine afin de démarrer ou d'arrêter des processus de manière ciblée. L'intégrateur affecte des composants logiciels à certains états d'un groupe de fonctions. Si le State Management souhaite exécuter ces logiciels, il demande via le StateClient auprès de l'Execution Management le passage à l'état de groupe de fonctions concerné ; l'arrêt s'effectue de manière analogue par une transition vers un état dans lequel le logiciel ne doit pas être actif [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

Diagramme de contexte : interaction entre State Management, StateClient et Execution Management. Sources : [SWS_EM_02276], [SWS_EM_02278]

Cycle de vie

Les instances de StateClient peuvent être créées soit via le constructeur nommé Create() [SWS_EM_02276] sous la forme d'un ara::core::Result<StateClient>, soit via le constructeur régulier StateClient() [SWS_EM_02561]. Ces deux voies de construction exigent impérativement un paramètre de callback undefinedStateCallback de type std::function<void(const ara::exec::ExecutionErrorEvent&)>. Ce callback est déclenché par la bibliothèque StateClient lorsqu'un groupe de fonctions passe de manière inattendue et sans demande préalable par SetState() dans un état indéfini. L'appelant doit s'assurer que ce callback reste appelable pendant toute la durée de vie de l'instance StateClient, ce qui est particulièrement pertinent lors de liaisons d'objets via std::bind [SWS_EM_02276], [SWS_EM_02561].

Les opérations de copie sont explicitement interdites pour StateClient : le constructeur de copie [SWS_EM_02565] ainsi que l'opérateur d'affectation par copie [SWS_EM_02568] sont tous deux supprimés (=delete). Un transfert de propriété est exclusivement possible par sémantique de déplacement via le constructeur de déplacement [SWS_EM_02566] et l'affectation par déplacement [SWS_EM_02567]. En matière de concurrence, les méthodes fonctionnelles telles que SetState(), GetExecutionError() et GetInitialMachineStateTransitionResult() ainsi que la création sont conçues pour être thread-safe [SWS_EM_02276], [SWS_EM_02278], [SWS_EM_02279], [SWS_EM_02542]. En revanche, les opérations de déplacement et le destructeur ~StateClient() ne sont pas thread-safe [SWS_EM_02277], [SWS_EM_02566], [SWS_EM_02567].

Parcours d'utilisation

Un cycle d'utilisation typique se divise en initialisation, interrogation du résultat de démarrage, changements d'état réguliers et surveillance des erreurs :

  1. Création : le State Management instancie StateClient en spécifiant un callback de signalement d'erreurs valide via Create() [SWS_EM_02276].
  2. Interroger le résultat initial du démarrage : avec GetInitialMachineStateTransitionResult(), le State Management demande le résultat de la transition d'état initiale vers l'état de startup [SWS_EM_02279]. Cette transition ayant lieu exactement une fois par cycle de vie de la Machine, le ara::core::Future<void> renvoyé reste stable et ne change plus jusqu'à un redémarrage.
  3. Demander un changement d'état : au moyen de SetState(), State Management ordonne des transitions d'état asynchrones pour des groupes de fonctions individuels [SWS_EM_02278]. La méthode retourne immédiatement et fournit un ara::core::Future<void> pour interroger l'achèvement. Dès que la demande est parvenue à Execution Management, elle est exécutée indépendamment de la durée de vie ultérieure de l'instance appelante.
  4. Analyser les états d'erreur : si un groupe de fonctions passe de manière inattendue dans un état indéfini, l'erreur d'exécution déclenchante peut être déterminée sous la forme d'un ara::exec::ExecutionErrorEvent via GetExecutionError() [SWS_EM_02542].
Déroulement d'utilisation typique avec ara::exec::StateClientState ManagementStateClientExecution ManagementCreate(undefinedStateCallback)Result<StateClient>Use Case: Initiales Hochlaufergebnis abfragenGetInitialMachineStateTransitionResult()Startup-Status anfragenStartup-ErgebnisFuture<void>Use Case: Zustandswechsel anfordernSetState(functionGroupState)Initier la transition d'étatFuture<void> (retour immédiat)Transition terminéeFuture-Ergebnis bereitgestelltUse Case: Surveillance des erreursoptUnerwarteter undefinierter ZustandundefinedStateCallback(ExecutionErrorEvent)GetExecutionError(functionGroupState)Result<ExecutionErrorEvent>

Diagramme de séquence : déroulement de la création, de l'interrogation de l'état initial, du changement d'état asynchrone et de l'analyse des erreurs. Sources : [SWS_EM_02276], [SWS_EM_02279], [SWS_EM_02278], [SWS_EM_02542]

Scénarios d'erreur

Les opérations de la classe communiquent les échecs via des codes d'erreur de ExecErrorDomain :

  • ExecErrc::kNoCommunication : signale des perturbations de communication avec Execution Management, par exemple en cas de connexion IPC interrompue. Se produit lors de Create() [SWS_EM_02276], SetState() [SWS_EM_02278], GetInitialMachineStateTransitionResult() [SWS_EM_02279] ainsi que GetExecutionError() [SWS_EM_02542]. La récupération prévue consiste en un nouvel appel.
  • ExecErrc::kInvalidArgument : est signalé par Create() et StateClient() si le callback transmis ne contient aucune fonction appelable [SWS_EM_02276], [SWS_EM_02561].
  • ExecErrc::kOperationCanceled : indique pour SetState() qu'une transition en cours a été interrompue par une demande plus récente [SWS_EM_02278]. Pour GetInitialMachineStateTransitionResult(), cette erreur survient lorsque la transition de démarrage initiale a été interrompue, par exemple par une séquence de Machine-Update interrompue [SWS_EM_02279].
  • ExecErrc::kInvalidTransition : la transition d'état demandée n'est pas autorisée, par exemple la transition vers l'état Off pour MachineFG, ou bien l'état n'existe plus après une mise à jour [SWS_EM_02278].
  • ExecErrc::kInvalidMetaModelIdentifier : l'état transmis n'existe pas dans le manifeste traité ou le processus ne possède pas de mappage vers le groupe de fonctions concerné [SWS_EM_02278], [SWS_EM_02542]. Si cette erreur survient lors de GetInitialMachineStateTransitionResult(), il manque au processus le mappage vers MachineFG, ce qui indique un problème de configuration [SWS_EM_02279].
  • ExecErrc::kOperationFailed : la transition a échoué [SWS_EM_02278]. Pour GetExecutionError(), le code indique que le groupe de fonctions ne se trouve pas dans un état indéfini et que le problème a probablement déjà été résolu [SWS_EM_02542].
  • ExecErrc::kIntegrityOrAuthenticityCheckFailed et ExecErrc::kUnexpectedTermination : échecs spécifiques pendant SetState() à la suite de contrôles d'intégrité ayant échoué ou de terminaisons inattendues de processus pendant la transition [SWS_EM_02278].

Ce guide est basé exclusivement sur les exigences de spécification d'AUTOSAR Adaptive R25-11.

Carte des membres

Diagramme de classes

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

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

Vue détaillée

Sélectionnez une entrée dans le plan.

Constructeurs et destructeur

StateClient fonction 3

Regular constructor for StateClient.

Surcharges 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 fonction

noexcept destructor

~StateClient () noexcept;

Méthodes

Create fonction

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 fonction

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;

Opérateurs

operator= fonction 2

Intentional use of move assignment for StateClient.

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

Documentation des méthodes

fonction 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.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : 86cbb8f72d61 Provenance Questions ouvertes (1)
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La méthode fabrique statique Create sert de constructeur nommé (Named Constructor) pour créer une instance de ara::exec::StateClient ([SWS_EM_02276]). undefinedStateCallback est transmis en tant que paramètre obligatoire. Ce rappel est déclenché par la bibliothèque cliente lorsqu'un groupe de fonctions passe de manière inattendue – c'est-à-dire sans demande préalable via SetState() – dans un état indéfini ([SWS_EM_02276]). À cette occasion, le groupe de fonctions concerné et l'erreur sont transmis au rappel via un ExecutionErrorEvent.

Des conditions-cadres strictes s'appliquent au contexte d'appel et à la durée de vie :

  • La fonction est thread-safe, exception-safe et déclarée comme noexcept ([SWS_EM_02276]).
  • Le undefinedStateCallback transmis doit rester invocable pendant toute la durée de vie de l'instance de StateClient créée ([SWS_EM_02276]). Cela requiert un soin particulier lors de liaisons à des instances d'objets (par exemple au moyen de std::bind).

L'instanciation s'effectue de manière synchrone et renvoie un ara::core::Result<StateClient> ([SWS_EM_02276]). En cas d'erreur, les codes d'erreur suivants sont définis :

  • ara::exec::ExecErrc::kInvalidArgument : est signalé lorsque l'argument transmis ne contient aucune fonction invocable (sémantique de rollback ; résolution par la fourniture d'une fonction valide) ([SWS_EM_02276]).
  • ara::exec::ExecErrc::kNoCommunication : signale une erreur de communication (sémantique sans rollback ; résolution par une nouvelle tentative) ([SWS_EM_02276]). Cela devrait vraisemblablement être dû à un échec de l'établissement de la connexion vers l'environnement d'exécution. Question Q-c312c2b5e7c3c7d0 (ouverte)

Le patron de construction correspond structurellement à l'approche d'initialisation de clients d'exécution apparentés tels que ara::exec::ExecutionClient ([SWS_EM_02562]), qui est également créé avec un rappel obligatoire via un constructeur nommé.

Cette note d'utilisation a été générée automatiquement sur la base des données de spécification d'AUTOSAR R25-11.

Guide de l'implémenteur à venir (complexité 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#25c221b8
Content hash
25c221b8
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

fonction 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#c6338ab4
Content hash
c6338ab4
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

fonction 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#331643c2
Content hash
331643c2
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

fonction 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.

GÉNÉRÉ PAR IA non vérifié Modèle : gemini-3.8-flash-medium · Effort : medium · Température : non réglable · Prompt : b3951f2f28ce Provenance
traduit du guide allemandgemini-3.8-flash-low · 2026-10-13 · Original allemand

La méthode SetState sert à demander la transition d’état pour un groupe de fonctions individuel auprès d’Execution Management [SWS_EM_02278]. L’appel s’effectue de manière asynchrone : la méthode déclenche le changement et retourne immédiatement avec un ara::core::Future<void> qui permet de déterminer le résultat de la transition [SWS_EM_02278]. Un FunctionGroupState est transmis en paramètre, qui identifie l’état cible au sein du groupe de fonctions conformément au métamodèle [SWS_EM_02278].

En cas d’échec de la transition, le Future fournit une erreur issue de l’ErrorDomain Exec [SWS_EM_02278]. Une sémantique de rollback s’applique pour ara::exec::ExecErrc::kInvalidTransition (par exemple lors de transitions interdites comme l’état Off pour MachineFG) et pour ara::exec::ExecErrc::kInvalidMetaModelIdentifier (en cas de mappage manquant ou de définition manquante dans le manifeste) [SWS_EM_02278]. Sont signalés sans sémantique de rollback : kOperationCanceled (évincé par une requête plus récente), kOperationFailed, kNoCommunication (connexion IPC perturbée), kIntegrityOrAuthenticityCheckFailed ainsi que kUnexpectedTermination [SWS_EM_02278].

La méthode est thread-safe et sûre vis-à-vis des exceptions (noexcept) [SWS_EM_02278]. Le ara::core::Future retourné dépend de la durée de vie de l’instance appelante ; en revanche, Execution Management traite la requête reçue indépendamment de la durée de vie de l’instance de StateClient [SWS_EM_02278].

En interaction avec l’instanciation via Create [SWS_EM_02276] ou le constructeur [SWS_EM_02561], un undefinedStateCallback intercepte les changements d’état inattendus qui surviennent sans appel préalable à SetState. Le résultat de la transition initiale vers l’état de démarrage peut être interrogé séparément via GetInitialMachineStateTransitionResult [SWS_EM_02279].

Ce texte a été généré par une IA ; l’exactitude est vérifiée par un éditeur.

Guide de l'implémenteur à venir (complexité 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#beefb606
Content hash
beefb606
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

fonction 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#e712101f
Content hash
e712101f
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

fonction 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#8e06712f
Content hash
8e06712f
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

fonction 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#ee354b8a
Content hash
ee354b8a
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

fonction 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#103e7e40
Content hash
103e7e40
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

fonction 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#9828dc2e
Content hash
9828dc2e
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

fonction ~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#ceb8ea47
Content hash
ceb8ea47
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