network: Move MaxSize attribute from QueueBase to derived classes

This commit is contained in:
Stefano Avallone
2020-02-17 15:34:15 +01:00
parent d1d8558d65
commit 5fc00356cf
11 changed files with 27 additions and 51 deletions

View File

@@ -36,12 +36,6 @@ QueueBase::GetTypeId (void)
static TypeId tid = TypeId ("ns3::QueueBase")
.SetParent<Object> ()
.SetGroupName ("Network")
.AddAttribute ("MaxSize",
"The max queue size",
QueueSizeValue (QueueSize ("100p")),
MakeQueueSizeAccessor (&QueueBase::SetMaxSize,
&QueueBase::GetMaxSize),
MakeQueueSizeChecker ())
.AddTraceSource ("PacketsInQueue",
"Number of packets currently stored in the queue",
MakeTraceSourceAccessor (&QueueBase::m_nPackets),
@@ -67,6 +61,7 @@ QueueBase::QueueBase () :
m_nTotalDroppedPacketsAfterDequeue (0)
{
NS_LOG_FUNCTION (this);
m_maxSize = QueueSize (QueueSizeUnit::PACKETS, std::numeric_limits<uint32_t>::max ());
}
QueueBase::~QueueBase ()