LocomotionEvent Class Reference#include <LocomotionEvent.h>
Inheritance diagram for LocomotionEvent:
[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 |
LocomotionEvent & | setXYA (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.
|
|
| 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] |
|
LocomotionEvent::LocomotionEvent |
( |
EventGeneratorID_t |
gid, |
|
|
unsigned int |
sid, |
|
|
EventTypeID_t |
tid, |
|
|
unsigned int |
dur, |
|
|
const std::string & |
n, |
|
|
float |
mag |
|
) |
[inline] |
|
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] |
|
Member Data Documentation
The documentation for this class was generated from the following file:
|