NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
tgControllable Class Referenceabstract

#include <tgControllable.h>

Inheritance diagram for tgControllable:

Public Member Functions

 tgControllable ()
virtual ~tgControllable ()
virtual void setControlInput (double input)=0
virtual void setControlInput (double input, double dt)

Detailed Description

An abstract mixin base class for classes that can be affected by controllers. Defines the common control API. Controllers will likely be observers, so they will know the details of their subjects/ controllables. That said, it is not worth making something this low level a subject, as there are higher level details not defined in this API (sensor data, etc)

Definition at line 39 of file tgControllable.h.

Constructor & Destructor Documentation

tgControllable::tgControllable ( )

The consructor has nothing to do.

Definition at line 44 of file tgControllable.h.

virtual tgControllable::~tgControllable ( )

The virtual destructor has nothing to do.

Definition at line 47 of file tgControllable.h.

Member Function Documentation

virtual void tgControllable::setControlInput ( double  input)
pure virtual

Set the relevant control variable for this class, such as commanded position or torque

[in]input,thecontrol input, units are application dependent

Implemented in tgCompressionSpringActuator, tgKinematicActuator, and tgBasicActuator.

virtual void tgControllable::setControlInput ( double  input,
double  dt 

Secondary function for those classes which need to know how much time has elapsed since they last recieved input (such as tgBasicActuator's moveMotors(dt) function) This will silently fail if it is called erroneously

[in]input,thedesired control input
[in]dt,thetime elapsed since the last call. Must be positive (typically enforced in child class)

Reimplemented in tgCompressionSpringActuator, and tgBasicActuator.

Definition at line 65 of file tgControllable.h.

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