« Return to Thread: 802.11 10Mhz Channel

Re: 802.11 10Mhz Channel

by Ramon Bauza :: Rate this Message:

Reply to Author | View in Thread

Hi,

Thank you for your comments. Please find the new patch modified accordingly
to your suggestions. Now, WifiMacHelpers remain the same way as in ns-3-dev.
I have also added the Configure80211b method to configure MAC parameters.
However, I would like someone to review the parameters, since I am not very
familiar with the 802.11b specification.  As Std 802.11-2007 states (page
654), I have considered:

- SlotTime = 20us
- SIFS = 10us

Ramon.

2009/7/13 Mathieu Lacage <mathieu.lacage@...>

> hi,
>
> The patch overall looks good. A couple of comments:
>
> 1) it feels like you could move the WifiMacHelper::Configure* methods to
> the WifiMac base class (that way, you could access
> WifiMac::GetDefaultMaxPropagationDelay directly)
> 2) maybe you could add a Standard attribute to WifiMac which is similar
> to the YansWifiPhy::Standard attribute and does the same thing as
> YansWifiPhy::SetStandard
> 3) maybe also add a Configure80211a and Configure80211b to WifiMac. Erm,
> I just realized that we currently have no set of 802.11b MAC parameters
> for the 802.11b PHY contributed by gary. If you can't bother with
> finding the right values in the spec, just add an empty Configure80211b
> method and we will fill them in later.
>
> Mathieu
>
>
>
> On Thu, 2009-07-09 at 19:23 +0200, Ramon Bauza wrote:
> > Hello,
> >
> > I would like to submit for code review the attached patch implementing
> half
> > and quarter-clocked Wifi operation using 5 and 10 Mhz channels spacing.
> We
> > would be glad to merge this new functionality in the main branch if ns-3
> > developers think it may be interesting for other people. The following
> files
> > have been modified (ns-3-dev):
> >
> > src/devices/wifi/interference-helper.cc
> > src/devices/wifi/interference-helper.h
> > src/devices/wifi/wifi-phy.cc
> > src/devices/wifi/wifi-phy.h
> > src/devices/wifi/wifi-phy-standard.h
> > src/devices/wifi/yans-error-rate-model.cc
> > src/devices/wifi/yans-wifi-phy.cc
> > src/devices/wifi/yans-wifi-phy.h
> > src/helper/nqos-wifi-mac-helper.cc
> > src/helper/nqos-wifi-mac-helper.h
> > src/helper/qos-wifi-mac-helper.cc
> > src/helper/qos-wifi-mac-helper.h
> > src/helper/wifi-helper.cc
> > src/helper/wifi-helper.h
> >
> > Apart from the modifications pointed out in the previous email posted
> some
> > weeks ago, we have also modified some of the wifi helpers. In order not
> to
> > make the user set weird values for the MAC parameters (slot,sifs, etc)
> from
> > the script, we have modified the WifiMacHelper incorporating two new
> > functions (Configure80211_10MhzParameters and
> Configure80211_5MhzParameters)
> > that allows the user to automatically select the default MAC parameters
> for
> > 5Mhz and 10Mhz channel spacing (we have also moved the function SetType
> and
> > the ObjectFactory m_mac from NqosWifiMacHelper and QosWifiMacHelper to
> > WifiMacHelper).
> >
> > Looking forward to your comments.
> >
> > Best regards,
> > Ramon Bauza.
> >
> > 2009/5/29 Ramon Bauza <monbauza@...>
> >
> > > Hello everyone,
> > >
> > > I am Ramon Bauza, a researcher at Miguel Hernandez University (Spain).
> > > Currently, I am involved in the EU FP7 project iTETRIS which aims at
> > > creating an integrated traffic and wireless simulation platform that
> will
> > > allow evaluating traffic management strategies and communication
> protocols
> > > in vehicular environments. The iTETRIS project employs SUMO and ns-3 as
> > > traffic simulation and wireless simulation platforms respectively.
> > >
> > > Our research group at UMH, it is charge of implementing the 802.11p
> (WAVE)
> > > standard in ns-3. 802.11p is based on 802.11a, being the channel
> bandwidth
> > > and thus also the data rates the main differences between both (802.11p
> uses
> > > a 10Mhz whereas 802.11a uses 20Mhz). After implementing 802.11p in
> ns-3, we
> > > will also look into and implement propagation models for vehicular
> > > environments that consider LOS/NLOS visibility conditions,
> > > vehicle-to-vehicle and vehicle-to-infraestructure communications, and
> > > shadowing and multipath fading effects.
> > >
> > > In order to model a 10Mhz channel in ns-3, some additions/modifications
> > > should be done (some weeks ago I posted a message in the user mailing
> list
> > > regarding this
> > >
> http://groups.google.com/group/ns-3-users/browse_thread/thread/f27b1ddcf9f1d532#
> ).
> > > Apart from 802.11p, I think other 802.11 standards employ 10MHz
> channels and
> > > thus probably the modeling of 10Mhz channels would also be useful for
> the
> > > ns-3 community working on 802.11-related topics. In fact, the IEEE Std
> > > 802.11TM-2007 standard considers 10Mhz channel spacing using OFDM. If
> you
> > > consider that the modeling of 10Mhz channels may be beneficial for
> other
> > > users we would be glad to merge the 10Mhz modeling in the main branch.
> > >
> > > Below, I compile the needed functions and modifications we plan to
> > > introduce in ns-3 at the PHY layer for modeling a 10Mhz channel:
> > >
> > > + wifi-phy-standard.h
> > >
> > >   Add WIFI_PHY_STANDARD_80211_10Mhz in the enum WifiPhyStandard
> > >
> > > + wifi-phy.h and wifi-phy.cc
> > >
> > >   Declare and define the following new functions:
> > >
> > >     static WifiMode Get3mb10Mhz (void);
> > >     static WifiMode Get4_5mb10Mhz (void);
> > >     static WifiMode Get6mb10Mhz (void);
> > >     static WifiMode Get9mb10Mhz (void);
> > >     static WifiMode Get12mb10Mhz (void);
> > >     static WifiMode Get18mb10Mhz (void);
> > >     static WifiMode Get24mb10Mhz (void);
> > >     static WifiMode Get27mb10Mhz (void);
> > >
> > > + yans-wifi-phy.h and yans-wifi-phy.cc
> > >
> > >   Declare and define the void Configure80211_10Mhz (void) function.
> > >   Modify the void SetStandard (enum WifiPhyStandard standard) function
> so
> > > that the user can also select a 10Mhz channel.
> > >
> > > + interference-helper.h and interference-helper.cc
> > >
> > >   Declare and define void Configure80211_10MhzParameters (void);
> > >
> > > One function that should be modified is
> > > InterferenceHelper::CalculateTxDuration (uint32_t size, WifiMode
> > > payloadMode, WifiPreamble preamble) const since it assumes that the
> symbol
> > > duration is always 4us (20 Mhz channel). This function should employ a
> > > symbol duration according to the channel used (10Mhz or 20Mhz). One
> possible
> > > solution to solve this would be to have a new variable in the class
> > > InterferenceHelper which allows differentiating the channel used. This
> > > variable could be of type WifiPhyStandard. In the function Time
> > > InterferenceHelper::CalculateTxDuration, this new variable would be
> examined
> > > and the packet txon duration will be calculated based on the bandwidth
> > > channel.
> > >
> > > Please, I would like to have your comments on this in order to proceed
> with
> > > the implementation.
> > >
> > > Thank you in advance.
> > > Best regards,
> > > Ramon.
> > >
> > >
> --------------------------------------------------------------------------
> > > Ramon Bauza
> > > Ubiquitous Wireless Communications Research Laboratory
> > > Uwicore, http://www.uwicore.umh.es
> > > Signal Theory and Communications Division
> > > University Miguel Hernández (Spain)
> > > Tel: +34 96522 2031
> > > Fax: +34 96665 8903
> > >
> > >
> ----------------------------------------------------------------------------
> > >
>
>

--
--------------------------------------------------------------------------
Ramon Bauza
Ubiquitous Wireless Communications Research Laboratory
Uwicore, http://www.uwicore.umh.es
Signal Theory and Communications Division
University Miguel Hernández (Spain)
Tel: +34 96522 2031
Fax: +34 96665 8903
----------------------------------------------------------------------------

[patchWifi10and5MhzChannelsv2.diff]

Los ficheros binarios ns-3-dev/.hg/dirstate y ns-3-spacing/.hg/dirstate son distintos
Los ficheros binarios ns-3-dev/.hg/store/undo y ns-3-spacing/.hg/store/undo son distintos
Los ficheros binarios ns-3-dev/.hg/undo.dirstate y ns-3-spacing/.hg/undo.dirstate son distintos
Los ficheros binarios ns-3-dev/regression.pyc y ns-3-spacing/regression.pyc son distintos
diff -u -r -N ns-3-dev/src/devices/wifi/interference-helper.cc ns-3-spacing/src/devices/wifi/interference-helper.cc
--- ns-3-dev/src/devices/wifi/interference-helper.cc 2009-07-13 11:35:47.000000000 +0200
+++ ns-3-spacing/src/devices/wifi/interference-helper.cc 2009-07-09 12:27:49.000000000 +0200
@@ -241,6 +241,18 @@
       delay += m_plcpLongPreambleDelayUs;
       delay += lrint (ceil ((size * 8.0 + 48.0) / payloadMode.GetDataRate () / 4e-6) * 4);
       break;
+    case WIFI_PHY_STANDARD_80211_10Mhz:
+      delay += m_plcpLongPreambleDelayUs;
+      // symbol duration is 8us
+      delay += 8;
+      delay += lrint (ceil ((size * 8.0 + 16.0 + 6.0) / payloadMode.GetDataRate () / 8e-6) * 8);
+      break;
+    case WIFI_PHY_STANDARD_80211_5Mhz:
+      delay += m_plcpLongPreambleDelayUs;
+      // symbol duration is 16us
+      delay += 16;
+      delay += lrint (ceil ((size * 8.0 + 16.0 + 6.0) / payloadMode.GetDataRate () / 1.6e-5) * 16);
+      break;
     default:
      NS_ASSERT (false);
      break;
@@ -277,6 +289,34 @@
   m_maxPacketDuration = CalculateTxDuration (4095, WifiPhy::Get1mbb (), WIFI_PREAMBLE_LONG);
 }
 
+void
+InterferenceHelper::Configure80211_10MhzParameters (void)
+{
+  NS_LOG_FUNCTION (this);
+  m_80211_standard = WIFI_PHY_STANDARD_80211_10Mhz;
+  m_plcpLongPreambleDelayUs = 32;
+  m_plcpShortPreambleDelayUs = 32;
+  m_longPlcpHeaderMode = WifiPhy::Get3mb10Mhz ();
+  m_shortPlcpHeaderMode = WifiPhy::Get3mb10Mhz ();
+  m_plcpHeaderLength = 4 + 1 + 12 + 1 + 6;
+  /* 4095 bytes at a 3Mb/s rate with a 1/2 coding rate. */
+  m_maxPacketDuration = CalculateTxDuration (4095, WifiPhy::Get3mb10Mhz (), WIFI_PREAMBLE_LONG);
+}
+
+void
+InterferenceHelper::Configure80211_5MhzParameters (void)
+{
+  NS_LOG_FUNCTION (this);
+  m_80211_standard = WIFI_PHY_STANDARD_80211_5Mhz;
+  m_plcpLongPreambleDelayUs = 64;
+  m_plcpShortPreambleDelayUs = 64;
+  m_longPlcpHeaderMode = WifiPhy::Get1_5mb5Mhz ();
+  m_shortPlcpHeaderMode = WifiPhy::Get1_5mb5Mhz ();
+  m_plcpHeaderLength = 4 + 1 + 12 + 1 + 6;
+  /* 4095 bytes at a 1.5Mb/s rate with a 1/2 coding rate. */
+  m_maxPacketDuration = CalculateTxDuration (4095, WifiPhy::Get1_5mb5Mhz (), WIFI_PREAMBLE_LONG);
+}
+
 void
 InterferenceHelper::AppendEvent (Ptr<InterferenceHelper::Event> event)
 {
diff -u -r -N ns-3-dev/src/devices/wifi/interference-helper.h ns-3-spacing/src/devices/wifi/interference-helper.h
--- ns-3-dev/src/devices/wifi/interference-helper.h 2009-07-13 11:35:47.000000000 +0200
+++ ns-3-spacing/src/devices/wifi/interference-helper.h 2009-07-09 12:26:29.000000000 +0200
@@ -71,6 +71,8 @@
 
   void Configure80211aParameters (void);
   void Configure80211bParameters (void);
+  void Configure80211_10MhzParameters (void);
+  void Configure80211_5MhzParameters (void);
   void SetNoiseFigure (double value);
   void SetErrorRateModel (Ptr<ErrorRateModel> rate);
 
diff -u -r -N ns-3-dev/src/devices/wifi/wifi-mac.cc ns-3-spacing/src/devices/wifi/wifi-mac.cc
--- ns-3-dev/src/devices/wifi/wifi-mac.cc 2009-07-13 11:35:47.000000000 +0200
+++ ns-3-spacing/src/devices/wifi/wifi-mac.cc 2009-07-13 11:27:21.000000000 +0200
@@ -117,6 +117,14 @@
    MakeSsidAccessor (&WifiMac::GetSsid,
      &WifiMac::SetSsid),
    MakeSsidChecker ())
+    .AddAttribute ("Standard", "The standard chosen configures some MAC-specific constants",
+                   EnumValue (WIFI_PHY_STANDARD_80211a),
+                   MakeEnumAccessor (&WifiMac::SetStandard),
+                   MakeEnumChecker (WIFI_PHY_STANDARD_80211a, "802.11a",
+                                    WIFI_PHY_STANDARD_80211b, "802.11b",
+                                    WIFI_PHY_STANDARD_80211_10Mhz,"802.11_10Mhz",
+                                    WIFI_PHY_STANDARD_80211_5Mhz,"802-11_5Mhz",
+                                    WIFI_PHY_STANDARD_holland, "holland"))
     .AddTraceSource ("MacTx",
                      "A packet has been received from higher layers and is being processed in preparation for "
                      "queueing for transmission.",
@@ -200,4 +208,74 @@
   m_macRxDropTrace (packet);
 }
 
+void
+WifiMac::SetStandard (enum WifiPhyStandard standard)
+{
+  m_standard = standard;
+  switch (standard) {
+  case WIFI_PHY_STANDARD_80211a:
+    Configure80211a ();
+    break;
+  case WIFI_PHY_STANDARD_80211b:
+    Configure80211b ();
+    break;
+  case WIFI_PHY_STANDARD_80211_10Mhz:
+    Configure80211_10Mhz ();
+    break;
+  case WIFI_PHY_STANDARD_80211_5Mhz:
+    Configure80211_5Mhz ();
+    break;
+  case WIFI_PHY_STANDARD_holland:
+    Configure80211a ();
+    break;
+  default:
+    NS_ASSERT (false);
+    break;
+  }
+}
+
+void
+WifiMac::Configure80211a (void)
+{
+  SetSifs(MicroSeconds(16));
+  SetSlot(MicroSeconds(9));
+  SetEifsNoDifs(MicroSeconds(16+44));
+  SetPifs(MicroSeconds(16+9));
+  SetCtsTimeout(MicroSeconds(16+44+9+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2));
+  SetAckTimeout(MicroSeconds(16+44+9+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2));
+}
+
+void
+WifiMac::Configure80211b (void)
+{
+  SetSifs(MicroSeconds(10));
+  SetSlot(MicroSeconds(20));
+  SetEifsNoDifs(MicroSeconds(10+304));
+  SetPifs(MicroSeconds(10+20));
+  SetCtsTimeout(MicroSeconds(10+304+20+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2));
+  SetAckTimeout(MicroSeconds(10+304+20+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2));
+}
+
+void
+WifiMac::Configure80211_10Mhz (void)
+{
+  SetSifs(MicroSeconds(32));
+  SetSlot(MicroSeconds(13));
+  SetEifsNoDifs(MicroSeconds(32+88));
+  SetPifs(MicroSeconds(32+13));
+  SetCtsTimeout(MicroSeconds(32+88+13+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2));
+  SetAckTimeout(MicroSeconds(32+88+13+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2));
+}
+
+void
+WifiMac::Configure80211_5Mhz (void)
+{
+  SetSifs(MicroSeconds(64));
+  SetSlot(MicroSeconds(21));
+  SetEifsNoDifs(MicroSeconds(64+176));
+  SetPifs(MicroSeconds(64+21));
+  SetCtsTimeout(MicroSeconds(64+176+21+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2));
+  SetAckTimeout(MicroSeconds(64+176+21+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2));
+}
+
 } // namespace ns3
diff -u -r -N ns-3-dev/src/devices/wifi/wifi-mac.h ns-3-spacing/src/devices/wifi/wifi-mac.h
--- ns-3-dev/src/devices/wifi/wifi-mac.h 2009-07-13 11:35:47.000000000 +0200
+++ ns-3-spacing/src/devices/wifi/wifi-mac.h 2009-07-13 11:27:45.000000000 +0200
@@ -206,6 +206,10 @@
    * purposes.
    */
   void NotifyRxDrop (Ptr<const Packet> packet);
+  /**
+   * \param standard the wifi standard to be configured
+   */
+  void SetStandard (enum WifiPhyStandard standard);
 
 private:
   static Time GetDefaultMaxPropagationDelay (void);
@@ -217,6 +221,12 @@
 
   Time m_maxPropagationDelay;
   uint32_t m_maxMsduSize;
+  WifiPhyStandard m_standard;
+
+  void Configure80211a (void);
+  void Configure80211b (void);
+  void Configure80211_10Mhz (void);
+  void Configure80211_5Mhz ();
 
   /**
    * The trace source fired when packets come into the "top" of the device
diff -u -r -N ns-3-dev/src/devices/wifi/wifi-phy.cc ns-3-spacing/src/devices/wifi/wifi-phy.cc
--- ns-3-dev/src/devices/wifi/wifi-phy.cc 2009-07-13 11:35:47.000000000 +0200
+++ ns-3-spacing/src/devices/wifi/wifi-phy.cc 2009-07-09 12:22:34.000000000 +0200
@@ -244,6 +244,150 @@
   return mode;
 }
 
+WifiMode
+WifiPhy::Get3mb10Mhz (void)
+{
+  static WifiMode mode = WifiModeFactory::CreateBpsk ("wifi-3mbs-10Mhz",
+                                                      true,
+                                                      10000000, 3000000, 6000000);
+  return mode;
+}
+
+WifiMode
+WifiPhy::Get4_5mb10Mhz (void)
+{
+  static WifiMode mode = WifiModeFactory::CreateBpsk ("wifi-4.5mbs-10Mhz",
+                                                      false,
+                                                      10000000, 4500000, 6000000);
+  return mode;
+}
+
+WifiMode
+WifiPhy::Get6mb10Mhz (void)
+{
+  static WifiMode mode = WifiModeFactory::CreateBpsk ("wifi-6mbs-10Mhz",
+                                                      true,
+                                                      10000000, 6000000, 12000000);
+  return mode;
+}
+
+WifiMode
+WifiPhy::Get9mb10Mhz (void)
+{
+  static WifiMode mode = WifiModeFactory::CreateBpsk ("wifi-9mbs-10Mhz",
+                                                      false,
+                                                      10000000, 9000000, 12000000);
+  return mode;
+}
+
+WifiMode
+WifiPhy::Get12mb10Mhz (void)
+{
+  static WifiMode mode = WifiModeFactory::CreateBpsk ("wifi-12mbs-10Mhz",
+                                                      true,
+                                                      10000000, 12000000, 24000000);
+  return mode;
+}
+
+WifiMode
+WifiPhy::Get18mb10Mhz (void)
+{
+  static WifiMode mode = WifiModeFactory::CreateBpsk ("wifi-18mbs-10Mhz",
+                                                      false,
+                                                      10000000, 18000000, 24000000);
+  return mode;
+}
+
+WifiMode
+WifiPhy::Get24mb10Mhz (void)
+{
+  static WifiMode mode = WifiModeFactory::CreateBpsk ("wifi-24mbs-10Mhz",
+                                                      false,
+                                                      10000000, 24000000, 36000000);
+  return mode;
+}
+
+WifiMode
+WifiPhy::Get27mb10Mhz (void)
+{
+  static WifiMode mode = WifiModeFactory::CreateBpsk ("wifi-27mbs-10Mhz",
+                                                      false,
+                                                      10000000, 27000000, 36000000);
+  return mode;
+}
+
+WifiMode
+WifiPhy::Get1_5mb5Mhz (void)
+{
+  static WifiMode mode = WifiModeFactory::CreateBpsk ("wifi-1_5mbs-5Mhz",
+                                                      true,
+                                                      5000000, 1500000, 3000000);
+  return mode;
+}
+
+WifiMode
+WifiPhy::Get2_25mb5Mhz (void)
+{
+  static WifiMode mode = WifiModeFactory::CreateBpsk ("wifi-2.25mbs-5Mhz",
+                                                      false,
+                                                      5000000, 2250000, 3000000);
+  return mode;
+}
+
+WifiMode
+WifiPhy::Get3mb5Mhz (void)
+{
+  static WifiMode mode = WifiModeFactory::CreateBpsk ("wifi-3mbs-5Mhz",
+                                                      true,
+                                                      5000000, 3000000, 6000000);
+  return mode;
+}
+
+WifiMode
+WifiPhy::Get4_5mb5Mhz (void)
+{
+  static WifiMode mode = WifiModeFactory::CreateBpsk ("wifi-4.5mbs-5Mhz",
+                                                      false,
+                                                      5000000, 4500000, 6000000);
+  return mode;
+}
+
+WifiMode
+WifiPhy::Get6mb5Mhz (void)
+{
+  static WifiMode mode = WifiModeFactory::CreateBpsk ("wifi-6mbs-5Mhz",
+                                                      true,
+                                                      5000000, 6000000, 12000000);
+  return mode;
+}
+
+WifiMode
+WifiPhy::Get9mb5Mhz (void)
+{
+  static WifiMode mode = WifiModeFactory::CreateBpsk ("wifi-9mbs-5Mhz",
+                                                      false,
+                                                      10000000, 9000000, 12000000);
+  return mode;
+}
+
+WifiMode
+WifiPhy::Get12mb5Mhz (void)
+{
+  static WifiMode mode = WifiModeFactory::CreateBpsk ("wifi-12mbs-5Mhz",
+                                                      false,
+                                                      10000000, 12000000, 18000000);
+  return mode;
+}
+
+WifiMode
+WifiPhy::Get13_5mb5Mhz (void)
+{
+  static WifiMode mode = WifiModeFactory::CreateBpsk ("wifi-13.5mbs-5Mhz",
+                                                      false,
+                                                      10000000, 13500000, 18000000);
+  return mode;
+}
+
 
 } // namespace ns3
 
@@ -265,6 +409,22 @@
     ns3::WifiPhy::Get2mbb ();
     ns3::WifiPhy::Get5_5mbb ();
     ns3::WifiPhy::Get11mbb ();
+    ns3::WifiPhy::Get3mb10Mhz ();
+    ns3::WifiPhy::Get4_5mb10Mhz ();
+    ns3::WifiPhy::Get6mb10Mhz ();
+    ns3::WifiPhy::Get9mb10Mhz ();
+    ns3::WifiPhy::Get12mb10Mhz ();
+    ns3::WifiPhy::Get18mb10Mhz ();
+    ns3::WifiPhy::Get24mb10Mhz ();
+    ns3::WifiPhy::Get27mb10Mhz ();
+    ns3::WifiPhy::Get1_5mb5Mhz ();
+    ns3::WifiPhy::Get2_25mb5Mhz ();
+    ns3::WifiPhy::Get3mb5Mhz ();
+    ns3::WifiPhy::Get4_5mb5Mhz ();
+    ns3::WifiPhy::Get6mb5Mhz ();
+    ns3::WifiPhy::Get9mb5Mhz ();
+    ns3::WifiPhy::Get12mb5Mhz ();
+    ns3::WifiPhy::Get13_5mb5Mhz ();
   }
 } g_constructor;
 }
diff -u -r -N ns-3-dev/src/devices/wifi/wifi-phy.h ns-3-spacing/src/devices/wifi/wifi-phy.h
--- ns-3-dev/src/devices/wifi/wifi-phy.h 2009-07-13 11:35:47.000000000 +0200
+++ ns-3-spacing/src/devices/wifi/wifi-phy.h 2009-07-09 12:21:10.000000000 +0200
@@ -256,6 +256,22 @@
   static WifiMode Get2mbb (void);
   static WifiMode Get5_5mbb (void);
   static WifiMode Get11mbb (void);
+  static WifiMode Get3mb10Mhz (void);
+  static WifiMode Get4_5mb10Mhz (void);
+  static WifiMode Get6mb10Mhz (void);
+  static WifiMode Get9mb10Mhz (void);
+  static WifiMode Get12mb10Mhz (void);
+  static WifiMode Get18mb10Mhz (void);
+  static WifiMode Get24mb10Mhz (void);
+  static WifiMode Get27mb10Mhz (void);
+  static WifiMode Get1_5mb5Mhz (void);
+  static WifiMode Get2_25mb5Mhz (void);
+  static WifiMode Get3mb5Mhz (void);
+  static WifiMode Get4_5mb5Mhz (void);
+  static WifiMode Get6mb5Mhz (void);
+  static WifiMode Get9mb5Mhz (void);
+  static WifiMode Get12mb5Mhz (void);
+  static WifiMode Get13_5mb5Mhz (void);
 
 
   /**
diff -u -r -N ns-3-dev/src/devices/wifi/wifi-phy-standard.h ns-3-spacing/src/devices/wifi/wifi-phy-standard.h
--- ns-3-dev/src/devices/wifi/wifi-phy-standard.h 2009-07-13 11:35:47.000000000 +0200
+++ ns-3-spacing/src/devices/wifi/wifi-phy-standard.h 2009-07-09 12:23:11.000000000 +0200
@@ -25,6 +25,8 @@
 enum WifiPhyStandard {
   WIFI_PHY_STANDARD_80211a,
   WIFI_PHY_STANDARD_80211b,
+  WIFI_PHY_STANDARD_80211_10Mhz,
+  WIFI_PHY_STANDARD_80211_5Mhz,
   WIFI_PHY_STANDARD_holland
 };
 
diff -u -r -N ns-3-dev/src/devices/wifi/yans-error-rate-model.cc ns-3-spacing/src/devices/wifi/yans-error-rate-model.cc
--- ns-3-dev/src/devices/wifi/yans-error-rate-model.cc 2009-07-13 11:35:47.000000000 +0200
+++ ns-3-spacing/src/devices/wifi/yans-error-rate-model.cc 2009-07-13 12:06:45.000000000 +0200
@@ -176,7 +176,7 @@
 double
 YansErrorRateModel::GetChunkSuccessRate (WifiMode mode, double snr, uint32_t nbits) const
 {
-  if (mode == WifiPhy::Get6mba ())
+  if (mode == WifiPhy::Get6mba () || mode == WifiPhy::Get3mb10Mhz () || mode == WifiPhy::Get1_5mb5Mhz ())
     {
       return GetFecBpskBer (snr,
                             nbits,
@@ -186,7 +186,7 @@
                             11 // adFree
                             );      
     }
-  else if (mode == WifiPhy::Get9mba ())
+  else if (mode == WifiPhy::Get9mba () || mode == WifiPhy::Get4_5mb10Mhz () || mode == WifiPhy::Get2_25mb5Mhz ())
     {
       return GetFecBpskBer (snr,
                             nbits,
@@ -196,7 +196,7 @@
                             8 // adFree
                             );
     }
-  else if (mode == WifiPhy::Get12mba ())
+  else if (mode == WifiPhy::Get12mba () || mode == WifiPhy::Get6mb10Mhz () || mode == WifiPhy::Get3mb5Mhz ())
     {
       return GetFecQamBer (snr,
                            nbits,
@@ -208,7 +208,7 @@
                            0   // adFreePlusOne
                            );
     }
-  else if (mode == WifiPhy::Get18mba ())
+  else if (mode == WifiPhy::Get18mba () || mode == WifiPhy::Get9mb10Mhz () || mode == WifiPhy::Get4_5mb5Mhz ())
     {
       return GetFecQamBer (snr,
                            nbits,
@@ -220,7 +220,7 @@
                            31 // adFreePlusOne
                            );
     }
-  else if (mode == WifiPhy::Get24mba ())
+  else if (mode == WifiPhy::Get24mba () || mode == WifiPhy::Get12mb10Mhz () || mode == WifiPhy::Get6mb5Mhz ())
     {
       return GetFecQamBer (snr,
                            nbits,
@@ -232,7 +232,7 @@
                            0   // adFreePlusOne
                            );
     }
-  else if (mode == WifiPhy::Get36mba ())
+  else if (mode == WifiPhy::Get36mba () || mode == WifiPhy::Get18mb10Mhz () || mode == WifiPhy::Get9mb5Mhz ())
     {
       return GetFecQamBer (snr,
                            nbits,
@@ -244,7 +244,7 @@
                            31  // adFreePlusOne
                            );
     }
-  else if (mode == WifiPhy::Get48mba ())
+  else if (mode == WifiPhy::Get48mba () || mode == WifiPhy::Get24mb10Mhz () || mode == WifiPhy::Get12mb5Mhz ())
     {
       return GetFecQamBer (snr,
                            nbits,
@@ -256,7 +256,7 @@
                            16  // adFreePlusOne
                            );
     }
-  else if (mode == WifiPhy::Get54mba ())
+  else if (mode == WifiPhy::Get54mba () || mode == WifiPhy::Get27mb10Mhz () || mode == WifiPhy::Get13_5mb5Mhz ())
     {
       return GetFecQamBer (snr,
                            nbits,
diff -u -r -N ns-3-dev/src/devices/wifi/yans-wifi-phy.cc ns-3-spacing/src/devices/wifi/yans-wifi-phy.cc
--- ns-3-dev/src/devices/wifi/yans-wifi-phy.cc 2009-07-13 11:35:47.000000000 +0200
+++ ns-3-spacing/src/devices/wifi/yans-wifi-phy.cc 2009-07-09 12:25:35.000000000 +0200
@@ -111,6 +111,8 @@
                    MakeEnumAccessor (&YansWifiPhy::SetStandard),
                    MakeEnumChecker (WIFI_PHY_STANDARD_80211a, "802.11a",
                                     WIFI_PHY_STANDARD_80211b, "802.11b",
+                                    WIFI_PHY_STANDARD_80211_10Mhz,"802.11_10Mhz",
+                                    WIFI_PHY_STANDARD_80211_5Mhz,"802-11_5Mhz",
                                     WIFI_PHY_STANDARD_holland, "holland"))
     .AddAttribute ("State", "The state of the PHY layer",
                    PointerValue (),
@@ -156,6 +158,12 @@
   case WIFI_PHY_STANDARD_80211b:
     Configure80211b ();
     break;
+  case WIFI_PHY_STANDARD_80211_10Mhz:
+    Configure80211_10Mhz ();
+    break;
+  case WIFI_PHY_STANDARD_80211_5Mhz:
+    Configure80211_5Mhz ();
+    break;
   case WIFI_PHY_STANDARD_holland:
     ConfigureHolland ();
     break;
@@ -461,6 +469,36 @@
 }
 
 void
+YansWifiPhy::Configure80211_10Mhz (void)
+{
+  NS_LOG_FUNCTION (this);
+  m_interference.Configure80211_10MhzParameters ();
+  m_modes.push_back (WifiPhy::Get3mb10Mhz ());
+  m_modes.push_back (WifiPhy::Get4_5mb10Mhz ());
+  m_modes.push_back (WifiPhy::Get6mb10Mhz ());
+  m_modes.push_back (WifiPhy::Get9mb10Mhz ());
+  m_modes.push_back (WifiPhy::Get12mb10Mhz ());
+  m_modes.push_back (WifiPhy::Get18mb10Mhz ());
+  m_modes.push_back (WifiPhy::Get24mb10Mhz ());
+  m_modes.push_back (WifiPhy::Get27mb10Mhz  ());
+}
+
+void
+YansWifiPhy::Configure80211_5Mhz (void)
+{
+  NS_LOG_FUNCTION (this);
+  m_interference.Configure80211_5MhzParameters ();
+  m_modes.push_back (WifiPhy::Get1_5mb5Mhz ());
+  m_modes.push_back (WifiPhy::Get2_25mb5Mhz ());
+  m_modes.push_back (WifiPhy::Get3mb5Mhz ());
+  m_modes.push_back (WifiPhy::Get4_5mb5Mhz ());
+  m_modes.push_back (WifiPhy::Get6mb5Mhz ());
+  m_modes.push_back (WifiPhy::Get9mb5Mhz ());
+  m_modes.push_back (WifiPhy::Get12mb5Mhz ());
+  m_modes.push_back (WifiPhy::Get13_5mb5Mhz  ());
+}
+
+void
 YansWifiPhy::ConfigureHolland (void)
 {
   NS_LOG_FUNCTION (this);
diff -u -r -N ns-3-dev/src/devices/wifi/yans-wifi-phy.h ns-3-spacing/src/devices/wifi/yans-wifi-phy.h
--- ns-3-dev/src/devices/wifi/yans-wifi-phy.h 2009-07-13 11:35:47.000000000 +0200
+++ ns-3-spacing/src/devices/wifi/yans-wifi-phy.h 2009-07-09 12:24:31.000000000 +0200
@@ -125,6 +125,8 @@
   virtual void DoDispose (void);
   void Configure80211a (void);
   void Configure80211b (void);
+  void Configure80211_10Mhz (void);
+  void Configure80211_5Mhz ();
   void ConfigureHolland (void);
   double GetEdThresholdW (void) const;
   double DbmToW (double dbm) const;
Los ficheros binarios ns-3-dev/wutils.pyc y ns-3-spacing/wutils.pyc son distintos

 « Return to Thread: 802.11 10Mhz Channel