bug 1912: avoid multiple MacTxMiddle instances
This commit is contained in:
1 parent
591cc89f35
commit
fb40e4b8b4
4 files changed
+13
-2
No files matched your search
@@ -81,6 +81,7 @@ ApWifiMac::ApWifiMac ()
|
||||
m_beaconDca->SetMaxCw (0);
|
||||
m_beaconDca->SetLow (m_low);
|
||||
m_beaconDca->SetManager (m_dcfManager);
|
||||
m_beaconDca->SetTxMiddle (m_txMiddle);
|
||||
|
||||
// Let the lower layers know that we are acting as an AP.
|
||||
SetTypeOfStation (AP);
|
||||
|
||||
@@ -145,7 +145,6 @@ DcaTxop::DcaTxop ()
|
||||
m_dcf = new DcaTxop::Dcf (this);
|
||||
m_queue = CreateObject<WifiMacQueue> ();
|
||||
m_rng = new RealRandomStream ();
|
||||
m_txMiddle = new MacTxMiddle ();
|
||||
}
|
||||
|
||||
DcaTxop::~DcaTxop ()
|
||||
@@ -163,7 +162,6 @@ DcaTxop::DoDispose (void)
|
||||
delete m_transmissionListener;
|
||||
delete m_dcf;
|
||||
delete m_rng;
|
||||
delete m_txMiddle;
|
||||
m_transmissionListener = 0;
|
||||
m_dcf = 0;
|
||||
m_rng = 0;
|
||||
@@ -178,6 +176,11 @@ DcaTxop::SetManager (DcfManager *manager)
|
||||
m_manager->Add (m_dcf);
|
||||
}
|
||||
|
||||
void DcaTxop::SetTxMiddle (MacTxMiddle *txMiddle)
|
||||
{
|
||||
m_txMiddle = txMiddle;
|
||||
}
|
||||
|
||||
void
|
||||
DcaTxop::SetLow (Ptr<MacLow> low)
|
||||
{
|
||||
|
||||
@@ -101,6 +101,12 @@ public:
|
||||
* \param remoteManager WifiRemoteStationManager
|
||||
*/
|
||||
void SetWifiRemoteStationManager (Ptr<WifiRemoteStationManager> remoteManager);
|
||||
/**
|
||||
* Set MacTxMiddle this DcaTxop is associated to.
|
||||
*
|
||||
* \param txMiddle MacTxMiddle
|
||||
*/
|
||||
void SetTxMiddle (MacTxMiddle *txMiddle);
|
||||
|
||||
/**
|
||||
* \param callback the callback to invoke when a
|
||||
|
||||
@@ -57,6 +57,7 @@ RegularWifiMac::RegularWifiMac ()
|
||||
m_dca = CreateObject<DcaTxop> ();
|
||||
m_dca->SetLow (m_low);
|
||||
m_dca->SetManager (m_dcfManager);
|
||||
m_dca->SetTxMiddle(m_txMiddle);
|
||||
m_dca->SetTxOkCallback (MakeCallback (&RegularWifiMac::TxOk, this));
|
||||
m_dca->SetTxFailedCallback (MakeCallback (&RegularWifiMac::TxFailed, this));
|
||||
|
||||
|
||||
Reference in new issue
Block a user