Homepage Demos Overview Downloads Tutorials Reference
Credits

LocomotionEvent Class Reference

#include <LocomotionEvent.h>

Inheritance diagram for LocomotionEvent:

Inheritance graph
[legend]
List of all members.

Detailed Description

Gives updates regarding the current movement of the robot through the world.

An activate event will be sent when a potential source of motion is created, and a deactivate when it is destroyed. Status events will be sent at any change of direction/speed.

The source ID field will hold the MotionManager::MC_ID of the sending MotionCommand

Definition at line 13 of file LocomotionEvent.h.

Public Member Functions

LocomotionEventsetXYA (float X, float Y, float A)
 Allows you to set the new X, Y, and A components.

virtual unsigned int getBinSize () const
 calculates space needed to save - if you can't precisely add up the size, overestimate and things will still work.

virtual unsigned int LoadBuffer (const char buf[], unsigned int len)
 Load from a saved buffer.

virtual unsigned int SaveBuffer (char buf[], unsigned int len) const
 Save to a given buffer.

Constructors
 LocomotionEvent ()
 constructor

 LocomotionEvent (EventGeneratorID_t gid, unsigned int sid, EventTypeID_t tid, unsigned int dur=0)
 constructor

 LocomotionEvent (EventGeneratorID_t gid, unsigned int sid, EventTypeID_t tid, unsigned int dur, const std::string &n, float mag)
 constructor


Public Attributes

float x
 the new x component (body relative)

float y
 the new y component (body relative)

float a
 the new angular component (body relative)


Constructor & Destructor Documentation

LocomotionEvent::LocomotionEvent  )  [inline]
 

constructor

Definition at line 19 of file LocomotionEvent.h.

LocomotionEvent::LocomotionEvent EventGeneratorID_t  gid,
unsigned int  sid,
EventTypeID_t  tid,
unsigned int  dur = 0
[inline]
 

constructor

Definition at line 20 of file LocomotionEvent.h.

LocomotionEvent::LocomotionEvent EventGeneratorID_t  gid,
unsigned int  sid,
EventTypeID_t  tid,
unsigned int  dur,
const std::string &  n,
float  mag
[inline]
 

constructor

Definition at line 21 of file LocomotionEvent.h.


Member Function Documentation

virtual unsigned int LocomotionEvent::getBinSize  )  const [inline, virtual]
 

calculates space needed to save - if you can't precisely add up the size, overestimate and things will still work.

Returns:
number of bytes read/written, 0 if error (or empty)

Reimplemented from EventBase.

Definition at line 32 of file LocomotionEvent.h.

virtual unsigned int LocomotionEvent::LoadBuffer const char  buf[],
unsigned int  len
[inline, virtual]
 

Load from a saved buffer.

Parameters:
buf pointer to the memory where you should begin loading
len length of buf available (this isn't all yours, might be more stuff saved after yours)
Returns:
the number of bytes actually used

Reimplemented from EventBase.

Definition at line 41 of file LocomotionEvent.h.

Referenced by EventTranslator::sendEvent().

virtual unsigned int LocomotionEvent::SaveBuffer char  buf[],
unsigned int  len
const [inline, virtual]
 

Save to a given buffer.

Parameters:
buf pointer to the memory where you should begin writing
len length of buf available. (this isn't all yours, constrain yourself to what you returned in getBinSize() )
Returns:
the number of bytes actually used

Reimplemented from EventBase.

Definition at line 57 of file LocomotionEvent.h.

LocomotionEvent& LocomotionEvent::setXYA float  X,
float  Y,
float  A
[inline]
 

Allows you to set the new X, Y, and A components.

Definition at line 25 of file LocomotionEvent.h.

Referenced by WalkMC::DoStart(), WalkMC::DoStop(), WorldStateVelDaemon::processEvent(), and WalkMC::updateOutputs().


Member Data Documentation

float LocomotionEvent::a
 

the new angular component (body relative)

Definition at line 75 of file LocomotionEvent.h.

Referenced by getBinSize(), LoadBuffer(), LocomotionEvent(), EventLogger::processEvent(), SaveBuffer(), setXYA(), and WorldStateVelDaemon::trapEvent().

float LocomotionEvent::x
 

the new x component (body relative)

Definition at line 73 of file LocomotionEvent.h.

Referenced by getBinSize(), LoadBuffer(), LocomotionEvent(), EventLogger::processEvent(), SaveBuffer(), setXYA(), and WorldStateVelDaemon::trapEvent().

float LocomotionEvent::y
 

the new y component (body relative)

Definition at line 74 of file LocomotionEvent.h.

Referenced by getBinSize(), LoadBuffer(), LocomotionEvent(), EventLogger::processEvent(), SaveBuffer(), setXYA(), and WorldStateVelDaemon::trapEvent().


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

Tekkotsu v2.1
Generated Tue Mar 16 23:22:16 2004 by Doxygen 1.3.5