From 7965ccd65c17a41bc9a1343f261edb10fab0c2ea Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Thu, 28 Feb 2008 06:18:02 +0100 Subject: [PATCH] MacParameters -> WifiMacParameters --- src/devices/wifi/dca-txop.cc | 6 +-- src/devices/wifi/dca-txop.h | 8 ++-- src/devices/wifi/dcf-manager-test.cc | 4 +- src/devices/wifi/dcf-manager.cc | 2 +- src/devices/wifi/mac-low.cc | 4 +- src/devices/wifi/mac-low.h | 6 +-- src/devices/wifi/mac-stations.cc | 6 +-- src/devices/wifi/mac-stations.h | 10 ++--- ...c-parameters.cc => wifi-mac-parameters.cc} | 38 +++++++++---------- ...mac-parameters.h => wifi-mac-parameters.h} | 4 +- src/devices/wifi/wifi-mac-queue.h | 4 +- src/devices/wifi/wifi-net-device.cc | 6 +-- src/devices/wifi/wifi-net-device.h | 4 +- src/devices/wifi/wscript | 2 +- 14 files changed, 52 insertions(+), 52 deletions(-) rename src/devices/wifi/{mac-parameters.cc => wifi-mac-parameters.cc} (77%) rename src/devices/wifi/{mac-parameters.h => wifi-mac-parameters.h} (97%) diff --git a/src/devices/wifi/dca-txop.cc b/src/devices/wifi/dca-txop.cc index 8a41ba0b3..471d91628 100644 --- a/src/devices/wifi/dca-txop.cc +++ b/src/devices/wifi/dca-txop.cc @@ -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 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; diff --git a/src/devices/wifi/dca-txop.h b/src/devices/wifi/dca-txop.h index ef3ee7d73..dd11ed64e 100644 --- a/src/devices/wifi/dca-txop.h +++ b/src/devices/wifi/dca-txop.h @@ -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 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 GetTraceResolver (void) const; Ptr 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 m_low; MacStations *m_stations; - MacParameters *m_parameters; + WifiMacParameters *m_parameters; TransmissionListener *m_transmissionListener; RandomStream *m_rng; diff --git a/src/devices/wifi/dcf-manager-test.cc b/src/devices/wifi/dcf-manager-test.cc index cb1b15c1f..eb4602bbd 100644 --- a/src/devices/wifi/dcf-manager-test.cc +++ b/src/devices/wifi/dcf-manager-test.cc @@ -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 DcfStates; DcfManager *m_dcfManager; - MacParameters *m_parameters; + WifiMacParameters *m_parameters; DcfStates m_dcfStates; bool m_result; }; diff --git a/src/devices/wifi/dcf-manager.cc b/src/devices/wifi/dcf-manager.cc index a49e3a41f..33a9402ce 100644 --- a/src/devices/wifi/dcf-manager.cc +++ b/src/devices/wifi/dcf-manager.cc @@ -6,7 +6,7 @@ #include #include "dcf-manager.h" -#include "mac-parameters.h" +#include "wifi-mac-parameters.h" NS_LOG_COMPONENT_DEFINE ("DcfManager"); diff --git a/src/devices/wifi/mac-low.cc b/src/devices/wifi/mac-low.cc index a72fc62c7..34e4a940c 100644 --- a/src/devices/wifi/mac-low.cc +++ b/src/devices/wifi/mac-low.cc @@ -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 phy) m_phy = phy; } void -MacLow::SetParameters (MacParameters *parameters) +MacLow::SetParameters (WifiMacParameters *parameters) { m_parameters = parameters; } diff --git a/src/devices/wifi/mac-low.h b/src/devices/wifi/mac-low.h index e4db9b325..f18a2a0cc 100644 --- a/src/devices/wifi/mac-low.h +++ b/src/devices/wifi/mac-low.h @@ -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 device); void SetPhy (Ptr phy); void SetStations (MacStations *stations); - void SetParameters (MacParameters *parameters); + void SetParameters (WifiMacParameters *parameters); Ptr GetDevice (void) const; /** * \param callback the callback which receives every incoming packet. @@ -389,7 +389,7 @@ private: Ptr m_device; Ptr m_phy; MacStations *m_stations; - MacParameters *m_parameters; + WifiMacParameters *m_parameters; MacLowRxCallback m_rxCallback; typedef std::vector::const_iterator NavListenersCI; typedef std::vector NavListeners; diff --git a/src/devices/wifi/mac-stations.cc b/src/devices/wifi/mac-stations.cc index 755bf7ae9..b96cf66eb 100644 --- a/src/devices/wifi/mac-stations.cc +++ b/src/devices/wifi/mac-stations.cc @@ -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; } diff --git a/src/devices/wifi/mac-stations.h b/src/devices/wifi/mac-stations.h index 6325101c0..a2ff26b2e 100644 --- a/src/devices/wifi/mac-stations.h +++ b/src/devices/wifi/mac-stations.h @@ -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 diff --git a/src/devices/wifi/mac-parameters.cc b/src/devices/wifi/wifi-mac-parameters.cc similarity index 77% rename from src/devices/wifi/mac-parameters.cc rename to src/devices/wifi/wifi-mac-parameters.cc index e0bdb9889..7848f68fb 100644 --- a/src/devices/wifi/mac-parameters.cc +++ b/src/devices/wifi/wifi-mac-parameters.cc @@ -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; } diff --git a/src/devices/wifi/mac-parameters.h b/src/devices/wifi/wifi-mac-parameters.h similarity index 97% rename from src/devices/wifi/mac-parameters.h rename to src/devices/wifi/wifi-mac-parameters.h index 4d5b14ec9..b6340915d 100644 --- a/src/devices/wifi/mac-parameters.h +++ b/src/devices/wifi/wifi-mac-parameters.h @@ -25,10 +25,10 @@ namespace ns3 { -class MacParameters +class WifiMacParameters { public: - MacParameters (); + WifiMacParameters (); void Initialize (Time ctsDelay, Time ackDelay); void SetSlotTime (Time slotTime); diff --git a/src/devices/wifi/wifi-mac-queue.h b/src/devices/wifi/wifi-mac-queue.h index 2f3ad4e12..900540266 100644 --- a/src/devices/wifi/wifi-mac-queue.h +++ b/src/devices/wifi/wifi-mac-queue.h @@ -28,7 +28,7 @@ namespace ns3 { -class MacParameters; +class WifiMacParameters; /** * \brief a 802.11e-specific queue. @@ -75,7 +75,7 @@ private: typedef std::deque::reverse_iterator PacketQueueRI; typedef std::deque::iterator PacketQueueI; PacketQueue m_queue; - MacParameters *m_parameters; + WifiMacParameters *m_parameters; uint32_t m_size; uint32_t m_maxSize; Time m_maxDelay; diff --git a/src/devices/wifi/wifi-net-device.cc b/src/devices/wifi/wifi-net-device.cc index 6788f2627..ad8f3878a 100644 --- a/src/devices/wifi/wifi-net-device.cc +++ b/src/devices/wifi/wifi-net-device.cc @@ -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); diff --git a/src/devices/wifi/wifi-net-device.h b/src/devices/wifi/wifi-net-device.h index e9a6345d5..1c4ba99d6 100644 --- a/src/devices/wifi/wifi-net-device.h +++ b/src/devices/wifi/wifi-net-device.h @@ -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 m_low; MacRxMiddle *m_rxMiddle; MacTxMiddle *m_txMiddle; - MacParameters *m_parameters; + WifiMacParameters *m_parameters; DcfManager *m_manager; PhyListener *m_phyListener; NavListener *m_navListener; diff --git a/src/devices/wifi/wscript b/src/devices/wifi/wscript index f0414b324..80d7f1d95 100644 --- a/src/devices/wifi/wscript +++ b/src/devices/wifi/wscript @@ -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',