#include <DropTailQueue.h>
Inheritance diagram for DropTailQueue:
Protected Member Functions | |
virtual void | initialize () |
virtual bool | enqueue (cMessage *msg) |
virtual cMessage * | dequeue () |
Protected Attributes | |
int | frameCapacity |
cQueue | queue |
cOutVector | qlenVec |
cOutVector | dropVec |
|
Redefined from PassiveQueueBase. Implements PassiveQueueBase. 00056 { 00057 if (queue.empty()) 00058 return NULL; 00059 00060 cMessage *pk = (cMessage *)queue.pop(); 00061 00062 // statistics 00063 qlenVec.record(queue.length()); 00064 00065 return pk; 00066 }
|
|
Redefined from PassiveQueueBase. Implements PassiveQueueBase. 00039 { 00040 if (frameCapacity && queue.length() >= frameCapacity) 00041 { 00042 EV << "Queue full, dropping packet.\n"; 00043 delete msg; 00044 dropVec.record(1); 00045 return true; 00046 } 00047 else 00048 { 00049 queue.insert(msg); 00050 qlenVec.record(queue.length()); 00051 return false; 00052 } 00053 }
|
|
Reimplemented from PassiveQueueBase. 00027 { 00028 PassiveQueueBase::initialize(); 00029 queue.setName("l2queue"); 00030 00031 qlenVec.setName("queue length"); 00032 dropVec.setName("drops"); 00033 00034 // configuration 00035 frameCapacity = par("frameCapacity"); 00036 }
|
|
|
|
|
|
|
|
|