xentara-plugin v2.0.4
The Xentara Plugin Framework
|
A task that needs to performed by a plugin. More...
#include <xentara/process/Task.hpp>
Classes | |
class | Role |
A built-in task role. More... | |
Public Types | |
enum class | Timing { RealTime , RealTimeCompatible , Conventional } |
The timing contraints of the task. More... | |
enum class | Stage { Startup , PreOperational , Operational , PostOperational , Shutdown , Suspended , Terminated , internal } |
The operational stages of Xentara. More... | |
enum class | Status { Pending , Ready , Completed } |
The status a task within an operational stage. More... | |
using | Stages = utils::core::Flags< Stage > |
A combination of operational stages. | |
Public Member Functions | |
virtual | ~Task ()=0 |
Virtual destructor. | |
virtual auto | timing () const -> Timing |
Called by the framework to get the timing requirements. | |
virtual auto | stages () const -> Stages |
Called by the framework to determine which stages the task implements. | |
virtual auto | schedule (const Track &track, std::optional< TimerSchedule > timerSchedule) -> void |
Called by the framework when the task is scheduled in an execution pipeline. | |
virtual auto | prepareStartup (const ExecutionContext &context) -> Status |
Called by the framework once at the beginning of the startup stage. | |
virtual auto | startup (const ExecutionContext &context) -> Status |
Called by the framework to perform the startup stage. | |
virtual auto | finishStartup (const ExecutionContext &context) -> void |
Called by the framework once at the end of the startup stage. | |
virtual auto | preparePreOperational (const ExecutionContext &context) -> Status |
Called by the framework once at the beginning of the pre-operational stage. | |
virtual auto | preOperational (const ExecutionContext &context) -> Status |
Called by the framework to perform the pre-operational stage. | |
virtual auto | finishPreOperational (const ExecutionContext &context) -> void |
Called by the framework once at the end of the pre-operational stage. | |
virtual auto | operational (const ExecutionContext &context) -> void=0 |
Called by the framework to perform the operational stage. | |
virtual auto | preparePostOperational (const ExecutionContext &context) -> Status |
Called by the framework once at the beginning of the post-operational stage. | |
virtual auto | postOperational (const ExecutionContext &context) -> Status |
Called by the framework to perform the post-operational stage. | |
virtual auto | finishPostOperational (const ExecutionContext &context) -> void |
Called by the framework once at the end of the post-operational stage. | |
virtual auto | prepareShutdown (const ExecutionContext &context) -> Status |
Called by the framework once at the beginning of the shutdown stage. | |
virtual auto | shutdown (const ExecutionContext &context) -> Status |
Called by the framework to perform the shutdown stage. | |
virtual auto | finishShutdown (const ExecutionContext &context) -> void |
Called by the framework once at the end of the shutdown stage. | |
Public Member Functions inherited from xentara::utils::tools::DisableCopy | |
constexpr | DisableCopy () noexcept=default |
DisableCopy (const DisableCopy &)=delete | |
DisableCopy & | operator= (const DisableCopy &)=delete |
Static Public Attributes | |
Standard Role | |
static const Role | kReconnect |
The standard role for the reconnect task of an I/O component. | |
A task that needs to performed by a plugin.
A combination of operational stages.
|
strong |
The operational stages of Xentara.
|
strong |
The status a task within an operational stage.
|
strong |
|
pure virtualdefault |
Virtual destructor.
|
virtual |
Called by the framework once at the end of the post-operational stage.
context | A context that allows access to time stamps, counters, etc. |
|
virtual |
Called by the framework once at the end of the pre-operational stage.
context | A context that allows access to time stamps, counters, etc. |
|
virtual |
Called by the framework once at the end of the shutdown stage.
context | A context that allows access to time stamps, counters, etc. |
|
virtual |
Called by the framework once at the end of the startup stage.
context | A context that allows access to time stamps, counters, etc. |
|
pure virtual |
Called by the framework to perform the operational stage.
context | A context that allows access to time stamps, counters, etc. |
|
virtual |
Called by the framework to perform the post-operational stage.
context | A context that allows access to time stamps, counters, etc. |
Reimplemented in xentara::process::StageAgnosticTask.
|
virtual |
Called by the framework to perform the pre-operational stage.
context | A context that allows access to time stamps, counters, etc. |
Reimplemented in xentara::process::StageAgnosticTask.
|
virtual |
Called by the framework once at the beginning of the post-operational stage.
context | A context that allows access to time stamps, counters, etc. |
Reimplemented in xentara::process::StageAgnosticTask.
|
virtual |
Called by the framework once at the beginning of the pre-operational stage.
context | A context that allows access to time stamps, counters, etc. |
Reimplemented in xentara::process::StageAgnosticTask.
|
virtual |
Called by the framework once at the beginning of the shutdown stage.
context | A context that allows access to time stamps, counters, etc. |
Reimplemented in xentara::process::StageAgnosticTask.
|
virtual |
Called by the framework once at the beginning of the startup stage.
context | A context that allows access to time stamps, counters, etc. |
Reimplemented in xentara::process::StageAgnosticTask.
|
virtual |
Called by the framework when the task is scheduled in an execution pipeline.
track | The track that the pipeline belongs to. This is an opaque reference, but its address can be used to identify the track that the task is being scheduled to. This is useful, e.g., to check whether two tasks have been scheduled to run in different tracks, or whether the same task is being scheduled to more than one track. |
timerSchedule | The schedule of the timer, or std::nullopt if the task is being added to an event. |
std::exception | An exception of this type can be thrown if the scheduling is not acceptable. You can throw an exception of this type if two tasks that need to be in the same track are scheduled in different tracks. |
|
virtual |
Called by the framework to perform the shutdown stage.
context | A context that allows access to time stamps, counters, etc. |
Reimplemented in xentara::process::StageAgnosticTask.
|
virtual |
Called by the framework to determine which stages the task implements.
The flags for Stage::Operational, Stage::Suspended, and Stage::Terminated are ignored. All tasks are required to implement the operational stage, and the suspended and terminated stages cannot be implemented.
Reimplemented in xentara::process::StageAgnosticTask.
|
virtual |
Called by the framework to perform the startup stage.
context | A context that allows access to time stamps, counters, etc. |
Reimplemented in xentara::process::StageAgnosticTask.
|
virtual |
Called by the framework to get the timing requirements.
|
static |
The standard role for the reconnect task of an I/O component.