YARP
Yet Another Robot Platform
FSM::StateMachineBase Class Reference

Class StateMachineBase. More...

#include <yarp/manager/fsm.h>

+ Inheritance diagram for FSM::StateMachineBase:

Public Member Functions

 StateMachineBase ()
 
 ~StateMachineBase () override=default
 
StateBasecurrentState ()
 
void setInitState (StateBase *pState)
 
void addTransition (StateBase *source, Event *event, StateBase *target)
 
void castEvent (Event *event) override
 
- Public Member Functions inherited from FSM::IEventSink
 IEventSink ()=default
 
virtual ~IEventSink ()=default
 

Protected Member Functions

virtual void onTransition (StateBase *previous, Event *event, StateBase *current)
 Callback onTransition represents the change in the states. More...
 
virtual void onEventMissed (StateBase *state, Event *event)
 

Detailed Description

Class StateMachineBase.

Definition at line 109 of file fsm.h.

Constructor & Destructor Documentation

◆ StateMachineBase()

FSM::StateMachineBase::StateMachineBase ( )
inline

Definition at line 112 of file fsm.h.

◆ ~StateMachineBase()

FSM::StateMachineBase::~StateMachineBase ( )
overridedefault

Member Function Documentation

◆ addTransition()

void FSM::StateMachineBase::addTransition ( StateBase source,
Event event,
StateBase target 
)
inline

Definition at line 135 of file fsm.h.

◆ castEvent()

void FSM::StateMachineBase::castEvent ( Event event)
inlineoverridevirtual
Parameters
eventthe event

Implements FSM::IEventSink.

Definition at line 158 of file fsm.h.

◆ currentState()

StateBase* FSM::StateMachineBase::currentState ( )
inline

Definition at line 118 of file fsm.h.

◆ onEventMissed()

virtual void FSM::StateMachineBase::onEventMissed ( StateBase state,
Event event 
)
inlineprotectedvirtual

Definition at line 154 of file fsm.h.

◆ onTransition()

virtual void FSM::StateMachineBase::onTransition ( StateBase previous,
Event event,
StateBase current 
)
inlineprotectedvirtual

Callback onTransition represents the change in the states.

Reimplemented in yarp::manager::ExecMachine.

Definition at line 153 of file fsm.h.

◆ setInitState()

void FSM::StateMachineBase::setInitState ( StateBase pState)
inline

Definition at line 131 of file fsm.h.


The documentation for this class was generated from the following file: