fixed Bug 1090 - WifiMacQueue is not accessible through the attribute path
This commit is contained in:
@@ -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 @@ DcaTxop::GetTypeId (void)
|
||||
static TypeId tid = TypeId ("ns3::DcaTxop")
|
||||
.SetParent (ns3::Dcf::GetTypeId ())
|
||||
.AddConstructor<DcaTxop> ()
|
||||
.AddAttribute ("Queue", "The WifiMacQueue object",
|
||||
PointerValue (),
|
||||
MakePointerAccessor (&DcaTxop::GetQueue),
|
||||
MakePointerChecker<WifiMacQueue> ())
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
@@ -171,18 +176,13 @@ DcaTxop::SetTxFailedCallback (TxFailed callback)
|
||||
m_txFailedCallback = callback;
|
||||
}
|
||||
|
||||
void
|
||||
DcaTxop::SetMaxQueueSize (uint32_t size)
|
||||
Ptr<WifiMacQueue >
|
||||
DcaTxop::GetQueue () const
|
||||
{
|
||||
NS_LOG_FUNCTION (this << size);
|
||||
m_queue->SetMaxSize (size);
|
||||
}
|
||||
void
|
||||
DcaTxop::SetMaxQueueDelay (Time delay)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << delay);
|
||||
m_queue->SetMaxDelay (delay);
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_queue;
|
||||
}
|
||||
|
||||
void
|
||||
DcaTxop::SetMinCw (uint32_t minCw)
|
||||
{
|
||||
|
||||
@@ -89,8 +89,7 @@ public:
|
||||
*/
|
||||
void SetTxFailedCallback (TxFailed callback);
|
||||
|
||||
void SetMaxQueueSize (uint32_t size);
|
||||
void SetMaxQueueDelay (Time delay);
|
||||
Ptr<WifiMacQueue > GetQueue () const;
|
||||
virtual void SetMinCw (uint32_t minCw);
|
||||
virtual void SetMaxCw (uint32_t maxCw);
|
||||
virtual void SetAifsn (uint32_t aifsn);
|
||||
|
||||
@@ -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 @@ EdcaTxopN::GetTypeId (void)
|
||||
UintegerValue(0),
|
||||
MakeUintegerAccessor (&EdcaTxopN::SetBlockAckInactivityTimeout),
|
||||
MakeUintegerChecker<uint16_t> ())
|
||||
.AddAttribute ("Queue", "The WifiMacQueue object",
|
||||
PointerValue (),
|
||||
MakePointerAccessor (&EdcaTxopN::GetQueue),
|
||||
MakePointerChecker<WifiMacQueue> ())
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
@@ -230,18 +235,11 @@ EdcaTxopN::GetTypeOfStation (void) const
|
||||
return m_typeOfStation;
|
||||
}
|
||||
|
||||
void
|
||||
EdcaTxopN::SetMaxQueueSize (uint32_t size)
|
||||
Ptr<WifiMacQueue >
|
||||
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
|
||||
|
||||
@@ -93,8 +93,7 @@ public:
|
||||
void SetTypeOfStation (enum TypeOfStation type);
|
||||
enum TypeOfStation GetTypeOfStation (void) const;
|
||||
|
||||
void SetMaxQueueSize (uint32_t size);
|
||||
void SetMaxQueueDelay (Time delay);
|
||||
Ptr<WifiMacQueue > GetQueue () const;
|
||||
virtual void SetMinCw (uint32_t minCw);
|
||||
virtual void SetMaxCw (uint32_t maxCw);
|
||||
virtual void SetAifsn (uint32_t aifsn);
|
||||
|
||||
Reference in New Issue
Block a user