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

Abstract Deployer class. More...

#include <AbstractDeployer.hpp>

Inheritance diagram for mauve::runtime::AbstractDeployer:
Collaboration diagram for mauve::runtime::AbstractDeployer:

Public Member Functions

virtual ~AbstractDeployer () noexcept
 Destructor. More...
 
bool activate ()
 Activate all tasks. More...
 
bool activate (AbstractComponent *component)
 Activate one task. More...
 
bool activate (std::string name)
 Activate one task. More...
 
bool clear_task (AbstractComponent *component)
 Clear component task.
 
void clear_tasks ()
 Clear the tasks. More...
 
bool create_task (AbstractComponent *component)
 Create one task. More...
 
bool create_tasks ()
 Create all tasks. More...
 
virtual Architectureget_architecture ()=0
 Get the deployer architecture. More...
 
Taskget_task (AbstractComponent *component)
 Get the task associated to a component. More...
 
time_ns_t get_time () const
 Get deployer reference time. More...
 
DeployerLoggerlogger ()
 Access to deployer logger.
 
void loop ()
 Loop.
 
virtual std::vector< std::string > manager_actions () const =0
 Get the list of Manager actions. More...
 
virtual bool manager_apply (std::string name)=0
 Apply a Manager action. More...
 
time_ns_t now () const
 Get current deployer time. More...
 
bool start ()
 Start all tasks. More...
 
bool start (AbstractComponent *component, time_ns_t start_time)
 Start a task. More...
 
bool start (std::string name, time_ns_t start_time)
 Start a task. More...
 
bool start_deployer ()
 Start only the Deployer. More...
 
void stop ()
 Stop all.
 
bool stop (AbstractComponent *component)
 Stop task.
 
bool stop (std::string name)
 Stop task by name.
 

Static Public Member Functions

static AbstractDeployerinstance ()
 Get the Deployer instance. More...
 

Protected Member Functions

 AbstractDeployer ()
 Constructor. More...
 

Protected Attributes

DeployerLogger_logger
 The Deployer logger. More...
 

Static Protected Attributes

static AbstractDeployerdeployer
 The singleton Deployer instance. More...
 

Friends

template<typename ARCHI >
AbstractDeployermk_abstract_deployer (ARCHI *a, Manager< ARCHI > *m)
 Build the application Deployer from an architecture. More...
 

Detailed Description

Abstract Deployer class.

Constructor & Destructor Documentation

virtual mauve::runtime::AbstractDeployer::~AbstractDeployer ( )
virtualnoexcept

Destructor.

mauve::runtime::AbstractDeployer::AbstractDeployer ( )
protected

Constructor.

Member Function Documentation

bool mauve::runtime::AbstractDeployer::activate ( )

Activate all tasks.

Returns
true if all tasks are activated.
bool mauve::runtime::AbstractDeployer::activate ( AbstractComponent component)

Activate one task.

Parameters
componentthe component corresponding to the task to activate
Returns
true if the task is activated.
bool mauve::runtime::AbstractDeployer::activate ( std::string  name)

Activate one task.

Parameters
namename of the task/component to activate
Returns
true if the task is activated.
void mauve::runtime::AbstractDeployer::clear_tasks ( )

Clear the tasks.

bool mauve::runtime::AbstractDeployer::create_task ( AbstractComponent component)

Create one task.

Parameters
componentthe component corresponding to the task to create
Returns
true if the task is created.
bool mauve::runtime::AbstractDeployer::create_tasks ( )

Create all tasks.

Returns
true if all tasks are created for all components.
virtual Architecture* mauve::runtime::AbstractDeployer::get_architecture ( )
pure virtual

Get the deployer architecture.

Returns
a pointer on the deployed architecture

Implemented in mauve::runtime::Deployer< ARCHI >.

Task* mauve::runtime::AbstractDeployer::get_task ( AbstractComponent component)

Get the task associated to a component.

Parameters
componentthe component
Returns
the task executing component
time_ns_t mauve::runtime::AbstractDeployer::get_time ( ) const

Get deployer reference time.

Returns
reference time
static AbstractDeployer* mauve::runtime::AbstractDeployer::instance ( )
inlinestatic

Get the Deployer instance.

Returns
a pointer on the deployer instance
virtual std::vector<std::string> mauve::runtime::AbstractDeployer::manager_actions ( ) const
pure virtual

Get the list of Manager actions.

Returns
a vector of the registered action names.

Implemented in mauve::runtime::Deployer< ARCHI >.

virtual bool mauve::runtime::AbstractDeployer::manager_apply ( std::string  name)
pure virtual

Apply a Manager action.

Parameters
namethe name of the action to apply
Returns
true if the action has succeeded.

Implemented in mauve::runtime::Deployer< ARCHI >.

time_ns_t mauve::runtime::AbstractDeployer::now ( ) const

Get current deployer time.

Returns
currect time.
bool mauve::runtime::AbstractDeployer::start ( )

Start all tasks.

Returns
true if all tasks are started.
bool mauve::runtime::AbstractDeployer::start ( AbstractComponent component,
time_ns_t  start_time 
)

Start a task.

Parameters
componentcomponent of the task to activate
start_timereference time at which to start the task
Returns
true if the task is started.
bool mauve::runtime::AbstractDeployer::start ( std::string  name,
time_ns_t  start_time 
)

Start a task.

Parameters
namename of the task/component to activate
start_timereference time at which to start the task
Returns
true if the task is started.
bool mauve::runtime::AbstractDeployer::start_deployer ( )

Start only the Deployer.

Tasks have to be started individually.

Returns
true if the deployer is started.

Friends And Related Function Documentation

template<typename ARCHI >
AbstractDeployer* mk_abstract_deployer ( ARCHI *  a,
Manager< ARCHI > *  m = nullptr 
)
friend

Build the application Deployer from an architecture.

Template Parameters
ARCHIArchitecture type
Parameters
architectureThe architecture executed by the Deployer
managerA manager of the architecture
Returns
a pointer on the application Deployer.

Member Data Documentation

DeployerLogger* mauve::runtime::AbstractDeployer::_logger
protected

The Deployer logger.

AbstractDeployer* mauve::runtime::AbstractDeployer::deployer
staticprotected

The singleton Deployer instance.