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