diff -r 3c76393dba66 src/wifi/model/dca-txop.cc --- a/src/wifi/model/dca-txop.cc Fri Apr 01 17:45:26 2011 +0100 +++ b/src/wifi/model/dca-txop.cc Sun Apr 03 19:12:45 2011 +0200 @@ -24,6 +24,7 @@ #include "ns3/simulator.h" #include "ns3/node.h" #include "ns3/uinteger.h" +#include "ns3/pointer.h" #include "dca-txop.h" #include "dcf-manager.h" @@ -102,6 +103,10 @@ static TypeId tid = TypeId ("ns3::DcaTxop") .SetParent (ns3::Dcf::GetTypeId ()) .AddConstructor () + .AddAttribute ("Queue", "The WifiMacQueue object", + PointerValue (), + MakePointerAccessor (&DcaTxop::GetQueue), + MakePointerChecker ()) ; return tid; } @@ -171,18 +176,13 @@ m_txFailedCallback = callback; } -void -DcaTxop::SetMaxQueueSize (uint32_t size) +Ptr +DcaTxop::GetQueue () const { - NS_LOG_FUNCTION (this << size); - m_queue->SetMaxSize (size); + NS_LOG_FUNCTION (this); + return m_queue; } -void -DcaTxop::SetMaxQueueDelay (Time delay) -{ - NS_LOG_FUNCTION (this << delay); - m_queue->SetMaxDelay (delay); -} + void DcaTxop::SetMinCw (uint32_t minCw) { diff -r 3c76393dba66 src/wifi/model/dca-txop.h --- a/src/wifi/model/dca-txop.h Fri Apr 01 17:45:26 2011 +0100 +++ b/src/wifi/model/dca-txop.h Sun Apr 03 19:12:45 2011 +0200 @@ -89,8 +89,7 @@ */ void SetTxFailedCallback (TxFailed callback); - void SetMaxQueueSize (uint32_t size); - void SetMaxQueueDelay (Time delay); + Ptr GetQueue () const; virtual void SetMinCw (uint32_t minCw); virtual void SetMaxCw (uint32_t maxCw); virtual void SetAifsn (uint32_t aifsn); diff -r 3c76393dba66 src/wifi/model/edca-txop-n.cc --- a/src/wifi/model/edca-txop-n.cc Fri Apr 01 17:45:26 2011 +0100 +++ b/src/wifi/model/edca-txop-n.cc Sun Apr 03 19:12:45 2011 +0200 @@ -21,6 +21,7 @@ */ #include "ns3/log.h" #include "ns3/assert.h" +#include "ns3/pointer.h" #include "edca-txop-n.h" #include "mac-low.h" @@ -138,6 +139,10 @@ UintegerValue(0), MakeUintegerAccessor (&EdcaTxopN::SetBlockAckInactivityTimeout), MakeUintegerChecker ()) + .AddAttribute ("Queue", "The WifiMacQueue object", + PointerValue (), + MakePointerAccessor (&EdcaTxopN::GetQueue), + MakePointerChecker ()) ; return tid; } @@ -230,18 +235,11 @@ return m_typeOfStation; } -void -EdcaTxopN::SetMaxQueueSize (uint32_t size) +Ptr +EdcaTxopN::GetQueue () const { - NS_LOG_FUNCTION (this << size); - m_queue->SetMaxSize (size); -} - -void -EdcaTxopN::SetMaxQueueDelay (Time delay) -{ - NS_LOG_FUNCTION (this << delay); - m_queue->SetMaxDelay (delay); + NS_LOG_FUNCTION (this); + return m_queue; } void diff -r 3c76393dba66 src/wifi/model/edca-txop-n.h --- a/src/wifi/model/edca-txop-n.h Fri Apr 01 17:45:26 2011 +0100 +++ b/src/wifi/model/edca-txop-n.h Sun Apr 03 19:12:45 2011 +0200 @@ -93,8 +93,7 @@ void SetTypeOfStation (enum TypeOfStation type); enum TypeOfStation GetTypeOfStation (void) const; - void SetMaxQueueSize (uint32_t size); - void SetMaxQueueDelay (Time delay); + Ptr GetQueue () const; virtual void SetMinCw (uint32_t minCw); virtual void SetMaxCw (uint32_t maxCw); virtual void SetAifsn (uint32_t aifsn);