Public Types | Public Member Functions | Private Attributes | List of all members
corbo::Environment Class Reference

Standard environment for control tasks. More...

#include <environment.h>

Public Types

using Ptr = std::shared_ptr< Environment >
 

Public Member Functions

 Environment ()
 Default constructor. More...
 
 Environment (ControllerInterface::Ptr controller, ObserverInterface::Ptr observer, PlantInterface::Ptr plant)
 Construct environment with a controller, observer and plant. More...
 
const ControllerInterface::PtrgetController () const
 Read access to the underlying controller. More...
 
ControllerInterface::Ptr getControllerPtr ()
 Write access to the underlying controller. More...
 
const ObserverInterface::PtrgetObserver () const
 Read access to the underlying observer. More...
 
ObserverInterface::Ptr getObserverPtr ()
 Write access to the underlying observer. More...
 
const PlantInterface::PtrgetPlant () const
 Read access to the underlying plant. More...
 
PlantInterface::Ptr getPlantPtr ()
 Write access to the underlying plant. More...
 
bool hasController () const
 Check if a controller has been specified. More...
 
bool hasObserver () const
 Check if an observer has been specified. More...
 
bool hasPlant () const
 Check if a plant has been specified. More...
 
void reset ()
 Reset environment. More...
 
void setController (ControllerInterface::Ptr controller)
 Set controller. More...
 
void setObserver (ObserverInterface::Ptr observer)
 Set observer. More...
 
void setPlant (PlantInterface::Ptr plant)
 Set plant. More...
 
bool verify (std::string *msg=nullptr) const
 Check if the environment satisfies all requirements (dimensions, ...) More...
 

Private Attributes

ControllerInterface::Ptr _controller
 
ObserverInterface::Ptr _observer
 
PlantInterface::Ptr _plant
 

Detailed Description

Standard environment for control tasks.

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.

See also
TaskInterface
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 49 of file environment.h.

Member Typedef Documentation

◆ Ptr

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

Definition at line 52 of file environment.h.

Constructor & Destructor Documentation

◆ Environment() [1/2]

corbo::Environment::Environment ( )
inline

Default constructor.

Definition at line 55 of file environment.h.

◆ Environment() [2/2]

corbo::Environment::Environment ( ControllerInterface::Ptr  controller,
ObserverInterface::Ptr  observer,
PlantInterface::Ptr  plant 
)

Construct environment with a controller, observer and plant.

Definition at line 33 of file environment.cpp.

Member Function Documentation

◆ getController()

const ControllerInterface::Ptr& corbo::Environment::getController ( ) const
inline

Read access to the underlying controller.

Definition at line 67 of file environment.h.

◆ getControllerPtr()

ControllerInterface::Ptr corbo::Environment::getControllerPtr ( )
inline

Write access to the underlying controller.

Definition at line 69 of file environment.h.

◆ getObserver()

const ObserverInterface::Ptr& corbo::Environment::getObserver ( ) const
inline

Read access to the underlying observer.

Definition at line 71 of file environment.h.

◆ getObserverPtr()

ObserverInterface::Ptr corbo::Environment::getObserverPtr ( )
inline

Write access to the underlying observer.

Definition at line 73 of file environment.h.

◆ getPlant()

const PlantInterface::Ptr& corbo::Environment::getPlant ( ) const
inline

Read access to the underlying plant.

Definition at line 75 of file environment.h.

◆ getPlantPtr()

PlantInterface::Ptr corbo::Environment::getPlantPtr ( )
inline

Write access to the underlying plant.

Definition at line 77 of file environment.h.

◆ hasController()

bool corbo::Environment::hasController ( ) const
inline

Check if a controller has been specified.

Definition at line 60 of file environment.h.

◆ hasObserver()

bool corbo::Environment::hasObserver ( ) const
inline

Check if an observer has been specified.

Definition at line 62 of file environment.h.

◆ hasPlant()

bool corbo::Environment::hasPlant ( ) const
inline

Check if a plant has been specified.

Definition at line 64 of file environment.h.

◆ reset()

void corbo::Environment::reset ( )

Reset environment.

Definition at line 156 of file environment.cpp.

◆ setController()

void corbo::Environment::setController ( ControllerInterface::Ptr  controller)

Set controller.

Definition at line 40 of file environment.cpp.

◆ setObserver()

void corbo::Environment::setObserver ( ObserverInterface::Ptr  observer)

Set observer.

Definition at line 42 of file environment.cpp.

◆ setPlant()

void corbo::Environment::setPlant ( PlantInterface::Ptr  plant)

Set plant.

Definition at line 44 of file environment.cpp.

◆ verify()

bool corbo::Environment::verify ( std::string *  msg = nullptr) const

Check if the environment satisfies all requirements (dimensions, ...)

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

Parameters
[out]msgThe string contains issue messages and hints if available [optional]
Returns
true if verification was successfull, false otherwise.

Definition at line 46 of file environment.cpp.

Member Data Documentation

◆ _controller

ControllerInterface::Ptr corbo::Environment::_controller
private

Definition at line 101 of file environment.h.

◆ _observer

ObserverInterface::Ptr corbo::Environment::_observer
private

Definition at line 102 of file environment.h.

◆ _plant

PlantInterface::Ptr corbo::Environment::_plant
private

Definition at line 103 of file environment.h.


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


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