Homepage Demos Overview Downloads Tutorials Reference
Credits
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Search

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 23 of file Aibo3DControllerBehavior.h.

Public Member Functions

 Aibo3DControllerBehavior ()
 constructor

virtual ~Aibo3DControllerBehavior ()
 destructor

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

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, and deletes if zero
Note:
you should 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 getGUIType () const
virtual unsigned int getPort () const
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 40 of file Aibo3DControllerBehavior.h.

References aibo3dControllerBehavior, cmdsock, fbuf, pos, rcontrol_id, SocketNS::SOCK_STREAM, val, and wireless.

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

destructor

Definition at line 47 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())

Note:
you should still call this from your overriding methods.

Reimplemented from BehaviorBase.

Definition at line 69 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, rcontrol_id, Wireless::setReceiver(), Socket::sock, and wireless.

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

By default, subtracts from the reference counter, and deletes if zero

Note:
you should 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.

Definition at line 86 of file Aibo3DControllerBehavior.h.

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

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.

Reimplemented in Aibo3DMonitorBehavior.

Definition at line 100 of file Aibo3DControllerBehavior.h.

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

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

Reimplemented in Aibo3DMonitorBehavior.

Definition at line 96 of file Aibo3DControllerBehavior.h.

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

returns name of behavior

Implements BehaviorBase.

Reimplemented in Aibo3DMonitorBehavior.

Definition at line 99 of file Aibo3DControllerBehavior.h.

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

Reimplemented in Aibo3DMonitorBehavior.

Definition at line 97 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 50 of file Aibo3DControllerBehavior.h.

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


Member Data Documentation

Socket* Aibo3DControllerBehavior::cmdsock [protected]
 

The input command stream socket.

Definition at line 28 of file Aibo3DControllerBehavior.h.

char* Aibo3DControllerBehavior::fbuf [protected]
 

alias to val

Definition at line 31 of file Aibo3DControllerBehavior.h.

unsigned int Aibo3DControllerBehavior::pos [protected]
 

a counter to know when we've gotten 4 frames

Definition at line 32 of file Aibo3DControllerBehavior.h.

MotionManager::MC_ID Aibo3DControllerBehavior::rcontrol_id [protected]
 

remote controller motion command's id

Definition at line 25 of file Aibo3DControllerBehavior.h.

float Aibo3DControllerBehavior::val[NumPIDJoints] [protected]
 

the value to use for each of the PID joints

Definition at line 30 of file Aibo3DControllerBehavior.h.


The documentation for this class was generated from the following file:
Tekkotsu v1.4
Generated Sat Jul 19 00:08:47 2003 by Doxygen 1.3.2