Class TaskBase
Contents
Class TaskBase#
Defined in File TaskBase.hpp
Inheritance Relationships#
Derived Types#
public corail_core::PeriodicTask
(Class PeriodicTask)public corail_core::ReactiveTask
(Class ReactiveTask)
Class Documentation#
-
class TaskBase#
Interface used to manipulate tasks.
Subclassed by corail_core::PeriodicTask, corail_core::ReactiveTask
Public Functions
-
inline virtual ~TaskBase()#
-
virtual bool create() = 0#
Trigger the create transition.
Launch the creation of the thread in which the task will execute. Only allowed in init state. -> created
- Returns
true If the transition succed
- Returns
false Otherwise
-
virtual bool configure() = 0#
Trigger the configure transition.
Configure the thread priority and cpu. Only allowed in created state. -> configured
- Returns
true If the transition succed
- Returns
false Otherwise
-
virtual bool cleanup() = 0#
Trigger the cleanup transition.
Only allowed in configured state. -> created
- Returns
true If the transition succed
- Returns
false Otherwise
-
virtual bool start(std::chrono::nanoseconds release) = 0#
Trigger the start transition.
Lauch execution of the task at the asked date. Only allowed in configured state. -> started
- Parameters
release – [in] The date of the first execution of the callback.
- Returns
true If the transition succed
- Returns
false Otherwise
-
virtual bool stop() = 0#
Trigger the stop transition.
Stop the execution of the task. Only allowed in started, running or sleeping states. -> configured
- Returns
true If the transition succed
- Returns
false Otherwise
-
virtual bool terminate() = 0#
Trigger the terminate transition.
Will destruct the thread of the task. Only allowed in created state. -> init
- Returns
true If the transition succed
- Returns
false Otherwises
Protected Static Functions
-
inline virtual ~TaskBase()#
Corail is free software: you can redistribute it and/or modify it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.