DEENESPTFRRUARHIKOZHNL

clase 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

Guía del usuarioGENERADO POR IA

Solicita a Execution Management cambios de estado para grupos de funciones con el fin de controlar procesos en una Machine.
GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 3af3f18c3d39 Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

Solicita a Execution Management cambios de estado para grupos de funciones con el fin de controlar procesos en una Machine.

La interfaz ara::exec::StateClient permite a State Management solicitar cambios de estado para grupos de funciones a Execution Management con el fin de controlar la ejecución de los procesos asignados en una Machine [SWS_EM_02278]. Durante la creación mediante Create() debe registrarse una retrollamada continuamente válida para estados no definidos inesperados [SWS_EM_02276]. Además de transiciones de estado asíncronas, la clase no copiable proporciona métodos para consultar el resultado del arranque de la Machine, así como para el análisis de fallos en caso de errores de ejecución [SWS_EM_02279], [SWS_EM_02542].

Contexto

La clase ara::exec::StateClient constituye la interfaz de Execution Management a través de la cual State Management solicita y controla las transiciones de estado para grupos de funciones (Function Groups). State Management utiliza este cliente durante todo el tiempo de funcionamiento de una Machine para iniciar o finalizar procesos de forma selectiva. El integrador asigna componentes de software a determinados estados de un grupo de funciones. Si State Management desea ejecutar este software, solicita a Execution Management el cambio al estado del grupo de funciones en cuestión a través de StateClient; la detención se realiza de forma análoga mediante la transición a un estado en el que el software no deba estar activo [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

Diagrama de contexto: interacción entre State Management, StateClient y Execution Management. Fuentes: [SWS_EM_02276], [SWS_EM_02278]

Ciclo de vida

Las instancias de StateClient pueden crearse bien mediante el constructor con nombre Create() [SWS_EM_02276] como ara::core::Result<StateClient>, o bien mediante el constructor regular StateClient() [SWS_EM_02561]. Ambas vías de construcción requieren obligatoriamente un parámetro de retrollamada undefinedStateCallback de tipo std::function<void(const ara::exec::ExecutionErrorEvent&)>. La biblioteca StateClient activa esta retrollamada cuando un grupo de funciones cambia de forma inesperada y sin solicitud previa por parte de SetState() a un estado no definido. El emisor de la llamada debe asegurarse de que esta retrollamada permanezca invocable a lo largo de toda la vida útil de la instancia de StateClient, lo cual resulta relevante en particular para las vinculaciones de objetos mediante std::bind [SWS_EM_02276], [SWS_EM_02561].

Las operaciones de copia están explícitamente prohibidas para StateClient: tanto el constructor de copia [SWS_EM_02565] como el operador de asignación por copia [SWS_EM_02568] están eliminados (=delete). La transferencia de la posesión solo es posible mediante semántica de movimiento a través del constructor de movimiento [SWS_EM_02566] y la asignación por movimiento [SWS_EM_02567]. En cuanto a la concurrencia, los métodos funcionales como SetState(), GetExecutionError() y GetInitialMachineStateTransitionResult(), así como la creación, están diseñados para ser seguros para hilos [SWS_EM_02276], [SWS_EM_02278], [SWS_EM_02279], [SWS_EM_02542]. Por el contrario, las operaciones de movimiento y el destructor ~StateClient() no son seguros para hilos [SWS_EM_02277], [SWS_EM_02566], [SWS_EM_02567].

Ruta de uso

Un ciclo de aplicación típico se divide en inicialización, consulta del resultado de arranque, cambios de estado regulares y supervisión de errores:

  1. Creación: State Management instancia StateClient especificando una retrollamada válida de señalización de errores mediante Create() [SWS_EM_02276].
  2. Consultar el resultado inicial de arranque: mediante GetInitialMachineStateTransitionResult(), State Management solicita el resultado de la transición de estado inicial al estado de inicio (Startup) [SWS_EM_02279]. Dado que esta transición tiene lugar exactamente una vez por ciclo de vida de la Machine, el ara::core::Future<void> entregado permanece estable y no vuelve a cambiar hasta un reinicio.
  3. Solicitar cambios de estado: mediante SetState(), State Management encarga transiciones de estado asíncronas para grupos de funciones individuales [SWS_EM_02278]. El método regresa inmediatamente y proporciona un ara::core::Future<void> para consultar la finalización. Una vez recibida la orden en Execution Management, se ejecuta con independencia de la vida útil posterior de la instancia invocadora.
  4. Examinar estados de error: si un grupo de funciones entra inesperadamente en un estado no definido, a través de GetExecutionError() se puede determinar el error de ejecución causante en forma de un ara::exec::ExecutionErrorEvent [SWS_EM_02542].
Flujo de uso típico con ara::exec::StateClientState ManagementStateClientExecution ManagementCreate(undefinedStateCallback)Result<StateClient>Use Case: Initiales Hochlaufergebnis abfragenGetInitialMachineStateTransitionResult()Startup-Status anfragenStartup-ErgebnisFuture<void>Use Case: Zustandswechsel anfordernSetState(functionGroupState)Iniciar transición de estadoFuture<void> (devolución inmediata)Transición completadaFuture-Ergebnis bereitgestelltUse Case: Monitorización de erroresoptUnerwarteter undefinierter ZustandundefinedStateCallback(ExecutionErrorEvent)GetExecutionError(functionGroupState)Result<ExecutionErrorEvent>

Diagrama de secuencia: flujo de creación, consulta del estado de inicio, cambio de estado asíncrono y análisis de errores. Fuentes: [SWS_EM_02276], [SWS_EM_02279], [SWS_EM_02278], [SWS_EM_02542]

Escenarios de error

Las operaciones de la clase comunican los fallos mediante códigos de error de ExecErrorDomain:

  • ExecErrc::kNoCommunication: Señala fallos de comunicación con Execution Management, por ejemplo en caso de una conexión IPC interrumpida. Se produce en Create() [SWS_EM_02276], SetState() [SWS_EM_02278], GetInitialMachineStateTransitionResult() [SWS_EM_02279] así como GetExecutionError() [SWS_EM_02542]. La recuperación prevista consiste en una nueva llamada.
  • ExecErrc::kInvalidArgument: Es notificado por Create() y StateClient() si la callback pasada no contiene una función invocable [SWS_EM_02276], [SWS_EM_02561].
  • ExecErrc::kOperationCanceled: Indica en SetState() que una transición en curso fue cancelada por una solicitud más reciente [SWS_EM_02278]. En GetInitialMachineStateTransitionResult(), este error ocurre si la transición inicial de arranque fue cancelada, por ejemplo debido a una secuencia interrumpida de actualización de la máquina (Machine Update) [SWS_EM_02279].
  • ExecErrc::kInvalidTransition: La transición de estado solicitada no es válida, por ejemplo la transición al estado Off para MachineFG, o el estado ya no existe tras una actualización [SWS_EM_02278].
  • ExecErrc::kInvalidMetaModelIdentifier: El estado pasado no existe en el manifiesto procesado o el proceso no posee mapeo hacia el grupo de funciones correspondiente [SWS_EM_02278], [SWS_EM_02542]. Si este error se produce en GetInitialMachineStateTransitionResult(), el proceso carece de mapeo a MachineFG, lo que apunta a un problema de configuración [SWS_EM_02279].
  • ExecErrc::kOperationFailed: La transición ha fallado [SWS_EM_02278]. En GetExecutionError(), el código indica que el grupo de funciones no se encuentra en un estado indefinido y que el problema probablemente ya se ha resuelto [SWS_EM_02542].
  • ExecErrc::kIntegrityOrAuthenticityCheckFailed y ExecErrc::kUnexpectedTermination: Fallos específicos durante SetState() como consecuencia de comprobaciones de integridad fallidas o terminaciones inesperadas de procesos durante la transición [SWS_EM_02278].

Esta guía se basa exclusivamente en los requisitos de especificación de AUTOSAR Adaptive R25-11.

Mapa de miembros

Diagrama de clases

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

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

Vista de detalle

Selecciona una entrada en el índice.

Constructores y destructor

StateClient función 3

Regular constructor for StateClient.

Sobrecargas 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 función

noexcept destructor

~StateClient () noexcept;

Métodos

Create función

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 función

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;

Operadores

operator= función 2

Intentional use of move assignment for StateClient.

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

Documentación de los métodos

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: 86cbb8f72d61 Procedencia Preguntas abiertas (1)
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

El método de fábrica estático Create sirve como constructor con nombre (Named Constructor) para crear una instancia de ara::exec::StateClient ([SWS_EM_02276]). Como parámetro obligatorio se pasa undefinedStateCallback. La biblioteca cliente activa este callback cuando un grupo de funciones cambia inesperadamente (es decir, sin una solicitud previa mediante SetState()) a un estado no definido ([SWS_EM_02276]). El grupo de funciones afectado y el error se transmiten al callback a través de un ExecutionErrorEvent.

Para el contexto de llamada y el ciclo de vida se aplican condiciones marco fijas:

  • La función es thread-safe, exception-safe y está declarada como noexcept ([SWS_EM_02276]).
  • El undefinedStateCallback pasado debe permanecer invocable durante toda la vida útil de la instancia de StateClient creada ([SWS_EM_02276]). Esto requiere especial cuidado en las vinculaciones a instancias de objetos (por ejemplo, mediante std::bind).

La instanciación se realiza de forma síncrona y devuelve un ara::core::Result<StateClient> ([SWS_EM_02276]). En caso de error, se definen los siguientes códigos de error:

  • ara::exec::ExecErrc::kInvalidArgument: Se notifica cuando el argumento pasado no contiene una función invocable (semántica de reversión; solución mediante el suministro de una función válida) ([SWS_EM_02276]).
  • ara::exec::ExecErrc::kNoCommunication: Señaliza un error de comunicación (semántica sin reversión; solución mediante reintento) ([SWS_EM_02276]). Es de suponer que esto se deba a un intento fallido de establecer conexión con el entorno de ejecución. Pregunta Q-c312c2b5e7c3c7d0 (abierta)

El patrón de diseño corresponde estructuralmente al enfoque de inicialización de clientes de ejecución relacionados como ara::exec::ExecutionClient ([SWS_EM_02562]), que también se crea con un callback obligatorio a través de un constructor con nombre (Named Constructor).

Esta nota de uso se generó automáticamente sobre la base de los datos de especificación de AUTOSAR R25-11.

Guía del implementador pendiente (complejidad 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#c8da5cb7
Content hash
c8da5cb7
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

función 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#158976d5
Content hash
158976d5
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

función 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#0f657655
Content hash
0f657655
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

función 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.

GENERADO POR IA no revisado Modelo: gemini-3.8-flash-medium · Esfuerzo: medium · Temperatura: no controlable · Prompt: b3951f2f28ce Procedencia
traducido de la guía alemanagemini-3.8-flash-low · 2026-10-13 · Original en alemán

El método SetState sirve para solicitar a Execution Management la transición de estado para un único grupo de funciones [SWS_EM_02278]. La llamada se realiza de forma asíncrona: el método inicia el cambio y regresa de inmediato con un ara::core::Future<void>, a través del cual se puede determinar el resultado de la transición [SWS_EM_02278]. Como parámetro se pasa un FunctionGroupState que identifica el estado de destino dentro del grupo de funciones conforme al metamodelo [SWS_EM_02278].

Si la transición falla, el Future devuelve un error del ErrorDomain Exec [SWS_EM_02278]. Se aplica una semántica de reversión (rollback) en ara::exec::ExecErrc::kInvalidTransition (p. ej., en transiciones prohibidas como el estado Off para MachineFG) y en ara::exec::ExecErrc::kInvalidMetaModelIdentifier (si falta el mapeo o la definición en el manifiesto) [SWS_EM_02278]. Sin semántica de reversión se notifican kOperationCanceled (desplazado por una solicitud más reciente), kOperationFailed, kNoCommunication (conexión IPC alterada), kIntegrityOrAuthenticityCheckFailed, así como kUnexpectedTermination [SWS_EM_02278].

El método es thread-safe y exception safe (noexcept) [SWS_EM_02278]. El ara::core::Future devuelto depende de la vida útil de la instancia que realiza la llamada; Execution Management, por el contrario, procesa la solicitud recibida con independencia de la vida útil de la instancia de StateClient [SWS_EM_02278].

En interacción con la instanciación mediante Create [SWS_EM_02276] o el constructor [SWS_EM_02561], un undefinedStateCallback intercepta cambios de estado inesperados que ocurren sin una llamada previa a SetState. El resultado de la transición inicial al estado de Startup se puede consultar por separado mediante GetInitialMachineStateTransitionResult [SWS_EM_02279].

Este texto fue creado por una IA; un editor comprueba su corrección.

Guía del implementador pendiente (complejidad 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#7883d18f
Content hash
7883d18f
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

función 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#240f07d0
Content hash
240f07d0
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

función 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#681832e5
Content hash
681832e5
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

función 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#3aa8f76d
Content hash
3aa8f76d
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

función 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#bd0e8f24
Content hash
bd0e8f24
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

función 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#8f7cdd07
Content hash
8f7cdd07
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

función ~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#b1261d21
Content hash
b1261d21
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