Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

RoverControllerBehavior Class Reference

#include <RoverControllerBehavior.h>

Inheritance diagram for RoverControllerBehavior:

List of all members.


Detailed Description

DESCRIPTION.

Definition at line 18 of file RoverControllerBehavior.h.


Public Member Functions

virtual ~RoverControllerBehavior ()
 destructor
virtual void DoStart ()
 By default, merely adds to the reference counter (through AddReference()); Note you should still call this from your overriding methods.
virtual void DoStop ()
 By default, subtracts from the reference counter (RemoveReference()), and thus may deletex if zero; Don't forget to still call this when you override this; Warning: call this at the end of your DoStop(), not beginning (it might delete this ).
virtual std::string getDescription () const
 Gives a short description of what this particular instantiation does (in case a more specific description is needed on an individual basis).

Static Public Member Functions

static RoverControllerBehaviorgetInstance ()
 returns theOne, initializing it if necessary
static std::string getClassDescription ()
 Gives a short description of what this class of behaviors does... you should override this (but don't have to).

Static Public Attributes

static const int PORT = 10056
 port number to open up

Protected Member Functions

 RoverControllerBehavior ()
 constructor
void initScale ()
int update (char *buf, int bytes)
 called by wireless (via callback()) when there's new data
void updateArm ()
void updateHead ()

Static Protected Member Functions

static int callback (char *buf, int bytes)
 called by wireless when there's new data, forwards call to theOne->update

Protected Attributes

float tgtScale
float tgtXOff
float tgtYOff
float heightScale
float heightOff
float distanceScale
float tgtX
float tgtY
float tgtZ
float lookX
float lookY
float lookD
float gripperAngle
float perspective
bool autoGripperAngle
bool autoPerspective
bool autoTrackGripper
bool maxDist
Socketcmdsock
 The input command stream socket.
MotionManager::MC_ID head
MotionManager::MC_ID arm

Static Protected Attributes

static RoverControllerBehaviortheOne

Private Member Functions

 RoverControllerBehavior (const RoverControllerBehavior &)
 don't call (copy constructor)
RoverControllerBehavioroperator= (const RoverControllerBehavior &)
 don't call (assignment operator)

Constructor & Destructor Documentation

virtual RoverControllerBehavior::~RoverControllerBehavior (  )  [inline, virtual]

destructor

Definition at line 30 of file RoverControllerBehavior.h.

RoverControllerBehavior::RoverControllerBehavior (  )  [inline, protected]

constructor

Definition at line 45 of file RoverControllerBehavior.h.

RoverControllerBehavior::RoverControllerBehavior ( const RoverControllerBehavior  )  [private]

don't call (copy constructor)


Member Function Documentation

static RoverControllerBehavior& RoverControllerBehavior::getInstance (  )  [inline, static]

returns theOne, initializing it if necessary

Definition at line 23 of file RoverControllerBehavior.h.

virtual void RoverControllerBehavior::DoStart (  )  [virtual]

By default, merely adds to the reference counter (through AddReference()); Note you should still call this from your overriding methods.

Reimplemented from BehaviorBase.

virtual void RoverControllerBehavior::DoStop (  )  [virtual]

By default, subtracts from the reference counter (RemoveReference()), and thus may deletex if zero; Don't forget to still call this when you override this; Warning: call this at the end of your DoStop(), not beginning (it might delete this ).

Reimplemented from BehaviorBase.

Referenced by ~RoverControllerBehavior().

static std::string RoverControllerBehavior::getClassDescription (  )  [inline, static]

Gives a short description of what this class of behaviors does... you should override this (but don't have to).

If you do override this, also consider overriding getDescription() to return it

Reimplemented from BehaviorBase.

Definition at line 39 of file RoverControllerBehavior.h.

Referenced by getDescription().

virtual std::string RoverControllerBehavior::getDescription (  )  const [inline, virtual]

Gives a short description of what this particular instantiation does (in case a more specific description is needed on an individual basis).

By default simply returns getName(), because any calls from a BehaviorBase function to getClassDescription() are going to call BehaviorBase::getClassDescription(), not ~YourSubClass~getClassDescription(), because static functions can't be virtual in C++ (doh!)

This means that getDescription called on a pointer to a BehaviorBase of unknown subtype would always return an empty string, which is pretty useless. So instead we return the name in this situation. If you want getDescription to return getClassDescription, you'll have to override it in your subclass to do so.

Reimplemented from BehaviorBase.

Definition at line 40 of file RoverControllerBehavior.h.

void RoverControllerBehavior::initScale (  )  [protected]

Referenced by RoverControllerBehavior().

static int RoverControllerBehavior::callback ( char *  buf,
int  bytes 
) [inline, static, protected]

called by wireless when there's new data, forwards call to theOne->update

Definition at line 59 of file RoverControllerBehavior.h.

int RoverControllerBehavior::update ( char *  buf,
int  bytes 
) [protected]

called by wireless (via callback()) when there's new data

Referenced by callback().

void RoverControllerBehavior::updateArm (  )  [protected]

void RoverControllerBehavior::updateHead (  )  [protected]

RoverControllerBehavior& RoverControllerBehavior::operator= ( const RoverControllerBehavior  )  [private]

don't call (assignment operator)


Member Data Documentation

const int RoverControllerBehavior::PORT = 10056 [static]

port number to open up

Definition at line 20 of file RoverControllerBehavior.h.

Definition at line 68 of file RoverControllerBehavior.h.

Definition at line 69 of file RoverControllerBehavior.h.

Definition at line 70 of file RoverControllerBehavior.h.

Definition at line 71 of file RoverControllerBehavior.h.

Definition at line 72 of file RoverControllerBehavior.h.

Definition at line 73 of file RoverControllerBehavior.h.

float RoverControllerBehavior::tgtX [protected]

Definition at line 75 of file RoverControllerBehavior.h.

float RoverControllerBehavior::tgtY [protected]

Definition at line 76 of file RoverControllerBehavior.h.

float RoverControllerBehavior::tgtZ [protected]

Definition at line 77 of file RoverControllerBehavior.h.

float RoverControllerBehavior::lookX [protected]

Definition at line 78 of file RoverControllerBehavior.h.

float RoverControllerBehavior::lookY [protected]

Definition at line 79 of file RoverControllerBehavior.h.

float RoverControllerBehavior::lookD [protected]

Definition at line 80 of file RoverControllerBehavior.h.

Definition at line 82 of file RoverControllerBehavior.h.

Definition at line 83 of file RoverControllerBehavior.h.

Definition at line 85 of file RoverControllerBehavior.h.

Definition at line 86 of file RoverControllerBehavior.h.

Definition at line 87 of file RoverControllerBehavior.h.

Definition at line 88 of file RoverControllerBehavior.h.

The input command stream socket.

Definition at line 90 of file RoverControllerBehavior.h.


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

Tekkotsu v4.0
Generated Thu Nov 22 00:58:40 2007 by Doxygen 1.5.4