INET Framework for OMNeT++/OMNEST
inet::ieee80211::PendingQueue Class Reference

#include <Ieee80211Queue.h>

Inheritance diagram for inet::ieee80211::PendingQueue:
inet::ieee80211::Ieee80211Queue

Public Types

enum  Priority { Priority::PRIORITIZE_MGMT_OVER_DATA, Priority::PRIORITIZE_MULTICAST_OVER_DATA }
 

Public Member Functions

virtual ~PendingQueue ()
 
 PendingQueue (int maxQueueSize, const char *name)
 
 PendingQueue (int maxQueueSize, const char *name, Priority priority)
 
- Public Member Functions inherited from inet::ieee80211::Ieee80211Queue
virtual ~Ieee80211Queue ()
 
 Ieee80211Queue (int maxQueueSize, const char *name)
 
virtual bool insert (Ieee80211DataOrMgmtFrame *frame)
 
virtual bool insertBefore (Ieee80211DataOrMgmtFrame *where, Ieee80211DataOrMgmtFrame *frame)
 
virtual bool insertAfter (Ieee80211DataOrMgmtFrame *where, Ieee80211DataOrMgmtFrame *frame)
 
virtual Ieee80211DataOrMgmtFrameremove (Ieee80211DataOrMgmtFrame *frame)
 
virtual Ieee80211DataOrMgmtFramepop ()
 
virtual Ieee80211DataOrMgmtFramefront () const
 
virtual Ieee80211DataOrMgmtFrameback () const
 
virtual bool contains (Ieee80211DataOrMgmtFrame *frame) const
 
int getNumberOfFrames ()
 
int getMaxQueueSize ()
 

Static Public Member Functions

static int cmpMgmtOverData (Ieee80211DataOrMgmtFrame *a, Ieee80211DataOrMgmtFrame *b)
 
static int cmpMgmtOverMulticastOverUnicast (Ieee80211DataOrMgmtFrame *a, Ieee80211DataOrMgmtFrame *b)
 

Additional Inherited Members

- Protected Attributes inherited from inet::ieee80211::Ieee80211Queue
int maxQueueSize = -1
 

Member Enumeration Documentation

Enumerator
PRIORITIZE_MGMT_OVER_DATA 
PRIORITIZE_MULTICAST_OVER_DATA 
55  {
56  PRIORITIZE_MGMT_OVER_DATA,
57  PRIORITIZE_MULTICAST_OVER_DATA
58  };

Constructor & Destructor Documentation

virtual inet::ieee80211::PendingQueue::~PendingQueue ( )
inlinevirtual
61 { }
inet::ieee80211::PendingQueue::PendingQueue ( int  maxQueueSize,
const char *  name 
)
78  :
80 {
81 }
Ieee80211Queue(int maxQueueSize, const char *name)
Definition: Ieee80211Queue.cc:23
int maxQueueSize
Definition: Ieee80211Queue.h:30
inet::ieee80211::PendingQueue::PendingQueue ( int  maxQueueSize,
const char *  name,
Priority  priority 
)
83  :
85 {
87  setup((CompareFunc)cmpMgmtOverData);
88  else if (priority == Priority::PRIORITIZE_MULTICAST_OVER_DATA)
89  setup((CompareFunc)cmpMgmtOverMulticastOverUnicast);
90  else
91  throw cRuntimeError("Unknown 802.11 queue priority");
92  this->maxQueueSize = maxQueueSize;
93 }
Ieee80211Queue(int maxQueueSize, const char *name)
Definition: Ieee80211Queue.cc:23
static int cmpMgmtOverData(Ieee80211DataOrMgmtFrame *a, Ieee80211DataOrMgmtFrame *b)
Definition: Ieee80211Queue.cc:95
int maxQueueSize
Definition: Ieee80211Queue.h:30
static int cmpMgmtOverMulticastOverUnicast(Ieee80211DataOrMgmtFrame *a, Ieee80211DataOrMgmtFrame *b)
Definition: Ieee80211Queue.cc:102

Member Function Documentation

int inet::ieee80211::PendingQueue::cmpMgmtOverData ( Ieee80211DataOrMgmtFrame a,
Ieee80211DataOrMgmtFrame b 
)
static

Referenced by PendingQueue().

96 {
97  int aPri = dynamic_cast<Ieee80211ManagementFrame*>(a) ? 1 : 0; //TODO there should really exist a high-performance isMgmtFrame() function!
98  int bPri = dynamic_cast<Ieee80211ManagementFrame*>(b) ? 1 : 0;
99  return bPri - aPri;
100 }
value< double, units::m > b
Definition: Units.h:1054
int inet::ieee80211::PendingQueue::cmpMgmtOverMulticastOverUnicast ( Ieee80211DataOrMgmtFrame a,
Ieee80211DataOrMgmtFrame b 
)
static

Referenced by PendingQueue().

103 {
104  int aPri = dynamic_cast<Ieee80211ManagementFrame*>(a) ? 2 : a->getReceiverAddress().isMulticast() ? 1 : 0;
105  int bPri = dynamic_cast<Ieee80211ManagementFrame*>(a) ? 2 : b->getReceiverAddress().isMulticast() ? 1 : 0;
106  return bPri - aPri;
107 }
value< double, units::m > b
Definition: Units.h:1054

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