Event queue where the run control internal events are stored until they are processed
Event queue where the run control internal events are stored until they are processed.
rcEventQueue is a very simple first in - first out event queue, implemented as an STL deque. This would allow to also add high priority events at the beginning of the queue, a feature that is currently in use only for timer objects.
The event queue works in the following way: Named objects register with the queue using its member function Register, which adds a pointer to the state machine rcFsm of the object. An event is added to the queue using the member AddEvent (called from the send() member of the class rcEvent). ProcessNextEvent is called continously by the main run control steering routine rcMain::rcMainLoop. An event is processed by calling the member TakeEvent of the rcFsm of the destination object.Note that there are two queues: a queue for events which an object sends to itself (source == destination) and events where the destination is a different object that the source. The static public members for these two queues are theSelfQueue and theQueue. Events to the objects itself have priority over other events. This is achieved in rcMain::rcMainLoop by calling theSelfQueue::ProcessNextEvent() before calling theQueue::ProcessNextEvent.
See also: rcFsm, rcEvent, smTimer
First version: Mar 12, 98 by CW
Last modifications: Feb 3, 2000, by CW
static int Deregister( char *pcObjectName )
static int ProcessNextEvent()
static int AddEvent( rcEvent *theEvent, bool bPriorityEvent = false )
bPriorityEvent - If true add the event to the front of
the queue, otherwise to the back. The default priority
is adding it to the back.
static void dump( ostream &os = cout )
static void dumpRegisteredObjects( ostream &os = cout )
static mapActiveObjects_t::iterator findObject( const char *pcName )
static rcEventQueue_t theQueue
static rcEventQueue_t theSelfQueue
static mapActiveObjects_t mapActiveObjects
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de