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 }
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition: net-device-container.h:42
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
ns3::InetSocketAddress
an Inet address class
Definition: inet-socket-address.h:41
ns3::ApplicationContainer::Get
Ptr< Application > Get(uint32_t i) const
Get the Ptr<Application> stored in this container at a given index.
Definition: application-container.cc:62
ns3::YansWifiChannelHelper::Default
static YansWifiChannelHelper Default(void)
Create a channel helper in a default working state.
Definition: yans-wifi-helper.cc:41
ns3::YansWifiPhyHelper
Make it easy to create and manage PHY objects for the YANS model.
Definition: yans-wifi-helper.h:161
ns3::CommandLine
Parse command-line arguments.
Definition: command-line.h:228
ns3::ListPositionAllocator::Add
void Add(Vector v)
Add a position to the list of positions.
Definition: position-allocator.cc:70
ns3::BooleanValue
AttributeValue implementation for Boolean.
Definition: boolean.h:37
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::ApplicationContainer::Stop
void Stop(Time stop)
Arrange for all of the Applications in this container to Stop() at the Time given as a parameter.
Definition: application-container.cc:107
ns3::WifiHelper
helps to create WifiNetDevice objects
Definition: wifi-helper.h:327
ns3::Ipv4AddressHelper
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Definition: ipv4-address-helper.h:48
ns3::MicroSeconds
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1305
third.channel
channel
Definition: third.py:92
TxopDurationTracer
Keeps the maximum duration among all TXOPs.
Definition: wifi-80211e-txop.cc:72
ns3::PointerValue
Hold objects of type Ptr<T>.
Definition: pointer.h:37
ns3::WifiPhyHelper::DLT_IEEE802_11_RADIO
@ DLT_IEEE802_11_RADIO
Include Radiotap link layer information.
Definition: wifi-helper.h:180
third.mac
mac
Definition: third.py:99
TxopDurationTracer::Trace
void Trace(Time startTime, Time duration)
Definition: wifi-80211e-txop.cc:78
ns3::NodeContainer::Create
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Definition: node-container.cc:98
ns3::SsidValue
AttributeValue implementation for Ssid.
Definition: ssid.h:105
ns3::Ssid
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:36
ns3::UdpServerHelper
Create a server application which waits for input UDP packets and uses the information carried into t...
Definition: udp-client-server-helper.h:38
startTime
double startTime
Definition: tcp-nsc-comparison.cc:45
third.wifi
wifi
Definition: third.py:96
ns3::Ptr< NetDevice >
first.stack
stack
Definition: first.py:41
ns3::Simulator::Stop
static void Stop(void)
Tell the Simulator the calling event should be the last one executed.
Definition: simulator.cc:180
ns3::ObjectBase::GetAttribute
void GetAttribute(std::string name, AttributeValue &value) const
Get the value of an attribute, raising fatal errors if unsuccessful.
Definition: object-base.cc:223
ns3::OnOffHelper
A helper to make it easier to instantiate an ns3::OnOffApplication on a set of nodes.
Definition: on-off-helper.h:43
ns3::Node::GetDevice
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
Definition: node.cc:144
ns3::Ipv4InterfaceContainer
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Definition: ipv4-interface-container.h:55
ns3::PointerValue::Get
Ptr< T > Get(void) const
Definition: pointer.h:201
ns3::NodeContainer::Get
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
Definition: node-container.cc:93
first.address
address
Definition: first.py:44
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
second.cmd
cmd
Definition: second.py:35
ns3::QosTxop
Handle packet fragmentation and retransmissions for QoS data frames as well as MSDU aggregation (A-MS...
Definition: qos-txop.h:75
ns3::MakeCallback
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
ns3::Simulator::Run
static void Run(void)
Run the simulation.
Definition: simulator.cc:172
ns3::StringValue
Hold variables of type string.
Definition: string.h:41
NS_LOG_ERROR
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
Definition: log.h:257
ns3::ApplicationContainer::Start
void Start(Time start)
Arrange for all of the Applications in this container to Start() at the Time given as a parameter.
Definition: application-container.cc:87
ns3::Seconds
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1289
ns3::Simulator::Destroy
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
Definition: simulator.cc:136
ns3::ApplicationContainer
holds a vector of ns3::Application pointers.
Definition: application-container.h:43
third.ssid
ssid
Definition: third.py:100
ns3::Txop::SetTxopLimit
void SetTxopLimit(Time txopLimit)
Set the TXOP limit.
Definition: txop.cc:249
ns3::NodeContainer
keep track of a set of node pointers.
Definition: node-container.h:39
third.wifiStaNodes
wifiStaNodes
Definition: third.py:88
ns3::Ipv4InterfaceContainer::GetAddress
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
Definition: ipv4-interface-container.cc:59
ns3::UintegerValue
Hold an unsigned integer type.
Definition: uinteger.h:44
ns3::YansWifiChannelHelper
manage and create wifi channel objects for the YANS model.
Definition: yans-wifi-helper.h:37
ns3::WifiMacHelper
create MAC layers for a ns3::WifiNetDevice.
Definition: wifi-mac-helper.h:48
ns3::ObjectBase::TraceConnectWithoutContext
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context.
Definition: object-base.cc:293
ns3::InternetStackHelper
aggregate IP/TCP/UDP functionality to existing Nodes.
Definition: internet-stack-helper.h:88
ns3::NetDeviceContainer::Get
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
Definition: net-device-container.cc:62
ns3::MobilityHelper
Helper class used to assign positions and mobility models to nodes.
Definition: mobility-helper.h:43
third.mobility
mobility
Definition: third.py:108
third.phy
phy
Definition: third.py:93
enablePcap
bool enablePcap
Definition: tcp-nsc-comparison.cc:48
port
uint16_t port
Definition: dsdv-manet.cc:45
ns3::WifiNetDevice::GetMac
Ptr< WifiMac > GetMac(void) const
Definition: wifi-net-device.cc:201