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 std::string getDescription (bool showTypeSpecific=true, unsigned int verbosity=0) const
 generates a description of the event with variable verbosity
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

unsigned int LocomotionEvent::getBinSize  )  const [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 14 of file LocomotionEvent.cc.

std::string LocomotionEvent::getDescription bool  showTypeSpecific = true,
unsigned int  verbosity = 0
const [virtual]
 

generates a description of the event with variable verbosity

Parameters:
showTypeSpecific will signal subclasses to add additional information
verbosity can be one of the following values:
  • 0 - the name and type
  • 1 - the name, type, duration, and timestamp
  • 2 and above - the name, type, duration, and magnitude if showTypeSpecific, additional fields will be added after the common fields listed above.

Reimplemented from EventBase.

Definition at line 5 of file LocomotionEvent.cc.

unsigned int LocomotionEvent::LoadBuffer const char  buf[],
unsigned int  len
[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 24 of file LocomotionEvent.cc.

Referenced by EventTranslator::sendEvent().

unsigned int LocomotionEvent::SaveBuffer char  buf[],
unsigned int  len
const [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 41 of file LocomotionEvent.cc.

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 40 of file LocomotionEvent.h.

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

float LocomotionEvent::x
 

the new x component (body relative)

Definition at line 38 of file LocomotionEvent.h.

Referenced by getDescription(), LoadBuffer(), LocomotionEvent(), SaveBuffer(), setXYA(), WorldStateVelDaemon::trapEvent(), and WalkMC::updateOutputs().

float LocomotionEvent::y
 

the new y component (body relative)

Definition at line 39 of file LocomotionEvent.h.

Referenced by getDescription(), LoadBuffer(), LocomotionEvent(), SaveBuffer(), setXYA(), and WorldStateVelDaemon::trapEvent().


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

Tekkotsu v2.2
Generated Tue Oct 19 14:20:19 2004 by Doxygen 1.3.9.1