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 15 of file LocomotionEvent.h.
|
Public Member Functions |
virtual unsigned int | getClassTypeID () const |
| All subclasses should override this and return a unique ID for their class.
|
LocomotionEvent & | setXYA (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 |
| values to pass to setSaveFormat()
|
virtual unsigned int | LoadBinaryBuffer (const char buf[], unsigned int len) |
| values to pass to setSaveFormat()
|
virtual unsigned int | SaveBinaryBuffer (char buf[], unsigned int len) const |
| values to pass to setSaveFormat()
|
virtual void | LoadXML (xmlNode *node) |
| values to pass to setSaveFormat()
|
virtual void | SaveXML (xmlNode *node) const |
| values to pass to setSaveFormat()
|
|
| 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
|
virtual EventBase * | clone () const |
| 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 EventBase* LocomotionEvent::clone |
( |
|
) |
const [inline, virtual] |
|
unsigned int LocomotionEvent::getBinSize |
( |
|
) |
const [virtual] |
|
virtual unsigned int LocomotionEvent::getClassTypeID |
( |
|
) |
const [inline, virtual] |
|
|
All subclasses should override this and return a unique ID for their class.
All IDs corresponding to all-capital letters are reserved for future framework expansion. (Thus, user subclasses should contain at least one lower-case letter.) This code can be used when serializing to allow quick identification of the class type by the receiver.
Reimplemented from EventBase.
Definition at line 27 of file LocomotionEvent.h. |
std::string LocomotionEvent::getDescription |
( |
bool |
showTypeSpecific = true , |
|
|
unsigned int |
verbosity = 0 |
|
) |
const [virtual] |
|
|
generates a description of the event with variable verbosity
- Parameters:
-
| showTypeSpecific | should be read by subclasses to add additional information |
| verbosity | can be one of the following values:
- 0 - Basic: event_name \t generator_id \t source_id \t type_id
- 1 - Numerics: event_name \t generator_id \t source_id \t type_id
- 2 - Timing: event_name \t generator_id \t source_id \t type_id \t duration \t timestamp
- 3 and above - Full: event_name \t generator_id \t source_id \t type_id \t duration \t timestamp \t magnitude if showTypeSpecific, additional fields will be added after the common fields listed above.
|
Reimplemented from EventBase.
Definition at line 9 of file LocomotionEvent.cc. |
unsigned int LocomotionEvent::LoadBinaryBuffer |
( |
const char |
buf[], |
|
|
unsigned int |
len |
|
) |
[virtual] |
|
void LocomotionEvent::LoadXML |
( |
xmlNode * |
node |
) |
[virtual] |
|
unsigned int LocomotionEvent::SaveBinaryBuffer |
( |
char |
buf[], |
|
|
unsigned int |
len |
|
) |
const [virtual] |
|
void LocomotionEvent::SaveXML |
( |
xmlNode * |
node |
) |
const [virtual] |
|
LocomotionEvent& LocomotionEvent::setXYA |
( |
float |
X, |
|
|
float |
Y, |
|
|
float |
A |
|
) |
[inline] |
|
Member Data Documentation
The documentation for this class was generated from the following files:
|