EventBase Class Reference#include <EventBase.h>
Inheritance diagram for EventBase:
[legend]List of all members.
Detailed Description
The basis of events passed around the high level system.
Contains the list of 'known' event generators in EventGeneratorID_t and EventGeneratorNames[]. If you want to make a new generator, all you have to do is add a new entry to the ID list (EventGeneratorID_t) and then put its name in the EventGeneratorNames[] array.
The EventGeneratorID_t list should contain links to the generators' documentation, or will directly give information about what to expect in events from that generator.
Alternatively, there is an 'unlicensed spectrum' available under the unknownEGID. You can send out events from that generator just like any other, but it should only be used for quick tests and hacking around...
The sourceID (just an unsigned int) is generator specific. A SID of i from the button generator (buttonEGID) will refer to a particular button, whereas a SID from a vision detector (say visObjEGID) refers to seeing a particular object. These SIDs are usually defined in the generators themselves.
If more information needs to be sent along with the event, the cleanest solution is to create a subclass of EventBase to hold the additional information. For example, you can see the existing subclasses in the inheritance diagram above. If you want to use a quick hack however, you could assume the pointer size is the same as an unsigned int and just pass a pointer to data as the SID. Your funeral, err, I mean your call. ;)
The duration field is also generator specific - some may refer to the time since the last activation event (e.g. button events) where as others refer to time since last status (e.g. sensors updates)
- Note:
- All subclasses must override getClassTypeID() and provide a unique value to allow fast serialization for inter-process communication.
Definition at line 47 of file EventBase.h.
|
LoadSave interface |
Useful for serializing events to send between processes
|
enum | SaveFormat { BINARY,
XML
} |
| values to pass to setSaveFormat() More...
|
virtual unsigned int | getClassTypeID () const |
| All subclasses should override this and return a unique ID for their class.
|
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()
|
virtual unsigned int | LoadBuffer (const char buf[], unsigned int len) |
| values to pass to setSaveFormat()
|
virtual unsigned int | SaveBuffer (char buf[], unsigned int len) const |
| values to pass to setSaveFormat()
|
virtual unsigned int | LoadFile (const char *filename) |
| values to pass to setSaveFormat()
|
virtual unsigned int | SaveFile (const char *filename) const |
| values to pass to setSaveFormat()
|
virtual unsigned int | LoadFileStream (FILE *f) |
| values to pass to setSaveFormat()
|
virtual unsigned int | SaveFileStream (FILE *f) const |
| values to pass to setSaveFormat()
|
virtual void | setSaveFormat (SaveFormat sf) const |
| set saveFormat
|
virtual SaveFormat | getSaveFormat () const |
| return saveFormat
|
Methods |
virtual const std::string & | getName () const |
| gets the name of the event - useful for debugging output, see also getDescription()
|
virtual EventBase & | setName (const std::string &n) |
| sets name to a given string, prevents overwriting by generated names
|
virtual float | getMagnitude () const |
| gets "strength" of event - by default 1 for activate and status events, 0 for deactivate events
|
virtual EventBase & | setMagnitude (float m) |
| sets "strength" of event - you may want to override the default values (see getMagnitude())
|
virtual unsigned int | getTimeStamp () const |
| time event was created
|
virtual EventGeneratorID_t | getGeneratorID () const |
| gets the generator ID for this event
|
virtual EventBase & | setGeneratorID (EventGeneratorID_t gid) |
| sets the generator ID for this event
|
virtual unsigned int | getSourceID () const |
| gets the source ID for this event
|
virtual EventBase & | setSourceID (unsigned int sid) |
| sets the source ID for this event
|
virtual EventTypeID_t | getTypeID () const |
| gets the type ID
|
virtual EventBase & | setTypeID (EventTypeID_t tid) |
| sets the type ID
|
virtual unsigned int | getDuration () const |
| gets the time since the beginning of this sequence (the timestamp of the activate event)
|
virtual EventBase & | setDuration (unsigned int d) |
| sets the time since the beginning of this sequence (the timestamp of the activate event)
|
virtual const std::string & | resetName () |
| resets name to generated form, overwriting any previous name
|
virtual bool | isCustomName () const |
| returns true if not using the generated name
|
virtual std::string | getDescription (bool showTypeSpecific=true, unsigned int verbosity=0) const |
| generates a description of the event with variable verbosity
|
bool | operator< (const EventBase &e) const |
| gets the name of the event - useful for debugging output, see also getDescription()
|
virtual bool | operator== (const EventBase &eb) const |
| is true if the genID, typeID, and sourceID's all match
|
bool | sameGenSource (const EventBase &eb) const |
| tests to see if events have the same generator and source IDs
|
bool | longerThan (const EventBase &eb) const |
| compares event duration and ensures same event generator, source, and type - useful for event masks
|
bool | shorterThan (const EventBase &eb) const |
| compares event duration and ensures same event generator, source, and type - useful for event masks
|
bool | equalOrLongerThan (const EventBase &eb) const |
| compares event duration and ensures same event generator, source, and type - useful for event masks
|
bool | equalOrShorterThan (const EventBase &eb) const |
| compares event duration and ensures same event generator, source, and type - useful for event masks
|
static bool | isValidGeneratorID (unsigned int egid) |
| gets the name of the event - useful for debugging output, see also getDescription()
|
Public Types |
enum | EventGeneratorID_t {
unknownEGID = 0,
aiEGID,
audioEGID,
buttonEGID,
erouterEGID,
estopEGID,
locomotionEGID,
micOSndEGID,
micRawEGID,
micFFTEGID,
motmanEGID,
powerEGID,
sensorEGID,
stateMachineEGID,
stateTransitionEGID,
textmsgEGID,
timerEGID,
visOFbkEGID,
visRawCameraEGID,
visInterleaveEGID,
visJPEGEGID,
visSegmentEGID,
visRLEEGID,
visRegionEGID,
visObjEGID,
wmVarEGID,
worldModelEGID,
numEGIDs
} |
| Lists all possible event generator ids. More...
|
enum | EventTypeID_t { activateETID,
statusETID,
deactivateETID,
numETIDs
} |
| an event type id is used to denote whether it's the first in a sequence (button down), in a sequence (button still down), or last (button up) More...
|
Public Member Functions |
|
| EventBase () |
| constructor
|
| EventBase (EventGeneratorID_t gid, unsigned int sid, EventTypeID_t tid, unsigned int dur=0) |
| constructor
|
| EventBase (EventGeneratorID_t gid, unsigned int sid, EventTypeID_t tid, unsigned int dur, const std::string &n) |
| constructor
|
| EventBase (EventGeneratorID_t gid, unsigned int sid, EventTypeID_t tid, unsigned int dur, const std::string &n, float mag) |
| constructor
|
virtual | ~EventBase () |
| destructor
|
virtual EventBase * | clone () const |
| allows a copy to be made of an event, supporting polymorphism
|
Static Public Attributes |
static const char *const | EventGeneratorNames [numEGIDs] |
| Holds string versions of each of the generator's names, handy for debugging so you can output the events as readable strings (you'll find this in EventBase.cc since it can't go in the header or we get multiply-defined errors during linking).
|
static const char *const | EventTypeNames [numETIDs] |
| holds string versions of EventTypeID_t
|
static const char *const | EventTypeAbbr [numETIDs] = { "A", "S", "D" } |
| holds abbreviated string versions of EventTypeID_t
|
Protected Member Functions |
virtual void | genName () |
| calls setName() with a string version of sourceID, decimal notation
|
Static Protected Member Functions |
static unsigned int | makeClassTypeID (const char *str) |
| converts the first 4 characters of str to an unsigned int, should ensure consistent byte ordering across platforms
|
Protected Attributes |
std::string | stim_id |
| the name of the event, use the same name consistently or else will be seen as different stimuli
|
float | magnitude |
| the current "strength" of the event/stimuli... MAKE SURE this gets set to ZERO IF event is DEACTIVATE
|
unsigned int | timestamp |
| the time the event was created - set automatically by constructor
|
SaveFormat | saveFormat |
| controls the format used during the next call to SaveBuffer() (packed binary or XML)
|
bool | nameisgen |
| tracks whether the current name (stim_id) was generated by genName() (true) or setName() (false)
|
EventGeneratorID_t | genID |
| generator ID, see EventGeneratorID_t
|
EventTypeID_t | typeID |
| type ID, see EventTypeID_t
|
unsigned int | sourceID |
| the source ID for this event Source IDs are defined by the generator that made it. This should give authors flexibility to design their modules without having to worry about ID space collision
|
unsigned int | duration |
| the time since this sequence started (like, how long the button has been pressed); not all generators will set this; Typically, this would be 0 for activate, (activate.timestamp-get_time()) for status and deactivate
|
Member Enumeration Documentation
|
Lists all possible event generator ids.
An event generator is a abstract source of events, used for listening to and parsing certain classes of events
IF YOU ADD AN EVENT GENERATOR, DON'T FORGET TO NAME IT (EventBase::EventGeneratorNames, actual names are in EventBase.cc) - Enumerator:
-
unknownEGID |
default EGID, used if you forget to set it, probably not a good idea to use this for anything except errors or testing quick hacks |
aiEGID |
not being used, yet (might use this when AI makes decisions?) |
audioEGID |
Sends an event when a sound starts/ends playback, status events as chained sounds end; SID is SoundManager::Play_ID; duration is playtime. |
buttonEGID |
Sends activate event for button down, deactivate for button up. Status events only for when pressure sensitive buttons' reading changes. (on sensorEGID updates); SIDs are from ButtonOffset_t in the namespace of the target model (e.g. ERS210Info::ButtonOffset_t); duration is button down time. |
erouterEGID |
Sends activate event on first listener, deactivate on last listener, and status on other listener changes.; SID is the generator ID affected. |
estopEGID |
Sends an event when the estop is turned on or off; SID is the MotionManager::MC_ID of the EmergencyStopMC; duration is length of estop activation. |
locomotionEGID |
Sends events regarding transportation in the world; you can/should assume these will all be LocomotionEvent classes; SID is MotionManager::MC_ID of posting MotionCommand; duration is the time since last velocity change of that MC. (You could generate these for things other than walking...). |
micOSndEGID |
Sends a DataEvent<OSoundVectorData> for every audio buffer received from the system; SID and duration are always 0 (This is generated by the MainObj instantiation of MMCombo). |
micRawEGID |
reserved for future use |
micFFTEGID |
reserved for future use |
motmanEGID |
Sends events when a MotionCommand is added or removed, SID is is the MotionManager::MC_ID, duration is always 0; individual MotionCommands may throw status events to signal intermediary status. |
powerEGID |
Sends events for low power warnings, temperature, etc. see PowerSourceID::PowerSourceID_t. |
sensorEGID |
Sends a status event when new sensor readings are available. see SensorSourceID::SensorSourceID_t. |
stateMachineEGID |
Sends an event upon entering and leaving a StateNode; SID is pointer to the StateNode; duration is always 0; some state will throw a status event when they have completed their task and are now idling. |
stateTransitionEGID |
Sends an event each time a transition is triggered; SID is a pointer to the transition; type is always status, duration is always 0; guaranteed to occur immediately *before* the transition actually occurs. |
textmsgEGID |
Sends status events when a text msg is received on console; generated by the Controller, SID is always -1; durations is always 0 (see Controller for more information). |
timerEGID |
Sends timer events; you set timers explicitly, you don't have to listen as well. (See EventRouter::addTimer()) There's no cross-talk, only the listener which requested the timer will receive it; SID is whatever you requested it to be; duration is the time (since boot, in ms) that the timer was supposed to go off; these are always status. |
visOFbkEGID |
Sends a DataEvent < OFbkImageVectorData > for every camera image received from the system; SID and duration are always 0 (This is generated by the MainObj instantiation of MMCombo). |
visRawCameraEGID |
Sends a FilterBankEvent when new raw camera images are available; SID is whatever value you gave during setup (typically in StartupBehavior_SetupVision.cc), duration is always 0. |
visInterleaveEGID |
Sends a FilterBankEvent when new interleaved images are available; SID is whatever value you gave during setup (typically in StartupBehavior_SetupVision.cc), duration is always 0. |
visJPEGEGID |
Sends a FilterBankEvent when JPEG compressed images are available; SID is whatever value you gave during setup (typically in StartupBehavior_SetupVision.cc), duration is always 0. |
visSegmentEGID |
Sends a SegmentedColorFilterBankEvent when color segmentated images are available; SID is whatever value you gave during setup (typically in StartupBehavior_SetupVision.cc), duration is always 0. |
visRLEEGID |
Sends a SegmentedColorFilterBankEvent when RLE encoded color segmentated images are available; SID is whatever value you gave during setup (typically in StartupBehavior_SetupVision.cc), duration is always 0. |
visRegionEGID |
Sends a SegmentedColorFilterBankEvent when color regions are available; SID is whatever value you gave during setup (typically in StartupBehavior_SetupVision.cc), duration is always 0. |
visObjEGID |
Sends VisionObjectEvents for objects detected in camera images; SID is whatever value you gave during setup (typically in StartupBehavior_SetupVision.cc), duration is always 0. |
wmVarEGID |
Sends an event when a watched memory is changed; source id is pointer to WMEntry. |
worldModelEGID |
not being used, yet (for when objects are detected/lost?) |
numEGIDs |
the number of generators available |
Definition at line 53 of file EventBase.h. |
|
an event type id is used to denote whether it's the first in a sequence (button down), in a sequence (button still down), or last (button up)
- Enumerator:
-
activateETID |
Start of an event sequence, e.g. button down. |
statusETID |
Indicates a value has changed, e.g. new sensor readings. |
deactivateETID |
Last of a series of events, e.g. button up. |
numETIDs |
the number of different event types |
Definition at line 88 of file EventBase.h. |
|
values to pass to setSaveFormat()
- Enumerator:
-
BINARY |
saves will be in packed binary, loads will try binary first |
XML |
saves will be in xml, loads will try xml first |
Definition at line 207 of file EventBase.h. |
Constructor & Destructor Documentation
virtual EventBase::~EventBase |
( |
|
) |
[inline, virtual] |
|
Member Function Documentation
virtual EventBase* EventBase::clone |
( |
|
) |
const [inline, virtual] |
|
bool EventBase::equalOrLongerThan |
( |
const EventBase & |
eb |
) |
const [inline] |
|
|
compares event duration and ensures same event generator, source, and type - useful for event masks
Definition at line 165 of file EventBase.h. |
bool EventBase::equalOrShorterThan |
( |
const EventBase & |
eb |
) |
const [inline] |
|
|
compares event duration and ensures same event generator, source, and type - useful for event masks
Definition at line 166 of file EventBase.h. |
void EventBase::genName |
( |
|
) |
[protected, virtual] |
|
unsigned int EventBase::getBinSize |
( |
|
) |
const [virtual] |
|
virtual unsigned int EventBase::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 in LocomotionEvent, TextMsgEvent, and VisionObjectEvent.
Definition at line 179 of file EventBase.h.
Referenced by EventTranslator::encodeEvent(). |
std::string EventBase::getDescription |
( |
bool |
showTypeSpecific = true , |
|
|
unsigned int |
verbosity = 0 |
|
) |
const [virtual] |
|
virtual unsigned int EventBase::getDuration |
( |
|
) |
const [inline, virtual] |
|
|
gets the generator ID for this event
- See also:
- EventGeneratorID_t
Definition at line 129 of file EventBase.h.
Referenced by EventRouter::addListener(), EventRouter::addTrapper(), getDescription(), EventRouter::EventMapper::getMapping(), EventRouter::hasListeners(), EventRouter::isListening(), EventRouter::isTrapping(), WallTestBehavior::processEvent(), WalkNode::processEvent(), TimeOutTrans::processEvent(), StareAtPawBehavior2::processEvent(), StareAtBallBehavior::processEvent(), SpiderMachineBehavior::processEvent(), SimpleChaseBallBehavior::processEvent(), SensorObserverControl::processEvent(), SegmentedColorGenerator::processEvent(), SegCamBehavior::processEvent(), RLEGenerator::processEvent(), RegionGenerator::processEvent(), RawCameraGenerator::processEvent(), PostureEditor::processEvent(), MotionSequenceNode< SIZE >::processEvent(), MicrophoneServer::processEvent(), LostTargetTrans::processEvent(), LookForSoundBehavior::processEvent(), KinematicSampleBehavior2::processEvent(), KinematicSampleBehavior::processEvent(), JPEGGenerator::processEvent(), InterleavedYUVGenerator::processEvent(), FreeMemReportControl::processEvent(), FlashIPAddrBehavior::processEvent(), FilterBankGenerator::processEvent(), EventGeneratorBase::processEvent(), DriveMeBehavior::processEvent(), DrawVisObjBoundBehavior::processEvent(), ChaseBallBehavior::processEvent(), CDTGenerator::processEvent(), CameraBehavior::processEvent(), BufferedImageGenerator::processEvent(), BatteryMonitorBehavior::processEvent(), BanditMachine::WaitNode::processEvent(), BallDetectionGenerator::processEvent(), AutoGetupBehavior::processEvent(), AlanBehavior::processEvent(), EventRouter::removeListener(), EventRouter::removeTrapper(), EventRouter::EventMapper::verifyMapping(), RawCamBehavior::writeColor(), and RawCamBehavior::writeSingleChannel(). |
virtual float EventBase::getMagnitude |
( |
|
) |
const [inline, virtual] |
|
virtual const std::string& EventBase::getName |
( |
|
) |
const [inline, virtual] |
|
|
gets the name of the event - useful for debugging output, see also getDescription()
Definition at line 121 of file EventBase.h.
Referenced by EventRouter::doSendEvent(), getDescription(), StepTest::processEvent(), StareAtPawBehavior2::processEvent(), SpiderMachineBehavior::processEvent(), SensorObserverControl::processEvent(), RegionGenerator::processEvent(), PostureEditor::processEvent(), KinematicSampleBehavior2::processEvent(), KinematicSampleBehavior::processEvent(), HeadLevelBehavior::processEvent(), GroundPlaneBehavior::processEvent(), FollowHeadBehavior::processEvent(), FlashIPAddrBehavior::processEvent(), EchoBehavior::processEvent(), BatteryMonitorBehavior::processEvent(), BallDetectionGenerator::processEvent(), AlanBehavior::processEvent(), and EventRouter::processTimers(). |
virtual SaveFormat EventBase::getSaveFormat |
( |
|
) |
const [inline, virtual] |
|
virtual unsigned int EventBase::getSourceID |
( |
|
) |
const [inline, virtual] |
|
|
gets the source ID for this event
- See also:
- sourceID
Definition at line 132 of file EventBase.h.
Referenced by EventRouter::addListener(), EventRouter::addTimer(), EventRouter::addTrapper(), getDescription(), EventRouter::EventMapper::getMapping(), EventRouter::hasListeners(), EventRouter::isListening(), EventRouter::isTrapping(), WorldStateVelDaemon::processEvent(), WMMonitorBehavior::processEvent(), WallTestBehavior::processEvent(), ValueEditControl< T >::processEvent(), StareAtPawBehavior2::processEvent(), SpiderMachineBehavior::processEvent(), SoundTestBehavior::processEvent(), SegmentedColorGenerator::processEvent(), RLEGenerator::processEvent(), RegionGenerator::processEvent(), RawCameraGenerator::processEvent(), MotionStressTestBehavior::processEvent(), LostTargetTrans::processEvent(), KinematicSampleBehavior2::processEvent(), KinematicSampleBehavior::processEvent(), JPEGGenerator::processEvent(), InterleavedYUVGenerator::processEvent(), FreeMemReportControl::processEvent(), FlashIPAddrBehavior::processEvent(), FilterBankGenerator::processEvent(), CompletionTrans::processEvent(), CDTGenerator::processEvent(), BufferedImageGenerator::processEvent(), BatteryMonitorBehavior::processEvent(), BatteryCheckControl::processEvent(), BallDetectionGenerator::processEvent(), EventRouter::removeListener(), EventRouter::removeTrapper(), Controller::trapEvent(), and EventRouter::EventMapper::verifyMapping(). |
virtual unsigned int EventBase::getTimeStamp |
( |
|
) |
const [inline, virtual] |
|
|
time event was created
Definition at line 127 of file EventBase.h.
Referenced by getDescription(), WorldStateVelDaemon::processEvent(), WorldStateSerializerBehavior::processEvent(), WalkCalibration::processEvent(), SpiderMachineBehavior::processEvent(), WorldStateVelDaemon::trapEvent(), RawCamBehavior::writeColor(), RegionCamBehavior::writeRegions(), SegCamBehavior::writeRLE(), SegCamBehavior::writeSeg(), and RawCamBehavior::writeSingleChannel(). |
virtual EventTypeID_t EventBase::getTypeID |
( |
|
) |
const [inline, virtual] |
|
|
gets the type ID
- See also:
- EventTypeID_t
Definition at line 135 of file EventBase.h.
Referenced by EventRouter::addListener(), EventRouter::addTrapper(), getDescription(), EventRouter::EventMapper::getMapping(), EventRouter::hasListeners(), EventRouter::isListening(), EventRouter::isTrapping(), WorldStateVelDaemon::processEvent(), WalkToTargetNode::processEvent(), VisualTargetTrans::processEvent(), StareAtPawBehavior2::processEvent(), StareAtBallBehavior::processEvent(), SpiderMachineBehavior::processEvent(), SoundTestBehavior::processEvent(), SimpleChaseBallBehavior::processEvent(), RLEGenerator::processEvent(), RawCameraGenerator::processEvent(), PostureEditor::processEvent(), MotionStressTestBehavior::processEvent(), KinematicSampleBehavior2::processEvent(), KinematicSampleBehavior::processEvent(), FlashIPAddrBehavior::processEvent(), EStopControllerBehavior::processEvent(), DrawVisObjBoundBehavior::processEvent(), Controller::processEvent(), ChaseBallBehavior::processEvent(), CDTGenerator::processEvent(), BufferedImageGenerator::processEvent(), EventRouter::removeListener(), EventRouter::removeTrapper(), setName(), Controller::trapEvent(), and EventRouter::EventMapper::verifyMapping(). |
virtual bool EventBase::isCustomName |
( |
|
) |
const [inline, virtual] |
|
|
returns true if not using the generated name
Definition at line 142 of file EventBase.h. |
static bool EventBase::isValidGeneratorID |
( |
unsigned int |
egid |
) |
[inline, static] |
|
unsigned int EventBase::LoadBinaryBuffer |
( |
const char |
buf[], |
|
|
unsigned int |
len |
|
) |
[virtual] |
|
virtual unsigned int EventBase::LoadBuffer |
( |
const char |
buf[], |
|
|
unsigned int |
len |
|
) |
[inline, virtual] |
|
virtual unsigned int EventBase::LoadFile |
( |
const char * |
filename |
) |
[inline, virtual] |
|
virtual unsigned int EventBase::LoadFileStream |
( |
FILE * |
f |
) |
[inline, virtual] |
|
void EventBase::LoadXML |
( |
xmlNode * |
node |
) |
[virtual] |
|
bool EventBase::longerThan |
( |
const EventBase & |
eb |
) |
const [inline] |
|
|
compares event duration and ensures same event generator, source, and type - useful for event masks
Definition at line 163 of file EventBase.h. |
static unsigned int EventBase::makeClassTypeID |
( |
const char * |
str |
) |
[inline, static, protected] |
|
bool EventBase::operator< |
( |
const EventBase & |
e |
) |
const [inline] |
|
virtual bool EventBase::operator== |
( |
const EventBase & |
eb |
) |
const [inline, virtual] |
|
|
is true if the genID, typeID, and sourceID's all match
Definition at line 157 of file EventBase.h. |
virtual const std::string& EventBase::resetName |
( |
|
) |
[inline, virtual] |
|
|
resets name to generated form, overwriting any previous name
Definition at line 141 of file EventBase.h. |
bool EventBase::sameGenSource |
( |
const EventBase & |
eb |
) |
const [inline] |
|
unsigned int EventBase::SaveBinaryBuffer |
( |
char |
buf[], |
|
|
unsigned int |
len |
|
) |
const [virtual] |
|
virtual unsigned int EventBase::SaveBuffer |
( |
char |
buf[], |
|
|
unsigned int |
len |
|
) |
const [inline, virtual] |
|
virtual unsigned int EventBase::SaveFile |
( |
const char * |
filename |
) |
const [inline, virtual] |
|
virtual unsigned int EventBase::SaveFileStream |
( |
FILE * |
f |
) |
const [inline, virtual] |
|
void EventBase::SaveXML |
( |
xmlNode * |
node |
) |
const [virtual] |
|
virtual EventBase& EventBase::setDuration |
( |
unsigned int |
d |
) |
[inline, virtual] |
|
|
sets the time since the beginning of this sequence (the timestamp of the activate event)
- See also:
- duration
Definition at line 139 of file EventBase.h. |
virtual EventBase& EventBase::setMagnitude |
( |
float |
m |
) |
[inline, virtual] |
|
EventBase & EventBase::setName |
( |
const std::string & |
n |
) |
[virtual] |
|
virtual void EventBase::setSaveFormat |
( |
SaveFormat |
sf |
) |
const [inline, virtual] |
|
virtual EventBase& EventBase::setSourceID |
( |
unsigned int |
sid |
) |
[inline, virtual] |
|
bool EventBase::shorterThan |
( |
const EventBase & |
eb |
) |
const [inline] |
|
Member Data Documentation
|
the time since this sequence started (like, how long the button has been pressed); not all generators will set this; Typically, this would be 0 for activate, (activate.timestamp-get_time()) for status and deactivate
Definition at line 237 of file EventBase.h.
Referenced by equalOrLongerThan(), equalOrShorterThan(), getBinSize(), getDuration(), LoadBinaryBuffer(), LoadXML(), longerThan(), SaveBinaryBuffer(), SaveXML(), setDuration(), and shorterThan(). |
|
Initial value: {
"unknownEGID",
"aiEGID",
"audioEGID",
"buttonEGID",
"erouterEGID",
"estopEGID",
"locomotionEGID",
"micOSndEGID",
"micRawEGID",
"micFFTEGID",
"motmanEGID",
"powerEGID",
"sensorEGID",
"stateMachineEGID",
"stateTransitionEGID",
"textmsgEGID",
"timerEGID",
"visOFbkEGID",
"visRawCameraEGID",
"visInterleaveEGID",
"visJPEGEGID",
"visSegmentEGID",
"visRLEEGID",
"visRegionEGID",
"visObjEGID",
"wmVarEGID",
"worldModelEGID",
}
Holds string versions of each of the generator's names, handy for debugging so you can output the events as readable strings (you'll find this in EventBase.cc since it can't go in the header or we get multiply-defined errors during linking).
Definition at line 85 of file EventBase.h.
Referenced by EventRouter::addListener(), EventRouter::addTrapper(), EventLogger::EventLogger(), LoadXML(), EventRouter::removeListener(), EventRouter::removeTrapper(), SaveXML(), and setName(). |
|
Initial value: {
"activate",
"status",
"deactivate"
}
holds string versions of EventTypeID_t
Definition at line 96 of file EventBase.h.
Referenced by LoadXML(). |
|
controls the format used during the next call to SaveBuffer() (packed binary or XML)
Definition at line 226 of file EventBase.h.
Referenced by VisionObjectEvent::getBinSize(), TextMsgEvent::getBinSize(), LocomotionEvent::getBinSize(), getBinSize(), getSaveFormat(), LoadBuffer(), LoadFile(), LoadFileStream(), SaveBuffer(), SaveFile(), SaveFileStream(), and setSaveFormat(). |
The documentation for this class was generated from the following files:
|