Public Types | Public Member Functions | List of all members
corbo::TaskInterface Class Referenceabstract

Interface class for tasks. More...

#include <task_interface.h>

Inheritance diagram for corbo::TaskInterface:
Inheritance graph
[legend]

Public Types

using Ptr = std::shared_ptr< TaskInterface >
 

Public Member Functions

virtual void getAvailableSignals (const Environment &environment, SignalTargetInterface &signal_target, const std::string &ns="") const
 Retrieve available signals from the task. More...
 
virtual Ptr getInstance () const =0
 Return a newly created shared instance of the implemented class. More...
 
virtual void performTask (Environment &environment, SignalTargetInterface *signal_target=nullptr, std::string *msg=nullptr, const std::string &ns="")=0
 Perform task. More...
 
virtual void reset ()=0
 Reset task state. More...
 
virtual bool verify (const Environment &environment, std::string *msg=nullptr) const =0
 Check if the environment and other settings satisfy all requirements for the given task. More...
 
virtual ~TaskInterface ()
 Virtuel destructor. More...
 

Detailed Description

Interface class for tasks.

Possible task implementations can be the closed-loop control of a plant, open-loop control, benchmarking, ...

Usually, tasks are called with an Environment to facilitate the initialization and verification of commonly used control architectures. An Environment contains a plant, observer and controller. But a particular task does not need to rely on an Environment only but can contain more objects or replace objects (e.g. multiple controllers, ...).

Remarks
This interface is provided with factory support (TaskFactory).
See also
Environment
Author
Christoph Rösmann (chris.nosp@m.toph.nosp@m..roes.nosp@m.mann.nosp@m.@tu-d.nosp@m.ortm.nosp@m.und.d.nosp@m.e)

Definition at line 60 of file task_interface.h.

Member Typedef Documentation

◆ Ptr

using corbo::TaskInterface::Ptr = std::shared_ptr<TaskInterface>

Definition at line 63 of file task_interface.h.

Constructor & Destructor Documentation

◆ ~TaskInterface()

virtual corbo::TaskInterface::~TaskInterface ( )
inlinevirtual

Virtuel destructor.

Definition at line 66 of file task_interface.h.

Member Function Documentation

◆ getAvailableSignals()

virtual void corbo::TaskInterface::getAvailableSignals ( const Environment environment,
SignalTargetInterface signal_target,
const std::string &  ns = "" 
) const
inlinevirtual

Retrieve available signals from the task.

Register a-priori known signals at the signal target. Registration is optional. Note, during performTask() further signals might occur without registration (in case the they are not known in advance or the implementation lacks a proper registration).

Parameters
[in,out]signal_targetTarget for occuring signals [optional]

Reimplemented in corbo::ClosedLoopControlTask, corbo::OpenLoopControlTask, corbo::BenchmarkTaskIncreasingHorizonOpenLoop, and corbo::BenchmarkTaskVaryingInitialState.

Definition at line 103 of file task_interface.h.

◆ getInstance()

virtual Ptr corbo::TaskInterface::getInstance ( ) const
pure virtual

Return a newly created shared instance of the implemented class.

Implemented in corbo::ClosedLoopControlTask, corbo::OpenLoopControlTask, corbo::BenchmarkTaskIncreasingHorizonOpenLoop, and corbo::BenchmarkTaskVaryingInitialState.

◆ performTask()

virtual void corbo::TaskInterface::performTask ( Environment environment,
SignalTargetInterface signal_target = nullptr,
std::string *  msg = nullptr,
const std::string &  ns = "" 
)
pure virtual

Perform task.

Parameters
[in]environmentStandard environment (plant, controller, observer)
[in,out]signal_targetTarget for occuring signals [optional]

Implemented in corbo::ClosedLoopControlTask, corbo::OpenLoopControlTask, corbo::BenchmarkTaskIncreasingHorizonOpenLoop, and corbo::BenchmarkTaskVaryingInitialState.

◆ reset()

virtual void corbo::TaskInterface::reset ( )
pure virtual

◆ verify()

virtual bool corbo::TaskInterface::verify ( const Environment environment,
std::string *  msg = nullptr 
) const
pure virtual

Check if the environment and other settings satisfy all requirements for the given task.

This function can be called in order to check if all components and models are appropriate, e.g. if all input and output dimensions are chosen adequately.

Note, Environment::verify() might be invoked in order to check if controller, plant and observer are specified correctly and if they have matching dimensions.

Parameters
[in]environmentStandard environment (plant, controller, observer)
[out]msgThe string contains issue messages and hints if available [optional]
Returns
true if verification was successfull, false otherwise.

Implemented in corbo::ClosedLoopControlTask, corbo::OpenLoopControlTask, corbo::BenchmarkTaskIncreasingHorizonOpenLoop, and corbo::BenchmarkTaskVaryingInitialState.


The documentation for this class was generated from the following file:


control_box_rst
Author(s): Christoph Rösmann
autogenerated on Mon Feb 28 2022 22:08:03