DEENESPTFRRUARHIKOZHNL

klasse 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 GuideAI-GEGENEREERD

Verzoekt bij Execution Management toestandswijzigingen voor functiegroepen om processen op een Machine te besturen.
DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 3af3f18c3d39 Herkomst
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

Verzoekt bij Execution Management toestandswijzigingen voor functiegroepen om processen op een Machine te besturen.

De interface ara::exec::StateClient stelt State Management in staat om toestandswijzigingen voor functiegroepen aan te vragen bij Execution Management, om zo de uitvoering van toegewezen processen op een Machine te besturen [SWS_EM_02278]. Bij de aanmaak via Create() moet een continu geldige callback voor onverwachte ongedefinieerde toestanden worden geregistreerd [SWS_EM_02276]. Naast asynchrone toestandsovergangen biedt de niet-kopieerbare klasse methoden voor het opvragen van het opstartresultaat van de Machine en voor foutanalyse bij uitvoeringsfouten [SWS_EM_02279], [SWS_EM_02542].

Context

De klasse ara::exec::StateClient vormt de interface van Execution Management waarmee State Management toestandsovergangen voor functiegroepen (Function Groups) aanvraagt en bestuurt. State Management gebruikt deze client gedurende de gehele bedrijfstijd van een Machine om processen gericht te starten of te beëindigen. De integrator wijst softwarecomponenten toe aan specifieke toestanden van een functiegroep. Als State Management deze software wil uitvoeren, verzoekt het via de StateClient bij Execution Management om de overgang naar de betreffende functiegroeptoestand; het stoppen gebeurt analoog door overgang naar een toestand waarin de software niet actief behoort te zijn [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

Contextdiagram: samenspel tussen State Management, StateClient en Execution Management. Bronnen: [SWS_EM_02276], [SWS_EM_02278]

Levenscyclus

Instanties van StateClient kunnen worden aangemaakt via de benoemde constructor Create() [SWS_EM_02276] als ara::core::Result<StateClient> of via de reguliere constructor StateClient() [SWS_EM_02561]. Beide constructiepaden vereisen verplicht een callback-parameter undefinedStateCallback van het type std::function<void(const ara::exec::ExecutionErrorEvent&)>. Deze callback wordt door de StateClient-bibliotheek geactiveerd wanneer een functiegroep onverwacht en zonder voorafgaand verzoek door SetState() overgaat naar een ongedefinieerde toestand. De aanroeper moet ervoor zorgen dat deze callback gedurende de gehele levensduur van de StateClient-instantie aanroepbaar blijft, wat in het bijzonder relevant is bij objectbindingen via std::bind [SWS_EM_02276], [SWS_EM_02561].

Kopieerbewerkingen zijn voor StateClient expliciet uitgesloten: zowel de copy-constructor [SWS_EM_02565] als de copy-toewijzingsoperator [SWS_EM_02568] zijn verwijderd (=delete). Eigendomsoverdracht is uitsluitend mogelijk via move-semantiek met behulp van move-constructor [SWS_EM_02566] en move-toewijzing [SWS_EM_02567]. Met betrekking tot concurrency zijn de functionele methoden zoals SetState(), GetExecutionError() en GetInitialMachineStateTransitionResult() evenals de aanmaak thread-safe ontworpen [SWS_EM_02276], [SWS_EM_02278], [SWS_EM_02279], [SWS_EM_02542]. Daarentegen zijn de move-bewerkingen en de destructor ~StateClient() niet thread-safe [SWS_EM_02277], [SWS_EM_02566], [SWS_EM_02567].

Gebruikspad

Een typische applicatiecyclus is onderverdeeld in initialisatie, opvragen van het opstartresultaat, reguliere toestandswijzigingen en foutbewaking:

  1. Aanmaak: State Management instantieert StateClient onder opgave van een geldige callback voor foutsignalering via Create() [SWS_EM_02276].
  2. Initieel opstartresultaat opvragen: met GetInitialMachineStateTransitionResult() verzoekt State Management het resultaat van de initiële toestandsovergang naar de startup-toestand [SWS_EM_02279]. Omdat deze overgang exact één keer per levenscyclus van de Machine plaatsvindt, blijft de geleverde ara::core::Future<void> stabiel en verandert deze niet meer tot een herstart.
  3. Toestandswijziging aanvragen: Met SetState() vraagt State Management asynchrone toestandsovergangen aan voor afzonderlijke functiegroepen [SWS_EM_02278]. De methode keert direct terug en levert een ara::core::Future<void> op om de voltooiing op te vragen. Zodra de opdracht bij Execution Management is binnengekomen, wordt deze onafhankelijk van de verdere levensduur van de aanroepende instantie uitgevoerd.
  4. Fouttoestanden onderzoeken: Als een functiegroep onverwacht in een ongedefinieerde toestand terechtkomt, kan via GetExecutionError() de veroorzakende uitvoeringsfout in de vorm van een ara::exec::ExecutionErrorEvent worden bepaald [SWS_EM_02542].
Typisch gebruiksverloop met ara::exec::StateClientState ManagementStateClientExecution ManagementCreate(undefinedStateCallback)Result<StateClient>Use Case: Initiales Hochlaufergebnis abfragenGetInitialMachineStateTransitionResult()Startup-Status anfragenStartup-ErgebnisFuture<void>Use Case: Zustandswechsel anfordernSetState(functionGroupState)Statusovergang initiërenFuture<void> (onmiddellijke teruggave)Overgang voltooidFuture-Ergebnis bereitgestelltUse Case: FoutbewakingoptUnerwarteter undefinierter ZustandundefinedStateCallback(ExecutionErrorEvent)GetExecutionError(functionGroupState)Result<ExecutionErrorEvent>

Sequentiediagram: verloop van aanmaak, opvragen van de begintoestand, asynchrone toestandswijziging en foutanalyse. Bronnen: [SWS_EM_02276], [SWS_EM_02279], [SWS_EM_02278], [SWS_EM_02542]

Foutscenario's

De bewerkingen van de klasse communiceren fouten via foutcodes van ExecErrorDomain:

  • ExecErrc::kNoCommunication: Signaleert communicatiestoringen naar Execution Management, bijvoorbeeld bij een verbroken IPC-verbinding. Treedt op bij Create() [SWS_EM_02276], SetState() [SWS_EM_02278], GetInitialMachineStateTransitionResult() [SWS_EM_02279] en GetExecutionError() [SWS_EM_02542]. Het beoogde herstel bestaat uit een herhaalde aanroep.
  • ExecErrc::kInvalidArgument: Wordt door Create() en StateClient() gemeld als de meegegeven callback geen aanroepbare functie bevat [SWS_EM_02276], [SWS_EM_02561].
  • ExecErrc::kOperationCanceled: Geeft bij SetState() aan dat een lopende overgang door een recentere aanvraag is afgebroken [SWS_EM_02278]. Bij GetInitialMachineStateTransitionResult() treedt deze fout op wanneer de initiële startovergang is afgebroken, bijvoorbeeld door een onderbroken machine-updatesequentie [SWS_EM_02279].
  • ExecErrc::kInvalidTransition: De aangevraagde toestandsovergang is niet toegestaan, bijvoorbeeld de overgang naar de toestand Off voor MachineFG, of de toestand bestaat na een update niet meer [SWS_EM_02278].
  • ExecErrc::kInvalidMetaModelIdentifier: De meegegeven toestand bestaat niet in het verwerkte manifest of het proces heeft geen mapping naar de desbetreffende functiegroep [SWS_EM_02278], [SWS_EM_02542]. Als deze fout optreedt bij GetInitialMachineStateTransitionResult(), ontbreekt bij het proces de mapping naar MachineFG, wat duidt op een configuratieprobleem [SWS_EM_02279].
  • ExecErrc::kOperationFailed: De overgang is mislukt [SWS_EM_02278]. Bij GetExecutionError() geeft de code aan dat de functiegroep zich niet in een ongedefinieerde toestand bevindt en het probleem vermoedelijk al is verholpen [SWS_EM_02542].
  • ExecErrc::kIntegrityOrAuthenticityCheckFailed en ExecErrc::kUnexpectedTermination: Specifieke mislukkingen tijdens SetState() als gevolg van mislukte integriteitscontroles of onverwachte procesbeëindigingen tijdens de transitie [SWS_EM_02278].

Deze handleiding is uitsluitend gebaseerd op de specificatievereisten van AUTOSAR Adaptive R25-11.

Ledenkaart

Klassendiagram

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

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

Detailweergave

Kies een item in de inhoudsopgave.

Constructors en destructor

StateClient functie 3

Regular constructor for StateClient.

Overloads 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 functie

noexcept destructor

~StateClient () noexcept;

Methoden

Create functie

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 functie

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= functie 2

Intentional use of move assignment for StateClient.

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

Documentatie van de methoden

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

DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: 86cbb8f72d61 Herkomst Open vragen (1)
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

De statische factory-methode Create dient als named constructor voor het aanmaken van een instantie van ara::exec::StateClient ([SWS_EM_02276]). Als verplichte parameter wordt undefinedStateCallback doorgegeven. Deze callback wordt door de client-bibliotheek geactiveerd wanneer een functiegroep onverwacht – dat wil zeggen zonder voorafgaand verzoek via SetState() – naar een ongedefinieerde toestand overgaat ([SWS_EM_02276]). Daarbij worden de getroffen functiegroep en de fout via een ExecutionErrorEvent aan de callback doorgegeven.

Voor aanroepcontext en levensduur gelden vaste randvoorwaarden:

  • De functie is thread-safe, exception-safe en gedeclareerd als noexcept ([SWS_EM_02276]).
  • De meegegeven undefinedStateCallback moet gedurende de gehele levensduur van de aangemaakte StateClient-instantie aanroepbaar blijven ([SWS_EM_02276]). Dit vereist bijzondere zorgvuldigheid bij bindingen aan objectinstanties (bijvoorbeeld met behulp van std::bind).

De instantiëring vindt synchroon plaats en levert een ara::core::Result<StateClient> op ([SWS_EM_02276]). In geval van een fout zijn de volgende foutcodes gedefinieerd:

  • ara::exec::ExecErrc::kInvalidArgument: Wordt gemeld wanneer het doorgegeven argument geen aanroepbare functie bevat (rollback-semantiek; verhelping door het aanbieden van een geldige functie) ([SWS_EM_02276]).
  • ara::exec::ExecErrc::kNoCommunication: Signaleert een communicatiefout (no-rollback-semantiek; verhelping door een nieuwe poging) ([SWS_EM_02276]). Dit zal vermoedelijk te herleiden zijn tot een mislukte verbindingsopbouw met de uitvoeringsomgeving. Vraag Q-c312c2b5e7c3c7d0 (open)

Het constructiepatroon komt structureel overeen met de initialisatie-aanpak van verwante uitvoeringsclients zoals ara::exec::ExecutionClient ([SWS_EM_02562]), die eveneens met een verplichte callback via een named constructor wordt aangemaakt.

Deze gebruiksinstructie is automatisch gegenereerd op basis van de specificatiegegevens van AUTOSAR R25-11.

Implementer's Guide volgt (complexiteit 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#80fa559d
Content hash
80fa559d
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

functie 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#9c1d0dab
Content hash
9c1d0dab
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

functie 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#300b0fa6
Content hash
300b0fa6
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

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

DOOR AI GEGENEREERD ongecontroleerd Model: gemini-3.8-flash-medium · Inspanning: medium · Temperatuur: niet regelbaar · Prompt: b3951f2f28ce Herkomst
vertaald uit de Duitse handleidinggemini-3.8-flash-low · 2026-10-13 · Duits origineel

De methode SetState dient ertoe om de toestandsovergang voor een afzonderlijke functiegroep bij het Execution Management aan te vragen [SWS_EM_02278]. De aanroep verloopt asynchroon: de methode initieert de overgang en keert onmiddellijk terug met een ara::core::Future<void>, waarmee het resultaat van de transitie kan worden achterhaald [SWS_EM_02278]. Als parameter wordt een FunctionGroupState doorgegeven, die de doeltoestand binnen de functiegroep conform het metamodel identificeert [SWS_EM_02278].

Als de transitie mislukt, levert de Future een fout uit de Exec-ErrorDomain [SWS_EM_02278] op. Een rollback-semantiek treedt in werking bij ara::exec::ExecErrc::kInvalidTransition (bijv. bij verboden overgangen zoals de Off-toestand voor MachineFG) en bij ara::exec::ExecErrc::kInvalidMetaModelIdentifier (bij ontbrekende mapping of ontbrekende definitie in het manifest) [SWS_EM_02278]. Zonder rollback-semantiek worden kOperationCanceled (verdrongen door een nieuwer verzoek), kOperationFailed, kNoCommunication (IPC-verbinding verstoord), kIntegrityOrAuthenticityCheckFailed en kUnexpectedTermination gemeld [SWS_EM_02278].

De methode is thread-safe en exception safe (noexcept) [SWS_EM_02278]. De geretourneerde ara::core::Future hangt af van de levensduur van de aanroepende instantie; Execution Management verwerkt het binnengekomen verzoek daarentegen onafhankelijk van de levensduur van de StateClient-instantie [SWS_EM_02278].

In samenspel met de instantiëring via Create [SWS_EM_02276] resp. de constructor [SWS_EM_02561] vangt een undefinedStateCallback onverwachte toestandsveranderingen op die optreden zonder voorafgaande aanroep van SetState. Het resultaat van de initiële overgang naar de opstarttoestand kan afzonderlijk via GetInitialMachineStateTransitionResult worden opgevraagd [SWS_EM_02279].

Deze tekst is opgesteld door een AI; de juistheid wordt gecontroleerd door een redacteur.

Implementer's Guide volgt (complexiteit 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#30761fcd
Content hash
30761fcd
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

functie 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#facaf671
Content hash
facaf671
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

functie 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#8810c706
Content hash
8810c706
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

functie 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#d4022d8d
Content hash
d4022d8d
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

functie 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#be87ef29
Content hash
be87ef29
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

functie 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#743f9c1c
Content hash
743f9c1c
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

functie ~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#e2ba97d0
Content hash
e2ba97d0
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