A Discrete-Event Network Simulator
API
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/core-module.h"
22 #include "ns3/network-module.h"
23 #include "ns3/applications-module.h"
24 #include "ns3/wifi-module.h"
25 #include "ns3/mobility-module.h"
26 #include "ns3/internet-module.h"
27 
28 // This is an example that illustrates 802.11 QoS for different Access Categories.
29 // It defines 4 independant Wi-Fi networks (working on different logical channels
30 // on the same "ns3::YansWifiPhy" channel object).
31 // Each network contains one access point and one station. Each station continuously
32 // transmits data packets to its respective AP.
33 //
34 // Network topology (numbers in parentheses are channel numbers):
35 //
36 // BSS A (36) BSS B (40) BSS C (44) BSS D (48)
37 // * * * * * * * *
38 // | | | | | | | |
39 // AP A STA A AP B STA B AP C STA C AP D STA D
40 //
41 // The configuration is the following on the 4 networks:
42 // - STA A sends AC_BE traffic to AP A with default AC_BE TXOP value of 0 (1 MSDU);
43 // - STA B sends AC_BE traffic to AP B with non-default AC_BE TXOP of 3.008 ms;
44 // - STA C sends AC_VI traffic to AP C with default AC_VI TXOP of 3.008 ms;
45 // - STA D sends AC_VI traffic to AP D with non-default AC_VI TXOP value of 0 (1 MSDU);
46 //
47 // The user can select the distance between the stations and the APs, can enable/disable the RTS/CTS mechanism
48 // and can choose the payload size and the simulation duration.
49 // Example: ./waf --run "80211e-txop --distance=10 --enableRts=0 --simulationTime=20 --payloadSize=1000"
50 //
51 // The output prints the throughput measured for the 4 cases/networks decribed above. When TXOP is enabled, results show
52 // increased throughput since the channel is granted for a longer duration. TXOP is enabled by default for AC_VI and AC_VO,
53 // so that they can use the channel for a longer duration than AC_BE and AC_BK.
54 
55 using namespace ns3;
56 
57 NS_LOG_COMPONENT_DEFINE ("80211eTxop");
58 
59 int main (int argc, char *argv[])
60 {
61  uint32_t payloadSize = 1472; //bytes
62  uint64_t simulationTime = 10; //seconds
63  double distance = 5; //meters
64  bool enablePcap = 0;
65  bool verifyResults = 0; //used for regression
66 
68  cmd.AddValue ("payloadSize", "Payload size in bytes", payloadSize);
69  cmd.AddValue ("simulationTime", "Simulation time in seconds", simulationTime);
70  cmd.AddValue ("distance", "Distance in meters between the station and the access point", distance);
71  cmd.AddValue ("enablePcap", "Enable/disable pcap file generation", enablePcap);
72  cmd.AddValue ("verifyResults", "Enable/disable results verification at the end of the simulation", verifyResults);
73  cmd.Parse (argc, argv);
74 
76  wifiStaNodes.Create (4);
77  NodeContainer wifiApNodes;
78  wifiApNodes.Create (4);
79 
83  phy.SetChannel (channel.Create ());
84 
85  WifiHelper wifi; //the default standard of 802.11a will be selected by this helper since the program doesn't specify another one
86  wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
88 
89  NetDeviceContainer staDeviceA, staDeviceB, staDeviceC, staDeviceD, apDeviceA, apDeviceB, apDeviceC, apDeviceD;
90  Ssid ssid;
91 
92  //Network A
93  ssid = Ssid ("network-A");
94  phy.Set ("ChannelNumber", UintegerValue (36));
95  mac.SetType ("ns3::StaWifiMac",
96  "QosSupported", BooleanValue (true),
97  "Ssid", SsidValue (ssid));
98  staDeviceA = wifi.Install (phy, mac, wifiStaNodes.Get (0));
99 
100  mac.SetType ("ns3::ApWifiMac",
101  "QosSupported", BooleanValue (true),
102  "Ssid", SsidValue (ssid),
103  "EnableBeaconJitter", BooleanValue (false));
104  apDeviceA = wifi.Install (phy, mac, wifiApNodes.Get (0));
105 
106  //Network B
107  ssid = Ssid ("network-B");
108  phy.Set ("ChannelNumber", UintegerValue (40));
109  mac.SetType ("ns3::StaWifiMac",
110  "QosSupported", BooleanValue (true),
111  "Ssid", SsidValue (ssid));
112 
113  staDeviceB = wifi.Install (phy, mac, wifiStaNodes.Get (1));
114 
115  mac.SetType ("ns3::ApWifiMac",
116  "QosSupported", BooleanValue (true),
117  "Ssid", SsidValue (ssid),
118  "EnableBeaconJitter", BooleanValue (false));
119  apDeviceB = wifi.Install (phy, mac, wifiApNodes.Get (1));
120 
121  //Modify EDCA configuration (TXOP limit) for AC_BE
122  Ptr<NetDevice> dev = wifiApNodes.Get (1)->GetDevice (0);
123  Ptr<WifiNetDevice> wifi_dev = DynamicCast<WifiNetDevice> (dev);
124  Ptr<WifiMac> wifi_mac = wifi_dev->GetMac ();
125  PointerValue ptr;
126  Ptr<EdcaTxopN> edca;
127  wifi_mac->GetAttribute ("BE_EdcaTxopN", ptr);
128  edca = ptr.Get<EdcaTxopN> ();
129  edca->SetTxopLimit (MicroSeconds (3008));
130 
131  //Network C
132  ssid = Ssid ("network-C");
133  phy.Set ("ChannelNumber", UintegerValue (44));
134  mac.SetType ("ns3::StaWifiMac",
135  "QosSupported", BooleanValue (true),
136  "Ssid", SsidValue (ssid));
137 
138  staDeviceC = wifi.Install (phy, mac, wifiStaNodes.Get (2));
139 
140  mac.SetType ("ns3::ApWifiMac",
141  "QosSupported", BooleanValue (true),
142  "Ssid", SsidValue (ssid),
143  "EnableBeaconJitter", BooleanValue (false));
144  apDeviceC = wifi.Install (phy, mac, wifiApNodes.Get (2));
145 
146  //Network D
147  ssid = Ssid ("network-D");
148  phy.Set ("ChannelNumber", UintegerValue (48));
149  mac.SetType ("ns3::StaWifiMac",
150  "QosSupported", BooleanValue (true),
151  "Ssid", SsidValue (ssid));
152 
153  staDeviceD = wifi.Install (phy, mac, wifiStaNodes.Get (3));
154 
155  mac.SetType ("ns3::ApWifiMac",
156  "QosSupported", BooleanValue (true),
157  "Ssid", SsidValue (ssid),
158  "EnableBeaconJitter", BooleanValue (false));
159  apDeviceD = wifi.Install (phy, mac, wifiApNodes.Get (3));
160 
161  //Modify EDCA configuration (TXOP limit) for AC_VO
162  dev = wifiApNodes.Get (3)->GetDevice (0);
163  wifi_dev = DynamicCast<WifiNetDevice> (dev);
164  wifi_mac = wifi_dev->GetMac ();
165  wifi_mac->GetAttribute ("VI_EdcaTxopN", ptr);
166  edca = ptr.Get<EdcaTxopN> ();
167  edca->SetTxopLimit (MicroSeconds (0));
168 
169  /* Setting mobility model */
171  Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
172  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
173 
174  //Set position for APs
175  positionAlloc->Add (Vector (0.0, 0.0, 0.0));
176  positionAlloc->Add (Vector (10.0, 0.0, 0.0));
177  positionAlloc->Add (Vector (20.0, 0.0, 0.0));
178  positionAlloc->Add (Vector (30.0, 0.0, 0.0));
179  //Set position for STAs
180  positionAlloc->Add (Vector (distance, 0.0, 0.0));
181  positionAlloc->Add (Vector (10 + distance, 0.0, 0.0));
182  positionAlloc->Add (Vector (20 + distance, 0.0, 0.0));
183  positionAlloc->Add (Vector (30 + distance, 0.0, 0.0));
184  //Remark: while we set these positions 10 meters apart, the networks do not interact
185  //and the only variable that affects transmission performance is the distance.
186 
187  mobility.SetPositionAllocator (positionAlloc);
188  mobility.Install (wifiApNodes);
189  mobility.Install (wifiStaNodes);
190 
191  /* Internet stack */
193  stack.Install (wifiApNodes);
194  stack.Install (wifiStaNodes);
195 
197  address.SetBase ("192.168.1.0", "255.255.255.0");
198  Ipv4InterfaceContainer StaInterfaceA;
199  StaInterfaceA = address.Assign (staDeviceA);
200  Ipv4InterfaceContainer ApInterfaceA;
201  ApInterfaceA = address.Assign (apDeviceA);
202 
203  address.SetBase ("192.168.2.0", "255.255.255.0");
204  Ipv4InterfaceContainer StaInterfaceB;
205  StaInterfaceB = address.Assign (staDeviceB);
206  Ipv4InterfaceContainer ApInterfaceB;
207  ApInterfaceB = address.Assign (apDeviceB);
208 
209  address.SetBase ("192.168.3.0", "255.255.255.0");
210  Ipv4InterfaceContainer StaInterfaceC;
211  StaInterfaceC = address.Assign (staDeviceC);
212  Ipv4InterfaceContainer ApInterfaceC;
213  ApInterfaceC = address.Assign (apDeviceC);
214 
215  address.SetBase ("192.168.4.0", "255.255.255.0");
216  Ipv4InterfaceContainer StaInterfaceD;
217  StaInterfaceD = address.Assign (staDeviceD);
218  Ipv4InterfaceContainer ApInterfaceD;
219  ApInterfaceD = address.Assign (apDeviceD);
220 
221  /* Setting applications */
222  uint16_t port = 5001;
223  UdpServerHelper serverA (port);
224  ApplicationContainer serverAppA = serverA.Install (wifiApNodes.Get (0));
225  serverAppA.Start (Seconds (0.0));
226  serverAppA.Stop (Seconds (simulationTime + 1));
227 
228  InetSocketAddress destA (ApInterfaceA.GetAddress (0), port);
229  destA.SetTos (0x70); //AC_BE
230 
231  OnOffHelper clientA ("ns3::UdpSocketFactory", destA);
232  clientA.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
233  clientA.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
234  clientA.SetAttribute ("DataRate", StringValue ("100000kb/s"));
235  clientA.SetAttribute ("PacketSize", UintegerValue (payloadSize));
236 
237  ApplicationContainer clientAppA = clientA.Install (wifiStaNodes.Get (0));
238  clientAppA.Start (Seconds (1.0));
239  clientAppA.Stop (Seconds (simulationTime + 1));
240 
241  UdpServerHelper serverB (port);
242  ApplicationContainer serverAppB = serverB.Install (wifiApNodes.Get (1));
243  serverAppB.Start (Seconds (0.0));
244  serverAppB.Stop (Seconds (simulationTime + 1));
245 
246  InetSocketAddress destB (ApInterfaceB.GetAddress (0), port);
247  destB.SetTos (0x70); //AC_BE
248 
249  OnOffHelper clientB ("ns3::UdpSocketFactory", destB);
250  clientB.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
251  clientB.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
252  clientB.SetAttribute ("DataRate", StringValue ("100000kb/s"));
253  clientB.SetAttribute ("PacketSize", UintegerValue (payloadSize));
254 
255  ApplicationContainer clientAppB = clientB.Install (wifiStaNodes.Get (1));
256  clientAppB.Start (Seconds (1.0));
257  clientAppB.Stop (Seconds (simulationTime + 1));
258 
259  UdpServerHelper serverC (port);
260  ApplicationContainer serverAppC = serverC.Install (wifiApNodes.Get (2));
261  serverAppC.Start (Seconds (0.0));
262  serverAppC.Stop (Seconds (simulationTime + 1));
263 
264  InetSocketAddress destC (ApInterfaceC.GetAddress (0), port);
265  destC.SetTos (0xb8); //AC_VI
266 
267  OnOffHelper clientC ("ns3::UdpSocketFactory", destC);
268  clientC.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
269  clientC.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
270  clientC.SetAttribute ("DataRate", StringValue ("100000kb/s"));
271  clientC.SetAttribute ("PacketSize", UintegerValue (payloadSize));
272 
273  ApplicationContainer clientAppC = clientC.Install (wifiStaNodes.Get (2));
274  clientAppC.Start (Seconds (1.0));
275  clientAppC.Stop (Seconds (simulationTime + 1));
276 
277  UdpServerHelper serverD (port);
278  ApplicationContainer serverAppD = serverD.Install (wifiApNodes.Get (3));
279  serverAppD.Start (Seconds (0.0));
280  serverAppD.Stop (Seconds (simulationTime + 1));
281 
282  InetSocketAddress destD (ApInterfaceD.GetAddress (0), port);
283  destD.SetTos (0xb8); //AC_VI
284 
285  OnOffHelper clientD ("ns3::UdpSocketFactory", destD);
286  clientD.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
287  clientD.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
288  clientD.SetAttribute ("DataRate", StringValue ("100000kb/s"));
289  clientD.SetAttribute ("PacketSize", UintegerValue (payloadSize));
290 
291  ApplicationContainer clientAppD = clientD.Install (wifiStaNodes.Get (3));
292  clientAppD.Start (Seconds (1.0));
293  clientAppD.Stop (Seconds (simulationTime + 1));
294 
295  if (enablePcap)
296  {
297  phy.EnablePcap ("AP_A", apDeviceA.Get (0));
298  phy.EnablePcap ("STA_A", staDeviceA.Get (0));
299  phy.EnablePcap ("AP_B", apDeviceB.Get (0));
300  phy.EnablePcap ("STA_B", staDeviceB.Get (0));
301  phy.EnablePcap ("AP_C", apDeviceC.Get (0));
302  phy.EnablePcap ("STA_C", staDeviceC.Get (0));
303  phy.EnablePcap ("AP_D", apDeviceD.Get (0));
304  phy.EnablePcap ("STA_D", staDeviceD.Get (0));
305  }
306 
307  Simulator::Stop (Seconds (simulationTime + 1));
308  Simulator::Run ();
310 
311  /* Show results */
312  uint32_t totalPacketsThrough = DynamicCast<UdpServer> (serverAppA.Get (0))->GetReceived ();
313  double throughput = totalPacketsThrough * payloadSize * 8 / (simulationTime * 1000000.0);
314  std::cout << "Throughput for AC_BE with default TXOP limit (0ms): " << throughput << " Mbit/s" << '\n';
315  if (verifyResults && (throughput < 28 || throughput > 29))
316  {
317  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
318  exit (1);
319  }
320 
321  totalPacketsThrough = DynamicCast<UdpServer> (serverAppB.Get (0))->GetReceived ();
322  throughput = totalPacketsThrough * payloadSize * 8 / (simulationTime * 1000000.0);
323  std::cout << "Throughput for AC_BE with non-default TXOP limit (3.008ms): " << throughput << " Mbit/s" << '\n';
324  if (verifyResults && (throughput < 35.5 || throughput > 36.5))
325  {
326  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
327  exit (1);
328  }
329 
330  totalPacketsThrough = DynamicCast<UdpServer> (serverAppC.Get (0))->GetReceived ();
331  throughput = totalPacketsThrough * payloadSize * 8 / (simulationTime * 1000000.0);
332  std::cout << "Throughput for AC_VI with default TXOP limit (3.008ms): " << throughput << " Mbit/s" << '\n';
333  if (verifyResults && (throughput < 36 || throughput > 37))
334  {
335  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
336  exit (1);
337  }
338 
339  totalPacketsThrough = DynamicCast<UdpServer> (serverAppD.Get (0))->GetReceived ();
340  throughput = totalPacketsThrough * payloadSize * 8 / (simulationTime * 1000000.0);
341  std::cout << "Throughput for AC_VI with non-default TXOP limit (0ms): " << throughput << " Mbit/s" << '\n';
342  if (verifyResults && (throughput < 31.5 || throughput > 32.5))
343  {
344  NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
345  exit (1);
346  }
347 
348  return 0;
349 }
tuple channel
Definition: third.py:85
void Set(std::string name, const AttributeValue &v)
Definition: wifi-helper.cc:132
holds a vector of ns3::Application pointers.
Ptr< T > Get(void) const
Definition: pointer.h:194
an Inet address class
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
AttributeValue implementation for Boolean.
Definition: boolean.h:36
holds a vector of std::pair of Ptr and interface index.
Ptr< YansWifiChannel > Create(void) const
void SetRemoteStationManager(std::string type, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
Definition: wifi-helper.cc:719
Hold variables of type string.
Definition: string.h:41
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
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.
bool enablePcap
static void Run(void)
Run the simulation.
Definition: simulator.cc:226
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:201
aggregate IP/TCP/UDP functionality to existing Nodes.
static YansWifiPhyHelper Default(void)
Create a phy helper in a default working state.
helps to create WifiNetDevice objects
Definition: wifi-helper.h:213
A helper to make it easier to instantiate an ns3::OnOffApplication on a set of nodes.
Definition: on-off-helper.h:42
tuple cmd
Definition: second.py:35
void SetPcapDataLinkType(enum SupportedPcapDataLinkTypes dlt)
Set the data link type of PCAP traces to be used.
Definition: wifi-helper.cc:566
uint16_t port
Definition: dsdv-manet.cc:44
void SetChannel(Ptr< YansWifiChannel > channel)
This queue contains packets for a particular access class.
Definition: edca-txop-n.h:68
void Install(Ptr< Node > node) const
"Layout" a single node according to the current position allocator type.
tuple mobility
Definition: third.py:101
tuple phy
Definition: third.py:86
Hold an unsigned integer type.
Definition: uinteger.h:44
holds a vector of ns3::NetDevice pointers
Create a server application which waits for input UDP packets and uses the information carried into t...
virtual NetDeviceContainer Install(const WifiPhyHelper &phy, const WifiMacHelper &mac, NodeContainer::Iterator first, NodeContainer::Iterator last) const
Definition: wifi-helper.cc:748
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
Definition: node.cc:142
tuple mac
Definition: third.py:92
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:205
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
Definition: simulator.cc:190
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
Ptr< Application > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
Hold objects of type Ptr.
Definition: pointer.h:36
void SetMobilityModel(std::string type, std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue())
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
tuple ssid
Definition: third.py:93
manage and create wifi channel objects for the yans model.
void GetAttribute(std::string name, AttributeValue &value) const
Get the value of an attribute, raising fatal errors if unsuccessful.
Definition: object-base.cc:223
create MAC layers for a ns3::WifiNetDevice.
tuple stack
Definition: first.py:34
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:35
virtual void SetType(std::string type, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue(), std::string n10="", const AttributeValue &v10=EmptyAttributeValue())
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...
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
void SetTxopLimit(Time txopLimit)
Set the TXOP limit.
Definition: dca-txop.cc:188
void AddValue(const std::string &name, const std::string &help, T &value)
Add a program argument, assigning to POD.
Definition: command-line.h:498
static void Stop(void)
Tell the Simulator the calling event should be the last one executed.
Definition: simulator.cc:234
Ptr< Node > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:993
AttributeValue implementation for Ssid.
Definition: ssid.h:117
void Add(Vector v)
Add a position to the list of positions.
Ptr< WifiMac > GetMac(void) const
void Parse(int argc, char *argv[])
Parse the program arguments.
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:1009
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
Definition: log.h:253
tuple wifi
Definition: third.py:89
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
tuple address
Definition: first.py:37
void EnablePcap(std::string prefix, Ptr< NetDevice > nd, bool promiscuous=false, bool explicitFilename=false)
Enable pcap output the indicated net device.
void SetPositionAllocator(Ptr< PositionAllocator > allocator)
Set the position allocator which will be used to allocate the initial position of every node initiali...
Include Radiotap link layer information.
Definition: wifi-helper.h:111
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
tuple wifiStaNodes
Definition: third.py:81