Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::com::helper::MachineState< T > Class Template Referenceabstract

Machine state abstract class. More...

#include <machine_state.h>

Inheritance diagram for ara::com::helper::MachineState< T >:
ara::com::someip::sd::fsm::TimerSetState< T > ara::com::someip::sd::fsm::InitialWaitState< helper::SdClientState > ara::com::someip::sd::fsm::RepetitionState< helper::SdClientState > ara::com::someip::sd::fsm::InitialWaitState< T > ara::com::someip::sd::fsm::RepetitionState< T > ara::com::someip::sd::fsm::ClientInitialWaitState ara::com::someip::sd::fsm::ClientRepetitionState

Public Member Functions

 MachineState (const MachineState &)=delete
 
MachineStateoperator= (const MachineState &)=delete
 
GetState () const noexcept
 Get the machine state. More...
 
virtual void Activate (T previousState)=0
 Activate the state. More...
 
void Register (AbstractStateMachine< T > *finiteStateMachine) noexcept
 Register the state to a finite state machine (FSM) More...
 

Protected Member Functions

virtual void Deactivate (T nextState)=0
 Deactivating the current state before transiting to the next state. More...
 
void Transit (T nextState)
 Transit to the next state. More...
 
 MachineState (T state) noexcept
 Constructor. More...
 

Detailed Description

template<typename T>
class ara::com::helper::MachineState< T >

Machine state abstract class.

Template Parameters
TState enumeration type
Note
A machine state is not copyable

Constructor & Destructor Documentation

◆ MachineState()

template<typename T >
ara::com::helper::MachineState< T >::MachineState ( state)
inlineprotectednoexcept

Constructor.

Parameters
stateMachine state enumeration

Member Function Documentation

◆ Activate()

◆ Deactivate()

◆ GetState()

template<typename T >
T ara::com::helper::MachineState< T >::GetState ( ) const
inlinenoexcept

Get the machine state.

Returns
Machine state enumeration

◆ Register()

template<typename T >
void ara::com::helper::MachineState< T >::Register ( AbstractStateMachine< T > *  finiteStateMachine)
inlinenoexcept

Register the state to a finite state machine (FSM)

Parameters
finiteStateMachineFinite state machine that contains the state

◆ Transit()

template<typename T >
void ara::com::helper::MachineState< T >::Transit ( nextState)
inlineprotected

Transit to the next state.

Parameters
nextStateNext state coming after the current state