|
reSIProcate
SIP stack, Dialog Usage Manager and related libraries
|
#include <TimeLimitFifo.hxx>
Public Types | |
| enum | DepthUsage { EnforceTimeDepth , IgnoreTimeDepth , InternalElement } |
Public Member Functions | |
| TimeLimitFifo (unsigned int maxDurationSecs, unsigned int maxSize) | |
| After it runs out of the lesser of these limits it will start to refuse messages. | |
| virtual | ~TimeLimitFifo () |
| bool | add (Msg *msg, DepthUsage usage) |
| Add a message to the fifo. | |
| Msg * | getNext () |
| Returns the first message available. | |
| Msg * | getNext (int ms) |
| Returns the first message available within a time limit. | |
| virtual time_t | timeDepth () const |
| Return the time depth of the queue. | |
| bool | wouldAccept (DepthUsage usage) const |
| would an add called now work? | |
| void | clear () |
| removes all items from the FIFO | |
| virtual size_t | getCountDepth () const |
| gets the depth of the FIFO | |
| virtual time_t | getTimeDepth () const |
| Return the time depth of the queue. | |
| virtual size_t | getCountDepthTolerance () const |
| returns the FIFO count depth tolerance | |
| virtual time_t | getTimeDepthTolerance () const |
| returns the FIFO time depth tolerance | |
| virtual void | setCountDepthTolerance (unsigned int max) |
| set the count depth tolerance of the FIFO | |
| virtual void | setTimeDepthTolerance (unsigned int maxSecs) |
| set the time depth tolerance of the FIFO | |
Public Member Functions inherited from resip::AbstractFifo< Timestamped< 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 | 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) | |
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. | |
Definition at line 91 of file TimeLimitFifo.hxx.
| enum resip::TimeLimitFifo::DepthUsage |
| Enumerator | |
|---|---|
| EnforceTimeDepth | |
| IgnoreTimeDepth | |
| InternalElement | |
Definition at line 94 of file TimeLimitFifo.hxx.
| resip::TimeLimitFifo< Msg >::TimeLimitFifo | ( | unsigned int | maxDurationSecs, |
| unsigned int | maxSize | ||
| ) |
After it runs out of the lesser of these limits it will start to refuse messages.
Definition at line 221 of file TimeLimitFifo.hxx.
|
virtual |
Definition at line 230 of file TimeLimitFifo.hxx.
| bool resip::TimeLimitFifo< Msg >::add | ( | Msg * | msg, |
| DepthUsage | usage | ||
| ) |
Add a message to the fifo.
return true iff succeeds
| Msg* | 'Message pointer' |
| DepthUsage | : (Needs work...) EnforceTimeDepth – external (non ACK) requests IgnoreTimeDepth – external reponse and ACK InternalElement – internal messages (timers, application postbacks..); use reserved queue space |
+---------------------------------------------------—+ | | | | +---------------------------------------------------—+ <--—enforce----------------—> <------------—ignoreTimeDepth---------—> <------------------— internalElement-------------—>
enforce will drop things that exceed the queue ignore will go past that limit to the extent of the queue (eg. internal will basically not drop anything
Definition at line 238 of file TimeLimitFifo.hxx.
|
virtual |
removes all items from the FIFO
Reimplemented from resip::AbstractFifo< Timestamped< Msg * > >.
Definition at line 346 of file TimeLimitFifo.hxx.
|
virtual |
gets the depth of the FIFO
Reimplemented from resip::AbstractFifo< Timestamped< Msg * > >.
Definition at line 359 of file TimeLimitFifo.hxx.
|
virtual |
returns the FIFO count depth tolerance
Definition at line 366 of file TimeLimitFifo.hxx.
| Msg * resip::TimeLimitFifo< Msg >::getNext | ( | ) |
Returns the first message available.
Definition at line 268 of file TimeLimitFifo.hxx.
| Msg * resip::TimeLimitFifo< Msg >::getNext | ( | int | ms | ) |
Returns the first message available within a time limit.
| ms | the maximum amount of time to wait in milliseconds for a message |
Definition at line 276 of file TimeLimitFifo.hxx.
|
virtual |
Return the time depth of the queue.
Reimplemented from resip::AbstractFifo< Timestamped< Msg * > >.
Definition at line 373 of file TimeLimitFifo.hxx.
|
virtual |
returns the FIFO time depth tolerance
Definition at line 380 of file TimeLimitFifo.hxx.
|
virtual |
set the count depth tolerance of the FIFO
| max | the new count depth tolerance of the FIFO |
Definition at line 387 of file TimeLimitFifo.hxx.
|
virtual |
set the time depth tolerance of the FIFO
| maxSec | the maximum time depth tolerance |
Definition at line 395 of file TimeLimitFifo.hxx.
|
virtual |
Return the time depth of the queue.
Definition at line 338 of file TimeLimitFifo.hxx.
| bool resip::TimeLimitFifo< Msg >::wouldAccept | ( | DepthUsage | usage | ) | const |
would an add called now work?
| usage | what depth policy should be used to determine if the call would work |
Definition at line 259 of file TimeLimitFifo.hxx.