119 virtual void flush();
174 #if MSGQ_IS_VALID_CHECK 175 virtual void testMessageQ() = 0;
177 unsigned int mNumInsertEntry;
178 unsigned int mNumInsertExitOk;
179 unsigned int mNumInsertExitFail;
181 unsigned int mNumRemoveEntry;
182 unsigned int mNumRemoveExitOk;
183 unsigned int mNumRemoveExitFail;
185 unsigned int mLastSuccessTest;
209 #elif defined(_VXWORKS) 210 # include "os/Vxw/OsMsgQVxw.h" 211 typedef class OsMsgQVxw OsMsgQ;
212 #elif defined(__pingtel_on_posix__) 216 # error Unsupported target platform. virtual OsStatus sendNoCopy(OsMsg *pMsg, const OsTime &rTimeout=OsTime::OS_INFINITY)=0
Insert an original of the message at the tail of the queue.
virtual OsStatus sendFromISR(OsMsg &rMsg)=0
Insert a copy of the message at the tail of the queue with ISR flag.
Definition: OsMsgQShared.h:80
queue blocked tasks based on their priority
Definition: OsMsgQ.h:51
virtual OsStatus sendUrgent(const OsMsg &rMsg, const OsTime &rTimeout=OsTime::OS_INFINITY)=0
Insert a copy of the message at the head of the queue.
Options
Definition: OsMsgQ.h:48
static const int DEF_MAX_MSGS
Default maximum number of messages.
Definition: OsMsgQ.h:43
static const int DEF_MAX_MSG_LEN
Default maximum msg length (in bytes)
Definition: OsMsgQ.h:44
virtual ~OsMsgQBase()
Destructor.
Definition: OsMsgQ.cpp:50
virtual OsStatus send(const OsMsg &rMsg, const OsTime &rTimeout=OsTime::OS_INFINITY)=0
Insert a copy of the message at the tail of the queue.
static OsMsgQBase * getMsgQByName(const UtlString &name)
Return a pointer to the named queue, or NULL if not found.
Definition: OsMsgQ.cpp:62
OsStatus
Definition: OsStatus.h:27
virtual void setSendHook(OsMsgQSendHookPtr func)
Set the function that is invoked whenever a msg is sent to the queue.
Definition: OsMsgQ.cpp:100
virtual int numMsgs()=0
Return the number of messages in the queue.
virtual UtlBoolean isEmpty()
Return TRUE if the message queue is empty, FALSE otherwise.
Definition: OsMsgQ.cpp:131
UtlBoolean(* OsMsgQSendHookPtr)(const OsMsg &rMsg)
Definition: OsMsgQ.h:33
Definition: UtlString.h:48
int maxMsgs() const
Returns the maximum number of messages that can be queued.
Definition: OsMsgQ.cpp:123
static const UtlString MSGQ_PREFIX
Prefix for OsMsgQ names stored in < the name database.
Definition: OsMsgQ.h:45
queue blocked tasks on a first-in, first-out basis
Definition: OsMsgQ.h:50
OsMsgQBase(const UtlString &name)
Constructor.
Definition: OsMsgQ.cpp:40
virtual void flush()
Delete all messages currently in the queue.
Definition: OsMsgQ.cpp:82
int mMaxMsgs
maximum number of messages the queue can hold
Definition: OsMsgQ.h:172
OsMsgQFlushHookPtr mFlushHookFunc
Method that is invoked whenever a message is flushed from the queue.
Definition: OsMsgQ.h:167
virtual OsMsgQSendHookPtr getSendHook() const
Return a pointer to the current send hook function.
Definition: OsMsgQ.cpp:117
int UtlBoolean
Definition: UtlDefs.h:41
virtual void setFlushHook(OsMsgQFlushHookPtr func)
Set the function that is invoked whenever a msg is flushed from the queue.
Definition: OsMsgQ.cpp:109
OsMsgQSendHookPtr mSendHookFunc
Method that is invoked whenever a message is sent to the queue.
Definition: OsMsgQ.h:164
void(* OsMsgQFlushHookPtr)(const OsMsg &rMsg)
Definition: OsMsgQ.h:34
const UtlString & getName() const
Get the name associated with the queue.
Definition: OsMsgQ.h:158
virtual OsStatus receive(OsMsg *&rpMsg, const OsTime &rTimeout=OsTime::OS_INFINITY)=0
Remove a message from the head of the queue.