The MAUVE Toolchain
mauve::runtime::AbstractComponent Class Referenceabstract

Abstract Component class. More...

#include <AbstractComponent.hpp>

Inheritance diagram for mauve::runtime::AbstractComponent:
Collaboration diagram for mauve::runtime::AbstractComponent:

Public Member Functions

 AbstractComponent (std::string const &name)
 Constructor. More...
 
virtual ~AbstractComponent ()
 Destructor.
 
virtual bool clear ()=0
 Clear the component.
 
virtual AbstractStatecurrent_state ()=0
 Get component current State.
 
virtual void disconnect ()=0
 Disconnect the component.
 
virtual int get_cpu () const =0
 Get the cpu mapping of the component task. More...
 
virtual int get_priority () const =0
 Get the priority of the component real-time task. More...
 
virtual time_ns_t get_time () const =0
 Get the component current time.
 
virtual bool is_activated () const =0
 Check if the component is activated.
 
virtual bool is_created () const =0
 Check if the component is created.
 
virtual bool is_empty () const =0
 Check if the component is empty (i.e. More...
 
virtual bool is_running () const =0
 Check if the component is running.
 
std::string name () const overridefinal
 Get component name.
 
virtual bool set_cpu (int cpu)=0
 Set the affinity of the task of the component to a single processor. More...
 
virtual bool set_priority (int priority)=0
 Sets the real-time task priority. More...
 
virtual bool step ()=0
 Make one step on the component FSM.
 
std::string type_name () const
 Get component type name.
 
- Public Member Functions inherited from mauve::runtime::Configurable
virtual void cleanup ()=0
 Cleanup the object.
 
virtual bool configure ()=0
 Configure the object.
 
virtual bool is_configured () const =0
 Get the configuration status of the configurable object. More...
 
- Public Member Functions inherited from mauve::runtime::WithAbstractShell
virtual bool cleanup_shell ()=0
 Clean up the shell.
 
virtual bool configure_shell ()=0
 Configure th shell.
 
virtual Shellget_shell () const =0
 Get a pointer to the shell.
 
virtual bool is_empty_shell () const =0
 Check if the shell is empty.
 
- Public Member Functions inherited from mauve::runtime::WithAbstractCore
virtual bool cleanup_core ()=0
 Clean up the Core.
 
virtual bool configure_core ()=0
 Configure the Core.
 
virtual AbstractCoreget_core () const =0
 Get a pointer to the Core.
 
virtual bool is_empty_core () const =0
 Check if the Core is empty.
 
- Public Member Functions inherited from mauve::runtime::WithAbstractFSM
virtual bool cleanup_fsm ()=0
 Clean up the FSM.
 
virtual bool configure_fsm ()=0
 Configure the FSM.
 
virtual AbstractFiniteStateMachineget_fsm () const =0
 Get a pointer to the FSM.
 
virtual bool is_empty_fsm () const =0
 Check if the FSM is empty.
 
- Public Member Functions inherited from mauve::runtime::WithLogger
virtual AbstractLoggerlogger () const =0
 Get the logger.
 

Protected Attributes

ComponentLoggerlogger
 

Friends

class Task
 

Detailed Description

Abstract Component class.

Constructor & Destructor Documentation

mauve::runtime::AbstractComponent::AbstractComponent ( std::string const &  name)

Constructor.

Parameters
namecomponent name

Member Function Documentation

virtual int mauve::runtime::AbstractComponent::get_cpu ( ) const
pure virtual

Get the cpu mapping of the component task.

Returns
cpu mapping

Implemented in mauve::runtime::Component< SHELL, CORE, FSM >.

virtual int mauve::runtime::AbstractComponent::get_priority ( ) const
pure virtual

Get the priority of the component real-time task.

Returns
priority

Implemented in mauve::runtime::Component< SHELL, CORE, FSM >.

virtual bool mauve::runtime::AbstractComponent::is_empty ( ) const
pure virtual

Check if the component is empty (i.e.

not built)

Implemented in mauve::runtime::Component< SHELL, CORE, FSM >.

virtual bool mauve::runtime::AbstractComponent::set_cpu ( int  cpu)
pure virtual

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.

Implemented in mauve::runtime::Component< SHELL, CORE, FSM >.

virtual bool mauve::runtime::AbstractComponent::set_priority ( int  priority)
pure virtual

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

Implemented in mauve::runtime::Component< SHELL, CORE, FSM >.