A Discrete-Event Network Simulator
API
wifi-mixed-network.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2016 S├ębastien Deronne
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: S├ębastien Deronne <sebastien.deronne@gmail.com>
19  */
20 
21 #include "ns3/command-line.h"
22 #include "ns3/config.h"
23 #include "ns3/string.h"
24 #include "ns3/pointer.h"
25 #include "ns3/log.h"
26 #include "ns3/yans-wifi-helper.h"
27 #include "ns3/ssid.h"
28 #include "ns3/mobility-helper.h"
29 #include "ns3/internet-stack-helper.h"
30 #include "ns3/ipv4-address-helper.h"
31 #include "ns3/udp-client-server-helper.h"
32 #include "ns3/on-off-helper.h"
33 #include "ns3/yans-wifi-channel.h"
34 #include "ns3/wifi-net-device.h"
35 #include "ns3/qos-txop.h"
36 #include "ns3/wifi-mac.h"
37 #include "ns3/packet-sink-helper.h"
38 #include "ns3/packet-sink.h"
39 #include "ns3/ht-configuration.h"
40 
41 // This example shows how to configure mixed networks (i.e. mixed b/g and HT/non-HT) and how are performance in several scenarios.
42 //
43 // The example compares first g only and mixed b/g cases with various configurations depending on the following parameters:
44 // - protection mode that is configured on the AP;
45 // - whether short PPDU format is supported by the 802.11b station;
46 // - whether short slot time is supported by both the 802.11g station and the AP.
47 //
48 // The example then compares HT only and mixed HT/non-HT cases.
49 //
50 // The output results show that the presence of an 802.11b station strongly affects 802.11g performance.
51 // Protection mechanisms ensure that the NAV value of 802.11b stations is set correctly in case of 802.11g transmissions.
52 // In practice, those protection mechanism add a lot of overhead, resulting in reduced performance. CTS-To-Self introduces
53 // less overhead than Rts-Cts, but is not heard by hidden stations (and is thus generally only recommended as a protection
54 // mechanism for access points). Since short slot time is disabled once an 802.11b station enters the network, benefits from
55 // short slot time are only observed in a g only configuration.
56 //
57 // The user can also select the payload size and can choose either an UDP or a TCP connection.
58 // Example: ./waf --run "wifi-mixed-network --isUdp=1"
59 
60 using namespace ns3;
61 
62 NS_LOG_COMPONENT_DEFINE ("MixedNetwork");
63 
64 struct Parameters
65 {
66  std::string testName;
68  std::string erpProtectionMode;
72  uint32_t nWifiB;
74  uint32_t nWifiG;
76  uint32_t nWifiN;
78  bool isUdp;
79  uint32_t payloadSize;
81 };
82 
83 class Experiment
84 {
85 public:
86  Experiment ();
87  double Run (Parameters params);
88 };
89 
91 {
92 }
93 
94 double
96 {
97  std::string apTypeString;
98  if (params.apType == WIFI_STANDARD_80211g)
99  {
100  apTypeString = "WIFI_STANDARD_80211g";
101  }
102  else if (params.apType == WIFI_STANDARD_80211n_2_4GHZ)
103  {
104  apTypeString = "WIFI_STANDARD_80211n_2_4GHZ";
105  }
106 
107  std::cout << "Run: " << params.testName
108  << "\n\t enableErpProtection=" << params.enableErpProtection
109  << "\n\t erpProtectionMode=" << params.erpProtectionMode
110  << "\n\t enableShortSlotTime=" << params.enableShortSlotTime
111  << "\n\t enableShortPhyPreamble=" << params.enableShortPhyPreamble
112  << "\n\t apType=" << apTypeString
113  << "\n\t nWifiB=" << params.nWifiB
114  << "\n\t bHasTraffic=" << params.bHasTraffic
115  << "\n\t nWifiG=" << params.nWifiG
116  << "\n\t gHasTraffic=" << params.gHasTraffic
117  << "\n\t nWifiN=" << params.nWifiN
118  << "\n\t nHasTraffic=" << params.nHasTraffic
119  << std::endl;
120 
121  Config::SetDefault ("ns3::WifiRemoteStationManager::ErpProtectionMode", StringValue (params.erpProtectionMode));
122 
123  double throughput = 0;
124  uint32_t nWifiB = params.nWifiB;
125  uint32_t nWifiG = params.nWifiG;
126  uint32_t nWifiN = params.nWifiN;
127  double simulationTime = params.simulationTime;
128  uint32_t payloadSize = params.payloadSize;
129 
130  NodeContainer wifiBStaNodes;
131  wifiBStaNodes.Create (nWifiB);
132  NodeContainer wifiGStaNodes;
133  wifiGStaNodes.Create (nWifiG);
134  NodeContainer wifiNStaNodes;
135  wifiNStaNodes.Create (nWifiN);
137  wifiApNode.Create (1);
138 
140  channel.AddPropagationLoss ("ns3::RangePropagationLossModel");
141 
143  phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
144  phy.SetChannel (channel.Create ());
145 
147  wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
148 
149  // 802.11b STA
150  wifi.SetStandard (WIFI_STANDARD_80211b);
151 
153  Ssid ssid = Ssid ("ns-3-ssid");
154 
155  mac.SetType ("ns3::StaWifiMac",
156  "Ssid", SsidValue (ssid),
157  "ShortSlotTimeSupported", BooleanValue (params.enableShortSlotTime));
158 
159  // Configure the PHY preamble type: long or short
160  phy.Set ("ShortPlcpPreambleSupported", BooleanValue (params.enableShortPhyPreamble));
161 
162  NetDeviceContainer bStaDevice;
163  bStaDevice = wifi.Install (phy, mac, wifiBStaNodes);
164 
165  // 802.11b/g STA
166  wifi.SetStandard (WIFI_STANDARD_80211g);
167  NetDeviceContainer gStaDevice;
168  gStaDevice = wifi.Install (phy, mac, wifiGStaNodes);
169 
170  // 802.11b/g/n STA
171  wifi.SetStandard (WIFI_STANDARD_80211n_2_4GHZ);
172  NetDeviceContainer nStaDevice;
173  mac.SetType ("ns3::StaWifiMac",
174  "Ssid", SsidValue (ssid),
175  "BE_BlockAckThreshold", UintegerValue (2),
176  "ShortSlotTimeSupported", BooleanValue (params.enableShortSlotTime));
177  nStaDevice = wifi.Install (phy, mac, wifiNStaNodes);
178 
179  // AP
180  NetDeviceContainer apDevice;
181  wifi.SetStandard (params.apType);
182  mac.SetType ("ns3::ApWifiMac",
183  "Ssid", SsidValue (ssid),
184  "EnableBeaconJitter", BooleanValue (false),
185  "BE_BlockAckThreshold", UintegerValue (2),
186  "EnableNonErpProtection", BooleanValue (params.enableErpProtection),
187  "ShortSlotTimeSupported", BooleanValue (params.enableShortSlotTime));
188  apDevice = wifi.Install (phy, mac, wifiApNode);
189 
190  // Set TXOP limit
191  if (params.apType == WIFI_STANDARD_80211n_2_4GHZ)
192  {
193  Ptr<NetDevice> dev = wifiApNode.Get (0)->GetDevice (0);
194  Ptr<WifiNetDevice> wifi_dev = DynamicCast<WifiNetDevice> (dev);
195  Ptr<WifiMac> wifi_mac = wifi_dev->GetMac ();
196  PointerValue ptr;
197  wifi_mac->GetAttribute ("BE_Txop", ptr);
198  Ptr<QosTxop> edca = ptr.Get<QosTxop> ();
199  edca->SetTxopLimit (MicroSeconds (3008));
200  }
201  if (nWifiN > 0)
202  {
203  Ptr<NetDevice> dev = wifiNStaNodes.Get (0)->GetDevice (0);
204  Ptr<WifiNetDevice> wifi_dev = DynamicCast<WifiNetDevice> (dev);
205  Ptr<WifiMac> wifi_mac = wifi_dev->GetMac ();
206  PointerValue ptr;
207  wifi_mac->GetAttribute ("BE_Txop", ptr);
208  Ptr<QosTxop> edca = ptr.Get<QosTxop> ();
209  edca->SetTxopLimit (MicroSeconds (3008));
210  }
211 
212  Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/BE_MaxAmpduSize", UintegerValue (0)); //Disable A-MPDU
213 
214  // Define mobility model
216  Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
217 
218  positionAlloc->Add (Vector (0.0, 0.0, 0.0));
219  for (uint32_t i = 0; i < nWifiB; i++)
220  {
221  positionAlloc->Add (Vector (5.0, 0.0, 0.0));
222  }
223  for (uint32_t i = 0; i < nWifiG; i++)
224  {
225  positionAlloc->Add (Vector (0.0, 5.0, 0.0));
226  }
227  for (uint32_t i = 0; i < nWifiN; i++)
228  {
229  positionAlloc->Add (Vector (0.0, 0.0, 5.0));
230  }
231 
232  mobility.SetPositionAllocator (positionAlloc);
233  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
234  mobility.Install (wifiApNode);
235  mobility.Install (wifiBStaNodes);
236  mobility.Install (wifiGStaNodes);
237  mobility.Install (wifiNStaNodes);
238 
239  // Internet stack
241  stack.Install (wifiApNode);
242  stack.Install (wifiBStaNodes);
243  stack.Install (wifiGStaNodes);
244  stack.Install (wifiNStaNodes);
245 
247  address.SetBase ("192.168.1.0", "255.255.255.0");
248  Ipv4InterfaceContainer bStaInterface;
249  bStaInterface = address.Assign (bStaDevice);
250  Ipv4InterfaceContainer gStaInterface;
251  gStaInterface = address.Assign (gStaDevice);
252  Ipv4InterfaceContainer nStaInterface;
253  nStaInterface = address.Assign (nStaDevice);
254  Ipv4InterfaceContainer ApInterface;
255  ApInterface = address.Assign (apDevice);
256 
257  // Setting applications
258  if (params.isUdp)
259  {
260  uint16_t port = 9;
261  UdpServerHelper server (port);
262  ApplicationContainer serverApp = server.Install (wifiApNode);
263  serverApp.Start (Seconds (0.0));
264  serverApp.Stop (Seconds (simulationTime + 1));
265 
266  UdpClientHelper client (ApInterface.GetAddress (0), port);
267  client.SetAttribute ("MaxPackets", UintegerValue (4294967295u));
268  client.SetAttribute ("Interval", TimeValue (Time ("0.0002"))); //packets/s
269  client.SetAttribute ("PacketSize", UintegerValue (payloadSize));
270 
272  if (params.bHasTraffic)
273  {
274  clientApps.Add (client.Install (wifiBStaNodes));
275  }
276  if (params.gHasTraffic)
277  {
278  clientApps.Add (client.Install (wifiGStaNodes));
279  }
280  if (params.nHasTraffic)
281  {
282  clientApps.Add (client.Install (wifiNStaNodes));
283  }
284  clientApps.Start (Seconds (1.0));
285  clientApps.Stop (Seconds (simulationTime + 1));
286 
287  Simulator::Stop (Seconds (simulationTime + 1));
288  Simulator::Run ();
289 
290  uint64_t totalPacketsThrough = DynamicCast<UdpServer> (serverApp.Get (0))->GetReceived ();
291  throughput = totalPacketsThrough * payloadSize * 8 / (simulationTime * 1000000.0);
292  }
293  else
294  {
295  uint16_t port = 50000;
296  Address localAddress (InetSocketAddress (Ipv4Address::GetAny (), port));
297  PacketSinkHelper packetSinkHelper ("ns3::TcpSocketFactory", localAddress);
298 
299  ApplicationContainer serverApp = packetSinkHelper.Install (wifiApNode.Get (0));
300  serverApp.Start (Seconds (0.0));
301  serverApp.Stop (Seconds (simulationTime + 1));
302 
303  OnOffHelper onoff ("ns3::TcpSocketFactory", Ipv4Address::GetAny ());
304  onoff.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
305  onoff.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
306  onoff.SetAttribute ("PacketSize", UintegerValue (payloadSize));
307  onoff.SetAttribute ("DataRate", DataRateValue (150000000)); //bit/s
308 
309  AddressValue remoteAddress (InetSocketAddress (ApInterface.GetAddress (0), port));
310  onoff.SetAttribute ("Remote", remoteAddress);
311 
313  if (params.bHasTraffic)
314  {
315  clientApps.Add (onoff.Install (wifiBStaNodes));
316  }
317  if (params.gHasTraffic)
318  {
319  clientApps.Add (onoff.Install (wifiGStaNodes));
320  }
321  if (params.nHasTraffic)
322  {
323  clientApps.Add (onoff.Install (wifiNStaNodes));
324  }
325  clientApps.Start (Seconds (1.0));
326  clientApps.Stop (Seconds (simulationTime + 1));
327 
328  Simulator::Stop (Seconds (simulationTime + 1));
329  Simulator::Run ();
330 
331  uint64_t totalPacketsThrough = DynamicCast<PacketSink> (serverApp.Get (0))->GetTotalRx ();
332  throughput += totalPacketsThrough * 8 / (simulationTime * 1000000.0);
333  }
335  return throughput;
336 }
337 
338 int main (int argc, char *argv[])
339 {
340  Parameters params;
341  params.testName = "";
342  params.enableErpProtection = false;
343  params.erpProtectionMode = "Cts-To-Self";
344  params.enableShortSlotTime = false;
345  params.enableShortPhyPreamble = false;
346  params.apType = WIFI_STANDARD_80211g;
347  params.nWifiB = 0;
348  params.bHasTraffic = false;
349  params.nWifiG = 1;
350  params.gHasTraffic = true;
351  params.nWifiN = 0;
352  params.nHasTraffic = false;
353  params.isUdp = true;
354  params.payloadSize = 1472; //bytes
355  params.simulationTime = 10; //seconds
356 
357  bool verifyResults = 0; //used for regression
358 
359  CommandLine cmd (__FILE__);
360  cmd.AddValue ("payloadSize", "Payload size in bytes", params.payloadSize);
361  cmd.AddValue ("simulationTime", "Simulation time in seconds", params.simulationTime);
362  cmd.AddValue ("isUdp", "UDP if set to 1, TCP otherwise", params.isUdp);
363  cmd.AddValue ("verifyResults", "Enable/disable results verification at the end of the simulation", verifyResults);
364  cmd.Parse (argc, argv);
365 
367  double throughput = 0;
368 
369  params.testName = "g only with all g features disabled";
370  throughput = experiment.Run (params);
371  if (verifyResults && (throughput < 22.5 || throughput > 23.5))
372  {
373  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
374  exit (1);
375  }
376  std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
377 
378  params.testName = "g only with short slot time enabled";
379  params.enableErpProtection = false;
380  params.enableShortSlotTime = true;
381  params.enableShortPhyPreamble = false;
382  params.nWifiB = 0;
383  throughput = experiment.Run (params);
384  if (verifyResults && (throughput < 29 || throughput > 30))
385  {
386  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
387  exit (1);
388  }
389  std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
390 
391  params.testName = "Mixed b/g with all g features disabled";
392  params.enableErpProtection = false;
393  params.enableShortSlotTime = false;
394  params.enableShortPhyPreamble = false;
395  params.nWifiB = 1;
396  throughput = experiment.Run (params);
397  if (verifyResults && (throughput < 22.5 || throughput > 23.5))
398  {
399  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
400  exit (1);
401  }
402  std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
403 
404  params.testName = "Mixed b/g with short plcp preamble enabled";
405  params.enableErpProtection = false;
406  params.enableShortSlotTime = false;
407  params.enableShortPhyPreamble = true;
408  params.nWifiB = 1;
409  throughput = experiment.Run (params);
410  if (verifyResults && (throughput < 22.5 || throughput > 23.5))
411  {
412  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
413  exit (1);
414  }
415  std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
416 
417  params.testName = "Mixed b/g with short slot time enabled using RTS-CTS protection";
418  params.enableErpProtection = true;
419  params.erpProtectionMode = "Rts-Cts";
420  params.enableShortSlotTime = false;
421  params.enableShortPhyPreamble = false;
422  params.nWifiB = 1;
423  throughput = experiment.Run (params);
424  if (verifyResults && (throughput < 19 || throughput > 20))
425  {
426  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
427  exit (1);
428  }
429  std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
430 
431  params.testName = "Mixed b/g with short plcp preamble enabled using RTS-CTS protection";
432  params.enableErpProtection = true;
433  params.enableShortSlotTime = false;
434  params.enableShortPhyPreamble = true;
435  params.nWifiB = 1;
436  throughput = experiment.Run (params);
437  if (verifyResults && (throughput < 19 || throughput > 20))
438  {
439  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
440  exit (1);
441  }
442  std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
443 
444  params.testName = "Mixed b/g with short slot time enabled using CTS-TO-SELF protection";
445  params.enableErpProtection = true;
446  params.erpProtectionMode = "Cts-To-Self";
447  params.enableShortSlotTime = false;
448  params.enableShortPhyPreamble = false;
449  params.nWifiB = 1;
450  throughput = experiment.Run (params);
451  if (verifyResults && (throughput < 20.5 || throughput > 21.5))
452  {
453  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
454  exit (1);
455  }
456  std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
457 
458  params.testName = "Mixed b/g with short plcp preamble enabled using CTS-TO-SELF protection";
459  params.enableErpProtection = true;
460  params.enableShortSlotTime = false;
461  params.enableShortPhyPreamble = true;
462  params.nWifiB = 1;
463  throughput = experiment.Run (params);
464  if (verifyResults && (throughput < 20.5 || throughput > 21.5))
465  {
466  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
467  exit (1);
468  }
469  std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
470 
471  params.testName = "HT only";
472  params.enableErpProtection = false;
473  params.enableShortSlotTime = false;
474  params.enableShortPhyPreamble = false;
476  params.nWifiB = 0;
477  params.bHasTraffic = false;
478  params.nWifiG = 0;
479  params.gHasTraffic = false;
480  params.nWifiN = 1;
481  params.nHasTraffic = true;
482  throughput = experiment.Run (params);
483  if (verifyResults && (throughput < 44 || throughput > 45))
484  {
485  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
486  exit (1);
487  }
488  std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
489 
490  params.testName = "Mixed HT/non-HT";
491  params.enableErpProtection = false;
492  params.enableShortSlotTime = false;
493  params.enableShortPhyPreamble = false;
495  params.nWifiB = 0;
496  params.bHasTraffic = false;
497  params.nWifiG = 1;
498  params.gHasTraffic = false;
499  params.nWifiN = 1;
500  params.nHasTraffic = true;
501  throughput = experiment.Run (params);
502  if (verifyResults && (throughput < 44 || throughput > 45))
503  {
504  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
505  exit (1);
506  }
507  std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
508 
509  return 0;
510 }
Helper class for UAN CW MAC example.
Definition: wifi-adhoc.cc:40
holds a vector of ns3::Application pointers.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
an Inet address class
static Ipv4Address GetAny(void)
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
std::string testName
AttributeValue implementation for Boolean.
Definition: boolean.h:36
Ptr< T > Get(void) const
Definition: pointer.h:201
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Hold variables of type string.
Definition: string.h:41
Make it easy to create and manage PHY objects for the YANS model.
static YansWifiChannelHelper Default(void)
Create a channel helper in a default working state.
void Set(std::string path, const AttributeValue &value)
Definition: config.cc:839
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
Definition: node.cc:144
Handle packet fragmentation and retransmissions for QoS data frames as well as MSDU aggregation (A-MS...
Definition: qos-txop.h:74
static void Run(void)
Run the simulation.
Definition: simulator.cc:172
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
ApplicationContainer Install(NodeContainer c) const
Install an ns3::PacketSinkApplication on each node of the input container configured with all the att...
aggregate IP/TCP/UDP functionality to existing Nodes.
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes...
cmd
Definition: second.py:35
helps to create WifiNetDevice objects
Definition: wifi-helper.h:326
A helper to make it easier to instantiate an ns3::OnOffApplication on a set of nodes.
Definition: on-off-helper.h:42
stack
Definition: first.py:41
uint16_t port
Definition: dsdv-manet.cc:45
a polymophic address class
Definition: address.h:90
WifiStandard apType
channel
Definition: third.py:92
mobility
Definition: third.py:108
phy
Definition: third.py:93
ApplicationContainer Install(NodeContainer c) const
Install an ns3::OnOffApplication on each node of the input container configured with all the attribut...
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
AttributeValue implementation for Time.
Definition: nstime.h:1353
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
Hold an unsigned integer type.
Definition: uinteger.h:44
ssid
Definition: third.py:100
holds a vector of ns3::NetDevice pointers
mac
Definition: third.py:99
Create a server application which waits for input UDP packets and uses the information carried into t...
uint32_t payloadSize
wifiApNode
Definition: third.py:90
void Start(Time start)
Arrange for all of the Applications in this container to Start() at the Time given as a parameter...
Parse command-line arguments.
Definition: command-line.h:227
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
Definition: simulator.cc:136
void SetAttribute(std::string name, const AttributeValue &value)
Record an attribute to be set in each Application after it is is created.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
WifiStandard
Identifies the allowed configurations that a Wifi device is configured to use.
keep track of a set of node pointers.
Hold objects of type Ptr<T>.
Definition: pointer.h:36
std::string erpProtectionMode
address
Definition: first.py:44
manage and create wifi channel objects for the YANS model.
create MAC layers for a ns3::WifiNetDevice.
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:35
Gnuplot2dDataset Run(const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy, const WifiMacHelper &wifiMac, const YansWifiChannelHelper &wifiChannel)
Definition: wifi-adhoc.cc:119
wifi
Definition: third.py:96
Helper class used to assign positions and mobility models to nodes.
AttributeValue implementation for Address.
Definition: address.h:278
void Stop(Time stop)
Arrange for all of the Applications in this container to Stop() at the Time given as a parameter...
Ptr< WifiMac > GetMac(void) const
ApplicationContainer Install(NodeContainer c)
Create one UDP server application on each of the Nodes in the NodeContainer.
void experiment(std::string queue_disc_type)
AttributeValue implementation for DataRate.
Definition: data-rate.h:298
void SetTxopLimit(Time txopLimit)
Set the TXOP limit.
Definition: txop.cc:248
static void Stop(void)
Tell the Simulator the calling event should be the last one executed.
Definition: simulator.cc:180
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1289
AttributeValue implementation for Ssid.
Definition: ssid.h:105
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:849
void Add(Vector v)
Add a position to the list of positions.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
bool enableShortPhyPreamble
clientApps
Definition: first.py:61
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1305
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
Definition: log.h:257
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Include Radiotap link layer information.
Definition: wifi-helper.h:180
Ptr< Application > Get(uint32_t i) const
Get the Ptr<Application> stored in this container at a given index.
void SetAttribute(std::string name, const AttributeValue &value)
Helper function used to set the underlying application attributes.