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

HeadLevelBehavior Class Reference

#include <HeadLevelBehavior.h>

Inheritance diagram for HeadLevelBehavior:

Inheritance graph
[legend]
List of all members.

Detailed Description

Tests the head leveling code of HeadPointerMC.

Definition at line 13 of file HeadLevelBehavior.h.

Public Member Functions

 HeadLevelBehavior ()
 constructor

virtual ~HeadLevelBehavior ()
 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, 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 void processEvent (const EventBase &event)
 Allows you to get away with not supplying a processEvent() function for the EventListener interface. By default, does nothing.

virtual std::string getName () const
 Identifies the behavior in menus and such.


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

const EventBase head_release
 event mask for releasing head (chin button down)

const EventBase head_lock
 event mask for locking head (chin button up)

const SharedObject< HeadPointerMChead
 might as well just hang on to the whole memory region and reuse it, we can peek for most of our stuff

MotionManager::MC_ID head_id
 MCID of headpointer.


Constructor & Destructor Documentation

HeadLevelBehavior::HeadLevelBehavior  )  [inline]
 

constructor

Definition at line 16 of file HeadLevelBehavior.h.

References SharedObjectBase::getRegion(), head, head_id, head_lock, head_release, and ERS210Info::HeadFrButOffset.

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

destructor

Definition at line 26 of file HeadLevelBehavior.h.

References SharedObjectBase::getRegion(), and head.


Member Function Documentation

virtual void HeadLevelBehavior::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 30 of file HeadLevelBehavior.h.

References EventRouter::addListener(), MotionManager::addMotion(), BehaviorBase::DoStart(), erouter, HeadPointerMC::GravityRelative, head, head_id, head_lock, head_release, ERS210Info::HeadOffset, motman, WorldState::outputs, ERS210Info::PanOffset, ERS210Info::RollOffset, state, and ERS210Info::TiltOffset.

virtual void HeadLevelBehavior::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 39 of file HeadLevelBehavior.h.

References HeadPointerMC::BodyRelative, BehaviorBase::DoStop(), erouter, EventRouter::forgetListener(), head, head_id, motman, and MotionManager::removeMotion().

std::string HeadLevelBehavior::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 57 of file HeadLevelBehavior.h.

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

Identifies the behavior in menus and such.

Implements BehaviorBase.

Definition at line 56 of file HeadLevelBehavior.h.

virtual void HeadLevelBehavior::processEvent const EventBase event  )  [inline, virtual]
 

Allows you to get away with not supplying a processEvent() function for the EventListener interface. By default, does nothing.

Reimplemented from BehaviorBase.

Definition at line 46 of file HeadLevelBehavior.h.

References MotionManager::addMotion(), ASSERTRET, HeadPointerMC::BodyRelative, EventBase::getName(), head, head_lock, head_release, ERS210Info::HeadOffset, motman, ERS210Info::NumHeadJoints, WorldState::outputs, state, and ERS210Info::TPROffset_t.


Member Data Documentation

const SharedObject<HeadPointerMC> HeadLevelBehavior::head [protected]
 

might as well just hang on to the whole memory region and reuse it, we can peek for most of our stuff

Definition at line 62 of file HeadLevelBehavior.h.

MotionManager::MC_ID HeadLevelBehavior::head_id [protected]
 

MCID of headpointer.

Definition at line 63 of file HeadLevelBehavior.h.

const EventBase HeadLevelBehavior::head_lock [protected]
 

event mask for locking head (chin button up)

Definition at line 61 of file HeadLevelBehavior.h.

const EventBase HeadLevelBehavior::head_release [protected]
 

event mask for releasing head (chin button down)

Definition at line 60 of file HeadLevelBehavior.h.


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