A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wifi-mixed-network.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 Sébastien Deronne
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Sébastien Deronne <sebastien.deronne@gmail.com>
7 */
8
9#include "ns3/command-line.h"
10#include "ns3/config.h"
11#include "ns3/ht-configuration.h"
12#include "ns3/internet-stack-helper.h"
13#include "ns3/ipv4-address-helper.h"
14#include "ns3/log.h"
15#include "ns3/mobility-helper.h"
16#include "ns3/on-off-helper.h"
17#include "ns3/packet-sink-helper.h"
18#include "ns3/packet-sink.h"
19#include "ns3/pointer.h"
20#include "ns3/qos-txop.h"
21#include "ns3/ssid.h"
22#include "ns3/string.h"
23#include "ns3/udp-client-server-helper.h"
24#include "ns3/udp-server.h"
25#include "ns3/wifi-mac.h"
26#include "ns3/wifi-net-device.h"
27#include "ns3/yans-wifi-channel.h"
28#include "ns3/yans-wifi-helper.h"
29
30// This example shows how to configure mixed networks (i.e. mixed b/g and HT/non-HT) and how are
31// performance in several scenarios.
32//
33// The example compares first g only and mixed b/g cases with various configurations depending on
34// the following parameters:
35// - protection mode that is configured on the AP;
36// - whether short PPDU format is supported by the 802.11b station;
37// - whether short slot time is supported by both the 802.11g station and the AP.
38//
39// The example then compares HT only and mixed HT/non-HT cases.
40//
41// The output results show that the presence of an 802.11b station strongly affects 802.11g
42// performance. Protection mechanisms ensure that the NAV value of 802.11b stations is set correctly
43// in case of 802.11g transmissions. In practice, those protection mechanism add a lot of overhead,
44// resulting in reduced performance. CTS-To-Self introduces less overhead than Rts-Cts, but is not
45// heard by hidden stations (and is thus generally only recommended as a protection mechanism for
46// access points). Since short slot time is disabled once an 802.11b station enters the network,
47// benefits from short slot time are only observed in a g only configuration.
48//
49// The user can also select the payload size and can choose either an UDP or a TCP connection.
50// Example: ./ns3 run "wifi-mixed-network --isUdp=1"
51
52using namespace ns3;
53
54NS_LOG_COMPONENT_DEFINE("MixedNetwork");
55
56/** Parameters */
58{
59 std::string testName; //!< Test name
60 bool enableErpProtection; //!< True to enable ERP protection
61 std::string erpProtectionMode; //!< ERP protection mode
62 bool enableShortSlotTime; //!< True to enable short slot time
63 bool enableShortPhyPreamble; //!< True to enable short PHY preamble
64 WifiStandard apType; //!< Wifi standard for AP
65 uint32_t nWifiB; //!< Number of 802.11b stations
66 bool bHasTraffic; //!< True if 802.11b stations generate traffic
67 uint32_t nWifiG; //!< Number of 802.11g stations
68 bool gHasTraffic; //!< True if 802.11g stations generate traffic
69 uint32_t nWifiN; //!< Number of 802.11n stations
70 bool nHasTraffic; //!< True if 802.11n stations generate traffic
71 bool isUdp; //!< True to generate UDP traffic
72 uint32_t payloadSize; //!< Payload size in bytes
73 Time simulationTime; //!< Simulation time
74};
75
76class Experiment
77{
78 public:
80 /**
81 * Run an experiment with the given parameters
82 * \param params the given parameters
83 * \return the throughput
84 */
85 double Run(Parameters params);
86};
87
89{
90}
91
92double
94{
95 std::string apTypeString;
96 if (params.apType == WIFI_STANDARD_80211g)
97 {
98 apTypeString = "WIFI_STANDARD_80211g";
99 }
100 else if (params.apType == WIFI_STANDARD_80211n)
101 {
102 apTypeString = "WIFI_STANDARD_80211n_2_4GHZ";
103 }
104
105 std::cout << "Run: " << params.testName
106 << "\n\t enableErpProtection=" << params.enableErpProtection
107 << "\n\t erpProtectionMode=" << params.erpProtectionMode
108 << "\n\t enableShortSlotTime=" << params.enableShortSlotTime
109 << "\n\t enableShortPhyPreamble=" << params.enableShortPhyPreamble
110 << "\n\t apType=" << apTypeString << "\n\t nWifiB=" << params.nWifiB
111 << "\n\t bHasTraffic=" << params.bHasTraffic << "\n\t nWifiG=" << params.nWifiG
112 << "\n\t gHasTraffic=" << params.gHasTraffic << "\n\t nWifiN=" << params.nWifiN
113 << "\n\t nHasTraffic=" << params.nHasTraffic << std::endl;
114
115 Config::SetDefault("ns3::WifiRemoteStationManager::ErpProtectionMode",
116 StringValue(params.erpProtectionMode));
117
118 double throughput = 0;
119 uint32_t nWifiB = params.nWifiB;
120 uint32_t nWifiG = params.nWifiG;
121 uint32_t nWifiN = params.nWifiN;
122 auto simulationTime = params.simulationTime;
123 uint32_t payloadSize = params.payloadSize;
124
125 NodeContainer wifiBStaNodes;
126 wifiBStaNodes.Create(nWifiB);
127 NodeContainer wifiGStaNodes;
128 wifiGStaNodes.Create(nWifiG);
129 NodeContainer wifiNStaNodes;
130 wifiNStaNodes.Create(nWifiN);
131 NodeContainer wifiApNode;
132 wifiApNode.Create(1);
133
135 channel.AddPropagationLoss("ns3::RangePropagationLossModel");
136
138 phy.SetChannel(channel.Create());
139
140 WifiHelper wifi;
141 wifi.SetRemoteStationManager("ns3::IdealWifiManager");
142
143 // 802.11b STA
144 wifi.SetStandard(WIFI_STANDARD_80211b);
145
146 WifiMacHelper mac;
147 Ssid ssid = Ssid("ns-3-ssid");
148
149 mac.SetType("ns3::StaWifiMac",
150 "Ssid",
151 SsidValue(ssid),
152 "ShortSlotTimeSupported",
153 BooleanValue(params.enableShortSlotTime));
154
155 // Configure the PHY preamble type: long or short
156 phy.Set("ShortPlcpPreambleSupported", BooleanValue(params.enableShortPhyPreamble));
157
158 NetDeviceContainer bStaDevice;
159 bStaDevice = wifi.Install(phy, mac, wifiBStaNodes);
160
161 // 802.11b/g STA
162 wifi.SetStandard(WIFI_STANDARD_80211g);
163 NetDeviceContainer gStaDevice;
164 gStaDevice = wifi.Install(phy, mac, wifiGStaNodes);
165
166 // 802.11b/g/n STA
167 wifi.SetStandard(WIFI_STANDARD_80211n);
168 NetDeviceContainer nStaDevice;
169 mac.SetType("ns3::StaWifiMac",
170 "Ssid",
171 SsidValue(ssid),
172 "BE_BlockAckThreshold",
173 UintegerValue(2),
174 "ShortSlotTimeSupported",
175 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",
183 SsidValue(ssid),
184 "EnableBeaconJitter",
185 BooleanValue(false),
186 "BE_BlockAckThreshold",
187 UintegerValue(2),
188 "EnableNonErpProtection",
189 BooleanValue(params.enableErpProtection),
190 "ShortSlotTimeSupported",
191 BooleanValue(params.enableShortSlotTime));
192 apDevice = wifi.Install(phy, mac, wifiApNode);
193
194 // Set TXOP limit
195 if (params.apType == WIFI_STANDARD_80211n)
196 {
197 Ptr<NetDevice> dev = wifiApNode.Get(0)->GetDevice(0);
199 Ptr<WifiMac> wifi_mac = wifi_dev->GetMac();
200 PointerValue ptr;
201 wifi_mac->GetAttribute("BE_Txop", ptr);
202 Ptr<QosTxop> edca = ptr.Get<QosTxop>();
203 edca->SetTxopLimit(MicroSeconds(3008));
204 }
205 if (nWifiN > 0)
206 {
207 Ptr<NetDevice> dev = wifiNStaNodes.Get(0)->GetDevice(0);
209 Ptr<WifiMac> wifi_mac = wifi_dev->GetMac();
210 PointerValue ptr;
211 wifi_mac->GetAttribute("BE_Txop", ptr);
212 Ptr<QosTxop> edca = ptr.Get<QosTxop>();
213 edca->SetTxopLimit(MicroSeconds(3008));
214 }
215
216 Config::Set("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/BE_MaxAmpduSize",
217 UintegerValue(0)); // Disable A-MPDU
218
219 // Define mobility model
220 MobilityHelper mobility;
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
251 Ipv4AddressHelper address;
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(simulationTime + Seconds(1.0));
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
276 ApplicationContainer clientApps;
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(simulationTime + Seconds(1.0));
291
292 Simulator::Stop(simulationTime + Seconds(1.0));
294
295 double totalPacketsThrough = DynamicCast<UdpServer>(serverApp.Get(0))->GetReceived();
296 throughput = totalPacketsThrough * payloadSize * 8 / simulationTime.GetMicroSeconds();
297 }
298 else
299 {
300 uint16_t port = 50000;
302 PacketSinkHelper packetSinkHelper("ns3::TcpSocketFactory", localAddress);
303
304 ApplicationContainer serverApp = packetSinkHelper.Install(wifiApNode.Get(0));
305 serverApp.Start(Seconds(0.0));
306 serverApp.Stop(simulationTime + Seconds(1.0));
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
317 ApplicationContainer clientApps;
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(simulationTime + Seconds(1.0));
332
333 Simulator::Stop(simulationTime + Seconds(1.0));
335
336 double totalPacketsThrough = DynamicCast<PacketSink>(serverApp.Get(0))->GetTotalRx();
337 throughput += totalPacketsThrough * 8 / simulationTime.GetMicroSeconds();
338 }
340 return throughput;
341}
342
343int
344main(int argc, char* argv[])
345{
346 Parameters params;
347 params.testName = "";
348 params.enableErpProtection = false;
349 params.erpProtectionMode = "Cts-To-Self";
350 params.enableShortSlotTime = false;
351 params.enableShortPhyPreamble = false;
352 params.apType = WIFI_STANDARD_80211g;
353 params.nWifiB = 0;
354 params.bHasTraffic = false;
355 params.nWifiG = 1;
356 params.gHasTraffic = true;
357 params.nWifiN = 0;
358 params.nHasTraffic = false;
359 params.isUdp = true;
360 params.payloadSize = 1472; // bytes
361 params.simulationTime = Seconds(10);
362
363 bool verifyResults = false; // used for regression
364
365 CommandLine cmd(__FILE__);
366 cmd.AddValue("payloadSize", "Payload size in bytes", params.payloadSize);
367 cmd.AddValue("simulationTime", "Simulation time", params.simulationTime);
368 cmd.AddValue("isUdp", "UDP if set to 1, TCP otherwise", params.isUdp);
369 cmd.AddValue("verifyResults",
370 "Enable/disable results verification at the end of the simulation",
371 verifyResults);
372 cmd.Parse(argc, argv);
373
375 double throughput = 0;
376
377 params.testName = "g only with all g features disabled";
378 throughput = experiment.Run(params);
379 if (verifyResults && (throughput < 22.5 || throughput > 23.5))
380 {
381 NS_LOG_ERROR("Obtained throughput " << throughput << " is not in the expected boundaries!");
382 exit(1);
383 }
384 std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
385
386 params.testName = "g only with short slot time enabled";
387 params.enableErpProtection = false;
388 params.enableShortSlotTime = true;
389 params.enableShortPhyPreamble = false;
390 params.nWifiB = 0;
391 throughput = experiment.Run(params);
392 if (verifyResults && (throughput < 29 || throughput > 30))
393 {
394 NS_LOG_ERROR("Obtained throughput " << throughput << " is not in the expected boundaries!");
395 exit(1);
396 }
397 std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
398
399 params.testName = "Mixed b/g with all g features disabled";
400 params.enableErpProtection = false;
401 params.enableShortSlotTime = false;
402 params.enableShortPhyPreamble = false;
403 params.nWifiB = 1;
404 throughput = experiment.Run(params);
405 if (verifyResults && (throughput < 22.5 || throughput > 23.5))
406 {
407 NS_LOG_ERROR("Obtained throughput " << throughput << " is not in the expected boundaries!");
408 exit(1);
409 }
410 std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
411
412 params.testName = "Mixed b/g with short plcp preamble enabled";
413 params.enableErpProtection = false;
414 params.enableShortSlotTime = false;
415 params.enableShortPhyPreamble = true;
416 params.nWifiB = 1;
417 throughput = experiment.Run(params);
418 if (verifyResults && (throughput < 22.5 || throughput > 23.5))
419 {
420 NS_LOG_ERROR("Obtained throughput " << throughput << " is not in the expected boundaries!");
421 exit(1);
422 }
423 std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
424
425 params.testName = "Mixed b/g with short slot time enabled using RTS-CTS protection";
426 params.enableErpProtection = true;
427 params.erpProtectionMode = "Rts-Cts";
428 params.enableShortSlotTime = false;
429 params.enableShortPhyPreamble = false;
430 params.nWifiB = 1;
431 throughput = experiment.Run(params);
432 if (verifyResults && (throughput < 19 || throughput > 20))
433 {
434 NS_LOG_ERROR("Obtained throughput " << throughput << " is not in the expected boundaries!");
435 exit(1);
436 }
437 std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
438
439 params.testName = "Mixed b/g with short plcp preamble enabled using RTS-CTS protection";
440 params.enableErpProtection = true;
441 params.enableShortSlotTime = false;
442 params.enableShortPhyPreamble = true;
443 params.nWifiB = 1;
444 throughput = experiment.Run(params);
445 if (verifyResults && (throughput < 19 || throughput > 20))
446 {
447 NS_LOG_ERROR("Obtained throughput " << throughput << " is not in the expected boundaries!");
448 exit(1);
449 }
450 std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
451
452 params.testName = "Mixed b/g with short slot time enabled using CTS-TO-SELF protection";
453 params.enableErpProtection = true;
454 params.erpProtectionMode = "Cts-To-Self";
455 params.enableShortSlotTime = false;
456 params.enableShortPhyPreamble = false;
457 params.nWifiB = 1;
458 throughput = experiment.Run(params);
459 if (verifyResults && (throughput < 20.5 || throughput > 21.5))
460 {
461 NS_LOG_ERROR("Obtained throughput " << throughput << " is not in the expected boundaries!");
462 exit(1);
463 }
464 std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
465
466 params.testName = "Mixed b/g with short plcp preamble enabled using CTS-TO-SELF protection";
467 params.enableErpProtection = true;
468 params.enableShortSlotTime = false;
469 params.enableShortPhyPreamble = true;
470 params.nWifiB = 1;
471 throughput = experiment.Run(params);
472 if (verifyResults && (throughput < 20.5 || throughput > 21.5))
473 {
474 NS_LOG_ERROR("Obtained throughput " << throughput << " is not in the expected boundaries!");
475 exit(1);
476 }
477 std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
478
479 params.testName = "HT only";
480 params.enableErpProtection = false;
481 params.enableShortSlotTime = false;
482 params.enableShortPhyPreamble = false;
484 params.nWifiB = 0;
485 params.bHasTraffic = false;
486 params.nWifiG = 0;
487 params.gHasTraffic = false;
488 params.nWifiN = 1;
489 params.nHasTraffic = true;
490 throughput = experiment.Run(params);
491 if (verifyResults && (throughput < 44 || throughput > 45))
492 {
493 NS_LOG_ERROR("Obtained throughput " << throughput << " is not in the expected boundaries!");
494 exit(1);
495 }
496 std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
497
498 params.testName = "Mixed HT/non-HT";
499 params.enableErpProtection = false;
500 params.enableShortSlotTime = false;
501 params.enableShortPhyPreamble = false;
503 params.nWifiB = 0;
504 params.bHasTraffic = false;
505 params.nWifiG = 1;
506 params.gHasTraffic = false;
507 params.nWifiN = 1;
508 params.nHasTraffic = true;
509 throughput = experiment.Run(params);
510 if (verifyResults && (throughput < 44 || throughput > 45))
511 {
512 NS_LOG_ERROR("Obtained throughput " << throughput << " is not in the expected boundaries!");
513 exit(1);
514 }
515 std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
516
517 return 0;
518}
WiFi adhoc experiment class.
Definition wifi-adhoc.cc:34
Gnuplot2dDataset Run(const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy, const WifiMacHelper &wifiMac, const YansWifiChannelHelper &wifiChannel)
Run an experiment.
a polymophic address class
Definition address.h:90
holds a vector of ns3::Application pointers.
void Start(Time start) const
Start all of the Applications in this container at the start time given as a parameter.
Ptr< Application > Get(uint32_t i) const
Get the Ptr<Application> stored in this container at a given index.
void Stop(Time stop) const
Arrange for all of the Applications in this container to Stop() at the Time given as a parameter.
Parse command-line arguments.
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.
static Ipv4Address GetAny()
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:138
A helper to make it easier to instantiate an ns3::OnOffApplication on a set of nodes.
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
AttributeValue implementation for Pointer.
Ptr< T > Get() const
Definition pointer.h:223
Smart pointer class similar to boost::intrusive_ptr.
Handles the packet queue and stores DCF/EDCA access parameters (one Txop per AC).
Definition qos-txop.h:52
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
Definition simulator.cc:131
static void Run()
Run the simulation.
Definition simulator.cc:167
static void Stop()
Tell the Simulator the calling event should be the last one executed.
Definition simulator.cc:175
The IEEE 802.11 SSID Information Element.
Definition ssid.h:25
Hold variables of type string.
Definition string.h:45
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
Create a server application which waits for input UDP packets and uses the information carried into t...
Hold an unsigned integer type.
Definition uinteger.h:34
helps to create WifiNetDevice objects
create MAC layers for a ns3::WifiNetDevice.
manage and create wifi channel objects for the YANS model.
static YansWifiChannelHelper Default()
Create a channel helper in a default working state.
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:33
void SetDefault(std::string name, const AttributeValue &value)
Definition config.cc:883
void Set(std::string path, const AttributeValue &value)
Definition config.cc:869
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
Definition log.h:243
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
Definition object.h:619
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition nstime.h:1332
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition nstime.h:1308
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
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< T1 > DynamicCast(const Ptr< T2 > &p)
Cast a Ptr.
Definition ptr.h:580
params
Fit Fluctuating Two Ray model to the 3GPP TR 38.901 using the Anderson-Darling goodness-of-fit ##.
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.
std::string erpProtectionMode
ERP protection mode.
Time simulationTime
Simulation time.
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.
std::ofstream throughput