|
reSIProcate
SIP stack, Dialog Usage Manager and related libraries
|
A templated, threadsafe message-queue class with a fixed size. More...
#include <FiniteFifo.hxx>
Public Member Functions | |
| FiniteFifo (unsigned int maxSize) | |
| virtual | ~FiniteFifo () |
| bool | add (Msg *msg) |
| Msg * | getNext () |
| Returns the first message available. | |
| Msg * | getNext (int ms) |
| Returns the next message available. | |
Public Member Functions inherited from resip::AbstractFifo< Msg * > | |
| AbstractFifo () | |
| Constructor. | |
| virtual | ~AbstractFifo () |
| bool | empty () const |
| is the queue empty? | |
| virtual unsigned int | size () const |
| get the current size of the fifo. | |
| bool | messageAvailable () const |
| is a message available? | |
| virtual time_t | getTimeDepth () const |
| computes the time delta between the oldest and newest queue members | |
| virtual size_t | getCountDepth () const |
| Returns the number of elements in the FIFO. | |
| virtual time_t | expectedWaitTimeMilliSec () const |
| Returns the expected time it will take to service all messages currently in the queue (in milli-seconds) | |
| virtual time_t | averageServiceTimeMicroSec () const |
| Returns the average time it takes for individual messages to be serviced (in micro-seconds) | |
| virtual void | clear () |
| remove all elements in the queue (or not) | |
Public Member Functions inherited from resip::FifoStatsInterface | |
| FifoStatsInterface () | |
| virtual | ~FifoStatsInterface () |
| uint8_t | getRole () const |
| void | setRole (uint8_t role) |
| void | setDescription (const resip::Data &description) |
| Sets the description for this fifo. | |
| virtual const resip::Data & | getDescription () const |
| Gets the description for this fifo. | |
A templated, threadsafe message-queue class with a fixed size.
Definition at line 20 of file FiniteFifo.hxx.
| resip::FiniteFifo< Msg >::FiniteFifo | ( | unsigned int | maxSize | ) |
Definition at line 57 of file FiniteFifo.hxx.
|
virtual |
Definition at line 64 of file FiniteFifo.hxx.
| bool resip::FiniteFifo< Msg >::add | ( | Msg * | msg | ) |
Definition at line 76 of file FiniteFifo.hxx.
| Msg * resip::FiniteFifo< Msg >::getNext | ( | ) |
Returns the first message available.
It will wait if no messages are available. If a signal interrupts the wait, it will retry the wait. Signals can therefore not be caught via getNext. If you need to detect a signal, use block prior to calling getNext.
Definition at line 93 of file FiniteFifo.hxx.
| Msg * resip::FiniteFifo< Msg >::getNext | ( | int | ms | ) |
Returns the next message available.
Will wait up to ms milliseconds if no information is available. If the specified time passes or a signal interrupts the wait, this method returns 0. This interface provides no mechanism to distinguish between timeout and interrupt.
Definition at line 100 of file FiniteFifo.hxx.