Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Teddy::Behaviour::Control Class Reference

#include <Control.h>

Inheritance diagram for Teddy::Behaviour::Control:

Inheritance graph
[legend]
Collaboration diagram for Teddy::Behaviour::Control:

Collaboration graph
[legend]
List of all members.

Public Methods

 Control (double max_delta, double max, Teddy::MixIn::Options options, double dampen_const)
 Constructor. More...

virtual void tick ()
 Update Control (Teddy::MixIn::Tick API). More...

void setValue (double value)
double getValue () const
double getMin () const
double getMax () const
double getDelta () const
double getDampConst () const
void setDelta (double max_delta)
void setDampConst (double dampen_const)
void adjust (double analog)
 Adjust Control value. More...

void more (bool apply)
 Activate or deactivate more Control. More...

void less (bool apply)
 Activate or deactivate less Control. More...

void stop (bool apply)
 Stop Control. More...

void inhibit (bool apply)
void clear ()
void dampen ()
 Dampen Control. More...


Static Public Attributes

const unsigned long RESERVED = 0ul
const unsigned long MORE = 1ul
const unsigned long LESS = 2ul
const unsigned long STOP = 3ul
const unsigned long ACTIVE = 4ul
const unsigned long INHIBIT = 5ul
const unsigned long DAMPEN_LINEAR = 6ul
const unsigned long DAMPEN_MULTIPLY = 7ul
const unsigned long DAMPEN_MASTER = 8ul
const unsigned long RESERVED_M = (1ul<<Control::RESERVED )
const unsigned long MORE_M = (1ul<<Control::MORE )
const unsigned long LESS_M = (1ul<<Control::LESS )
const unsigned long STOP_M = (1ul<<Control::STOP )
const unsigned long ACTIVE_M = (1ul<<Control::ACTIVE )
const unsigned long INHIBIT_M = (1ul<<Control::INHIBIT )
const unsigned long DAMPEN_LINEAR_M = (1ul<<Control::DAMPEN_LINEAR )
const unsigned long DAMPEN_MULTIPLY_M = (1ul<<Control::DAMPEN_MULTIPLY)
const unsigned long DAMPEN_MASTER_M = (1ul<<Control::DAMPEN_MASTER )
const unsigned long CLEAR_M

Protected Attributes

double dampen_const
 Multiplying dampening constant. More...

double max_delta
 Maximum change. More...

double min
 Mimimum value. More...

double max
 Maximum value. More...

double c_delta
 Currently active change. More...

double c_value
 Current value. More...


Constructor & Destructor Documentation

Teddy::Behaviour::Control::Control double    max_delta,
double    max,
Teddy::MixIn::Options    options,
double    dampen_const
 

Constructor.

Definition at line 61 of file Control.cpp.


Member Function Documentation

void Teddy::Behaviour::Control::adjust double    analog
 

Adjust Control value.

Definition at line 145 of file Control.cpp.

References c_value, max, and min.

Referenced by tick.

void Teddy::Behaviour::Control::clear  
 

Definition at line 121 of file Control.cpp.

References c_delta, c_value, and Teddy::MixIn::Options::disable.

void Teddy::Behaviour::Control::dampen  
 

Dampen Control.

Definition at line 157 of file Control.cpp.

References c_value, dampen_const, Teddy::MixIn::Options::isDisabled, Teddy::MixIn::Options::isEnabled, and max_delta.

Referenced by tick.

double Teddy::Behaviour::Control::getDampConst   const
 

Definition at line 106 of file Control.cpp.

References dampen_const.

double Teddy::Behaviour::Control::getDelta   const
 

Definition at line 101 of file Control.cpp.

References max_delta.

double Teddy::Behaviour::Control::getMax   const
 

Definition at line 96 of file Control.cpp.

References max.

double Teddy::Behaviour::Control::getMin   const
 

Definition at line 91 of file Control.cpp.

References min.

double Teddy::Behaviour::Control::getValue   const
 

Definition at line 86 of file Control.cpp.

References c_value.

void Teddy::Behaviour::Control::inhibit bool    apply
 

void Teddy::Behaviour::Control::less bool    apply
 

Activate or deactivate less Control.

Definition at line 201 of file Control.cpp.

References c_delta, Teddy::MixIn::Options::disable, Teddy::MixIn::Options::enable, Teddy::MixIn::Options::isEnabled, and max_delta.

void Teddy::Behaviour::Control::more bool    apply
 

Activate or deactivate more Control.

Definition at line 184 of file Control.cpp.

References c_delta, Teddy::MixIn::Options::disable, Teddy::MixIn::Options::enable, Teddy::MixIn::Options::isEnabled, and max_delta.

void Teddy::Behaviour::Control::setDampConst double    dampen_const
 

Definition at line 116 of file Control.cpp.

References dampen_const.

void Teddy::Behaviour::Control::setDelta double    max_delta
 

Definition at line 111 of file Control.cpp.

References max_delta.

void Teddy::Behaviour::Control::setValue double    value
 

Definition at line 81 of file Control.cpp.

References c_value.

void Teddy::Behaviour::Control::stop bool    apply
 

Stop Control.

Definition at line 218 of file Control.cpp.

References c_delta, c_value, Teddy::MixIn::Options::disable, Teddy::MixIn::Options::enable, Teddy::MixIn::Options::isDisabled, Teddy::MixIn::Options::isEnabled, and max_delta.

void Teddy::Behaviour::Control::tick   [virtual]
 

Update Control (Teddy::MixIn::Tick API).

Reimplemented from Teddy::MixIn::Tick.

Definition at line 134 of file Control.cpp.

References adjust, c_delta, dampen, Teddy::MixIn::Options::isDisabled, and Teddy::MixIn::Options::isEnabled.


Member Data Documentation

const unsigned long Teddy::Behaviour::Control::ACTIVE = 4ul [static]
 

Definition at line 36 of file Control.cpp.

const unsigned long Teddy::Behaviour::Control::ACTIVE_M = (1ul<<Control::ACTIVE ) [static]
 

Definition at line 46 of file Control.cpp.

double Teddy::Behaviour::Control::c_delta [protected]
 

Currently active change.

Definition at line 93 of file Control.h.

Referenced by clear, less, more, stop, and tick.

double Teddy::Behaviour::Control::c_value [protected]
 

Current value.

Definition at line 94 of file Control.h.

Referenced by adjust, clear, dampen, getValue, setValue, and stop.

const unsigned long Teddy::Behaviour::Control::CLEAR_M [static]
 

Initial value:

    Control::MORE_M    |  
    Control::LESS_M    |  
    Control::STOP_M    |  
    Control::ACTIVE_M  |  
    Control::INHIBIT_M

Definition at line 52 of file Control.cpp.

double Teddy::Behaviour::Control::dampen_const [protected]
 

Multiplying dampening constant.

Definition at line 89 of file Control.h.

Referenced by dampen, getDampConst, and setDampConst.

const unsigned long Teddy::Behaviour::Control::DAMPEN_LINEAR = 6ul [static]
 

Definition at line 38 of file Control.cpp.

const unsigned long Teddy::Behaviour::Control::DAMPEN_LINEAR_M = (1ul<<Control::DAMPEN_LINEAR ) [static]
 

Definition at line 48 of file Control.cpp.

const unsigned long Teddy::Behaviour::Control::DAMPEN_MASTER = 8ul [static]
 

Definition at line 40 of file Control.cpp.

const unsigned long Teddy::Behaviour::Control::DAMPEN_MASTER_M = (1ul<<Control::DAMPEN_MASTER ) [static]
 

Definition at line 50 of file Control.cpp.

const unsigned long Teddy::Behaviour::Control::DAMPEN_MULTIPLY = 7ul [static]
 

Definition at line 39 of file Control.cpp.

const unsigned long Teddy::Behaviour::Control::DAMPEN_MULTIPLY_M = (1ul<<Control::DAMPEN_MULTIPLY) [static]
 

Definition at line 49 of file Control.cpp.

const unsigned long Teddy::Behaviour::Control::INHIBIT = 5ul [static]
 

Definition at line 37 of file Control.cpp.

const unsigned long Teddy::Behaviour::Control::INHIBIT_M = (1ul<<Control::INHIBIT ) [static]
 

Definition at line 47 of file Control.cpp.

const unsigned long Teddy::Behaviour::Control::LESS = 2ul [static]
 

Definition at line 34 of file Control.cpp.

const unsigned long Teddy::Behaviour::Control::LESS_M = (1ul<<Control::LESS ) [static]
 

Definition at line 44 of file Control.cpp.

double Teddy::Behaviour::Control::max [protected]
 

Maximum value.

Definition at line 92 of file Control.h.

Referenced by adjust, and getMax.

double Teddy::Behaviour::Control::max_delta [protected]
 

Maximum change.

Definition at line 90 of file Control.h.

Referenced by dampen, getDelta, less, more, setDelta, and stop.

double Teddy::Behaviour::Control::min [protected]
 

Mimimum value.

Definition at line 91 of file Control.h.

Referenced by adjust, and getMin.

const unsigned long Teddy::Behaviour::Control::MORE = 1ul [static]
 

Definition at line 33 of file Control.cpp.

const unsigned long Teddy::Behaviour::Control::MORE_M = (1ul<<Control::MORE ) [static]
 

Definition at line 43 of file Control.cpp.

const unsigned long Teddy::Behaviour::Control::RESERVED = 0ul [static]
 

Definition at line 32 of file Control.cpp.

const unsigned long Teddy::Behaviour::Control::RESERVED_M = (1ul<<Control::RESERVED ) [static]
 

Definition at line 42 of file Control.cpp.

const unsigned long Teddy::Behaviour::Control::STOP = 3ul [static]
 

Definition at line 35 of file Control.cpp.

const unsigned long Teddy::Behaviour::Control::STOP_M = (1ul<<Control::STOP ) [static]
 

Definition at line 45 of file Control.cpp.


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