Homepage Demos Overview Downloads Tutorials Reference
Credits

Aibo3DControllerBehavior Class Reference

#include <Aibo3DControllerBehavior.h>

Inheritance diagram for Aibo3DControllerBehavior:

Inheritance graph
[legend]
List of all members.

Detailed Description

Listens to aibo3d control commands coming in from the command port.

Definition at line 25 of file Aibo3DControllerBehavior.h.

Public Member Functions

 Aibo3DControllerBehavior ()
 constructor

virtual ~Aibo3DControllerBehavior ()
 destructor

int registerData (char *buf, int bytes)
 processes input from the GUI

void updateRC ()
virtual void DoStart ()
 By default, merely adds to the reference counter (through AddReference()) you should still call this from your overriding methods.

virtual void DoStop ()
 By default, subtracts from the reference counter, and deletes if zero you should still call this when you override this call this at the end of your DoStop(), not beginning (it might delete this ).

virtual std::string getGUIType () const
 returns string corresponding to the Java GUI which should be launched

virtual unsigned int getPort () const
 returns port number the Java GUI should connect to

virtual std::string getName () const
 returns name of behavior


Static Public Member Functions

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


Protected Attributes

MotionManager::MC_ID rcontrol_id
 remote controller motion command's id

Socketcmdsock
 The input command stream socket.

float val [NumPIDJoints]
 the value to use for each of the PID joints

char * fbuf
 alias to val

unsigned int pos
 a counter to know when we've gotten 4 frames


Private Member Functions

 Aibo3DControllerBehavior (const Aibo3DControllerBehavior &)
 don't call

Aibo3DControllerBehavior operator= (const Aibo3DControllerBehavior &)
 don't call


Constructor & Destructor Documentation

Aibo3DControllerBehavior::Aibo3DControllerBehavior const Aibo3DControllerBehavior  )  [private]
 

don't call

Aibo3DControllerBehavior::Aibo3DControllerBehavior  )  [inline]
 

constructor

Definition at line 42 of file Aibo3DControllerBehavior.h.

References aibo3dControllerBehavior, cmdsock, fbuf, pos, rcontrol_id, Wireless::setDaemon(), SocketNS::SOCK_STREAM, val, and wireless.

Here is the call graph for this function:

virtual Aibo3DControllerBehavior::~Aibo3DControllerBehavior  )  [inline, virtual]
 

destructor

Definition at line 50 of file Aibo3DControllerBehavior.h.

References aibo3dControllerBehavior.


Member Function Documentation

virtual void Aibo3DControllerBehavior::DoStart  )  [inline, virtual]
 

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

Reimplemented from BehaviorBase.

Definition at line 75 of file Aibo3DControllerBehavior.h.

References MotionManager::addMotion(), Config::main_config::aibo3d_port, aibo3dcontrollercmd_callback(), cmdsock, config, BehaviorBase::DoStart(), getGUIType(), getPort(), Wireless::listen(), Controller::loadGUI(), Config::main, motman, ERS210Info::NumPIDJoints, WorldState::outputs, rcontrol_id, Wireless::setReceiver(), Socket::sock, state, updateRC(), val, and wireless.

Here is the call graph for this function:

virtual void Aibo3DControllerBehavior::DoStop  )  [inline, virtual]
 

By default, subtracts from the reference counter, and deletes if zero you should still call this when you override this call this at the end of your DoStop(), not beginning (it might delete this ).

Reimplemented from BehaviorBase.

Definition at line 95 of file Aibo3DControllerBehavior.h.

References Wireless::close(), Controller::closeGUI(), cmdsock, BehaviorBase::DoStop(), getGUIType(), motman, rcontrol_id, MotionManager::removeMotion(), and wireless.

Here is the call graph for this function:

std::string Aibo3DControllerBehavior::getClassDescription  )  [inline, static]
 

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

Reimplemented from BehaviorBase.

Definition at line 111 of file Aibo3DControllerBehavior.h.

References Config::main_config::aibo3d_port, config, and Config::main.

virtual std::string Aibo3DControllerBehavior::getGUIType  )  const [inline, virtual]
 

returns string corresponding to the Java GUI which should be launched

Definition at line 106 of file Aibo3DControllerBehavior.h.

virtual std::string Aibo3DControllerBehavior::getName  )  const [inline, virtual]
 

returns name of behavior

Implements BehaviorBase.

Definition at line 110 of file Aibo3DControllerBehavior.h.

virtual unsigned int Aibo3DControllerBehavior::getPort  )  const [inline, virtual]
 

returns port number the Java GUI should connect to

Definition at line 108 of file Aibo3DControllerBehavior.h.

References Config::main_config::aibo3d_port, config, and Config::main.

Aibo3DControllerBehavior Aibo3DControllerBehavior::operator= const Aibo3DControllerBehavior  )  [private]
 

don't call

int Aibo3DControllerBehavior::registerData char *  buf,
int  bytes
[inline]
 

processes input from the GUI

Definition at line 53 of file Aibo3DControllerBehavior.h.

References fbuf, ERS210Info::NumPIDJoints, pos, and updateRC().

Here is the call graph for this function:

void Aibo3DControllerBehavior::updateRC  )  [inline]
 

Definition at line 67 of file Aibo3DControllerBehavior.h.

References MotionManager::checkinMotion(), MotionManager::checkoutMotion(), RemoteControllerMC::cmds, motman, ERS210Info::NumPIDJoints, rcontrol_id, RemoteControllerMC::setDirty(), and val.

Here is the call graph for this function:


Member Data Documentation

Socket* Aibo3DControllerBehavior::cmdsock [protected]
 

The input command stream socket.

Definition at line 30 of file Aibo3DControllerBehavior.h.

char* Aibo3DControllerBehavior::fbuf [protected]
 

alias to val

Definition at line 33 of file Aibo3DControllerBehavior.h.

unsigned int Aibo3DControllerBehavior::pos [protected]
 

a counter to know when we've gotten 4 frames

Definition at line 34 of file Aibo3DControllerBehavior.h.

MotionManager::MC_ID Aibo3DControllerBehavior::rcontrol_id [protected]
 

remote controller motion command's id

Definition at line 27 of file Aibo3DControllerBehavior.h.

float Aibo3DControllerBehavior::val[NumPIDJoints] [protected]
 

the value to use for each of the PID joints

Definition at line 32 of file Aibo3DControllerBehavior.h.


The documentation for this class was generated from the following file:
Tekkotsu v1.5
Generated Fri Oct 10 15:54:50 2003 by Doxygen 1.3.4