|
INET Framework for OMNeT++/OMNEST
|
#include <WeightedFairQueue.h>
Public Member Functions | |
| QueueRecord () | |
| ~QueueRecord () | |
| void | setLastSn (int n_sn) |
| int | getLastSn () |
| int | getQueueLength () |
| bool | isQueueEmpty () |
| bool | isFromThisFlow (const Flow &flow) |
| void | setQueueID (const Flow &packetInfo) |
| void | enqueue (SNPacket &newSNPacket) |
| void | substractSnFromAll (int subNum) |
| int | getLowestSn () |
| cMessage * | dequeue () |
Private Attributes | |
| Flow | queueID |
| int | lastSn |
| std::vector< SNPacket > | snPackets |
Definition at line 52 of file WeightedFairQueue.h.
| WFQ::QueueRecord::QueueRecord | ( | ) | [inline] |
Definition at line 61 of file WeightedFairQueue.h.
{lastSn = 0;}
Definition at line 257 of file WeightedFairQueue.cc.
{
if(!isQueueEmpty())
{
for (std::vector<SNPacket>::iterator it = snPackets.begin(); it!=snPackets.end(); ++it)
{
delete it->getMsg();
}
}
}
| cMessage * WFQ::QueueRecord::dequeue | ( | ) |
Definition at line 316 of file WeightedFairQueue.cc.
Referenced by WeightedFairQueue::dequeue().
| void WFQ::QueueRecord::enqueue | ( | SNPacket & | newSNPacket | ) |
Definition at line 297 of file WeightedFairQueue.cc.
Referenced by WeightedFairQueue::putIntoQueue().
| int WFQ::QueueRecord::getLastSn | ( | ) | [inline] |
Definition at line 65 of file WeightedFairQueue.h.
Referenced by WeightedFairQueue::putIntoQueue().
{return lastSn;}
| int WFQ::QueueRecord::getLowestSn | ( | ) | [inline] |
Definition at line 72 of file WeightedFairQueue.h.
Referenced by WeightedFairQueue::dequeue().
{return (snPackets.front()).getSn();}
| int WFQ::QueueRecord::getQueueLength | ( | ) | [inline] |
Definition at line 66 of file WeightedFairQueue.h.
Referenced by WeightedFairQueue::dequeue(), and WeightedFairQueue::putIntoQueue().
{return snPackets.size();}
| bool WFQ::QueueRecord::isFromThisFlow | ( | const Flow & | flow | ) |
Definition at line 278 of file WeightedFairQueue.cc.
{
if(!isQueueEmpty() && queueID == flow)
return true;
return false;
}
| bool WFQ::QueueRecord::isQueueEmpty | ( | ) |
Definition at line 268 of file WeightedFairQueue.cc.
{
if(getQueueLength() > 0)
return false;
return true;
}
| void WFQ::QueueRecord::setLastSn | ( | int | n_sn | ) | [inline] |
Definition at line 64 of file WeightedFairQueue.h.
Referenced by WeightedFairQueue::putIntoQueue().
{lastSn = n_sn;}
| void WFQ::QueueRecord::setQueueID | ( | const Flow & | packetInfo | ) |
Definition at line 287 of file WeightedFairQueue.cc.
Referenced by WeightedFairQueue::putIntoQueue().
{
queueID.srcAddress = packetInfo.srcAddress;
queueID.destAddress = packetInfo.destAddress;
queueID.transportProtocol = packetInfo.transportProtocol;
queueID.diffServCodePoint = packetInfo.diffServCodePoint;
queueID.srcPort = packetInfo.srcPort;
queueID.destPort = packetInfo.destPort;
}
| void WFQ::QueueRecord::substractSnFromAll | ( | int | subNum | ) |
Definition at line 303 of file WeightedFairQueue.cc.
Referenced by WeightedFairQueue::dequeue().
{
if(!isQueueEmpty())
{
for (std::vector<SNPacket>::iterator it = snPackets.begin(); it!=snPackets.end(); ++it)
{
it->substractSn(subNum);
}
lastSn -= subNum;
}
}
int WFQ::QueueRecord::lastSn [private] |
Definition at line 57 of file WeightedFairQueue.h.
Referenced by getLastSn(), QueueRecord(), and setLastSn().
Flow WFQ::QueueRecord::queueID [private] |
Definition at line 55 of file WeightedFairQueue.h.
std::vector<SNPacket> WFQ::QueueRecord::snPackets [private] |
Definition at line 58 of file WeightedFairQueue.h.
Referenced by getLowestSn(), and getQueueLength().