sipxportlib
Version 3.3
|
Queued events are used to send event notifications using a message queue. More...
#include <OsQueuedEvent.h>
Public Member Functions | |
OsQueuedEvent (OsMsgQ &rMsgQ, const intptr_t userData) | |
Constructor. More... | |
virtual | ~OsQueuedEvent () |
Destructor. More... | |
virtual OsStatus | signal (const intptr_t eventData) |
Set the event data and send an event message to the designated queue. More... | |
virtual OsStatus | setUserData (intptr_t userData) |
Set the user data value for this object. More... | |
virtual OsStatus | getUserData (intptr_t &rUserData) const |
Return the user data specified when this object was constructed. More... | |
Public Member Functions inherited from OsNotification | |
OsNotification () | |
virtual | ~OsNotification () |
virtual void | setTimeout (const OsTime &signalTimeout) |
Set timeout to use when signalling if supported by derived class. More... | |
Additional Inherited Members | |
Protected Attributes inherited from OsNotification | |
OsTime | mSignalTimeout |
Used by derived classes that support a timeout on signal. More... | |
Queued events are used to send event notifications using a message queue.
When the corresponding event occurs, the Notifier sends a message the designated message queue. The Listener must wait on the queue to receive the event messages.
First, a little bit of terminology. The task that wishes to be notified when an event occurs is the "Listener" task. The task that signals when a given event occurs is the "Notifier" task. A Notifier informs the Listener that a given event has occurred by sending an "Event Notification".
The Listener passes an OsQueuedEvent object to the Notifier which includes a message queue identifier for that message queue that will be used for event notifications. When the corresponding event occurs, the Notifier sends a message the designated message queue. The Listener waits on the queue to receive the event notification. This mechanism allows a task to receive notifications for multiple events. The same message queue that is used to receive event notifications may also be used to receive other types of messages.
OsQueuedEvent | ( | OsMsgQ & | rMsgQ, |
const intptr_t | userData | ||
) |
Constructor.
|
virtual |
Destructor.
Set the event data and send an event message to the designated queue.
Implements OsNotification.
Set the user data value for this object.