The MAUVE Toolchain
mauve::runtime::Component< SHELL, CORE, FSM > Class Template Reference

Component class. More...

#include <Component.hpp>

Inheritance diagram for mauve::runtime::Component< SHELL, CORE, FSM >:
Collaboration diagram for mauve::runtime::Component< SHELL, CORE, FSM >:

Public Member Functions

 Component (Component const &component)=delete
 
void cleanup () override
 Cleanup the object.
 
bool cleanup_core () override
 Clean up the Core.
 
bool cleanup_fsm () override
 Clean up the FSM.
 
bool cleanup_shell () override
 Clean up the shell.
 
bool clear () override
 Clear the component.
 
bool clear_core () override
 Clear the Core.
 
bool clear_fsm () override
 Clear the FSM.
 
bool clear_shell () override
 Clear the shell.
 
bool configure () override
 Configure the object.
 
bool configure_core () override
 Configure the Core.
 
bool configure_fsm () override
 Configure the FSM.
 
bool configure_shell () override
 Configure th shell.
 
CORE & core () const override
 Get the Core.
 
CORE * core_ptr () const overridefinal
 Get a pointer to the Core.
 
AbstractStatecurrent_state () override
 Get component current State.
 
void disconnect () override
 Disconnect the component.
 
FSM & fsm () const override
 Get the FSM.
 
AbstractCoreget_core () const override
 Get a pointer to the Core.
 
int get_cpu () const override
 Get the cpu mapping of the component task. More...
 
AbstractFiniteStateMachineget_fsm () const override
 Get a pointer to the FSM.
 
int get_priority () const override
 Get the priority of the component real-time task. More...
 
Shellget_shell () const override
 Get a pointer to the shell.
 
Taskget_task () const
 Get the task executing this component.
 
time_ns_t get_time () const override
 Get the component current time.
 
bool is_activated () const override
 Check if the component is activated.
 
bool is_configured () const override
 Get the configuration status of the configurable object. More...
 
bool is_created () const override
 Check if the component is created.
 
bool is_empty () const override
 Check if the component is empty (i.e. More...
 
bool is_empty_core () const override
 Check if the Core is empty.
 
bool is_empty_fsm () const override
 Check if the FSM is empty.
 
bool is_empty_shell () const override
 Check if the shell is empty.
 
bool is_running () const override
 Check if the component is running.
 
AbstractLoggerlogger () const override
 Get the logger.
 
template<typename... P>
bool make (P...parameters)
 
template<typename S , typename C , typename F , typename... P>
bool make (P...parameters)
 
template<typename... P>
bool make_core (P...parameters)
 
template<typename C , typename... P>
bool make_core (P...parameters)
 
template<typename... P>
bool make_fsm (P...parameters)
 
template<typename F , typename... P>
bool make_fsm (P...parameters)
 
template<typename... P>
bool make_shell (P...parameters)
 
template<typename S , typename... P>
bool make_shell (P...parameters)
 
Componentoperator& ()=delete
 
template<typename C , typename... P>
bool replace_core (P...parameters)
 
template<typename F , typename... P>
bool replace_fsm (P...parameters)
 
template<typename S , typename... P>
bool replace_shell (P...parameters)
 
bool set_cpu (int cpu) override
 Set the affinity of the task of the component to a single processor. More...
 
bool set_priority (int priority) override
 Sets the real-time task priority. More...
 
void set_task (Task *task) override
 Set the task executing this component.
 
SHELL & shell () const override
 Get the shell.
 
bool step () override
 Make one step on the component FSM.
 
- Public Member Functions inherited from mauve::runtime::AbstractComponent
 AbstractComponent (std::string const &name)
 Constructor. More...
 
virtual ~AbstractComponent ()
 Destructor.
 
std::string name () const overridefinal
 Get component name.
 
std::string type_name () const
 Get component type name.
 

Friends

class Architecture
 

Additional Inherited Members

- Protected Attributes inherited from mauve::runtime::AbstractComponent
ComponentLoggerlogger
 

Detailed Description

template<typename SHELL, typename CORE, typename FSM>
class mauve::runtime::Component< SHELL, CORE, FSM >

Component class.

A component is made of a Shell, a Core, and a FiniteStateMachine

Template Parameters
SHELLShell type
CORECore type
FSMFiniteStateMachine type

Member Function Documentation

template<typename SHELL, typename CORE, typename FSM>
int mauve::runtime::Component< SHELL, CORE, FSM >::get_cpu ( ) const
inlineoverridevirtual

Get the cpu mapping of the component task.

Returns
cpu mapping

Implements mauve::runtime::AbstractComponent.

template<typename SHELL, typename CORE, typename FSM>
int mauve::runtime::Component< SHELL, CORE, FSM >::get_priority ( ) const
inlineoverridevirtual

Get the priority of the component real-time task.

Returns
priority

Implements mauve::runtime::AbstractComponent.

template<typename SHELL , typename CORE , typename FSM >
bool mauve::runtime::Component< SHELL, CORE, FSM >::is_configured ( ) const
overridevirtual

Get the configuration status of the configurable object.

Returns
true if the object is configured

Implements mauve::runtime::Configurable.

template<typename SHELL , typename CORE , typename FSM >
bool mauve::runtime::Component< SHELL, CORE, FSM >::is_empty ( ) const
overridevirtual

Check if the component is empty (i.e.

not built)

Implements mauve::runtime::AbstractComponent.

template<typename SHELL , typename CORE , typename FSM >
bool mauve::runtime::Component< SHELL, CORE, FSM >::set_cpu ( int  cpu)
overridevirtual

Set the affinity of the task of the component to a single processor.

The cpu mapping can be changed iff the component is neither activated nor running. The default value is 0. Cpu id is checked.

Parameters
cpucpu mapping of the component task (0..nproc-1)
Returns
true if cpu mapping can be changed.

Implements mauve::runtime::AbstractComponent.

template<typename SHELL , typename CORE , typename FSM >
bool mauve::runtime::Component< SHELL, CORE, FSM >::set_priority ( int  priority)
overridevirtual

Sets the real-time task priority.

1 is the lowest priority and 99 the most prioritary. The priority can be changed iff the component is neither activated nor running. The default value is 1.  

Parameters
priorityin 1-99

Implements mauve::runtime::AbstractComponent.