EMANE  1.2.1
EMANE::Models::RFPipe::DownstreamQueue Class Reference

Provides a queue implementation for the RFPipe Mac layer. More...

#include <downstreamqueue.h>

Public Member Functions

 DownstreamQueue ()
 Constructor. More...
 
 ~DownstreamQueue ()
 Destructor. More...
 
void registerStatistics (StatisticRegistrar &statisticRegistrar)
 
size_t getNumDiscards (bool bClear)
 Returns the number of discards. More...
 
size_t getCurrentDepth ()
 Returns the current size of the queue. More...
 
size_t getMaxCapacity ()
 Returns the max size of the queue. More...
 
std::pair< DownstreamQueueEntry, bool > dequeue ()
 removes an element from the queue More...
 
std::vector< DownstreamQueueEntryenqueue (DownstreamQueueEntry &entry)
 Adds an element to the queue. More...
 
const DownstreamQueueEntrypeek ()
 Returns a reference to the element to be pop'd next. More...
 

Detailed Description

Provides a queue implementation for the RFPipe Mac layer.

Definition at line 101 of file rfpipe/downstreamqueue.h.

Constructor & Destructor Documentation

◆ DownstreamQueue()

EMANE::Models::RFPipe::DownstreamQueue::DownstreamQueue ( )

Constructor.

Definition at line 42 of file rfpipe/downstreamqueue.cc.

◆ ~DownstreamQueue()

EMANE::Models::RFPipe::DownstreamQueue::~DownstreamQueue ( )

Destructor.

Definition at line 49 of file rfpipe/downstreamqueue.cc.

Member Function Documentation

◆ dequeue()

std::pair< EMANE::Models::RFPipe::DownstreamQueueEntry, bool > EMANE::Models::RFPipe::DownstreamQueue::dequeue ( )

removes an element from the queue

Returns
entry the pop'd entry

Definition at line 91 of file rfpipe/downstreamqueue.cc.

◆ enqueue()

std::vector< EMANE::Models::RFPipe::DownstreamQueueEntry > EMANE::Models::RFPipe::DownstreamQueue::enqueue ( DownstreamQueueEntry entry)

Adds an element to the queue.

Parameters
entrythe entry to be added to the queue
Returns
return true if the queue was full and the old entry

Definition at line 107 of file rfpipe/downstreamqueue.cc.

◆ getCurrentDepth()

size_t EMANE::Models::RFPipe::DownstreamQueue::getCurrentDepth ( )

Returns the current size of the queue.

Return values
size_tcurrent size of the queue

Definition at line 77 of file rfpipe/downstreamqueue.cc.

◆ getMaxCapacity()

size_t EMANE::Models::RFPipe::DownstreamQueue::getMaxCapacity ( )

Returns the max size of the queue.

Return values
size_tmax size of the queue

Definition at line 84 of file rfpipe/downstreamqueue.cc.

◆ getNumDiscards()

size_t EMANE::Models::RFPipe::DownstreamQueue::getNumDiscards ( bool  bClear)

Returns the number of discards.

Parameters
bClearclear counter
Return values
size_tnum of packets discarded

Definition at line 63 of file rfpipe/downstreamqueue.cc.

◆ peek()

const EMANE::Models::RFPipe::DownstreamQueueEntry & EMANE::Models::RFPipe::DownstreamQueue::peek ( )

Returns a reference to the element to be pop'd next.

Returns
entry the entry to be pop'd next

Definition at line 134 of file rfpipe/downstreamqueue.cc.

◆ registerStatistics()

void EMANE::Models::RFPipe::DownstreamQueue::registerStatistics ( StatisticRegistrar statisticRegistrar)

Definition at line 53 of file rfpipe/downstreamqueue.cc.


The documentation for this class was generated from the following files: