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:
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.SetChannel (channel.Create ());
144 
146  wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
147 
148  // 802.11b STA
149  wifi.SetStandard (WIFI_STANDARD_80211b);
150 
152  Ssid ssid = Ssid ("ns-3-ssid");
153 
154  mac.SetType ("ns3::StaWifiMac",
155  "Ssid", SsidValue (ssid),
156  "ShortSlotTimeSupported", BooleanValue (params.enableShortSlotTime));
157 
158  // Configure the PHY preamble type: long or short
159  phy.Set ("ShortPlcpPreambleSupported", BooleanValue (params.enableShortPhyPreamble));
160 
161  NetDeviceContainer bStaDevice;
162  bStaDevice = wifi.Install (phy, mac, wifiBStaNodes);
163 
164  // 802.11b/g STA
165  wifi.SetStandard (WIFI_STANDARD_80211g);
166  NetDeviceContainer gStaDevice;
167  gStaDevice = wifi.Install (phy, mac, wifiGStaNodes);
168 
169  // 802.11b/g/n STA
170  wifi.SetStandard (WIFI_STANDARD_80211n_2_4GHZ);
171  NetDeviceContainer nStaDevice;
172  mac.SetType ("ns3::StaWifiMac",
173  "Ssid", SsidValue (ssid),
174  "BE_BlockAckThreshold", UintegerValue (2),
175  "ShortSlotTimeSupported", BooleanValue (params.enableShortSlotTime));
176  nStaDevice = wifi.Install (phy, mac, wifiNStaNodes);
177 
178  // AP
179  NetDeviceContainer apDevice;
180  wifi.SetStandard (params.apType);
181  mac.SetType ("ns3::ApWifiMac",
182  "Ssid", SsidValue (ssid),
183  "EnableBeaconJitter", BooleanValue (false),
184  "BE_BlockAckThreshold", UintegerValue (2),
185  "EnableNonErpProtection", BooleanValue (params.enableErpProtection),
186  "ShortSlotTimeSupported", BooleanValue (params.enableShortSlotTime));
187  apDevice = wifi.Install (phy, mac, wifiApNode);
188 
189  // Set TXOP limit
190  if (params.apType == WIFI_STANDARD_80211n_2_4GHZ)
191  {
192  Ptr<NetDevice> dev = wifiApNode.Get (0)->GetDevice (0);
193  Ptr<WifiNetDevice> wifi_dev = DynamicCast<WifiNetDevice> (dev);
194  Ptr<WifiMac> wifi_mac = wifi_dev->GetMac ();
195  PointerValue ptr;
196  wifi_mac->GetAttribute ("BE_Txop", ptr);
197  Ptr<QosTxop> edca = ptr.Get<QosTxop> ();
198  edca->SetTxopLimit (MicroSeconds (3008));
199  }
200  if (nWifiN > 0)
201  {
202  Ptr<NetDevice> dev = wifiNStaNodes.Get (0)->GetDevice (0);
203  Ptr<WifiNetDevice> wifi_dev = DynamicCast<WifiNetDevice> (dev);
204  Ptr<WifiMac> wifi_mac = wifi_dev->GetMac ();
205  PointerValue ptr;
206  wifi_mac->GetAttribute ("BE_Txop", ptr);
207  Ptr<QosTxop> edca = ptr.Get<QosTxop> ();
208  edca->SetTxopLimit (MicroSeconds (3008));
209  }
210 
211  Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/BE_MaxAmpduSize", UintegerValue (0)); //Disable A-MPDU
212 
213  // Define mobility model
215  Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
216 
217  positionAlloc->Add (Vector (0.0, 0.0, 0.0));
218  for (uint32_t i = 0; i < nWifiB; i++)
219  {
220  positionAlloc->Add (Vector (5.0, 0.0, 0.0));
221  }
222  for (uint32_t i = 0; i < nWifiG; i++)
223  {
224  positionAlloc->Add (Vector (0.0, 5.0, 0.0));
225  }
226  for (uint32_t i = 0; i < nWifiN; i++)
227  {
228  positionAlloc->Add (Vector (0.0, 0.0, 5.0));
229  }
230 
231  mobility.SetPositionAllocator (positionAlloc);
232  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
233  mobility.Install (wifiApNode);
234  mobility.Install (wifiBStaNodes);
235  mobility.Install (wifiGStaNodes);
236  mobility.Install (wifiNStaNodes);
237 
238  // Internet stack
240  stack.Install (wifiApNode);
241  stack.Install (wifiBStaNodes);
242  stack.Install (wifiGStaNodes);
243  stack.Install (wifiNStaNodes);
244 
246  address.SetBase ("192.168.1.0", "255.255.255.0");
247  Ipv4InterfaceContainer bStaInterface;
248  bStaInterface = address.Assign (bStaDevice);
249  Ipv4InterfaceContainer gStaInterface;
250  gStaInterface = address.Assign (gStaDevice);
251  Ipv4InterfaceContainer nStaInterface;
252  nStaInterface = address.Assign (nStaDevice);
253  Ipv4InterfaceContainer ApInterface;
254  ApInterface = address.Assign (apDevice);
255 
256  // Setting applications
257  if (params.isUdp)
258  {
259  uint16_t port = 9;
260  UdpServerHelper server (port);
261  ApplicationContainer serverApp = server.Install (wifiApNode);
262  serverApp.Start (Seconds (0.0));
263  serverApp.Stop (Seconds (simulationTime + 1));
264 
265  UdpClientHelper client (ApInterface.GetAddress (0), port);
266  client.SetAttribute ("MaxPackets", UintegerValue (4294967295u));
267  client.SetAttribute ("Interval", TimeValue (Time ("0.0002"))); //packets/s
268  client.SetAttribute ("PacketSize", UintegerValue (payloadSize));
269 
271  if (params.bHasTraffic)
272  {
273  clientApps.Add (client.Install (wifiBStaNodes));
274  }
275  if (params.gHasTraffic)
276  {
277  clientApps.Add (client.Install (wifiGStaNodes));
278  }
279  if (params.nHasTraffic)
280  {
281  clientApps.Add (client.Install (wifiNStaNodes));
282  }
283  clientApps.Start (Seconds (1.0));
284  clientApps.Stop (Seconds (simulationTime + 1));
285 
286  Simulator::Stop (Seconds (simulationTime + 1));
287  Simulator::Run ();
288 
289  uint64_t totalPacketsThrough = DynamicCast<UdpServer> (serverApp.Get (0))->GetReceived ();
290  throughput = totalPacketsThrough * payloadSize * 8 / (simulationTime * 1000000.0);
291  }
292  else
293  {
294  uint16_t port = 50000;
295  Address localAddress (InetSocketAddress (Ipv4Address::GetAny (), port));
296  PacketSinkHelper packetSinkHelper ("ns3::TcpSocketFactory", localAddress);
297 
298  ApplicationContainer serverApp = packetSinkHelper.Install (wifiApNode.Get (0));
299  serverApp.Start (Seconds (0.0));
300  serverApp.Stop (Seconds (simulationTime + 1));
301 
302  OnOffHelper onoff ("ns3::TcpSocketFactory", Ipv4Address::GetAny ());
303  onoff.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
304  onoff.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
305  onoff.SetAttribute ("PacketSize", UintegerValue (payloadSize));
306  onoff.SetAttribute ("DataRate", DataRateValue (150000000)); //bit/s
307 
308  AddressValue remoteAddress (InetSocketAddress (ApInterface.GetAddress (0), port));
309  onoff.SetAttribute ("Remote", remoteAddress);
310 
312  if (params.bHasTraffic)
313  {
314  clientApps.Add (onoff.Install (wifiBStaNodes));
315  }
316  if (params.gHasTraffic)
317  {
318  clientApps.Add (onoff.Install (wifiGStaNodes));
319  }
320  if (params.nHasTraffic)
321  {
322  clientApps.Add (onoff.Install (wifiNStaNodes));
323  }
324  clientApps.Start (Seconds (1.0));
325  clientApps.Stop (Seconds (simulationTime + 1));
326 
327  Simulator::Stop (Seconds (simulationTime + 1));
328  Simulator::Run ();
329 
330  uint64_t totalPacketsThrough = DynamicCast<PacketSink> (serverApp.Get (0))->GetTotalRx ();
331  throughput += totalPacketsThrough * 8 / (simulationTime * 1000000.0);
332  }
334  return throughput;
335 }
336 
337 int main (int argc, char *argv[])
338 {
339  Parameters params;
340  params.testName = "";
341  params.enableErpProtection = false;
342  params.erpProtectionMode = "Cts-To-Self";
343  params.enableShortSlotTime = false;
344  params.enableShortPhyPreamble = false;
345  params.apType = WIFI_STANDARD_80211g;
346  params.nWifiB = 0;
347  params.bHasTraffic = false;
348  params.nWifiG = 1;
349  params.gHasTraffic = true;
350  params.nWifiN = 0;
351  params.nHasTraffic = false;
352  params.isUdp = true;
353  params.payloadSize = 1472; //bytes
354  params.simulationTime = 10; //seconds
355 
356  bool verifyResults = 0; //used for regression
357 
358  CommandLine cmd (__FILE__);
359  cmd.AddValue ("payloadSize", "Payload size in bytes", params.payloadSize);
360  cmd.AddValue ("simulationTime", "Simulation time in seconds", params.simulationTime);
361  cmd.AddValue ("isUdp", "UDP if set to 1, TCP otherwise", params.isUdp);
362  cmd.AddValue ("verifyResults", "Enable/disable results verification at the end of the simulation", verifyResults);
363  cmd.Parse (argc, argv);
364 
366  double throughput = 0;
367 
368  params.testName = "g only with all g features disabled";
369  throughput = experiment.Run (params);
370  if (verifyResults && (throughput < 22.5 || throughput > 23.5))
371  {
372  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
373  exit (1);
374  }
375  std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
376 
377  params.testName = "g only with short slot time enabled";
378  params.enableErpProtection = false;
379  params.enableShortSlotTime = true;
380  params.enableShortPhyPreamble = false;
381  params.nWifiB = 0;
382  throughput = experiment.Run (params);
383  if (verifyResults && (throughput < 29 || throughput > 30))
384  {
385  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
386  exit (1);
387  }
388  std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
389 
390  params.testName = "Mixed b/g with all g features disabled";
391  params.enableErpProtection = false;
392  params.enableShortSlotTime = false;
393  params.enableShortPhyPreamble = false;
394  params.nWifiB = 1;
395  throughput = experiment.Run (params);
396  if (verifyResults && (throughput < 22.5 || throughput > 23.5))
397  {
398  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
399  exit (1);
400  }
401  std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
402 
403  params.testName = "Mixed b/g with short plcp preamble enabled";
404  params.enableErpProtection = false;
405  params.enableShortSlotTime = false;
406  params.enableShortPhyPreamble = true;
407  params.nWifiB = 1;
408  throughput = experiment.Run (params);
409  if (verifyResults && (throughput < 22.5 || throughput > 23.5))
410  {
411  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
412  exit (1);
413  }
414  std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
415 
416  params.testName = "Mixed b/g with short slot time enabled using RTS-CTS protection";
417  params.enableErpProtection = true;
418  params.erpProtectionMode = "Rts-Cts";
419  params.enableShortSlotTime = false;
420  params.enableShortPhyPreamble = false;
421  params.nWifiB = 1;
422  throughput = experiment.Run (params);
423  if (verifyResults && (throughput < 19 || throughput > 20))
424  {
425  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
426  exit (1);
427  }
428  std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
429 
430  params.testName = "Mixed b/g with short plcp preamble enabled using RTS-CTS protection";
431  params.enableErpProtection = true;
432  params.enableShortSlotTime = false;
433  params.enableShortPhyPreamble = true;
434  params.nWifiB = 1;
435  throughput = experiment.Run (params);
436  if (verifyResults && (throughput < 19 || throughput > 20))
437  {
438  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
439  exit (1);
440  }
441  std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
442 
443  params.testName = "Mixed b/g with short slot time enabled using CTS-TO-SELF protection";
444  params.enableErpProtection = true;
445  params.erpProtectionMode = "Cts-To-Self";
446  params.enableShortSlotTime = false;
447  params.enableShortPhyPreamble = false;
448  params.nWifiB = 1;
449  throughput = experiment.Run (params);
450  if (verifyResults && (throughput < 20.5 || throughput > 21.5))
451  {
452  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
453  exit (1);
454  }
455  std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
456 
457  params.testName = "Mixed b/g with short plcp preamble enabled using CTS-TO-SELF protection";
458  params.enableErpProtection = true;
459  params.enableShortSlotTime = false;
460  params.enableShortPhyPreamble = true;
461  params.nWifiB = 1;
462  throughput = experiment.Run (params);
463  if (verifyResults && (throughput < 20.5 || throughput > 21.5))
464  {
465  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
466  exit (1);
467  }
468  std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
469 
470  params.testName = "HT only";
471  params.enableErpProtection = false;
472  params.enableShortSlotTime = false;
473  params.enableShortPhyPreamble = false;
475  params.nWifiB = 0;
476  params.bHasTraffic = false;
477  params.nWifiG = 0;
478  params.gHasTraffic = false;
479  params.nWifiN = 1;
480  params.nHasTraffic = true;
481  throughput = experiment.Run (params);
482  if (verifyResults && (throughput < 44 || throughput > 45))
483  {
484  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
485  exit (1);
486  }
487  std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
488 
489  params.testName = "Mixed HT/non-HT";
490  params.enableErpProtection = false;
491  params.enableShortSlotTime = false;
492  params.enableShortPhyPreamble = false;
494  params.nWifiB = 0;
495  params.bHasTraffic = false;
496  params.nWifiG = 1;
497  params.gHasTraffic = false;
498  params.nWifiN = 1;
499  params.nHasTraffic = true;
500  throughput = experiment.Run (params);
501  if (verifyResults && (throughput < 44 || throughput > 45))
502  {
503  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
504  exit (1);
505  }
506  std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
507 
508  return 0;
509 }
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition: net-device-container.h:42
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
ns3::InetSocketAddress
an Inet address class
Definition: inet-socket-address.h:41
ns3::DataRateValue
AttributeValue implementation for DataRate.
Definition: data-rate.h:298
ns3::ApplicationContainer::Get
Ptr< Application > Get(uint32_t i) const
Get the Ptr<Application> stored in this container at a given index.
Definition: application-container.cc:62
ns3::UdpClientHelper::SetAttribute
void SetAttribute(std::string name, const AttributeValue &value)
Record an attribute to be set in each Application after it is is created.
Definition: udp-client-server-helper.cc:87
ns3::YansWifiChannelHelper::Default
static YansWifiChannelHelper Default(void)
Create a channel helper in a default working state.
Definition: yans-wifi-helper.cc:41
ns3::UdpClientHelper
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
Definition: udp-client-server-helper.h:94
ns3::YansWifiPhyHelper
Make it easy to create and manage PHY objects for the YANS model.
Definition: yans-wifi-helper.h:161
ns3::CommandLine
Parse command-line arguments.
Definition: command-line.h:228
Parameters::enableErpProtection
bool enableErpProtection
Definition: wifi-mixed-network.cc:67
ns3::ListPositionAllocator::Add
void Add(Vector v)
Add a position to the list of positions.
Definition: position-allocator.cc:70
ns3::Config::Set
void Set(std::string path, const AttributeValue &value)
Definition: config.cc:839
ns3::BooleanValue
AttributeValue implementation for Boolean.
Definition: boolean.h:37
Parameters::bHasTraffic
bool bHasTraffic
Definition: wifi-mixed-network.cc:73
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::ApplicationContainer::Stop
void Stop(Time stop)
Arrange for all of the Applications in this container to Stop() at the Time given as a parameter.
Definition: application-container.cc:107
Parameters
Definition: wifi-mixed-network.cc:65
ns3::WifiHelper
helps to create WifiNetDevice objects
Definition: wifi-helper.h:327
ns3::Ipv4AddressHelper
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Definition: ipv4-address-helper.h:48
ns3::WIFI_STANDARD_80211g
@ WIFI_STANDARD_80211g
Definition: wifi-standards.h:129
ns3::MicroSeconds
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1305
Parameters::nHasTraffic
bool nHasTraffic
Definition: wifi-mixed-network.cc:77
ns3::AddressValue
AttributeValue implementation for Address.
Definition: address.h:278
third.channel
channel
Definition: third.py:92
ns3::PointerValue
Hold objects of type Ptr<T>.
Definition: pointer.h:37
Parameters::erpProtectionMode
std::string erpProtectionMode
Definition: wifi-mixed-network.cc:68
third.mac
mac
Definition: third.py:99
ns3::NodeContainer::Create
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Definition: node-container.cc:98
ns3::SsidValue
AttributeValue implementation for Ssid.
Definition: ssid.h:105
ns3::Ssid
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:36
ns3::UdpServerHelper
Create a server application which waits for input UDP packets and uses the information carried into t...
Definition: udp-client-server-helper.h:38
Parameters::isUdp
bool isUdp
Definition: wifi-mixed-network.cc:78
third.wifi
wifi
Definition: third.py:96
ns3::Ptr< NetDevice >
experiment
void experiment(std::string queue_disc_type)
Definition: cobalt-vs-codel.cc:74
first.stack
stack
Definition: first.py:41
ns3::Simulator::Stop
static void Stop(void)
Tell the Simulator the calling event should be the last one executed.
Definition: simulator.cc:180
Parameters::apType
WifiStandard apType
Definition: wifi-mixed-network.cc:71
ns3::Address
a polymophic address class
Definition: address.h:91
ns3::ObjectBase::GetAttribute
void GetAttribute(std::string name, AttributeValue &value) const
Get the value of an attribute, raising fatal errors if unsuccessful.
Definition: object-base.cc:223
ns3::OnOffHelper
A helper to make it easier to instantiate an ns3::OnOffApplication on a set of nodes.
Definition: on-off-helper.h:43
Parameters::gHasTraffic
bool gHasTraffic
Definition: wifi-mixed-network.cc:75
ns3::Node::GetDevice
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
Definition: node.cc:144
Experiment
Helper class for UAN CW MAC example.
Definition: wifi-adhoc.cc:41
ns3::Ipv4InterfaceContainer
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Definition: ipv4-interface-container.h:55
ns3::PointerValue::Get
Ptr< T > Get(void) const
Definition: pointer.h:201
ns3::WIFI_STANDARD_80211b
@ WIFI_STANDARD_80211b
Definition: wifi-standards.h:128
ns3::NodeContainer::Get
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
Definition: node-container.cc:93
first.address
address
Definition: first.py:44
Experiment::Run
Gnuplot2dDataset Run(const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy, const WifiMacHelper &wifiMac, const YansWifiChannelHelper &wifiChannel)
Definition: wifi-adhoc.cc:119
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
third.wifiApNode
wifiApNode
Definition: third.py:90
second.cmd
cmd
Definition: second.py:35
ns3::OnOffHelper::SetAttribute
void SetAttribute(std::string name, const AttributeValue &value)
Helper function used to set the underlying application attributes.
Definition: on-off-helper.cc:40
Parameters::payloadSize
uint32_t payloadSize
Definition: wifi-mixed-network.cc:79
ns3::QosTxop
Handle packet fragmentation and retransmissions for QoS data frames as well as MSDU aggregation (A-MS...
Definition: qos-txop.h:72
ns3::Simulator::Run
static void Run(void)
Run the simulation.
Definition: simulator.cc:172
ns3::StringValue
Hold variables of type string.
Definition: string.h:41
ns3::PacketSinkHelper
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
Definition: packet-sink-helper.h:36
NS_LOG_ERROR
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
Definition: log.h:257
Parameters::enableShortSlotTime
bool enableShortSlotTime
Definition: wifi-mixed-network.cc:69
ns3::OnOffHelper::Install
ApplicationContainer Install(NodeContainer c) const
Install an ns3::OnOffApplication on each node of the input container configured with all the attribut...
Definition: on-off-helper.cc:59
first.clientApps
clientApps
Definition: first.py:61
ns3::Ipv4Address::GetAny
static Ipv4Address GetAny(void)
Definition: ipv4-address.cc:395
ns3::ApplicationContainer::Start
void Start(Time start)
Arrange for all of the Applications in this container to Start() at the Time given as a parameter.
Definition: application-container.cc:87
ns3::Seconds
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1289
Parameters::enableShortPhyPreamble
bool enableShortPhyPreamble
Definition: wifi-mixed-network.cc:70
ns3::Simulator::Destroy
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
Definition: simulator.cc:136
ns3::ApplicationContainer
holds a vector of ns3::Application pointers.
Definition: application-container.h:43
ns3::UdpClientHelper::Install
ApplicationContainer Install(NodeContainer c)
Definition: udp-client-server-helper.cc:93
third.ssid
ssid
Definition: third.py:100
ns3::TimeValue
AttributeValue implementation for Time.
Definition: nstime.h:1353
ns3::Txop::SetTxopLimit
void SetTxopLimit(Time txopLimit)
Set the TXOP limit.
Definition: txop.cc:254
ns3::UdpServerHelper::Install
ApplicationContainer Install(NodeContainer c)
Create one UDP server application on each of the Nodes in the NodeContainer.
Definition: udp-client-server-helper.cc:47
Parameters::nWifiN
uint32_t nWifiN
Definition: wifi-mixed-network.cc:76
ns3::NodeContainer
keep track of a set of node pointers.
Definition: node-container.h:39
Parameters::nWifiB
uint32_t nWifiB
Definition: wifi-mixed-network.cc:72
ns3::Ipv4InterfaceContainer::GetAddress
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
Definition: ipv4-interface-container.cc:59
ns3::UintegerValue
Hold an unsigned integer type.
Definition: uinteger.h:44
ns3::YansWifiChannelHelper
manage and create wifi channel objects for the YANS model.
Definition: yans-wifi-helper.h:37
ns3::WifiMacHelper
create MAC layers for a ns3::WifiNetDevice.
Definition: wifi-mac-helper.h:48
ns3::Config::SetDefault
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:849
ns3::WIFI_STANDARD_80211n_2_4GHZ
@ WIFI_STANDARD_80211n_2_4GHZ
Definition: wifi-standards.h:131
ns3::WifiStandard
WifiStandard
Identifies the allowed configurations that a Wifi device is configured to use.
Definition: wifi-standards.h:126
ns3::InternetStackHelper
aggregate IP/TCP/UDP functionality to existing Nodes.
Definition: internet-stack-helper.h:88
Experiment::Experiment
Experiment()
Parameters::nWifiG
uint32_t nWifiG
Definition: wifi-mixed-network.cc:74
ns3::MobilityHelper
Helper class used to assign positions and mobility models to nodes.
Definition: mobility-helper.h:43
Parameters::testName
std::string testName
Definition: wifi-mixed-network.cc:66
third.mobility
mobility
Definition: third.py:108
ns3::PacketSinkHelper::Install
ApplicationContainer Install(NodeContainer c) const
Install an ns3::PacketSinkApplication on each node of the input container configured with all the att...
Definition: packet-sink-helper.cc:55
third.phy
phy
Definition: third.py:93
port
uint16_t port
Definition: dsdv-manet.cc:45
Parameters::simulationTime
double simulationTime
Definition: wifi-mixed-network.cc:80
ns3::WifiNetDevice::GetMac
Ptr< WifiMac > GetMac(void) const
Definition: wifi-net-device.cc:201