18 #ifndef MAUVE_RUNTIME_ABSTRACT_COMPONENT_HPP 19 #define MAUVE_RUNTIME_ABSTRACT_COMPONENT_HPP 21 #include "Configurable.hpp" 22 #include "WithName.hpp" 23 #include "WithAbstractShell.hpp" 24 #include "WithAbstractCore.hpp" 25 #include "WithAbstractFSM.hpp" 26 #include "WithLogger.hpp" 62 inline std::string
name() const override final {
return _name; };
79 virtual bool clear() = 0;
85 virtual bool step() = 0;
88 virtual time_ns_t
get_time()
const = 0;
109 virtual int get_cpu()
const = 0;
119 virtual bool set_cpu(
int cpu) = 0;
126 virtual bool run() = 0;
128 virtual void set_task(
Task* task) = 0;
134 #endif // MAUVE_RUNTIME_ABSTRACT_COMPONENT_HPP virtual bool set_cpu(int cpu)=0
Set the affinity of the task of the component to a single processor.
Trait for objects with an abstract FSM.
Definition: WithAbstractFSM.hpp:27
Class of a MAUVE logger for a component.
Definition: logger.hpp:188
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 int get_priority() const =0
Get the priority of the component real-time task.
virtual ~AbstractComponent()
Destructor.
virtual bool step()=0
Make one step on the component FSM.
Trait for objects with an abstract Core.
Definition: WithAbstractCore.hpp:27
virtual bool set_priority(int priority)=0
Sets the real-time task priority.
Object with a name.
Definition: WithName.hpp:27
Object with a Logger.
Definition: WithLogger.hpp:27
The MAUVE namespace.
Definition: tracing.hpp:24
virtual AbstractLogger & logger() const =0
Get the logger.
virtual AbstractState * current_state()=0
Get component current State.
Abstract State class.
Definition: AbstractState.hpp:34
Configurable trait.
Definition: Configurable.hpp:25
virtual int get_cpu() const =0
Get the cpu mapping of the component task.
std::string type_name() const
Get component type name.
virtual bool clear()=0
Clear the component.
std::string name() const overridefinal
Get component name.
Definition: AbstractComponent.hpp:62
virtual bool is_running() const =0
Check if the component is running.
virtual bool is_empty() const =0
Check if the component is empty (i.e.
AbstractComponent(std::string const &name)
Constructor.
virtual bool is_created() const =0
Check if the component is created.
virtual void disconnect()=0
Disconnect the component.
Trait for objects with an abstract Shell.
Definition: WithAbstractShell.hpp:27
Abstract Component class.
Definition: AbstractComponent.hpp:43
A system Task that executes a component.
Definition: Task.hpp:46