Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::exec::StateClient Class Referencefinal

Class the enables State Management to interact with Execution Management. More...

#include <state_client.h>

Public Member Functions

 StateClient (std::function< void(const ExecutionErrorEvent &)> undefinedStateCallback, com::someip::rpc::RpcClient *rpcClient)
 Constructor. More...
 
std::shared_future< void > SetState (const FunctionGroupState &state)
 Set a function group state. More...
 
std::shared_future< void > GetInitialMachineStateTransitionResult ()
 Push the EM to its start-up state. More...
 
core::Result< ExecutionErrorEventGetExecutionError (const FunctionGroup &functionGroup) noexcept
 Get the execution error made the state of function group undefined. More...
 

Detailed Description

Class the enables State Management to interact with Execution Management.

Constructor & Destructor Documentation

◆ StateClient()

ara::exec::StateClient::StateClient ( std::function< void(const ExecutionErrorEvent &)>  undefinedStateCallback,
com::someip::rpc::RpcClient rpcClient 
)

Constructor.

Parameters
undefinedStateCallbackCallback to be invoked when a function group is unexpectedly terminated while state transition
rpcClientRPC client abstraction layer

Member Function Documentation

◆ GetExecutionError()

core::Result< ExecutionErrorEvent > ara::exec::StateClient::GetExecutionError ( const FunctionGroup functionGroup)
noexcept

Get the execution error made the state of function group undefined.

Parameters
functionGroupFunction group of interest
Returns
Result containing the execution error if the Undefined Function Group State exist, otherwise Failed Result

◆ GetInitialMachineStateTransitionResult()

std::shared_future< void > ara::exec::StateClient::GetInitialMachineStateTransitionResult ( )

Push the EM to its start-up state.

Returns
Void future unless an error occurs

◆ SetState()

std::shared_future< void > ara::exec::StateClient::SetState ( const FunctionGroupState state)

Set a function group state.

Parameters
stateFunction group-state of interest combination
Returns
Void future unless an error occurs