Machine state abstract class. More...
#include <machine_state.h>
Public Member Functions | |
MachineState (const MachineState &)=delete | |
MachineState & | operator= (const MachineState &)=delete |
T | 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... | |
Machine state abstract class.
T | State enumeration type |
|
inlineprotectednoexcept |
Constructor.
state | Machine state enumeration |
|
pure virtual |
Activate the state.
previousState | Previous state before transiting to this state |
Implemented in ara::com::someip::pubsub::fsm::NotSubscribedState, ara::com::someip::pubsub::fsm::ServiceDownState, ara::com::someip::pubsub::fsm::SubscribedState, ara::com::someip::sd::fsm::ClientInitialWaitState, ara::com::someip::sd::fsm::ClientRepetitionState, ara::com::someip::sd::fsm::ServiceNotseenState, ara::com::someip::sd::fsm::ServiceReadyState, ara::com::someip::sd::fsm::ServiceSeenState, ara::com::someip::sd::fsm::StoppedState, ara::com::someip::sd::fsm::NotReadyState, ara::com::someip::sd::fsm::TimerSetState< helper::SdServerState >, and ara::com::someip::sd::fsm::TimerSetState< T >.
|
protectedpure virtual |
Deactivating the current state before transiting to the next state.
nextState | Next state coming after deactivation |
Implemented in ara::com::someip::pubsub::fsm::NotSubscribedState, ara::com::someip::pubsub::fsm::ServiceDownState, ara::com::someip::pubsub::fsm::SubscribedState, ara::com::someip::sd::fsm::ServiceNotseenState, ara::com::someip::sd::fsm::ServiceReadyState, ara::com::someip::sd::fsm::ServiceSeenState, ara::com::someip::sd::fsm::StoppedState, ara::com::someip::sd::fsm::NotReadyState, ara::com::someip::sd::fsm::TimerSetState< helper::SdServerState >, and ara::com::someip::sd::fsm::TimerSetState< T >.
|
inlinenoexcept |
Get the machine state.
|
inlinenoexcept |
Register the state to a finite state machine (FSM)
finiteStateMachine | Finite state machine that contains the state |
|
inlineprotected |
Transit to the next state.
nextState | Next state coming after the current state |