Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

OutputCmd Class Reference

This object holds all the information needed to control a single output. More...

#include <OutputCmd.h>


Detailed Description

This object holds all the information needed to control a single output.

Definition at line 6 of file OutputCmd.h.

List of all members.

Public Member Functions

 OutputCmd ()
 Constructor.
 OutputCmd (float v)
 Constructor (provides implicit conversion from float).
 OutputCmd (float v, float w)
 Constructor.
 OutputCmd (const OutputCmd &a, const OutputCmd &b, float w)
 Constructor, see set(a,b,w).
OutputCmdoperator= (const OutputCmd &oc)
 assignment from another OutputCmd (just copy everything, straightforward)
OutputCmdoperator= (float v)
 assignment from a float, set weight to 1
void set (float v, float w=1)
 sets the value to v and weight to w
void set (const OutputCmd &a, const OutputCmd &b, float w)
 sets the value to a weighted average of a and b (higher w, more a)
void unset ()
 sets value and weight to 0
bool operator== (const OutputCmd &c) const
 tests for equality of weight and value
bool operator!= (const OutputCmd &c) const
 tests for inequality of weight and value

Public Attributes

float value
 value of the output
float weight
 weight to be used in averaging, 0 to "fall through"

Static Public Attributes

static OutputCmd unused
 handy sometimes for returning a reference to a 0,0 cmd

Constructor & Destructor Documentation

OutputCmd::OutputCmd (  ) 

Constructor.

Definition at line 9 of file OutputCmd.h.

OutputCmd::OutputCmd ( float  v  ) 

Constructor (provides implicit conversion from float).

Definition at line 10 of file OutputCmd.h.

OutputCmd::OutputCmd ( float  v,
float  w 
)

Constructor.

Definition at line 11 of file OutputCmd.h.

OutputCmd::OutputCmd ( const OutputCmd a,
const OutputCmd b,
float  w 
)

Constructor, see set(a,b,w).

Definition at line 12 of file OutputCmd.h.


Member Function Documentation

bool OutputCmd::operator!= ( const OutputCmd c  )  const

tests for inequality of weight and value

Definition at line 23 of file OutputCmd.h.

OutputCmd& OutputCmd::operator= ( float  v  ) 

assignment from a float, set weight to 1

Definition at line 17 of file OutputCmd.h.

OutputCmd& OutputCmd::operator= ( const OutputCmd oc  ) 

assignment from another OutputCmd (just copy everything, straightforward)

Definition at line 15 of file OutputCmd.h.

bool OutputCmd::operator== ( const OutputCmd c  )  const

tests for equality of weight and value

Definition at line 22 of file OutputCmd.h.

void OutputCmd::set ( const OutputCmd a,
const OutputCmd b,
float  w 
)

sets the value to a weighted average of a and b (higher w, more a)

Definition at line 20 of file OutputCmd.h.

void OutputCmd::unset (  ) 

sets value and weight to 0

Definition at line 21 of file OutputCmd.h.

Referenced by MotionSequenceEngine::getOutputCmd(), and TailWagMC::unsetTilt().


Member Data Documentation

handy sometimes for returning a reference to a 0,0 cmd

Definition at line 27 of file OutputCmd.h.


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:13 2016 by Doxygen 1.6.3