MacParameters -> WifiMacParameters
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "dca-txop.h"
|
||||
#include "dcf-manager.h"
|
||||
#include "mac-parameters.h"
|
||||
#include "wifi-mac-parameters.h"
|
||||
#include "mac-low.h"
|
||||
#include "wifi-mac-queue.h"
|
||||
#include "mac-tx-middle.h"
|
||||
@@ -131,7 +131,7 @@ DcaTxop::SetLow (Ptr<MacLow> low)
|
||||
m_low = low;
|
||||
}
|
||||
void
|
||||
DcaTxop::SetParameters (MacParameters *parameters)
|
||||
DcaTxop::SetParameters (WifiMacParameters *parameters)
|
||||
{
|
||||
m_parameters = parameters;
|
||||
}
|
||||
@@ -213,7 +213,7 @@ DcaTxop::Low (void)
|
||||
return m_low;
|
||||
}
|
||||
|
||||
MacParameters *
|
||||
WifiMacParameters *
|
||||
DcaTxop::Parameters (void)
|
||||
{
|
||||
return m_parameters;
|
||||
|
||||
@@ -36,7 +36,7 @@ class DcfState;
|
||||
class DcfManager;
|
||||
class WifiMacQueue;
|
||||
class MacLow;
|
||||
class MacParameters;
|
||||
class WifiMacParameters;
|
||||
class MacTxMiddle;
|
||||
class RandomStream;
|
||||
class MacStation;
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
~DcaTxop ();
|
||||
|
||||
void SetLow (Ptr<MacLow> low);
|
||||
void SetParameters (MacParameters *parameters);
|
||||
void SetParameters (WifiMacParameters *parameters);
|
||||
void SetStations (MacStations *stations);
|
||||
void SetTxMiddle (MacTxMiddle *txMiddle);
|
||||
/**
|
||||
@@ -119,7 +119,7 @@ private:
|
||||
// Inherited from ns3::Object
|
||||
virtual Ptr<TraceResolver> GetTraceResolver (void) const;
|
||||
Ptr<MacLow> Low (void);
|
||||
MacParameters *Parameters (void);
|
||||
WifiMacParameters *Parameters (void);
|
||||
|
||||
/* dcf notifications forwarded here */
|
||||
bool NeedsAccess (void) const;
|
||||
@@ -156,7 +156,7 @@ private:
|
||||
MacTxMiddle *m_txMiddle;
|
||||
Ptr <MacLow> m_low;
|
||||
MacStations *m_stations;
|
||||
MacParameters *m_parameters;
|
||||
WifiMacParameters *m_parameters;
|
||||
TransmissionListener *m_transmissionListener;
|
||||
RandomStream *m_rng;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "ns3/test.h"
|
||||
#include "ns3/simulator.h"
|
||||
#include "dcf-manager.h"
|
||||
#include "mac-parameters.h"
|
||||
#include "wifi-mac-parameters.h"
|
||||
|
||||
|
||||
namespace ns3 {
|
||||
@@ -67,7 +67,7 @@ private:
|
||||
typedef std::vector<DcfStateTest *> DcfStates;
|
||||
|
||||
DcfManager *m_dcfManager;
|
||||
MacParameters *m_parameters;
|
||||
WifiMacParameters *m_parameters;
|
||||
DcfStates m_dcfStates;
|
||||
bool m_result;
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <math.h>
|
||||
|
||||
#include "dcf-manager.h"
|
||||
#include "mac-parameters.h"
|
||||
#include "wifi-mac-parameters.h"
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("DcfManager");
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "wifi-mac-trailer.h"
|
||||
#include "wifi-net-device.h"
|
||||
#include "mac-stations.h"
|
||||
#include "mac-parameters.h"
|
||||
#include "wifi-mac-parameters.h"
|
||||
#include "ns3/composite-trace-resolver.h"
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("MacLow");
|
||||
@@ -320,7 +320,7 @@ MacLow::SetPhy (Ptr<WifiPhy> phy)
|
||||
m_phy = phy;
|
||||
}
|
||||
void
|
||||
MacLow::SetParameters (MacParameters *parameters)
|
||||
MacLow::SetParameters (WifiMacParameters *parameters)
|
||||
{
|
||||
m_parameters = parameters;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ class WifiPhy;
|
||||
class PacketLogger;
|
||||
class MacStations;
|
||||
class MacStation;
|
||||
class MacParameters;
|
||||
class WifiMacParameters;
|
||||
|
||||
/**
|
||||
* \brief listen to events coming from ns3::MacLow.
|
||||
@@ -280,7 +280,7 @@ public:
|
||||
void SetDevice (Ptr<WifiNetDevice> device);
|
||||
void SetPhy (Ptr<WifiPhy> phy);
|
||||
void SetStations (MacStations *stations);
|
||||
void SetParameters (MacParameters *parameters);
|
||||
void SetParameters (WifiMacParameters *parameters);
|
||||
Ptr<NetDevice> GetDevice (void) const;
|
||||
/**
|
||||
* \param callback the callback which receives every incoming packet.
|
||||
@@ -389,7 +389,7 @@ private:
|
||||
Ptr<WifiNetDevice> m_device;
|
||||
Ptr<WifiPhy> m_phy;
|
||||
MacStations *m_stations;
|
||||
MacParameters *m_parameters;
|
||||
WifiMacParameters *m_parameters;
|
||||
MacLowRxCallback m_rxCallback;
|
||||
typedef std::vector<MacLowNavListener *>::const_iterator NavListenersCI;
|
||||
typedef std::vector<MacLowNavListener *> NavListeners;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "mac-stations.h"
|
||||
#include "wifi-default-parameters.h"
|
||||
#include "mac-parameters.h"
|
||||
#include "wifi-mac-parameters.h"
|
||||
#include "ns3/assert.h"
|
||||
#include "ns3/log.h"
|
||||
#include "ns3/tag.h"
|
||||
@@ -219,7 +219,7 @@ MacStations::IsLowLatency (void) const
|
||||
return m_isLowLatency;
|
||||
}
|
||||
void
|
||||
MacStations::SetParameters (MacParameters *parameters)
|
||||
MacStations::SetParameters (WifiMacParameters *parameters)
|
||||
{
|
||||
m_parameters = parameters;
|
||||
}
|
||||
@@ -309,7 +309,7 @@ MacStation::~MacStation ()
|
||||
{}
|
||||
|
||||
void
|
||||
MacStation::SetParameters (MacParameters *parameters)
|
||||
MacStation::SetParameters (WifiMacParameters *parameters)
|
||||
{
|
||||
m_parameters = parameters;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace ns3 {
|
||||
|
||||
class MacStation;
|
||||
class NonUnicastMacStation;
|
||||
class MacParameters;
|
||||
class WifiMacParameters;
|
||||
|
||||
class MacStations
|
||||
{
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
|
||||
MacStations (WifiMode defaultTxMode);
|
||||
virtual ~MacStations ();
|
||||
void SetParameters (MacParameters *parameters);
|
||||
void SetParameters (WifiMacParameters *parameters);
|
||||
|
||||
// Invoked in a STA upon dis-association
|
||||
// or in an AP upon reboot
|
||||
@@ -71,7 +71,7 @@ private:
|
||||
NonUnicastMacStation *m_nonUnicast;
|
||||
BasicModes m_basicModes;
|
||||
bool m_isLowLatency;
|
||||
MacParameters *m_parameters;
|
||||
WifiMacParameters *m_parameters;
|
||||
};
|
||||
|
||||
} // namespace ns3
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
// The set of supported modes includes
|
||||
// the BSSBasicRateSet.
|
||||
void AddSupportedMode (WifiMode mode);
|
||||
void SetParameters (MacParameters *parameters);
|
||||
void SetParameters (WifiMacParameters *parameters);
|
||||
|
||||
bool IsBrandNew (void) const;
|
||||
bool IsAssociated (void) const;
|
||||
@@ -145,7 +145,7 @@ private:
|
||||
GOT_ASSOC_TX_OK
|
||||
} m_state;
|
||||
SupportedModes m_modes;
|
||||
MacParameters *m_parameters;
|
||||
WifiMacParameters *m_parameters;
|
||||
};
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
*/
|
||||
|
||||
#include "ns3/assert.h"
|
||||
#include "mac-parameters.h"
|
||||
#include "wifi-mac-parameters.h"
|
||||
#include "wifi-default-parameters.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
MacParameters::MacParameters ()
|
||||
WifiMacParameters::WifiMacParameters ()
|
||||
{
|
||||
m_rtsCtsThreshold = WifiDefaultParameters::GetRtsCtsThreshold ();
|
||||
m_fragmentationThreshold = WifiDefaultParameters::GetFragmentationThreshold ();
|
||||
@@ -41,7 +41,7 @@ MacParameters::MacParameters ()
|
||||
Initialize (delay, delay);
|
||||
}
|
||||
void
|
||||
MacParameters::Initialize (Time ctsDelay, Time ackDelay)
|
||||
WifiMacParameters::Initialize (Time ctsDelay, Time ackDelay)
|
||||
{
|
||||
NS_ASSERT (WifiDefaultParameters::GetPhyStandard () == WIFI_PHY_STANDARD_80211a ||
|
||||
WifiDefaultParameters::GetPhyStandard () == WIFI_PHY_STANDARD_holland);
|
||||
@@ -71,87 +71,87 @@ MacParameters::Initialize (Time ctsDelay, Time ackDelay)
|
||||
}
|
||||
|
||||
void
|
||||
MacParameters::SetSlotTime (Time slotTime)
|
||||
WifiMacParameters::SetSlotTime (Time slotTime)
|
||||
{
|
||||
m_slot = slotTime;
|
||||
}
|
||||
|
||||
|
||||
Time
|
||||
MacParameters::GetPifs (void) const
|
||||
WifiMacParameters::GetPifs (void) const
|
||||
{
|
||||
return m_pifs;
|
||||
}
|
||||
Time
|
||||
MacParameters::GetSifs (void) const
|
||||
WifiMacParameters::GetSifs (void) const
|
||||
{
|
||||
return m_sifs;
|
||||
}
|
||||
Time
|
||||
MacParameters::GetSlotTime (void) const
|
||||
WifiMacParameters::GetSlotTime (void) const
|
||||
{
|
||||
return m_slot;
|
||||
}
|
||||
Time
|
||||
MacParameters::GetCtsTimeout (void) const
|
||||
WifiMacParameters::GetCtsTimeout (void) const
|
||||
{
|
||||
return m_ctsTimeout;
|
||||
}
|
||||
Time
|
||||
MacParameters::GetAckTimeout (void) const
|
||||
WifiMacParameters::GetAckTimeout (void) const
|
||||
{
|
||||
return m_ackTimeout;
|
||||
}
|
||||
|
||||
Time
|
||||
MacParameters::GetBeaconInterval (void) const
|
||||
WifiMacParameters::GetBeaconInterval (void) const
|
||||
{
|
||||
return Seconds (1);
|
||||
}
|
||||
uint32_t
|
||||
MacParameters::GetMaxSsrc (void) const
|
||||
WifiMacParameters::GetMaxSsrc (void) const
|
||||
{
|
||||
return m_maxSsrc;
|
||||
}
|
||||
uint32_t
|
||||
MacParameters::GetMaxSlrc (void) const
|
||||
WifiMacParameters::GetMaxSlrc (void) const
|
||||
{
|
||||
return m_maxSlrc;
|
||||
}
|
||||
uint32_t
|
||||
MacParameters::GetRtsCtsThreshold (void) const
|
||||
WifiMacParameters::GetRtsCtsThreshold (void) const
|
||||
{
|
||||
return m_rtsCtsThreshold;
|
||||
}
|
||||
uint32_t
|
||||
MacParameters::GetFragmentationThreshold (void) const
|
||||
WifiMacParameters::GetFragmentationThreshold (void) const
|
||||
{
|
||||
NS_ASSERT (GetMaxMsduSize () / 16 < m_fragmentationThreshold);
|
||||
return m_fragmentationThreshold;
|
||||
}
|
||||
Time
|
||||
MacParameters::GetMsduLifetime (void) const
|
||||
WifiMacParameters::GetMsduLifetime (void) const
|
||||
{
|
||||
return Seconds (10);
|
||||
}
|
||||
Time
|
||||
MacParameters::GetMaxPropagationDelay (void) const
|
||||
WifiMacParameters::GetMaxPropagationDelay (void) const
|
||||
{
|
||||
return m_maxPropagationDelay;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
MacParameters::GetMaxMsduSize (void) const
|
||||
WifiMacParameters::GetMaxMsduSize (void) const
|
||||
{
|
||||
return 2304;
|
||||
}
|
||||
double
|
||||
MacParameters::GetCapLimit (void) const
|
||||
WifiMacParameters::GetCapLimit (void) const
|
||||
{
|
||||
return 0.4;
|
||||
}
|
||||
double
|
||||
MacParameters::GetMinEdcaTrafficProportion (void) const
|
||||
WifiMacParameters::GetMinEdcaTrafficProportion (void) const
|
||||
{
|
||||
return 0.4;
|
||||
}
|
||||
@@ -25,10 +25,10 @@
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
class MacParameters
|
||||
class WifiMacParameters
|
||||
{
|
||||
public:
|
||||
MacParameters ();
|
||||
WifiMacParameters ();
|
||||
|
||||
void Initialize (Time ctsDelay, Time ackDelay);
|
||||
void SetSlotTime (Time slotTime);
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
class MacParameters;
|
||||
class WifiMacParameters;
|
||||
|
||||
/**
|
||||
* \brief a 802.11e-specific queue.
|
||||
@@ -75,7 +75,7 @@ private:
|
||||
typedef std::deque<struct Item>::reverse_iterator PacketQueueRI;
|
||||
typedef std::deque<struct Item>::iterator PacketQueueI;
|
||||
PacketQueue m_queue;
|
||||
MacParameters *m_parameters;
|
||||
WifiMacParameters *m_parameters;
|
||||
uint32_t m_size;
|
||||
uint32_t m_maxSize;
|
||||
Time m_maxDelay;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "wifi-channel.h"
|
||||
#include "mac-stations.h"
|
||||
#include "mac-low.h"
|
||||
#include "mac-parameters.h"
|
||||
#include "wifi-mac-parameters.h"
|
||||
#include "mac-rx-middle.h"
|
||||
#include "mac-tx-middle.h"
|
||||
#include "mac-high-adhoc.h"
|
||||
@@ -225,8 +225,8 @@ WifiNetDevice::Construct (void)
|
||||
break;
|
||||
}
|
||||
|
||||
// MacParameters
|
||||
MacParameters *parameters = new MacParameters ();
|
||||
// WifiMacParameters
|
||||
WifiMacParameters *parameters = new WifiMacParameters ();
|
||||
WifiMacHeader hdr;
|
||||
hdr.SetType (WIFI_MAC_CTL_CTS);
|
||||
Time ctsDelay = m_phy->CalculateTxDuration (hdr.GetSize () + 4, m_phy->GetMode (0), WIFI_PREAMBLE_LONG);
|
||||
|
||||
@@ -36,7 +36,7 @@ class MacStations;
|
||||
class MacLow;
|
||||
class MacRxMiddle;
|
||||
class MacTxMiddle;
|
||||
class MacParameters;
|
||||
class WifiMacParameters;
|
||||
class DcaTxop;
|
||||
class MacHighAdhoc;
|
||||
class MacHighNqsta;
|
||||
@@ -149,7 +149,7 @@ protected:
|
||||
Ptr<MacLow> m_low;
|
||||
MacRxMiddle *m_rxMiddle;
|
||||
MacTxMiddle *m_txMiddle;
|
||||
MacParameters *m_parameters;
|
||||
WifiMacParameters *m_parameters;
|
||||
DcfManager *m_manager;
|
||||
PhyListener *m_phyListener;
|
||||
NavListener *m_navListener;
|
||||
|
||||
@@ -15,7 +15,7 @@ def build(bld):
|
||||
'aarf-mac-stations.cc',
|
||||
'wifi-mac-header.cc',
|
||||
'wifi-mac-trailer.cc',
|
||||
'mac-parameters.cc',
|
||||
'wifi-mac-parameters.cc',
|
||||
'mac-low.cc',
|
||||
'wifi-mac-queue.cc',
|
||||
'mac-tx-middle.cc',
|
||||
|
||||
Reference in New Issue
Block a user