DEENESPTFRRUARHIKOZHNL

класс 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

Руководство пользователяСОЗДАНО ИИ

Запрашивает у Execution Management смену состояний для групп функций для управления процессами на Machine.
СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: 3af3f18c3d39 Происхождение
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Запрашивает у Execution Management смену состояний для групп функций для управления процессами на Machine.

Интерфейс ara::exec::StateClient позволяет State Management запрашивать у Execution Management смену состояний для групп функций, чтобы управлять выполнением назначенных процессов на Machine [SWS_EM_02278]. При создании через Create() должен быть зарегистрирован непрерывно действительный callback для неожиданных неопределенных состояний [SWS_EM_02276]. Наряду с асинхронными переходами состояний этот некопируемый класс предоставляет методы для запроса результата запуска Machine, а также для анализа ошибок при сбоях выполнения [SWS_EM_02279], [SWS_EM_02542].

Контекст

Класс ara::exec::StateClient образует интерфейс Execution Management, через который State Management запрашивает переходы состояний для групп функций (Function Groups) и управляет ими. State Management использует этот клиент в течение всего времени работы Machine для целенаправленного запуска или завершения процессов. Интегратор назначает программные компоненты определенным состояниям группы функций. Если State Management требуется запустить это программное обеспечение, оно запрашивает через StateClient у Execution Management переход в соответствующее состояние группы функций; остановка выполняется аналогично путем перехода в состояние, в котором это программное обеспечение не должно быть активно [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

Контекстная диаграмма: взаимодействие между State Management, StateClient и Execution Management. Источники: [SWS_EM_02276], [SWS_EM_02278]

Жизненный цикл

Экземпляры StateClient могут создаваться либо через именованный конструктор Create() [SWS_EM_02276] как ara::core::Result<StateClient>, либо через обычный конструктор StateClient() [SWS_EM_02561]. Оба пути конструирования обязательно требуют параметр обратного вызова undefinedStateCallback типа std::function<void(const ara::exec::ExecutionErrorEvent&)>. Этот callback вызывается библиотекой StateClient, если группа функций неожиданно и без предварительного запроса со стороны SetState() переходит в неопределенное состояние. Вызывающая сторона должна гарантировать, что этот callback остается доступным для вызова на протяжении всего времени жизни экземпляра StateClient, что особенно важно при привязках объектов через std::bind [SWS_EM_02276], [SWS_EM_02561].

Операции копирования для StateClient явно запрещены: как конструктор копирования [SWS_EM_02565], так и оператор присваивания с копированием [SWS_EM_02568] удалены (=delete). Передача владения возможна исключительно через семантику перемещения с помощью конструктора перемещения [SWS_EM_02566] и присваивания с перемещением [SWS_EM_02567]. Что касается параллелизма, прикладные методы, такие как SetState(), GetExecutionError() и GetInitialMachineStateTransitionResult(), а также создание спроектированы потокобезопасными [SWS_EM_02276], [SWS_EM_02278], [SWS_EM_02279], [SWS_EM_02542]. Напротив, операции перемещения и деструктор ~StateClient() не являются потокобезопасными [SWS_EM_02277], [SWS_EM_02566], [SWS_EM_02567].

Путь использования

Типичный жизненный цикл применения подразделяется на инициализацию, запрос результата запуска, штатную смену состояний и мониторинг ошибок:

  1. Создание: State Management создает экземпляр StateClient с указанием действительного callback сигнализации об ошибках через Create() [SWS_EM_02276].
  2. Запрос начального результата запуска: с помощью GetInitialMachineStateTransitionResult() State Management запрашивает результат начального перехода состояния в состояние Startup [SWS_EM_02279]. Поскольку этот переход происходит ровно один раз за жизненный цикл Machine, возвращаемый ara::core::Future<void> остается стабильным и больше не изменяется до перезапуска.
  3. Запрос смены состояния: с помощью SetState() State Management заказывает асинхронные переходы состояний для отдельных групп функций [SWS_EM_02278]. Метод немедленно возвращает управление и возвращает ara::core::Future<void> для опроса завершения. Как только поручение поступило в Execution Management, оно выполняется независимо от дальнейшего времени жизни вызывающего экземпляра.
  4. Исследование ошибочных состояний: если группа функций неожиданно переходит в неопределенное состояние, через GetExecutionError() можно определить вызвавшую сбой ошибку выполнения в виде ara::exec::ExecutionErrorEvent [SWS_EM_02542].
Типичный сценарий использования с ara::exec::StateClientState ManagementStateClientExecution ManagementCreate(undefinedStateCallback)Result<StateClient>Use Case: Initiales Hochlaufergebnis abfragenGetInitialMachineStateTransitionResult()Startup-Status anfragenStartup-ErgebnisFuture<void>Use Case: Zustandswechsel anfordernSetState(functionGroupState)Инициировать переход состоянияFuture<void> (немедленный возврат)Переход завершенFuture-Ergebnis bereitgestelltUse Case: Мониторинг ошибокoptUnerwarteter undefinierter ZustandundefinedStateCallback(ExecutionErrorEvent)GetExecutionError(functionGroupState)Result<ExecutionErrorEvent>

Диаграмма последовательности: процесс создания, запроса начального состояния, асинхронной смены состояния и анализа ошибок. Источники: [SWS_EM_02276], [SWS_EM_02279], [SWS_EM_02278], [SWS_EM_02542]

Сценарии ошибок

Операции класса сообщают о сбоях через коды ошибок ExecErrorDomain:

  • ExecErrc::kNoCommunication: сигнализирует о сбоях связи с Execution Management, например, при прерывании IPC-соединения. Возникает при Create() [SWS_EM_02276], SetState() [SWS_EM_02278], GetInitialMachineStateTransitionResult() [SWS_EM_02279], а также GetExecutionError() [SWS_EM_02542]. Предусмотренное восстановление заключается в повторном вызове.
  • ExecErrc::kInvalidArgument: сообщается со стороны Create() и StateClient(), если переданный callback не содержит вызываемой функции [SWS_EM_02276], [SWS_EM_02561].
  • ExecErrc::kOperationCanceled: указывает в случае SetState() на то, что выполняющийся переход был отменен более новым запросом [SWS_EM_02278]. В случае GetInitialMachineStateTransitionResult() эта ошибка возникает, если начальный переход запуска был прерван, например, из-за прерванной последовательности обновления Machine [SWS_EM_02279].
  • ExecErrc::kInvalidTransition: запрошенный переход состояния недопустим, например, переход в состояние Off для MachineFG, или состояние больше не существует после обновления [SWS_EM_02278].
  • ExecErrc::kInvalidMetaModelIdentifier: переданное состояние не существует в обработанном манифесте или у процесса отсутствует сопоставление (mapping) с соответствующей группой функций [SWS_EM_02278], [SWS_EM_02542]. Если эта ошибка возникает при GetInitialMachineStateTransitionResult(), у процесса отсутствует сопоставление с MachineFG, что указывает на проблему конфигурации [SWS_EM_02279].
  • ExecErrc::kOperationFailed: переход завершился неудачно [SWS_EM_02278]. В случае GetExecutionError() код указывает на то, что группа функций не находится в неопределенном состоянии и проблема, предположительно, уже устранена [SWS_EM_02542].
  • ExecErrc::kIntegrityOrAuthenticityCheckFailed и ExecErrc::kUnexpectedTermination: специфические сбои во время SetState() вследствие неудавшихся проверок целостности или неожиданных завершений процессов во время перехода [SWS_EM_02278].

Настоящее руководство основано исключительно на требованиях спецификации AUTOSAR Adaptive R25-11.

Карта членов

Конструкторы и деструктор

2

Операторы

1

Диаграмма классов

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

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

Подробный вид

Выберите элемент в оглавлении.

Конструкторы и деструктор

StateClient функция 3

Regular constructor for StateClient.

Перегрузки 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 функция

noexcept destructor

~StateClient () noexcept;

Методы

Create функция

Named constructor for StateClient.

static ara::core::Result< StateClient > Create (std::function< void(const ara::exec::ExecutionErrorEvent &)> undefinedStateCallback) noexcept;
GetExecutionError функция

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 функция

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;

Операторы

operator= функция 2

Intentional use of move assignment for StateClient.

Перегрузки = 2
StateClient & operator= (StateClient &&rval) noexcept; SWS_EM_02567
StateClient & operator= (const StateClient &)=delete; SWS_EM_02568

Документация методов

функция 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.

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: 86cbb8f72d61 Происхождение Открытые вопросы (1)
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Статический фабричный метод Create служит именованным конструктором для создания экземпляра ara::exec::StateClient ([SWS_EM_02276]). В качестве обязательного параметра передается undefinedStateCallback. Этот callback инициируется клиентской библиотекой, если группа функций неожиданно — то есть без предварительного запроса через SetState() — переходит в неопределенное состояние ([SWS_EM_02276]). При этом затронутая группа функций и ошибка передаются в callback через ExecutionErrorEvent.

Для контекста вызова и времени жизни действуют строгие рамочные условия:

  • Функция является thread-safe, exception-safe и объявлена как noexcept ([SWS_EM_02276]).
  • Переданный undefinedStateCallback должен оставаться доступным для вызова в течение всего времени жизни созданного экземпляра StateClient ([SWS_EM_02276]). Это требует особой внимательности при связывании с экземплярами объектов (например, с помощью std::bind).

Инстанцирование выполняется синхронно и возвращает ara::core::Result<StateClient> ([SWS_EM_02276]). В случае сбоя определены следующие коды ошибок:

  • ara::exec::ExecErrc::kInvalidArgument: выдается, если переданный аргумент не содержит вызываемой функции (семантика отката; устранение путем предоставления корректной функции) ([SWS_EM_02276]).
  • ara::exec::ExecErrc::kNoCommunication: сигнализирует об ошибке связи (семантика без отката; устранение путем повторной попытки) ([SWS_EM_02276]). Это, вероятно, связано с неудачной установкой соединения со средой выполнения. Вопрос Q-c312c2b5e7c3c7d0 (открытый)

Шаблон конструирования структурно соответствует подходу к инициализации родственных клиентов выполнения, таких как ara::exec::ExecutionClient ([SWS_EM_02562]), который также создается с обязательным callback через именованный конструктор.

Это указание по использованию сгенерировано автоматически на основе данных спецификации AUTOSAR R25-11.

Руководство разработчика реализации в подготовке (сложность 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#b6d9c9ce
Content hash
b6d9c9ce
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

функция 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#93f9319c
Content hash
93f9319c
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

функция 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#cd947a02
Content hash
cd947a02
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

функция 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.

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: b3951f2f28ce Происхождение
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Метод SetState служит для того, чтобы запросить переход состояния для отдельной функциональной группы у Execution Management [SWS_EM_02278]. Вызов выполняется асинхронно: метод инициирует смену и немедленно возвращает ara::core::Future<void>, с помощью которого можно определить результат перехода [SWS_EM_02278]. В качестве параметра передаётся FunctionGroupState, идентифицирующий целевое состояние внутри функциональной группы в соответствии с метамоделью [SWS_EM_02278].

Если переход завершается неудачно, Future возвращает ошибку из ErrorDomain Exec [SWS_EM_02278]. Семантика отката (rollback) действует при ara::exec::ExecErrc::kInvalidTransition (например, при запрещённых переходах, таких как состояние Off для MachineFG) и при ara::exec::ExecErrc::kInvalidMetaModelIdentifier (при отсутствии сопоставления или отсутствии определения в манифесте) [SWS_EM_02278]. Без семантики отката сообщаются kOperationCanceled (вытеснено более новым запросом), kOperationFailed, kNoCommunication (нарушено соединение IPC), kIntegrityOrAuthenticityCheckFailed, а также kUnexpectedTermination [SWS_EM_02278].

Метод является thread-safe и exception safe (noexcept) [SWS_EM_02278]. Возвращаемый ara::core::Future зависит от времени жизни вызывающего экземпляра; Execution Management, напротив, обрабатывает поступивший запрос независимо от времени жизни экземпляра StateClient [SWS_EM_02278].

Во взаимодействии с инстанцированием через Create [SWS_EM_02276] или конструктор [SWS_EM_02561] undefinedStateCallback перехватывает неожиданные смены состояния, происходящие без предварительного вызова SetState. Результат начального перехода в состояние Startup может быть запрошен отдельно через GetInitialMachineStateTransitionResult [SWS_EM_02279].

Этот текст был создан ИИ; правильность проверяется редактором.

Руководство разработчика реализации в подготовке (сложность 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#f69847c4
Content hash
f69847c4
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

функция 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#ed2fc04a
Content hash
ed2fc04a
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

функция 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#0a3583be
Content hash
0a3583be
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

функция 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#288b7a17
Content hash
288b7a17
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

функция 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#39e126ef
Content hash
39e126ef
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

функция 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#1be32577
Content hash
1be32577
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

функция ~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#bf48242f
Content hash
bf48242f
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