xentara-plugin v1.2.1
The Xentara Plugin Framework
Loading...
Searching...
No Matches
xentara::process::StageAgnosticTask Class Reference

A task that calls operational() for all stages. More...

#include <process/StageAgnosticTask.hpp>

+ Inheritance diagram for xentara::process::StageAgnosticTask:

Public Member Functions

auto stages () const -> Stages override
 Reiplementation of Task::stages()
 
auto prepareStartup (const ExecutionContext &context) -> Status override
 Reiplementation of Task::prepareStartup()
 
auto startup (const ExecutionContext &context) -> Status override
 Reiplementation of Task::startup()
 
auto preparePreOperational (const ExecutionContext &context) -> Status override
 Reiplementation of Task::preparePreOperational()
 
auto preOperational (const ExecutionContext &context) -> Status override
 Reiplementation of Task::preOperational()
 
auto preparePostOperational (const ExecutionContext &context) -> Status override
 Reiplementation of Task::preparePostOperational()
 
auto postOperational (const ExecutionContext &context) -> Status override
 Reiplementation of Task::postOperational()
 
auto prepareShutdown (const ExecutionContext &context) -> Status override
 Reiplementation of Task::prepareShutdown()
 
auto shutdown (const ExecutionContext &context) -> Status override
 Reiplementation of Task::shutdown()
 
- Public Member Functions inherited from xentara::process::Task
virtual ~Task ()=0
 Virtual destructor.
 
virtual auto timing () const -> Timing
 Called by the framework to get the timing requirements.
 
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 operational (const ExecutionContext &context) -> void=0
 Called by the framework to perform the operational stage.
 
- Public Member Functions inherited from xentara::utils::tools::DisableCopy
constexpr DisableCopy () noexcept=default
 
 DisableCopy (const DisableCopy &)=delete
 
DisableCopyoperator= (const DisableCopy &)=delete
 

Additional Inherited Members

- Public Types inherited from xentara::process::Task
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.
 
- Static Public Attributes inherited from xentara::process::Task
static const std::string_view kReconnect
 The standard name for the reconnect task of an I/O component.
 

Detailed Description

A task that calls operational() for all stages.

This class can be used as a base class for tasks that execute the same action for all stages. Each of the prepare functions does nothing, and returns Task::Status::Ready. Each of the regular functions calls operational(), and also returns Task::Status::Ready.

Member Function Documentation

◆ postOperational()

auto xentara::process::StageAgnosticTask::postOperational ( const ExecutionContext context) -> Status
overridevirtual

Reiplementation of Task::postOperational()

This implementation calls operational() and returns Status::Ready

Note
This implementation is not final and can be overridden if a different behaviour is desired.

Reimplemented from xentara::process::Task.

◆ preOperational()

auto xentara::process::StageAgnosticTask::preOperational ( const ExecutionContext context) -> Status
overridevirtual

Reiplementation of Task::preOperational()

This implementation calls operational() and returns Status::Ready

Note
This implementation is not final and can be overridden if a different behaviour is desired.

Reimplemented from xentara::process::Task.

◆ preparePostOperational()

auto xentara::process::StageAgnosticTask::preparePostOperational ( const ExecutionContext context) -> Status
overridevirtual

Reiplementation of Task::preparePostOperational()

This implementation does nothing and returns Status::Ready

Note
This implementation is not final and can be overridden if a different behaviour is desired.

Reimplemented from xentara::process::Task.

◆ preparePreOperational()

auto xentara::process::StageAgnosticTask::preparePreOperational ( const ExecutionContext context) -> Status
overridevirtual

Reiplementation of Task::preparePreOperational()

This implementation does nothing and returns Status::Ready

Note
This implementation is not final and can be overridden if a different behaviour is desired.

Reimplemented from xentara::process::Task.

◆ prepareShutdown()

auto xentara::process::StageAgnosticTask::prepareShutdown ( const ExecutionContext context) -> Status
overridevirtual

Reiplementation of Task::prepareShutdown()

This implementation does nothing and returns Status::Ready

Note
This implementation is not final and can be overridden if a different behaviour is desired.

Reimplemented from xentara::process::Task.

◆ prepareStartup()

auto xentara::process::StageAgnosticTask::prepareStartup ( const ExecutionContext context) -> Status
overridevirtual

Reiplementation of Task::prepareStartup()

This implementation does nothing and returns Status::Ready.

Note
This implementation is not final and can be overridden if a different behaviour is desired.

Reimplemented from xentara::process::Task.

◆ shutdown()

auto xentara::process::StageAgnosticTask::shutdown ( const ExecutionContext context) -> Status
overridevirtual

Reiplementation of Task::shutdown()

This implementation calls operational() and returns Status::Ready

Note
This implementation is not final and can be overridden if a different behaviour is desired.

Reimplemented from xentara::process::Task.

◆ stages()

auto xentara::process::StageAgnosticTask::stages ( ) const -> Stages
overridevirtual

Reiplementation of Task::stages()

This implementation returns all stages

Note
This implementation is not final and can be overridden if a different set of stages is desired.

Reimplemented from xentara::process::Task.

◆ startup()

auto xentara::process::StageAgnosticTask::startup ( const ExecutionContext context) -> Status
overridevirtual

Reiplementation of Task::startup()

This implementation calls operational() and returns Status::Ready

Note
This implementation is not final and can be overridden if a different behaviour is desired.

Reimplemented from xentara::process::Task.