Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
#include <EventGeneratorBase.h>
Inheritance diagram for EventGeneratorBase:
Note that you don't need to inherit from this class to be able to send events! Any code can send any event any time, just by calling one of the EventRouter::postEvent() functions.
Uses a BehaviorBase base class so that you can start and stop it.
Allows variable settings of the generator id and source id for outgoing events as well as automatic handling of listening/unlistening for a single optional event source. If you want something more fancy that that though, you'll have to override DoStart/DoStop yourself. (or extend/modify this class...)
Definition at line 21 of file EventGeneratorBase.h.
Public Member Functions | |
virtual void | DoStart () |
By default, merely adds to the reference counter (through AddReference()); Note you should still call this from your overriding methods. | |
virtual void | DoStop () |
By default, subtracts from the reference counter, and deletes if zero; Note you should still call this when you override this; Warning call this at the end of your DoStop(), not beginning (it might delete this ). | |
virtual EventBase::EventGeneratorID_t | getGeneratorID () |
return the generator ID that will be broadcast from | |
virtual void | setGeneratorID (EventBase::EventGeneratorID_t gid) |
set the generator ID that will be broadcast from (typically it's a bad idea to call this...) | |
virtual unsigned int | getSourceID () |
return the source ID that will be broadcast on | |
virtual void | setSourceID (unsigned int sid) |
set the source ID that will be broadcast on | |
virtual unsigned int | getListenSourceID () const |
returns the source ID that will be listened for (not the source of the FilterBankEvent to be created - that depends on the subclass) | |
virtual EventBase::EventGeneratorID_t | getListenGeneratorID () const |
returns the generator ID that will be listened for (not the generator of the FilterBankEvent to be created - that depends on the subclass) | |
virtual void | setAutoListen (EventBase::EventGeneratorID_t gid, unsigned int sid) |
turns on auto listening to make it easier to set up dependancies between vision filters | |
virtual void | unsetAutoListen () |
turns off auto listening | |
virtual std::string | getName () const |
returns current name | |
virtual void | setName (const std::string &name) |
sets a name (overriding automatically generated one) | |
Constructors | |
EventGeneratorBase () | |
EventGeneratorBase (const std::string &name, EventBase::EventGeneratorID_t mgid, unsigned int msid) | |
EventGeneratorBase (const std::string &name, EventBase::EventGeneratorID_t mgid, unsigned int msid, EventBase::EventGeneratorID_t srcgid, unsigned int srcsid) | |
Protected Attributes | |
EventBase::EventGeneratorID_t | myGenID |
the generator ID to broadcast on | |
unsigned int | mySourceID |
the source ID to broadcast on | |
bool | autoListen |
if true, will automatically start listening for EventBase(genID,sourceID) events | |
EventBase::EventGeneratorID_t | srcGenID |
the generator ID to listen for (typically the source that this filter works on) | |
unsigned int | srcSourceID |
the source ID to listen for | |
std::string | myName |
the name to report (handy for debugging output) |
|
Definition at line 25 of file EventGeneratorBase.h. |
|
Definition at line 28 of file EventGeneratorBase.h. |
|
Definition at line 31 of file EventGeneratorBase.h. |
|
By default, merely adds to the reference counter (through AddReference()); Note you should still call this from your overriding methods.
Reimplemented from BehaviorBase. Definition at line 5 of file EventGeneratorBase.cc. Referenced by StartupBehavior::initVision(). |
|
By default, subtracts from the reference counter, and deletes if zero; Note you should still call this when you override this; Warning call this at the end of your DoStop(), not beginning (it might
Reimplemented from BehaviorBase. Definition at line 12 of file EventGeneratorBase.cc. |
|
return the generator ID that will be broadcast from
Definition at line 41 of file EventGeneratorBase.h. Referenced by SegmentedColorGenerator::processEvent(), RLEGenerator::processEvent(), RegionGenerator::processEvent(), RawCameraGenerator::processEvent(), JPEGGenerator::processEvent(), InterleavedYUVGenerator::processEvent(), CDTGenerator::processEvent(), and BallDetectionGenerator::processEvent(). |
|
returns the generator ID that will be listened for (not the generator of the FilterBankEvent to be created - that depends on the subclass)
Definition at line 53 of file EventGeneratorBase.h. Referenced by DoStart(). |
|
returns the source ID that will be listened for (not the source of the FilterBankEvent to be created - that depends on the subclass)
Definition at line 51 of file EventGeneratorBase.h. Referenced by DoStart(). |
|
returns current name
Implements BehaviorBase. Definition at line 61 of file EventGeneratorBase.h. |
|
return the source ID that will be broadcast on
Definition at line 46 of file EventGeneratorBase.h. Referenced by SegmentedColorGenerator::processEvent(), RLEGenerator::processEvent(), RegionGenerator::processEvent(), RawCameraGenerator::processEvent(), JPEGGenerator::processEvent(), InterleavedYUVGenerator::processEvent(), CDTGenerator::processEvent(), and BallDetectionGenerator::processEvent(). |
|
turns on auto listening to make it easier to set up dependancies between vision filters
Definition at line 55 of file EventGeneratorBase.h. |
|
set the generator ID that will be broadcast from (typically it's a bad idea to call this...)
Definition at line 43 of file EventGeneratorBase.h. |
|
sets a name (overriding automatically generated one)
Definition at line 66 of file EventGeneratorBase.h. Referenced by StartupBehavior::initVision(). |
|
set the source ID that will be broadcast on
Definition at line 48 of file EventGeneratorBase.h. |
|
turns off auto listening
Definition at line 58 of file EventGeneratorBase.h. |
|
if true, will automatically start listening for EventBase(genID,sourceID) events
Definition at line 73 of file EventGeneratorBase.h. Referenced by DoStart(), EventGeneratorBase(), setAutoListen(), and unsetAutoListen(). |
|
the generator ID to broadcast on
Definition at line 71 of file EventGeneratorBase.h. Referenced by EventGeneratorBase(), getGeneratorID(), and setGeneratorID(). |
|
the name to report (handy for debugging output)
Definition at line 76 of file EventGeneratorBase.h. Referenced by EventGeneratorBase(), getName(), and setName(). |
|
the source ID to broadcast on
Definition at line 72 of file EventGeneratorBase.h. Referenced by BallDetectionGenerator::createEvent(), EventGeneratorBase(), getSourceID(), and setSourceID(). |
|
the generator ID to listen for (typically the source that this filter works on)
Definition at line 74 of file EventGeneratorBase.h. Referenced by EventGeneratorBase(), getListenGeneratorID(), and setAutoListen(). |
|
the source ID to listen for
Definition at line 75 of file EventGeneratorBase.h. Referenced by EventGeneratorBase(), getListenSourceID(), and setAutoListen(). |
Tekkotsu v2.0 |
Generated Wed Jan 21 03:23:09 2004 by Doxygen 1.3.4 |