The MAUVE Toolchain
mauve::base::PeriodicStateMachine< SHELL, CORE > Struct Template Reference

Defines a Periodic State Machine. More...

#include <PeriodicStateMachine.hpp>

Inheritance diagram for mauve::base::PeriodicStateMachine< SHELL, CORE >:
Collaboration diagram for mauve::base::PeriodicStateMachine< SHELL, CORE >:

Public Attributes

runtime::Property< runtime::time_ns_t > & period
 Property to set the PSM period. More...
 

Protected Member Functions

virtual bool configure_hook () override
 Configure the PSM. More...
 
- Protected Member Functions inherited from mauve::runtime::FiniteStateMachine< SHELL, CORE >
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...
 

Additional Inherited Members

- Public Types inherited from mauve::runtime::FiniteStateMachine< SHELL, CORE >
using Guard_t = typename ExecState< CORE >::Guard_t
 
using Update_t = typename ExecState< CORE >::Update_t
 
- Public Member Functions inherited from mauve::runtime::FiniteStateMachine< SHELL, CORE >
 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
 

Detailed Description

template<typename SHELL, typename CORE>
struct mauve::base::PeriodicStateMachine< SHELL, CORE >

Defines a Periodic State Machine.

Template Parameters
SHELLShell type
CORECore type

Member Function Documentation

template<typename SHELL , typename CORE >
bool mauve::base::PeriodicStateMachine< SHELL, CORE >::configure_hook ( )
overrideprotectedvirtual

Configure the PSM.

Set the sync_state clock according to period.

Reimplemented from mauve::runtime::WithHook.

Member Data Documentation

template<typename SHELL, typename CORE>
runtime::Property<runtime::time_ns_t>& mauve::base::PeriodicStateMachine< SHELL, CORE >::period
Initial value:
=
this->mk_property("period", runtime::sec_to_ns(1))

Property to set the PSM period.