A Discrete-Event Network Simulator
API
wifi-80211e-txop.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/string.h"
23 #include "ns3/pointer.h"
24 #include "ns3/log.h"
25 #include "ns3/yans-wifi-helper.h"
26 #include "ns3/ssid.h"
27 #include "ns3/mobility-helper.h"
28 #include "ns3/internet-stack-helper.h"
29 #include "ns3/ipv4-address-helper.h"
30 #include "ns3/udp-client-server-helper.h"
31 #include "ns3/on-off-helper.h"
32 #include "ns3/yans-wifi-channel.h"
33 #include "ns3/wifi-net-device.h"
34 #include "ns3/qos-txop.h"
35 #include "ns3/wifi-mac.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 3.008 ms;
53 // - STA C sends AC_VI traffic to AP C with default AC_VI TXOP of 3.008 ms;
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 mechanism
57 // and can choose the payload size and the simulation duration.
58 // Example: ./waf --run "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 enabled, results show
61 // increased throughput since the channel is granted for a longer duration. TXOP is enabled by default for AC_VI and AC_VO,
62 // so that they can use the channel for a longer duration than AC_BE and AC_BK.
63 
64 using namespace ns3;
65 
66 NS_LOG_COMPONENT_DEFINE ("80211eTxop");
67 
72 {
73  void Trace (Time startTime, Time duration);
74  Time m_max {Seconds (0)};
75 };
76 
77 void
79 {
80  if (duration > m_max)
81  {
82  m_max = duration;
83  }
84 }
85 
86 int main (int argc, char *argv[])
87 {
88  uint32_t payloadSize = 1472; //bytes
89  double simulationTime = 10; //seconds
90  double distance = 5; //meters
91  bool enablePcap = 0;
92  bool verifyResults = 0; //used for regression
93 
94  CommandLine cmd (__FILE__);
95  cmd.AddValue ("payloadSize", "Payload size in bytes", payloadSize);
96  cmd.AddValue ("simulationTime", "Simulation time in seconds", simulationTime);
97  cmd.AddValue ("distance", "Distance in meters between the station and the access point", distance);
98  cmd.AddValue ("enablePcap", "Enable/disable pcap file generation", enablePcap);
99  cmd.AddValue ("verifyResults", "Enable/disable results verification at the end of the simulation", verifyResults);
100  cmd.Parse (argc, argv);
101 
103  wifiStaNodes.Create (4);
104  NodeContainer wifiApNodes;
105  wifiApNodes.Create (4);
106 
109  phy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
110  phy.SetChannel (channel.Create ());
111 
112  WifiHelper wifi; //the default standard of 802.11a will be selected by this helper since the program doesn't specify another one
113  wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
115 
116  NetDeviceContainer staDeviceA, staDeviceB, staDeviceC, staDeviceD, apDeviceA, apDeviceB, apDeviceC, apDeviceD;
117  Ssid ssid;
118 
119  //Network A
120  ssid = Ssid ("network-A");
121  phy.Set ("ChannelNumber", UintegerValue (36));
122  mac.SetType ("ns3::StaWifiMac",
123  "QosSupported", BooleanValue (true),
124  "Ssid", SsidValue (ssid));
125  staDeviceA = wifi.Install (phy, mac, wifiStaNodes.Get (0));
126 
127  mac.SetType ("ns3::ApWifiMac",
128  "QosSupported", BooleanValue (true),
129  "Ssid", SsidValue (ssid),
130  "EnableBeaconJitter", BooleanValue (false));
131  apDeviceA = wifi.Install (phy, mac, wifiApNodes.Get (0));
132 
133  //Network B
134  ssid = Ssid ("network-B");
135  phy.Set ("ChannelNumber", UintegerValue (40));
136  mac.SetType ("ns3::StaWifiMac",
137  "QosSupported", BooleanValue (true),
138  "Ssid", SsidValue (ssid));
139 
140  staDeviceB = wifi.Install (phy, mac, wifiStaNodes.Get (1));
141 
142  mac.SetType ("ns3::ApWifiMac",
143  "QosSupported", BooleanValue (true),
144  "Ssid", SsidValue (ssid),
145  "EnableBeaconJitter", BooleanValue (false));
146  apDeviceB = wifi.Install (phy, mac, wifiApNodes.Get (1));
147 
148  //Modify EDCA configuration (TXOP limit) for AC_BE
149  Ptr<NetDevice> dev = wifiApNodes.Get (1)->GetDevice (0);
150  Ptr<WifiNetDevice> wifi_dev = DynamicCast<WifiNetDevice> (dev);
151  Ptr<WifiMac> wifi_mac = wifi_dev->GetMac ();
152  PointerValue ptr;
153  Ptr<QosTxop> edca;
154  wifi_mac->GetAttribute ("BE_Txop", ptr);
155  edca = ptr.Get<QosTxop> ();
156  edca->SetTxopLimit (MicroSeconds (3008));
157 
158  // Trace TXOP duration for BE on STA1
159  dev = wifiStaNodes.Get (1)->GetDevice (0);
160  wifi_dev = DynamicCast<WifiNetDevice> (dev);
161  wifi_mac = wifi_dev->GetMac ();
162  wifi_mac->GetAttribute ("BE_Txop", ptr);
163  edca = ptr.Get<QosTxop> ();
164  TxopDurationTracer beTxopTracer;
165  edca->TraceConnectWithoutContext ("TxopTrace", MakeCallback (&TxopDurationTracer::Trace, &beTxopTracer));
166 
167  //Network C
168  ssid = Ssid ("network-C");
169  phy.Set ("ChannelNumber", UintegerValue (44));
170  mac.SetType ("ns3::StaWifiMac",
171  "QosSupported", BooleanValue (true),
172  "Ssid", SsidValue (ssid));
173 
174  staDeviceC = wifi.Install (phy, mac, wifiStaNodes.Get (2));
175 
176  mac.SetType ("ns3::ApWifiMac",
177  "QosSupported", BooleanValue (true),
178  "Ssid", SsidValue (ssid),
179  "EnableBeaconJitter", BooleanValue (false));
180  apDeviceC = wifi.Install (phy, mac, wifiApNodes.Get (2));
181 
182  // Trace TXOP duration for VI on STA2
183  dev = wifiStaNodes.Get (2)->GetDevice (0);
184  wifi_dev = DynamicCast<WifiNetDevice> (dev);
185  wifi_mac = wifi_dev->GetMac ();
186  wifi_mac->GetAttribute ("VI_Txop", ptr);
187  edca = ptr.Get<QosTxop> ();
188  TxopDurationTracer viTxopTracer;
189  edca->TraceConnectWithoutContext ("TxopTrace", MakeCallback (&TxopDurationTracer::Trace, &viTxopTracer));
190 
191  //Network D
192  ssid = Ssid ("network-D");
193  phy.Set ("ChannelNumber", UintegerValue (48));
194  mac.SetType ("ns3::StaWifiMac",
195  "QosSupported", BooleanValue (true),
196  "Ssid", SsidValue (ssid));
197 
198  staDeviceD = wifi.Install (phy, mac, wifiStaNodes.Get (3));
199 
200  mac.SetType ("ns3::ApWifiMac",
201  "QosSupported", BooleanValue (true),
202  "Ssid", SsidValue (ssid),
203  "EnableBeaconJitter", BooleanValue (false));
204  apDeviceD = wifi.Install (phy, mac, wifiApNodes.Get (3));
205 
206  //Modify EDCA configuration (TXOP limit) for AC_VO
207  dev = wifiApNodes.Get (3)->GetDevice (0);
208  wifi_dev = DynamicCast<WifiNetDevice> (dev);
209  wifi_mac = wifi_dev->GetMac ();
210  wifi_mac->GetAttribute ("VI_Txop", ptr);
211  edca = ptr.Get<QosTxop> ();
212  edca->SetTxopLimit (MicroSeconds (0));
213 
214  /* Setting mobility model */
216  Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
217  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
218 
219  //Set position for APs
220  positionAlloc->Add (Vector (0.0, 0.0, 0.0));
221  positionAlloc->Add (Vector (10.0, 0.0, 0.0));
222  positionAlloc->Add (Vector (20.0, 0.0, 0.0));
223  positionAlloc->Add (Vector (30.0, 0.0, 0.0));
224  //Set position for STAs
225  positionAlloc->Add (Vector (distance, 0.0, 0.0));
226  positionAlloc->Add (Vector (10 + distance, 0.0, 0.0));
227  positionAlloc->Add (Vector (20 + distance, 0.0, 0.0));
228  positionAlloc->Add (Vector (30 + distance, 0.0, 0.0));
229  //Remark: while we set these positions 10 meters apart, the networks do not interact
230  //and the only variable that affects transmission performance is the distance.
231 
232  mobility.SetPositionAllocator (positionAlloc);
233  mobility.Install (wifiApNodes);
234  mobility.Install (wifiStaNodes);
235 
236  /* Internet stack */
238  stack.Install (wifiApNodes);
239  stack.Install (wifiStaNodes);
240 
242  address.SetBase ("192.168.1.0", "255.255.255.0");
243  Ipv4InterfaceContainer StaInterfaceA;
244  StaInterfaceA = address.Assign (staDeviceA);
245  Ipv4InterfaceContainer ApInterfaceA;
246  ApInterfaceA = address.Assign (apDeviceA);
247 
248  address.SetBase ("192.168.2.0", "255.255.255.0");
249  Ipv4InterfaceContainer StaInterfaceB;
250  StaInterfaceB = address.Assign (staDeviceB);
251  Ipv4InterfaceContainer ApInterfaceB;
252  ApInterfaceB = address.Assign (apDeviceB);
253 
254  address.SetBase ("192.168.3.0", "255.255.255.0");
255  Ipv4InterfaceContainer StaInterfaceC;
256  StaInterfaceC = address.Assign (staDeviceC);
257  Ipv4InterfaceContainer ApInterfaceC;
258  ApInterfaceC = address.Assign (apDeviceC);
259 
260  address.SetBase ("192.168.4.0", "255.255.255.0");
261  Ipv4InterfaceContainer StaInterfaceD;
262  StaInterfaceD = address.Assign (staDeviceD);
263  Ipv4InterfaceContainer ApInterfaceD;
264  ApInterfaceD = address.Assign (apDeviceD);
265 
266  /* Setting applications */
267  uint16_t port = 5001;
268  UdpServerHelper serverA (port);
269  ApplicationContainer serverAppA = serverA.Install (wifiApNodes.Get (0));
270  serverAppA.Start (Seconds (0.0));
271  serverAppA.Stop (Seconds (simulationTime + 1));
272 
273  InetSocketAddress destA (ApInterfaceA.GetAddress (0), port);
274  destA.SetTos (0x70); //AC_BE
275 
276  OnOffHelper clientA ("ns3::UdpSocketFactory", destA);
277  clientA.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
278  clientA.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
279  clientA.SetAttribute ("DataRate", StringValue ("100000kb/s"));
280  clientA.SetAttribute ("PacketSize", UintegerValue (payloadSize));
281 
282  ApplicationContainer clientAppA = clientA.Install (wifiStaNodes.Get (0));
283  clientAppA.Start (Seconds (1.0));
284  clientAppA.Stop (Seconds (simulationTime + 1));
285 
286  UdpServerHelper serverB (port);
287  ApplicationContainer serverAppB = serverB.Install (wifiApNodes.Get (1));
288  serverAppB.Start (Seconds (0.0));
289  serverAppB.Stop (Seconds (simulationTime + 1));
290 
291  InetSocketAddress destB (ApInterfaceB.GetAddress (0), port);
292  destB.SetTos (0x70); //AC_BE
293 
294  OnOffHelper clientB ("ns3::UdpSocketFactory", destB);
295  clientB.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
296  clientB.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
297  clientB.SetAttribute ("DataRate", StringValue ("100000kb/s"));
298  clientB.SetAttribute ("PacketSize", UintegerValue (payloadSize));
299 
300  ApplicationContainer clientAppB = clientB.Install (wifiStaNodes.Get (1));
301  clientAppB.Start (Seconds (1.0));
302  clientAppB.Stop (Seconds (simulationTime + 1));
303 
304  UdpServerHelper serverC (port);
305  ApplicationContainer serverAppC = serverC.Install (wifiApNodes.Get (2));
306  serverAppC.Start (Seconds (0.0));
307  serverAppC.Stop (Seconds (simulationTime + 1));
308 
309  InetSocketAddress destC (ApInterfaceC.GetAddress (0), port);
310  destC.SetTos (0xb8); //AC_VI
311 
312  OnOffHelper clientC ("ns3::UdpSocketFactory", destC);
313  clientC.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
314  clientC.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
315  clientC.SetAttribute ("DataRate", StringValue ("100000kb/s"));
316  clientC.SetAttribute ("PacketSize", UintegerValue (payloadSize));
317 
318  ApplicationContainer clientAppC = clientC.Install (wifiStaNodes.Get (2));
319  clientAppC.Start (Seconds (1.0));
320  clientAppC.Stop (Seconds (simulationTime + 1));
321 
322  UdpServerHelper serverD (port);
323  ApplicationContainer serverAppD = serverD.Install (wifiApNodes.Get (3));
324  serverAppD.Start (Seconds (0.0));
325  serverAppD.Stop (Seconds (simulationTime + 1));
326 
327  InetSocketAddress destD (ApInterfaceD.GetAddress (0), port);
328  destD.SetTos (0xb8); //AC_VI
329 
330  OnOffHelper clientD ("ns3::UdpSocketFactory", destD);
331  clientD.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
332  clientD.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
333  clientD.SetAttribute ("DataRate", StringValue ("100000kb/s"));
334  clientD.SetAttribute ("PacketSize", UintegerValue (payloadSize));
335 
336  ApplicationContainer clientAppD = clientD.Install (wifiStaNodes.Get (3));
337  clientAppD.Start (Seconds (1.0));
338  clientAppD.Stop (Seconds (simulationTime + 1));
339 
340  if (enablePcap)
341  {
342  phy.EnablePcap ("AP_A", apDeviceA.Get (0));
343  phy.EnablePcap ("STA_A", staDeviceA.Get (0));
344  phy.EnablePcap ("AP_B", apDeviceB.Get (0));
345  phy.EnablePcap ("STA_B", staDeviceB.Get (0));
346  phy.EnablePcap ("AP_C", apDeviceC.Get (0));
347  phy.EnablePcap ("STA_C", staDeviceC.Get (0));
348  phy.EnablePcap ("AP_D", apDeviceD.Get (0));
349  phy.EnablePcap ("STA_D", staDeviceD.Get (0));
350  }
351 
352  Simulator::Stop (Seconds (simulationTime + 1));
353  Simulator::Run ();
354 
355  /* Show results */
356  uint64_t totalPacketsThroughA = DynamicCast<UdpServer> (serverAppA.Get (0))->GetReceived ();
357  uint64_t totalPacketsThroughB = DynamicCast<UdpServer> (serverAppB.Get (0))->GetReceived ();
358  uint64_t totalPacketsThroughC = DynamicCast<UdpServer> (serverAppC.Get (0))->GetReceived ();
359  uint64_t totalPacketsThroughD = DynamicCast<UdpServer> (serverAppD.Get (0))->GetReceived ();
360 
362 
363  double throughput = totalPacketsThroughA * payloadSize * 8 / (simulationTime * 1000000.0);
364  std::cout << "AC_BE with default TXOP limit (0ms): " << '\n'
365  << " Throughput = " << throughput << " Mbit/s" << '\n';
366  if (verifyResults && (throughput < 28 || throughput > 29))
367  {
368  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
369  exit (1);
370  }
371 
372  throughput = totalPacketsThroughB * payloadSize * 8 / (simulationTime * 1000000.0);
373  std::cout << "AC_BE with non-default TXOP limit (3.008ms): " << '\n'
374  << " Throughput = " << throughput << " Mbit/s" << '\n';
375  if (verifyResults && (throughput < 35 || throughput > 36))
376  {
377  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
378  exit (1);
379  }
380  std::cout << " Maximum TXOP duration = " << beTxopTracer.m_max.GetMicroSeconds () << " us" << '\n';
381  if (verifyResults && (beTxopTracer.m_max < MicroSeconds (2700) || beTxopTracer.m_max > MicroSeconds (3008)))
382  {
383  NS_LOG_ERROR ("Maximum TXOP duration " << beTxopTracer.m_max << " is not in the expected boundaries!");
384  exit (1);
385  }
386 
387  throughput = totalPacketsThroughC * payloadSize * 8 / (simulationTime * 1000000.0);
388  std::cout << "AC_VI with default TXOP limit (3.008ms): " << '\n'
389  << " Throughput = " << throughput << " Mbit/s" << '\n';
390  if (verifyResults && (throughput < 35 || throughput > 36))
391  {
392  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
393  exit (1);
394  }
395  std::cout << " Maximum TXOP duration = " << viTxopTracer.m_max.GetMicroSeconds () << " us" << '\n';
396  if (verifyResults && (viTxopTracer.m_max < MicroSeconds (2700) || viTxopTracer.m_max > MicroSeconds (3008)))
397  {
398  NS_LOG_ERROR ("Maximum TXOP duration " << viTxopTracer.m_max << " is not in the expected boundaries!");
399  exit (1);
400  }
401 
402  throughput = totalPacketsThroughD * payloadSize * 8 / (simulationTime * 1000000.0);
403  std::cout << "AC_VI with non-default TXOP limit (0ms): " << '\n'
404  << " Throughput = " << throughput << " Mbit/s" << '\n';
405  if (verifyResults && (throughput < 31.5 || throughput > 32.5))
406  {
407  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
408  exit (1);
409  }
410 
411  return 0;
412 }
holds a vector of ns3::Application pointers.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
an Inet address class
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
AttributeValue implementation for Boolean.
Definition: boolean.h:36
Ptr< T > Get(void) const
Definition: pointer.h:201
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Hold variables of type string.
Definition: string.h:41
Make it easy to create and manage PHY objects for the YANS model.
static YansWifiChannelHelper Default(void)
Create a channel helper in a default working state.
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
Definition: node.cc:144
bool enablePcap
Handle packet fragmentation and retransmissions for QoS data frames as well as MSDU aggregation (A-MS...
Definition: qos-txop.h:74
static void Run(void)
Run the simulation.
Definition: simulator.cc:172
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
aggregate IP/TCP/UDP functionality to existing Nodes.
Keeps the maximum duration among all TXOPs.
cmd
Definition: second.py:35
helps to create WifiNetDevice objects
Definition: wifi-helper.h:326
A helper to make it easier to instantiate an ns3::OnOffApplication on a set of nodes.
Definition: on-off-helper.h:42
stack
Definition: first.py:41
void Trace(Time startTime, Time duration)
uint16_t port
Definition: dsdv-manet.cc:45
channel
Definition: third.py:92
mobility
Definition: third.py:108
phy
Definition: third.py:93
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
Hold an unsigned integer type.
Definition: uinteger.h:44
double startTime
ssid
Definition: third.py:100
holds a vector of ns3::NetDevice pointers
mac
Definition: third.py:99
Create a server application which waits for input UDP packets and uses the information carried into t...
void Start(Time start)
Arrange for all of the Applications in this container to Start() at the Time given as a parameter...
Parse command-line arguments.
Definition: command-line.h:227
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
Definition: simulator.cc:136
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context.
Definition: object-base.cc:293
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
Hold objects of type Ptr<T>.
Definition: pointer.h:36
address
Definition: first.py:44
manage and create wifi channel objects for the YANS model.
create MAC layers for a ns3::WifiNetDevice.
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:35
wifi
Definition: third.py:96
Helper class used to assign positions and mobility models to nodes.
void Stop(Time stop)
Arrange for all of the Applications in this container to Stop() at the Time given as a parameter...
Ptr< WifiMac > GetMac(void) const
void SetTxopLimit(Time txopLimit)
Set the TXOP limit.
Definition: txop.cc:248
static void Stop(void)
Tell the Simulator the calling event should be the last one executed.
Definition: simulator.cc:180
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1289
AttributeValue implementation for Ssid.
Definition: ssid.h:105
void Add(Vector v)
Add a position to the list of positions.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1305
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
Definition: log.h:257
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
wifiStaNodes
Definition: third.py:88
Include Radiotap link layer information.
Definition: wifi-helper.h:180
void GetAttribute(std::string name, AttributeValue &value) const
Get the value of an attribute, raising fatal errors if unsuccessful.
Definition: object-base.cc:223
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Definition: callback.h:1642
Ptr< Application > Get(uint32_t i) const
Get the Ptr<Application> stored in this container at a given index.