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 上的进程。
AI 生成 未审核 模型: 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() 进行创建时,必须注册一个针对非预期未定义状态的全局有效回调 [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] 创建。两种构造路径都强制要求一个类型为 std::function<void(const ara::exec::ExecutionErrorEvent&)> 的回调参数 undefinedStateCallback。当功能组在未事先由 SetState() 请求的情况下意外切换到未定义状态时,该回调由 StateClient 库触发。调用方必须确保该回调在 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 通过 Create() [SWS_EM_02276] 指定有效的错误信号回调来实例化 StateClient。
  2. 查询初始启动结果:State Management 使用 GetInitialMachineStateTransitionResult() 请求进入 Startup 状态的初始状态转换结果 [SWS_EM_02279]。由于此转换在 Machine 的每个生命周期中恰好发生一次,因此所提供的 ara::core::Future<void> 保持稳定,直到重新启动前都不会改变。
  3. 请求状态切换:State Management 借助 SetState() 为单个功能组请求异步状态转换 [SWS_EM_02278]。该方法立即返回,并提供一个用于查询完成情况的 ara::core::Future<void>。一旦请求到达 Execution Management,它的执行将独立于调用方实例的后续生命周期。
  4. 调查错误状态:如果功能组意外进入未定义状态,可以通过 GetExecutionError() 以 ara::exec::ExecutionErrorEvent 的形式确定触发该状态的执行错误 [SWS_EM_02542]。
使用 ara::exec::StateClient 的典型使用流程State 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() 报告 [SWS_EM_02276]、[SWS_EM_02561]。
  • ExecErrc::kOperationCanceled:在 SetState() 中表示正在进行的转换已被较新的请求中止 [SWS_EM_02278]。在 GetInitialMachineStateTransitionResult() 中,如果初始启动转换被中止(例如由于中断的 Machine 更新序列),则会出现此错误 [SWS_EM_02279]。
  • ExecErrc::kInvalidTransition:请求的状态转换是不允许的,例如转换到 MachineFG 的 Off 状态,或者该状态在更新后不再存在 [SWS_EM_02278]。
  • ExecErrc::kInvalidMetaModelIdentifier:传入的状态在已处理的 Manifest 中不存在,或者进程没有针对相关功能组的映射 [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的规范要求。

成员图

类图

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

noexcept destructor

~StateClient () noexcept;

方法

Create 函数

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 函数

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.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 86cbb8f72d61 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

静态工厂方法 Create 用作具名构造函数(Named Constructor),以创建 ara::exec::StateClient 的实例([SWS_EM_02276])。undefinedStateCallback 作为必填参数传入。当功能组意外地——即未事先通过 SetState() 请求——转换到未定义状态时,该回调由客户端库触发([SWS_EM_02276])。此时,受影响的功能组和错误将通过 ExecutionErrorEvent 传递给该回调。

对于调用上下文和生命周期,适用固定的框架条件:

  • 该函数是 thread-safe、exception-safe 并被声明为 noexcept([SWS_EM_02276])。
  • 在所创建的 StateClient 实例的整个生命周期内,传入的 undefinedStateCallback 必须保持可调用([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]))的初始化方法,后者同样通过具名构造函数并带有必选回调来创建。

本使用说明基于 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#3867dcad
Content hash
3867dcad
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#2ccda943
Content hash
2ccda943
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#641316d3
Content hash
641316d3
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.

AI 生成 未审核 模型: 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 将提供来自 Exec-ErrorDomain 的错误 [SWS_EM_02278]。回滚语义适用于 ara::exec::ExecErrc::kInvalidTransition(例如,对于像 MachineFG 的 Off 状态这样的禁止转换)以及 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]。

此文本由 AI 创建;准确性由编辑审核。

实现者指南即将推出(复杂度 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#8c969023
Content hash
8c969023
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#b74b6099
Content hash
b74b6099
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#316e51de
Content hash
316e51de
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#11301e79
Content hash
11301e79
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#2c09b463
Content hash
2c09b463
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#fba1fe43
Content hash
fba1fe43
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#cf238c03
Content hash
cf238c03
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