A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wifi-80211e-txop.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/internet-stack-helper.h"
22#include "ns3/ipv4-address-helper.h"
23#include "ns3/log.h"
24#include "ns3/mobility-helper.h"
25#include "ns3/on-off-helper.h"
26#include "ns3/pointer.h"
27#include "ns3/qos-txop.h"
28#include "ns3/ssid.h"
29#include "ns3/string.h"
30#include "ns3/udp-client-server-helper.h"
31#include "ns3/udp-server.h"
32#include "ns3/wifi-mac.h"
33#include "ns3/wifi-net-device.h"
34#include "ns3/yans-wifi-channel.h"
35#include "ns3/yans-wifi-helper.h"
36
37// This is an example that illustrates 802.11 QoS for different Access Categories.
38// It defines 4 independent Wi-Fi networks (working on different logical channels
39// on the same "ns3::YansWifiPhy" channel object).
40// Each network contains one access point and one station. Each station continuously
41// transmits data packets to its respective AP.
42//
43// Network topology (numbers in parentheses are channel numbers):
44//
45// BSS A (36) BSS B (40) BSS C (44) BSS D (48)
46// * * * * * * * *
47// | | | | | | | |
48// AP A STA A AP B STA B AP C STA C AP D STA D
49//
50// The configuration is the following on the 4 networks:
51// - STA A sends AC_BE traffic to AP A with default AC_BE TXOP value of 0 (1 MSDU);
52// - STA B sends AC_BE traffic to AP B with non-default AC_BE TXOP of 4096 us;
53// - STA C sends AC_VI traffic to AP C with default AC_VI TXOP of 4096 us;
54// - STA D sends AC_VI traffic to AP D with non-default AC_VI TXOP value of 0 (1 MSDU);
55//
56// The user can select the distance between the stations and the APs, can enable/disable the RTS/CTS
57// mechanism and can choose the payload size and the simulation duration. Example: ./ns3 run
58// "wifi-80211e-txop --distance=10 --simulationTime=20 --payloadSize=1000"
59//
60// The output prints the throughput measured for the 4 cases/networks described above. When TXOP is
61// enabled, results show increased throughput since the channel is granted for a longer duration.
62// TXOP is enabled by default for AC_VI and AC_VO, so that they can use the channel for a longer
63// duration than AC_BE and AC_BK.
64
65using namespace ns3;
66
67NS_LOG_COMPONENT_DEFINE("80211eTxop");
68
69/**
70 * Keeps the maximum duration among all TXOPs
71 */
73{
74 /**
75 * Callback connected to TXOP duration trace source.
76 *
77 * \param startTime TXOP start time
78 * \param duration TXOP duration
79 * \param linkId the ID of the link
80 */
81 void Trace(Time startTime, Time duration, uint8_t linkId);
82 Time m_max{Seconds(0)}; //!< maximum TXOP duration
83};
84
85void
86TxopDurationTracer::Trace(Time startTime, Time duration, uint8_t linkId)
87{
88 if (duration > m_max)
89 {
90 m_max = duration;
91 }
92}
93
94int
95main(int argc, char* argv[])
96{
97 uint32_t payloadSize = 1472; // bytes
98 double simulationTime = 10; // seconds
99 double distance = 5; // meters
100 bool enablePcap = false;
101 bool verifyResults = false; // used for regression
102 Time txopLimit = MicroSeconds(4096);
103
104 CommandLine cmd(__FILE__);
105 cmd.AddValue("payloadSize", "Payload size in bytes", payloadSize);
106 cmd.AddValue("simulationTime", "Simulation time in seconds", simulationTime);
107 cmd.AddValue("distance",
108 "Distance in meters between the station and the access point",
109 distance);
110 cmd.AddValue("enablePcap", "Enable/disable pcap file generation", enablePcap);
111 cmd.AddValue("verifyResults",
112 "Enable/disable results verification at the end of the simulation",
113 verifyResults);
114 cmd.Parse(argc, argv);
115
116 NodeContainer wifiStaNodes;
117 wifiStaNodes.Create(4);
118 NodeContainer wifiApNodes;
119 wifiApNodes.Create(4);
120
123 phy.SetPcapDataLinkType(WifiPhyHelper::DLT_IEEE802_11_RADIO);
124 phy.SetChannel(channel.Create());
125
126 WifiHelper wifi;
127 wifi.SetStandard(WIFI_STANDARD_80211a);
128 wifi.SetRemoteStationManager("ns3::IdealWifiManager");
129 WifiMacHelper mac;
130
131 NetDeviceContainer staDeviceA;
132 NetDeviceContainer staDeviceB;
133 NetDeviceContainer staDeviceC;
134 NetDeviceContainer staDeviceD;
135 NetDeviceContainer apDeviceA;
136 NetDeviceContainer apDeviceB;
137 NetDeviceContainer apDeviceC;
138 NetDeviceContainer apDeviceD;
139 Ssid ssid;
140
141 // Network A
142 ssid = Ssid("network-A");
143 phy.Set("ChannelSettings", StringValue("{36, 20, BAND_5GHZ, 0}"));
144 mac.SetType("ns3::StaWifiMac", "QosSupported", BooleanValue(true), "Ssid", SsidValue(ssid));
145 staDeviceA = wifi.Install(phy, mac, wifiStaNodes.Get(0));
146
147 mac.SetType("ns3::ApWifiMac",
148 "QosSupported",
149 BooleanValue(true),
150 "Ssid",
151 SsidValue(ssid),
152 "EnableBeaconJitter",
153 BooleanValue(false));
154 apDeviceA = wifi.Install(phy, mac, wifiApNodes.Get(0));
155
156 // Network B
157 ssid = Ssid("network-B");
158 phy.Set("ChannelSettings", StringValue("{40, 20, BAND_5GHZ, 0}"));
159 mac.SetType("ns3::StaWifiMac", "QosSupported", BooleanValue(true), "Ssid", SsidValue(ssid));
160
161 staDeviceB = wifi.Install(phy, mac, wifiStaNodes.Get(1));
162
163 mac.SetType("ns3::ApWifiMac",
164 "QosSupported",
165 BooleanValue(true),
166 "Ssid",
167 SsidValue(ssid),
168 "EnableBeaconJitter",
169 BooleanValue(false));
170 apDeviceB = wifi.Install(phy, mac, wifiApNodes.Get(1));
171
172 // Modify EDCA configuration (TXOP limit) for AC_BE
173 Ptr<NetDevice> dev = wifiApNodes.Get(1)->GetDevice(0);
174 Ptr<WifiNetDevice> wifi_dev = DynamicCast<WifiNetDevice>(dev);
175 Ptr<WifiMac> wifi_mac = wifi_dev->GetMac();
176 PointerValue ptr;
177 Ptr<QosTxop> edca;
178 wifi_mac->GetAttribute("BE_Txop", ptr);
179 edca = ptr.Get<QosTxop>();
180 edca->SetTxopLimit(txopLimit);
181
182 // Trace TXOP duration for BE on STA1
183 dev = wifiStaNodes.Get(1)->GetDevice(0);
184 wifi_dev = DynamicCast<WifiNetDevice>(dev);
185 wifi_mac = wifi_dev->GetMac();
186 wifi_mac->GetAttribute("BE_Txop", ptr);
187 edca = ptr.Get<QosTxop>();
188 TxopDurationTracer beTxopTracer;
189 edca->TraceConnectWithoutContext("TxopTrace",
190 MakeCallback(&TxopDurationTracer::Trace, &beTxopTracer));
191
192 // Network C
193 ssid = Ssid("network-C");
194 phy.Set("ChannelSettings", StringValue("{44, 20, BAND_5GHZ, 0}"));
195 mac.SetType("ns3::StaWifiMac", "QosSupported", BooleanValue(true), "Ssid", SsidValue(ssid));
196
197 staDeviceC = wifi.Install(phy, mac, wifiStaNodes.Get(2));
198
199 mac.SetType("ns3::ApWifiMac",
200 "QosSupported",
201 BooleanValue(true),
202 "Ssid",
203 SsidValue(ssid),
204 "EnableBeaconJitter",
205 BooleanValue(false));
206 apDeviceC = wifi.Install(phy, mac, wifiApNodes.Get(2));
207
208 // Trace TXOP duration for VI on STA2
209 dev = wifiStaNodes.Get(2)->GetDevice(0);
210 wifi_dev = DynamicCast<WifiNetDevice>(dev);
211 wifi_mac = wifi_dev->GetMac();
212 wifi_mac->GetAttribute("VI_Txop", ptr);
213 edca = ptr.Get<QosTxop>();
214 TxopDurationTracer viTxopTracer;
215 edca->TraceConnectWithoutContext("TxopTrace",
216 MakeCallback(&TxopDurationTracer::Trace, &viTxopTracer));
217
218 // Network D
219 ssid = Ssid("network-D");
220 phy.Set("ChannelSettings", StringValue("{48, 20, BAND_5GHZ, 0}"));
221 mac.SetType("ns3::StaWifiMac", "QosSupported", BooleanValue(true), "Ssid", SsidValue(ssid));
222
223 staDeviceD = wifi.Install(phy, mac, wifiStaNodes.Get(3));
224
225 mac.SetType("ns3::ApWifiMac",
226 "QosSupported",
227 BooleanValue(true),
228 "Ssid",
229 SsidValue(ssid),
230 "EnableBeaconJitter",
231 BooleanValue(false));
232 apDeviceD = wifi.Install(phy, mac, wifiApNodes.Get(3));
233
234 // Modify EDCA configuration (TXOP limit) for AC_VO
235 dev = wifiApNodes.Get(3)->GetDevice(0);
236 wifi_dev = DynamicCast<WifiNetDevice>(dev);
237 wifi_mac = wifi_dev->GetMac();
238 wifi_mac->GetAttribute("VI_Txop", ptr);
239 edca = ptr.Get<QosTxop>();
240 edca->SetTxopLimit(MicroSeconds(0));
241
242 /* Setting mobility model */
243 MobilityHelper mobility;
244 Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator>();
245 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
246
247 // Set position for APs
248 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
249 positionAlloc->Add(Vector(10.0, 0.0, 0.0));
250 positionAlloc->Add(Vector(20.0, 0.0, 0.0));
251 positionAlloc->Add(Vector(30.0, 0.0, 0.0));
252 // Set position for STAs
253 positionAlloc->Add(Vector(distance, 0.0, 0.0));
254 positionAlloc->Add(Vector(10 + distance, 0.0, 0.0));
255 positionAlloc->Add(Vector(20 + distance, 0.0, 0.0));
256 positionAlloc->Add(Vector(30 + distance, 0.0, 0.0));
257 // Remark: while we set these positions 10 meters apart, the networks do not interact
258 // and the only variable that affects transmission performance is the distance.
259
260 mobility.SetPositionAllocator(positionAlloc);
261 mobility.Install(wifiApNodes);
262 mobility.Install(wifiStaNodes);
263
264 /* Internet stack */
266 stack.Install(wifiApNodes);
267 stack.Install(wifiStaNodes);
268
269 Ipv4AddressHelper address;
270 address.SetBase("192.168.1.0", "255.255.255.0");
271 Ipv4InterfaceContainer StaInterfaceA;
272 StaInterfaceA = address.Assign(staDeviceA);
273 Ipv4InterfaceContainer ApInterfaceA;
274 ApInterfaceA = address.Assign(apDeviceA);
275
276 address.SetBase("192.168.2.0", "255.255.255.0");
277 Ipv4InterfaceContainer StaInterfaceB;
278 StaInterfaceB = address.Assign(staDeviceB);
279 Ipv4InterfaceContainer ApInterfaceB;
280 ApInterfaceB = address.Assign(apDeviceB);
281
282 address.SetBase("192.168.3.0", "255.255.255.0");
283 Ipv4InterfaceContainer StaInterfaceC;
284 StaInterfaceC = address.Assign(staDeviceC);
285 Ipv4InterfaceContainer ApInterfaceC;
286 ApInterfaceC = address.Assign(apDeviceC);
287
288 address.SetBase("192.168.4.0", "255.255.255.0");
289 Ipv4InterfaceContainer StaInterfaceD;
290 StaInterfaceD = address.Assign(staDeviceD);
291 Ipv4InterfaceContainer ApInterfaceD;
292 ApInterfaceD = address.Assign(apDeviceD);
293
294 /* Setting applications */
295 uint16_t port = 5001;
296 UdpServerHelper serverA(port);
297 ApplicationContainer serverAppA = serverA.Install(wifiApNodes.Get(0));
298 serverAppA.Start(Seconds(0.0));
299 serverAppA.Stop(Seconds(simulationTime + 1));
300
301 InetSocketAddress destA(ApInterfaceA.GetAddress(0), port);
302
303 OnOffHelper clientA("ns3::UdpSocketFactory", destA);
304 clientA.SetAttribute("OnTime", StringValue("ns3::ConstantRandomVariable[Constant=1]"));
305 clientA.SetAttribute("OffTime", StringValue("ns3::ConstantRandomVariable[Constant=0]"));
306 clientA.SetAttribute("DataRate", StringValue("100000kb/s"));
307 clientA.SetAttribute("PacketSize", UintegerValue(payloadSize));
308 clientA.SetAttribute("Tos", UintegerValue(0x70)); // AC_BE
309
310 ApplicationContainer clientAppA = clientA.Install(wifiStaNodes.Get(0));
311 clientAppA.Start(Seconds(1.0));
312 clientAppA.Stop(Seconds(simulationTime + 1));
313
314 UdpServerHelper serverB(port);
315 ApplicationContainer serverAppB = serverB.Install(wifiApNodes.Get(1));
316 serverAppB.Start(Seconds(0.0));
317 serverAppB.Stop(Seconds(simulationTime + 1));
318
319 InetSocketAddress destB(ApInterfaceB.GetAddress(0), port);
320
321 OnOffHelper clientB("ns3::UdpSocketFactory", destB);
322 clientB.SetAttribute("OnTime", StringValue("ns3::ConstantRandomVariable[Constant=1]"));
323 clientB.SetAttribute("OffTime", StringValue("ns3::ConstantRandomVariable[Constant=0]"));
324 clientB.SetAttribute("DataRate", StringValue("100000kb/s"));
325 clientB.SetAttribute("PacketSize", UintegerValue(payloadSize));
326 clientB.SetAttribute("Tos", UintegerValue(0x70)); // AC_BE
327
328 ApplicationContainer clientAppB = clientB.Install(wifiStaNodes.Get(1));
329 clientAppB.Start(Seconds(1.0));
330 clientAppB.Stop(Seconds(simulationTime + 1));
331
332 UdpServerHelper serverC(port);
333 ApplicationContainer serverAppC = serverC.Install(wifiApNodes.Get(2));
334 serverAppC.Start(Seconds(0.0));
335 serverAppC.Stop(Seconds(simulationTime + 1));
336
337 InetSocketAddress destC(ApInterfaceC.GetAddress(0), port);
338
339 OnOffHelper clientC("ns3::UdpSocketFactory", destC);
340 clientC.SetAttribute("OnTime", StringValue("ns3::ConstantRandomVariable[Constant=1]"));
341 clientC.SetAttribute("OffTime", StringValue("ns3::ConstantRandomVariable[Constant=0]"));
342 clientC.SetAttribute("DataRate", StringValue("100000kb/s"));
343 clientC.SetAttribute("PacketSize", UintegerValue(payloadSize));
344 clientC.SetAttribute("Tos", UintegerValue(0xb8)); // AC_VI
345
346 ApplicationContainer clientAppC = clientC.Install(wifiStaNodes.Get(2));
347 clientAppC.Start(Seconds(1.0));
348 clientAppC.Stop(Seconds(simulationTime + 1));
349
350 UdpServerHelper serverD(port);
351 ApplicationContainer serverAppD = serverD.Install(wifiApNodes.Get(3));
352 serverAppD.Start(Seconds(0.0));
353 serverAppD.Stop(Seconds(simulationTime + 1));
354
355 InetSocketAddress destD(ApInterfaceD.GetAddress(0), port);
356
357 OnOffHelper clientD("ns3::UdpSocketFactory", destD);
358 clientD.SetAttribute("OnTime", StringValue("ns3::ConstantRandomVariable[Constant=1]"));
359 clientD.SetAttribute("OffTime", StringValue("ns3::ConstantRandomVariable[Constant=0]"));
360 clientD.SetAttribute("DataRate", StringValue("100000kb/s"));
361 clientD.SetAttribute("PacketSize", UintegerValue(payloadSize));
362 clientD.SetAttribute("Tos", UintegerValue(0xb8)); // AC_VI
363
364 ApplicationContainer clientAppD = clientD.Install(wifiStaNodes.Get(3));
365 clientAppD.Start(Seconds(1.0));
366 clientAppD.Stop(Seconds(simulationTime + 1));
367
368 if (enablePcap)
369 {
370 phy.EnablePcap("AP_A", apDeviceA.Get(0));
371 phy.EnablePcap("STA_A", staDeviceA.Get(0));
372 phy.EnablePcap("AP_B", apDeviceB.Get(0));
373 phy.EnablePcap("STA_B", staDeviceB.Get(0));
374 phy.EnablePcap("AP_C", apDeviceC.Get(0));
375 phy.EnablePcap("STA_C", staDeviceC.Get(0));
376 phy.EnablePcap("AP_D", apDeviceD.Get(0));
377 phy.EnablePcap("STA_D", staDeviceD.Get(0));
378 }
379
380 Simulator::Stop(Seconds(simulationTime + 1));
382
383 /* Show results */
384 uint64_t totalPacketsThroughA = DynamicCast<UdpServer>(serverAppA.Get(0))->GetReceived();
385 uint64_t totalPacketsThroughB = DynamicCast<UdpServer>(serverAppB.Get(0))->GetReceived();
386 uint64_t totalPacketsThroughC = DynamicCast<UdpServer>(serverAppC.Get(0))->GetReceived();
387 uint64_t totalPacketsThroughD = DynamicCast<UdpServer>(serverAppD.Get(0))->GetReceived();
388
390
391 double throughput = totalPacketsThroughA * payloadSize * 8 / (simulationTime * 1000000.0);
392 std::cout << "AC_BE with default TXOP limit (0ms): " << '\n'
393 << " Throughput = " << throughput << " Mbit/s" << '\n';
394 if (verifyResults && (throughput < 28 || throughput > 29))
395 {
396 NS_LOG_ERROR("Obtained throughput " << throughput << " is not in the expected boundaries!");
397 exit(1);
398 }
399
400 throughput = totalPacketsThroughB * payloadSize * 8 / (simulationTime * 1000000.0);
401 std::cout << "AC_BE with non-default TXOP limit (4.096ms): " << '\n'
402 << " Throughput = " << throughput << " Mbit/s" << '\n';
403 if (verifyResults && (throughput < 36.5 || throughput > 37))
404 {
405 NS_LOG_ERROR("Obtained throughput " << throughput << " is not in the expected boundaries!");
406 exit(1);
407 }
408 std::cout << " Maximum TXOP duration = " << beTxopTracer.m_max.GetMicroSeconds() << " us"
409 << '\n';
410 if (verifyResults &&
411 (beTxopTracer.m_max < MicroSeconds(3008) || beTxopTracer.m_max > txopLimit))
412 {
413 NS_LOG_ERROR("Maximum TXOP duration " << beTxopTracer.m_max
414 << " is not in the expected boundaries!");
415 exit(1);
416 }
417
418 throughput = totalPacketsThroughC * payloadSize * 8 / (simulationTime * 1000000.0);
419 std::cout << "AC_VI with default TXOP limit (4.096ms): " << '\n'
420 << " Throughput = " << throughput << " Mbit/s" << '\n';
421 if (verifyResults && (throughput < 36.5 || throughput > 37.5))
422 {
423 NS_LOG_ERROR("Obtained throughput " << throughput << " is not in the expected boundaries!");
424 exit(1);
425 }
426 std::cout << " Maximum TXOP duration = " << viTxopTracer.m_max.GetMicroSeconds() << " us"
427 << '\n';
428 if (verifyResults &&
429 (viTxopTracer.m_max < MicroSeconds(3008) || viTxopTracer.m_max > txopLimit))
430 {
431 NS_LOG_ERROR("Maximum TXOP duration " << viTxopTracer.m_max
432 << " is not in the expected boundaries!");
433 exit(1);
434 }
435
436 throughput = totalPacketsThroughD * payloadSize * 8 / (simulationTime * 1000000.0);
437 std::cout << "AC_VI with non-default TXOP limit (0ms): " << '\n'
438 << " Throughput = " << throughput << " Mbit/s" << '\n';
439 if (verifyResults && (throughput < 31.5 || throughput > 32.5))
440 {
441 NS_LOG_ERROR("Obtained throughput " << throughput << " is not in the expected boundaries!");
442 exit(1);
443 }
444
445 return 0;
446}
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
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
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
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
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
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.
@ DLT_IEEE802_11_RADIO
Include Radiotap link layer information.
Definition: wifi-helper.h:178
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.
uint16_t port
Definition: dsdv-manet.cc:44
#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:1343
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1319
@ WIFI_STANDARD_80211a
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Definition: callback.h:706
Keeps the maximum duration among all TXOPs.
void Trace(Time startTime, Time duration, uint8_t linkId)
Callback connected to TXOP duration trace source.
Time m_max
maximum TXOP duration
std::ofstream throughput