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 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Sébastien Deronne <sebastien.deronne@gmail.com>
18 */
19
20#include "ns3/command-line.h"
21#include "ns3/config.h"
22#include "ns3/ht-configuration.h"
23#include "ns3/internet-stack-helper.h"
24#include "ns3/ipv4-address-helper.h"
25#include "ns3/log.h"
26#include "ns3/mobility-helper.h"
27#include "ns3/on-off-helper.h"
28#include "ns3/packet-sink-helper.h"
29#include "ns3/packet-sink.h"
30#include "ns3/pointer.h"
31#include "ns3/qos-txop.h"
32#include "ns3/ssid.h"
33#include "ns3/string.h"
34#include "ns3/udp-client-server-helper.h"
35#include "ns3/udp-server.h"
36#include "ns3/wifi-mac.h"
37#include "ns3/wifi-net-device.h"
38#include "ns3/yans-wifi-channel.h"
39#include "ns3/yans-wifi-helper.h"
40
41// This example shows how to configure mixed networks (i.e. mixed b/g and HT/non-HT) and how are
42// performance in several scenarios.
43//
44// The example compares first g only and mixed b/g cases with various configurations depending on
45// the following parameters:
46// - protection mode that is configured on the AP;
47// - whether short PPDU format is supported by the 802.11b station;
48// - whether short slot time is supported by both the 802.11g station and the AP.
49//
50// The example then compares HT only and mixed HT/non-HT cases.
51//
52// The output results show that the presence of an 802.11b station strongly affects 802.11g
53// performance. Protection mechanisms ensure that the NAV value of 802.11b stations is set correctly
54// in case of 802.11g transmissions. In practice, those protection mechanism add a lot of overhead,
55// resulting in reduced performance. CTS-To-Self introduces less overhead than Rts-Cts, but is not
56// heard by hidden stations (and is thus generally only recommended as a protection mechanism for
57// access points). Since short slot time is disabled once an 802.11b station enters the network,
58// benefits from short slot time are only observed in a g only configuration.
59//
60// The user can also select the payload size and can choose either an UDP or a TCP connection.
61// Example: ./ns3 run "wifi-mixed-network --isUdp=1"
62
63using namespace ns3;
64
65NS_LOG_COMPONENT_DEFINE("MixedNetwork");
66
67/** Parameters */
69{
70 std::string testName; //!< Test name
71 bool enableErpProtection; //!< True to enable ERP protection
72 std::string erpProtectionMode; //!< ERP protection mode
73 bool enableShortSlotTime; //!< True to enable short slot time
74 bool enableShortPhyPreamble; //!< True to enable short PHY preamble
75 WifiStandard apType; //!< Wifi standard for AP
76 uint32_t nWifiB; //!< Number of 802.11b stations
77 bool bHasTraffic; //!< True if 802.11b stations generate traffic
78 uint32_t nWifiG; //!< Number of 802.11g stations
79 bool gHasTraffic; //!< True if 802.11g stations generate traffic
80 uint32_t nWifiN; //!< Number of 802.11n stations
81 bool nHasTraffic; //!< True if 802.11n stations generate traffic
82 bool isUdp; //!< True to generate UDP traffic
83 uint32_t payloadSize; //!< Payload size in bytes
84 double simulationTime; //!< Simulation time in seconds
85};
86
87class Experiment
88{
89 public:
91 /**
92 * Run an experiment with the given parameters
93 * \param params the given parameters
94 * \return the throughput
95 */
96 double Run(Parameters params);
97};
98
100{
101}
102
103double
105{
106 std::string apTypeString;
107 if (params.apType == WIFI_STANDARD_80211g)
108 {
109 apTypeString = "WIFI_STANDARD_80211g";
110 }
111 else if (params.apType == WIFI_STANDARD_80211n)
112 {
113 apTypeString = "WIFI_STANDARD_80211n_2_4GHZ";
114 }
115
116 std::cout << "Run: " << params.testName
117 << "\n\t enableErpProtection=" << params.enableErpProtection
118 << "\n\t erpProtectionMode=" << params.erpProtectionMode
119 << "\n\t enableShortSlotTime=" << params.enableShortSlotTime
120 << "\n\t enableShortPhyPreamble=" << params.enableShortPhyPreamble
121 << "\n\t apType=" << apTypeString << "\n\t nWifiB=" << params.nWifiB
122 << "\n\t bHasTraffic=" << params.bHasTraffic << "\n\t nWifiG=" << params.nWifiG
123 << "\n\t gHasTraffic=" << params.gHasTraffic << "\n\t nWifiN=" << params.nWifiN
124 << "\n\t nHasTraffic=" << params.nHasTraffic << std::endl;
125
126 Config::SetDefault("ns3::WifiRemoteStationManager::ErpProtectionMode",
127 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);
142 NodeContainer wifiApNode;
143 wifiApNode.Create(1);
144
146 channel.AddPropagationLoss("ns3::RangePropagationLossModel");
147
149 phy.SetChannel(channel.Create());
150
151 WifiHelper wifi;
152 wifi.SetRemoteStationManager("ns3::IdealWifiManager");
153
154 // 802.11b STA
155 wifi.SetStandard(WIFI_STANDARD_80211b);
156
157 WifiMacHelper mac;
158 Ssid ssid = Ssid("ns-3-ssid");
159
160 mac.SetType("ns3::StaWifiMac",
161 "Ssid",
162 SsidValue(ssid),
163 "ShortSlotTimeSupported",
164 BooleanValue(params.enableShortSlotTime));
165
166 // Configure the PHY preamble type: long or short
167 phy.Set("ShortPlcpPreambleSupported", BooleanValue(params.enableShortPhyPreamble));
168
169 NetDeviceContainer bStaDevice;
170 bStaDevice = wifi.Install(phy, mac, wifiBStaNodes);
171
172 // 802.11b/g STA
173 wifi.SetStandard(WIFI_STANDARD_80211g);
174 NetDeviceContainer gStaDevice;
175 gStaDevice = wifi.Install(phy, mac, wifiGStaNodes);
176
177 // 802.11b/g/n STA
178 wifi.SetStandard(WIFI_STANDARD_80211n);
179 NetDeviceContainer nStaDevice;
180 mac.SetType("ns3::StaWifiMac",
181 "Ssid",
182 SsidValue(ssid),
183 "BE_BlockAckThreshold",
184 UintegerValue(2),
185 "ShortSlotTimeSupported",
186 BooleanValue(params.enableShortSlotTime));
187 nStaDevice = wifi.Install(phy, mac, wifiNStaNodes);
188
189 // AP
190 NetDeviceContainer apDevice;
191 wifi.SetStandard(params.apType);
192 mac.SetType("ns3::ApWifiMac",
193 "Ssid",
194 SsidValue(ssid),
195 "EnableBeaconJitter",
196 BooleanValue(false),
197 "BE_BlockAckThreshold",
198 UintegerValue(2),
199 "EnableNonErpProtection",
200 BooleanValue(params.enableErpProtection),
201 "ShortSlotTimeSupported",
202 BooleanValue(params.enableShortSlotTime));
203 apDevice = wifi.Install(phy, mac, wifiApNode);
204
205 // Set TXOP limit
206 if (params.apType == WIFI_STANDARD_80211n)
207 {
208 Ptr<NetDevice> dev = wifiApNode.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 if (nWifiN > 0)
217 {
218 Ptr<NetDevice> dev = wifiNStaNodes.Get(0)->GetDevice(0);
219 Ptr<WifiNetDevice> wifi_dev = DynamicCast<WifiNetDevice>(dev);
220 Ptr<WifiMac> wifi_mac = wifi_dev->GetMac();
221 PointerValue ptr;
222 wifi_mac->GetAttribute("BE_Txop", ptr);
223 Ptr<QosTxop> edca = ptr.Get<QosTxop>();
224 edca->SetTxopLimit(MicroSeconds(3008));
225 }
226
227 Config::Set("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/BE_MaxAmpduSize",
228 UintegerValue(0)); // Disable A-MPDU
229
230 // Define mobility model
231 MobilityHelper mobility;
232 Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator>();
233
234 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
235 for (uint32_t i = 0; i < nWifiB; i++)
236 {
237 positionAlloc->Add(Vector(5.0, 0.0, 0.0));
238 }
239 for (uint32_t i = 0; i < nWifiG; i++)
240 {
241 positionAlloc->Add(Vector(0.0, 5.0, 0.0));
242 }
243 for (uint32_t i = 0; i < nWifiN; i++)
244 {
245 positionAlloc->Add(Vector(0.0, 0.0, 5.0));
246 }
247
248 mobility.SetPositionAllocator(positionAlloc);
249 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
250 mobility.Install(wifiApNode);
251 mobility.Install(wifiBStaNodes);
252 mobility.Install(wifiGStaNodes);
253 mobility.Install(wifiNStaNodes);
254
255 // Internet stack
257 stack.Install(wifiApNode);
258 stack.Install(wifiBStaNodes);
259 stack.Install(wifiGStaNodes);
260 stack.Install(wifiNStaNodes);
261
262 Ipv4AddressHelper address;
263 address.SetBase("192.168.1.0", "255.255.255.0");
264 Ipv4InterfaceContainer bStaInterface;
265 bStaInterface = address.Assign(bStaDevice);
266 Ipv4InterfaceContainer gStaInterface;
267 gStaInterface = address.Assign(gStaDevice);
268 Ipv4InterfaceContainer nStaInterface;
269 nStaInterface = address.Assign(nStaDevice);
270 Ipv4InterfaceContainer ApInterface;
271 ApInterface = address.Assign(apDevice);
272
273 // Setting applications
274 if (params.isUdp)
275 {
276 uint16_t port = 9;
277 UdpServerHelper server(port);
278 ApplicationContainer serverApp = server.Install(wifiApNode);
279 serverApp.Start(Seconds(0.0));
280 serverApp.Stop(Seconds(simulationTime + 1));
281
282 UdpClientHelper client(ApInterface.GetAddress(0), port);
283 client.SetAttribute("MaxPackets", UintegerValue(4294967295U));
284 client.SetAttribute("Interval", TimeValue(Time("0.0002"))); // packets/s
285 client.SetAttribute("PacketSize", UintegerValue(payloadSize));
286
287 ApplicationContainer clientApps;
288 if (params.bHasTraffic)
289 {
290 clientApps.Add(client.Install(wifiBStaNodes));
291 }
292 if (params.gHasTraffic)
293 {
294 clientApps.Add(client.Install(wifiGStaNodes));
295 }
296 if (params.nHasTraffic)
297 {
298 clientApps.Add(client.Install(wifiNStaNodes));
299 }
300 clientApps.Start(Seconds(1.0));
301 clientApps.Stop(Seconds(simulationTime + 1));
302
303 Simulator::Stop(Seconds(simulationTime + 1));
305
306 uint64_t totalPacketsThrough = DynamicCast<UdpServer>(serverApp.Get(0))->GetReceived();
307 throughput = totalPacketsThrough * payloadSize * 8 / (simulationTime * 1000000.0);
308 }
309 else
310 {
311 uint16_t port = 50000;
313 PacketSinkHelper packetSinkHelper("ns3::TcpSocketFactory", localAddress);
314
315 ApplicationContainer serverApp = packetSinkHelper.Install(wifiApNode.Get(0));
316 serverApp.Start(Seconds(0.0));
317 serverApp.Stop(Seconds(simulationTime + 1));
318
319 OnOffHelper onoff("ns3::TcpSocketFactory", Ipv4Address::GetAny());
320 onoff.SetAttribute("OnTime", StringValue("ns3::ConstantRandomVariable[Constant=1]"));
321 onoff.SetAttribute("OffTime", StringValue("ns3::ConstantRandomVariable[Constant=0]"));
322 onoff.SetAttribute("PacketSize", UintegerValue(payloadSize));
323 onoff.SetAttribute("DataRate", DataRateValue(150000000)); // bit/s
324
325 AddressValue remoteAddress(InetSocketAddress(ApInterface.GetAddress(0), port));
326 onoff.SetAttribute("Remote", remoteAddress);
327
328 ApplicationContainer clientApps;
329 if (params.bHasTraffic)
330 {
331 clientApps.Add(onoff.Install(wifiBStaNodes));
332 }
333 if (params.gHasTraffic)
334 {
335 clientApps.Add(onoff.Install(wifiGStaNodes));
336 }
337 if (params.nHasTraffic)
338 {
339 clientApps.Add(onoff.Install(wifiNStaNodes));
340 }
341 clientApps.Start(Seconds(1.0));
342 clientApps.Stop(Seconds(simulationTime + 1));
343
344 Simulator::Stop(Seconds(simulationTime + 1));
346
347 uint64_t totalPacketsThrough = DynamicCast<PacketSink>(serverApp.Get(0))->GetTotalRx();
348 throughput += totalPacketsThrough * 8 / (simulationTime * 1000000.0);
349 }
351 return throughput;
352}
353
354int
355main(int argc, char* argv[])
356{
357 Parameters params;
358 params.testName = "";
359 params.enableErpProtection = false;
360 params.erpProtectionMode = "Cts-To-Self";
361 params.enableShortSlotTime = false;
362 params.enableShortPhyPreamble = false;
363 params.apType = WIFI_STANDARD_80211g;
364 params.nWifiB = 0;
365 params.bHasTraffic = false;
366 params.nWifiG = 1;
367 params.gHasTraffic = true;
368 params.nWifiN = 0;
369 params.nHasTraffic = false;
370 params.isUdp = true;
371 params.payloadSize = 1472; // bytes
372 params.simulationTime = 10; // seconds
373
374 bool verifyResults = false; // used for regression
375
376 CommandLine cmd(__FILE__);
377 cmd.AddValue("payloadSize", "Payload size in bytes", params.payloadSize);
378 cmd.AddValue("simulationTime", "Simulation time in seconds", params.simulationTime);
379 cmd.AddValue("isUdp", "UDP if set to 1, TCP otherwise", params.isUdp);
380 cmd.AddValue("verifyResults",
381 "Enable/disable results verification at the end of the simulation",
382 verifyResults);
383 cmd.Parse(argc, argv);
384
386 double throughput = 0;
387
388 params.testName = "g only with all g features disabled";
389 throughput = experiment.Run(params);
390 if (verifyResults && (throughput < 22.5 || throughput > 23.5))
391 {
392 NS_LOG_ERROR("Obtained throughput " << throughput << " is not in the expected boundaries!");
393 exit(1);
394 }
395 std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
396
397 params.testName = "g only with short slot time enabled";
398 params.enableErpProtection = false;
399 params.enableShortSlotTime = true;
400 params.enableShortPhyPreamble = false;
401 params.nWifiB = 0;
402 throughput = experiment.Run(params);
403 if (verifyResults && (throughput < 29 || throughput > 30))
404 {
405 NS_LOG_ERROR("Obtained throughput " << throughput << " is not in the expected boundaries!");
406 exit(1);
407 }
408 std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
409
410 params.testName = "Mixed b/g with all g features disabled";
411 params.enableErpProtection = false;
412 params.enableShortSlotTime = false;
413 params.enableShortPhyPreamble = false;
414 params.nWifiB = 1;
415 throughput = experiment.Run(params);
416 if (verifyResults && (throughput < 22.5 || throughput > 23.5))
417 {
418 NS_LOG_ERROR("Obtained throughput " << throughput << " is not in the expected boundaries!");
419 exit(1);
420 }
421 std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
422
423 params.testName = "Mixed b/g with short plcp preamble enabled";
424 params.enableErpProtection = false;
425 params.enableShortSlotTime = false;
426 params.enableShortPhyPreamble = true;
427 params.nWifiB = 1;
428 throughput = experiment.Run(params);
429 if (verifyResults && (throughput < 22.5 || throughput > 23.5))
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 slot time enabled using RTS-CTS protection";
437 params.enableErpProtection = true;
438 params.erpProtectionMode = "Rts-Cts";
439 params.enableShortSlotTime = false;
440 params.enableShortPhyPreamble = false;
441 params.nWifiB = 1;
442 throughput = experiment.Run(params);
443 if (verifyResults && (throughput < 19 || throughput > 20))
444 {
445 NS_LOG_ERROR("Obtained throughput " << throughput << " is not in the expected boundaries!");
446 exit(1);
447 }
448 std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
449
450 params.testName = "Mixed b/g with short plcp preamble enabled using RTS-CTS protection";
451 params.enableErpProtection = true;
452 params.enableShortSlotTime = false;
453 params.enableShortPhyPreamble = true;
454 params.nWifiB = 1;
455 throughput = experiment.Run(params);
456 if (verifyResults && (throughput < 19 || throughput > 20))
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 slot time enabled using CTS-TO-SELF protection";
464 params.enableErpProtection = true;
465 params.erpProtectionMode = "Cts-To-Self";
466 params.enableShortSlotTime = false;
467 params.enableShortPhyPreamble = false;
468 params.nWifiB = 1;
469 throughput = experiment.Run(params);
470 if (verifyResults && (throughput < 20.5 || throughput > 21.5))
471 {
472 NS_LOG_ERROR("Obtained throughput " << throughput << " is not in the expected boundaries!");
473 exit(1);
474 }
475 std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
476
477 params.testName = "Mixed b/g with short plcp preamble enabled using CTS-TO-SELF protection";
478 params.enableErpProtection = true;
479 params.enableShortSlotTime = false;
480 params.enableShortPhyPreamble = true;
481 params.nWifiB = 1;
482 throughput = experiment.Run(params);
483 if (verifyResults && (throughput < 20.5 || throughput > 21.5))
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 = "HT only";
491 params.enableErpProtection = false;
492 params.enableShortSlotTime = false;
493 params.enableShortPhyPreamble = false;
495 params.nWifiB = 0;
496 params.bHasTraffic = false;
497 params.nWifiG = 0;
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 params.testName = "Mixed HT/non-HT";
510 params.enableErpProtection = false;
511 params.enableShortSlotTime = false;
512 params.enableShortPhyPreamble = false;
514 params.nWifiB = 0;
515 params.bHasTraffic = false;
516 params.nWifiG = 1;
517 params.gHasTraffic = false;
518 params.nWifiN = 1;
519 params.nHasTraffic = true;
520 throughput = experiment.Run(params);
521 if (verifyResults && (throughput < 44 || throughput > 45))
522 {
523 NS_LOG_ERROR("Obtained throughput " << throughput << " is not in the expected boundaries!");
524 exit(1);
525 }
526 std::cout << "Throughput: " << throughput << " Mbit/s \n" << std::endl;
527
528 return 0;
529}
WiFi adhoc experiment class.
Definition: wifi-adhoc.cc:45
Gnuplot2dDataset Run(const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy, const WifiMacHelper &wifiMac, const YansWifiChannelHelper &wifiChannel)
Run an experiment.
Definition: wifi-adhoc.cc:162
a polymophic address class
Definition: address.h:101
AttributeValue implementation for Address.
Definition: address.h:286
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.
AttributeValue implementation for Boolean.
Definition: boolean.h:37
Parse command-line arguments.
Definition: command-line.h:232
AttributeValue implementation for DataRate.
Definition: data-rate.h:296
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:149
A helper to make it easier to instantiate an ns3::OnOffApplication on a set of nodes.
Definition: on-off-helper.h:37
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
AttributeValue implementation for Pointer.
Definition: pointer.h:48
Ptr< T > Get() const
Definition: pointer.h:234
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Handle packet fragmentation and retransmissions for QoS data frames as well as MSDU aggregation (A-MS...
Definition: qos-txop.h:74
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
Definition: simulator.cc:142
static void Run()
Run the simulation.
Definition: simulator.cc:178
static void Stop()
Tell the Simulator the calling event should be the last one executed.
Definition: simulator.cc:186
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:36
AttributeValue implementation for Ssid.
Definition: ssid.h:96
Hold variables of type string.
Definition: string.h:56
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
AttributeValue implementation for Time.
Definition: nstime.h:1413
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:45
helps to create WifiNetDevice objects
Definition: wifi-helper.h:324
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:44
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:894
void Set(std::string path, const AttributeValue &value)
Definition: config.cc:880
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
Definition: log.h:254
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1350
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1326
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.
FtrParams params
Fit Fluctuating Two Ray model to the 3GPP TR 38.901 using the Anderson-Darling goodness-of-fit ##.
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.
std::ofstream throughput