Add an attribute to read the queue size
authorRuben Merz <ruben@net.t-labs.tu-berlin.de>
Fri, 27 May 2011 14:56:30 +0200
changeset 13 10425771ca4a
parent 12 8f2ff0172df8
child 14 8041ff845b25
Add an attribute to read the queue size
003-wifi-queue-size-accessor.patch
--- a/003-wifi-queue-size-accessor.patch	Thu May 19 15:19:36 2011 +0200
+++ b/003-wifi-queue-size-accessor.patch	Fri May 27 14:56:30 2011 +0200
@@ -15,11 +15,16 @@
  
  #include "wifi-mac-queue.h"
  #include "qos-blocked-destinations.h"
-@@ -55,6 +56,9 @@
+@@ -55,6 +56,14 @@
                     TimeValue (Seconds (10.0)),
                     MakeTimeAccessor (&WifiMacQueue::m_maxDelay),
                     MakeTimeChecker ())
-+    .AddTraceSource ("WifiMacQueueSize",
++    .AddAttribute ("WifiMacQueueSize", "The current size of the Wifi MAC queue",
++                   TypeId::ATTR_GET,
++                   UintegerValue (0),
++                   MakeUintegerAccessor (&WifiMacQueue::m_size),
++                   MakeUintegerChecker<uint32_t> ())
++    .AddTraceSource ("WifiMacQueueSizeTrace",
 +                     "The current size of the Wifi MAC queue",
 +                     MakeTraceSourceAccessor (&WifiMacQueue::m_size))
    ;