The MAUVE Toolchain
mauve::runtime::FiniteStateMachine< SHELL, CORE > Class Template Reference
Inheritance diagram for mauve::runtime::FiniteStateMachine< SHELL, CORE >:
Collaboration diagram for mauve::runtime::FiniteStateMachine< SHELL, CORE >:

Public Types

using Guard_t = typename ExecState< CORE >::Guard_t
 
using Update_t = typename ExecState< CORE >::Update_t
 

Public Member Functions

 FiniteStateMachine (FiniteStateMachine const &other)=delete
 
bool check_reachable () const
 
void cleanup () overridefinal
 Cleanup the object.
 
bool configure () overridefinal
 Configure the object.
 
std::string core_type_name () const override
 Get the type of the FSM core. More...
 
AbstractStateget_state (std::string const &name) const override
 Get a state of the FSM by name. More...
 
AbstractStateget_state (int index) const override
 Get a state of the FSM by state index. More...
 
int get_state_index (const AbstractState *state) const override
 Get a index of state in the FSM. More...
 
std::size_t get_states_size () const override
 
bool is_configured () const overridefinal
 Get the configuration status of the configurable object. More...
 
AbstractLoggerlogger () const override
 Get the logger.
 
FiniteStateMachine< SHELL, CORE > & operator= (FiniteStateMachine< SHELL, CORE > const &other)=delete
 
std::string shell_type_name () const override
 Get the type of the FSM shell. More...
 
- Public Member Functions inherited from mauve::runtime::AbstractFiniteStateMachine
 AbstractFiniteStateMachine ()
 Default constructor. More...
 
virtual ~AbstractFiniteStateMachine ()
 Default destructor. More...
 
std::string type_name () const
 Get the type of this FSM. More...
 
- Public Member Functions inherited from mauve::runtime::HasProperty
const std::vector< AbstractProperty * > get_properties () const
 Get the properties of the shell. More...
 
std::size_t get_properties_size () const
 
AbstractPropertyget_property (std::string const &name) const
 
AbstractPropertyget_property (int index) const
 

Protected Member Functions

CORE & core () const
 
ExecState< CORE > & mk_execution (std::string const &name, Update_t fun)
 
SynchroState< CORE > & mk_synchronization (std::string const &name, time_ns_t clock)
 
void mk_transition (ExecState< CORE > &state, Guard_t guard, State< CORE > &next)
 
void set_initial (State< CORE > &state)
 
void set_next (State< CORE > &state, State< CORE > &next)
 
SHELL & shell () const
 
- Protected Member Functions inherited from mauve::runtime::HasProperty
template<typename T >
Property< T > & mk_property (std::string const &name, T init_value)
 Create a new property. More...
 
- Protected Member Functions inherited from mauve::runtime::WithHook
virtual void cleanup_hook ()
 Hook function called when cleaning the shell. More...
 
virtual bool configure_hook ()
 Hook function called when configuring the shell. More...
 

Friends

template<typename S , typename C , typename F >
class Component
 

Member Function Documentation

template<typename SHELL , typename CORE >
std::string mauve::runtime::FiniteStateMachine< SHELL, CORE >::core_type_name ( ) const
overridevirtual

Get the type of the FSM core.

Returns
the type name of the core

Implements mauve::runtime::AbstractFiniteStateMachine.

template<typename SHELL , typename CORE >
AbstractState * mauve::runtime::FiniteStateMachine< SHELL, CORE >::get_state ( std::string const &  name) const
overridevirtual

Get a state of the FSM by name.

Returns
the AbstractState named "name" if exists (nullptr if not)

Implements mauve::runtime::AbstractFiniteStateMachine.

template<typename SHELL , typename CORE >
AbstractState * mauve::runtime::FiniteStateMachine< SHELL, CORE >::get_state ( int  index) const
overridevirtual

Get a state of the FSM by state index.

Returns
the AbstractState if exists (nullptr if not)

Implements mauve::runtime::AbstractFiniteStateMachine.

template<typename SHELL , typename CORE >
int mauve::runtime::FiniteStateMachine< SHELL, CORE >::get_state_index ( const AbstractState state) const
overridevirtual

Get a index of state in the FSM.

Returns
index if exists (-1 if not)

Implements mauve::runtime::AbstractFiniteStateMachine.

template<typename SHELL, typename CORE>
std::size_t mauve::runtime::FiniteStateMachine< SHELL, CORE >::get_states_size ( ) const
inlineoverridevirtual
Returns
Get the states number

Implements mauve::runtime::AbstractFiniteStateMachine.

template<typename SHELL, typename CORE>
bool mauve::runtime::FiniteStateMachine< SHELL, CORE >::is_configured ( ) const
inlinefinaloverridevirtual

Get the configuration status of the configurable object.

Returns
true if the object is configured

Implements mauve::runtime::Configurable.

template<typename SHELL , typename CORE >
std::string mauve::runtime::FiniteStateMachine< SHELL, CORE >::shell_type_name ( ) const
overridevirtual

Get the type of the FSM shell.

Returns
the type name of the shell

Implements mauve::runtime::AbstractFiniteStateMachine.