A Discrete-Event Network Simulator
API
wifi-phy-configuration.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2016 Tom Henderson
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: Tom Henderson <tomh@tomh.org>
19  */
20 
21 // This example shows (and tests) some possible configurations for
22 // the Wi-Fi physical layer, particularly the interaction between
23 // WifiHelper.SetStandard () and the physical layer channel number,
24 // center frequency, and channel width.
25 
26 #include "ns3/log.h"
27 #include "ns3/command-line.h"
28 #include "ns3/config-store.h"
29 #include "ns3/config.h"
30 #include "ns3/boolean.h"
31 #include "ns3/uinteger.h"
32 #include "ns3/string.h"
33 #include "ns3/ssid.h"
34 #include "ns3/yans-wifi-phy.h"
35 #include "ns3/yans-wifi-helper.h"
36 #include "ns3/wifi-net-device.h"
37 
38 using namespace ns3;
39 
40 NS_LOG_COMPONENT_DEFINE ("WifiPhyConfigurationExample");
41 
44 {
45  Ptr<WifiNetDevice> wnd = nc.Get (0)->GetObject<WifiNetDevice> ();
46  Ptr<WifiPhy> wp = wnd->GetPhy ();
47  return wp->GetObject<YansWifiPhy> ();
48 }
49 
50 void
52 {
53  if (enabled)
54  {
55  ConfigStore outputConfig;
56  outputConfig.ConfigureAttributes ();
57  }
58 }
59 
60 int main (int argc, char *argv[])
61 {
62  uint32_t testCase = 0;
63  bool printAttributes = false;
64 
65  CommandLine cmd (__FILE__);
66  cmd.AddValue ("testCase", "Test case", testCase);
67  cmd.AddValue ("printAttributes", "If true, print out attributes", printAttributes);
68  cmd.Parse (argc, argv);
69 
70  NodeContainer wifiStaNode;
71  wifiStaNode.Create (1);
73  wifiApNode.Create (1);
74 
77  phy.SetChannel (channel.Create ());
79  wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
80 
81  // Configure and declare other generic components of this example
82  Ssid ssid;
83  ssid = Ssid ("wifi-phy-configuration");
84  WifiMacHelper macSta;
85  macSta.SetType ("ns3::StaWifiMac",
86  "Ssid", SsidValue (ssid),
87  "ActiveProbing", BooleanValue (false));
88  WifiMacHelper macAp;
89  macAp.SetType ("ns3::ApWifiMac",
90  "Ssid", SsidValue (ssid),
91  "BeaconInterval", TimeValue (MicroSeconds (102400)),
92  "BeaconGeneration", BooleanValue (true));
93  NetDeviceContainer staDevice;
94  NetDeviceContainer apDevice;
95  Ptr<YansWifiPhy> phySta;
96  Config::SetDefault ("ns3::ConfigStore::Filename", StringValue ("output-attributes-" + std::to_string (testCase) + ".txt"));
97  Config::SetDefault ("ns3::ConfigStore::FileFormat", StringValue ("RawText"));
98  Config::SetDefault ("ns3::ConfigStore::Mode", StringValue ("Save"));
99 
100  switch (testCase)
101  {
102  case 0:
103  // Default configuration, without WifiHelper::SetStandard or WifiHelper
104  phySta = CreateObject<YansWifiPhy> ();
105  // The default results in an invalid configuration of channel 0,
106  // width 20, and frequency 0 MHz
107  NS_ASSERT (phySta->GetChannelNumber () == 0);
108  NS_ASSERT (phySta->GetChannelWidth () == 20);
109  NS_ASSERT (phySta->GetFrequency () == 0);
110  PrintAttributesIfEnabled (printAttributes);
111  break;
112 
113  // The following cases test the setting of WifiPhyStandard alone;
114  // i.e. without further channel number/width/frequency configuration
115 
116  case 1:
117  // By default, WifiHelper will use WIFI_STANDARD_80211a
118  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
119  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
120  phySta = GetYansWifiPhyPtr (staDevice);
121  // We expect channel 36, width 20, frequency 5180
122  NS_ASSERT (phySta->GetChannelNumber () == 36);
123  NS_ASSERT (phySta->GetChannelWidth () == 20);
124  NS_ASSERT (phySta->GetFrequency () == 5180);
125  PrintAttributesIfEnabled (printAttributes);
126  break;
127  case 2:
128  wifi.SetStandard (WIFI_STANDARD_80211b);
129  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
130  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
131  phySta = GetYansWifiPhyPtr (staDevice);
132  // We expect channel 1, width 22, frequency 2412
133  NS_ASSERT (phySta->GetChannelNumber () == 1);
134  NS_ASSERT (phySta->GetChannelWidth () == 22);
135  NS_ASSERT (phySta->GetFrequency () == 2412);
136  PrintAttributesIfEnabled (printAttributes);
137  break;
138  case 3:
139  wifi.SetStandard (WIFI_STANDARD_80211g);
140  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
141  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
142  phySta = GetYansWifiPhyPtr (staDevice);
143  // We expect channel 1, width 20, frequency 2412
144  NS_ASSERT (phySta->GetChannelNumber () == 1);
145  NS_ASSERT (phySta->GetChannelWidth () == 20);
146  NS_ASSERT (phySta->GetFrequency () == 2412);
147  PrintAttributesIfEnabled (printAttributes);
148  break;
149  case 4:
150  wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
151  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
152  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
153  phySta = GetYansWifiPhyPtr (staDevice);
154  // We expect channel 36, width 20, frequency 5180
155  NS_ASSERT (phySta->GetChannelNumber () == 36);
156  NS_ASSERT (phySta->GetChannelWidth () == 20);
157  NS_ASSERT (phySta->GetFrequency () == 5180);
158  PrintAttributesIfEnabled (printAttributes);
159  break;
160  case 5:
161  wifi.SetStandard (WIFI_STANDARD_80211n_2_4GHZ);
162  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
163  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
164  phySta = GetYansWifiPhyPtr (staDevice);
165  // We expect channel 1, width 20, frequency 2412
166  NS_ASSERT (phySta->GetChannelNumber () == 1);
167  NS_ASSERT (phySta->GetChannelWidth () == 20);
168  NS_ASSERT (phySta->GetFrequency () == 2412);
169  PrintAttributesIfEnabled (printAttributes);
170  break;
171  case 6:
172  wifi.SetStandard (WIFI_STANDARD_80211ac);
173  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
174  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
175  phySta = GetYansWifiPhyPtr (staDevice);
176  // We expect channel 42, width 80, frequency 5210
177  NS_ASSERT (phySta->GetChannelNumber () == 42);
178  NS_ASSERT (phySta->GetChannelWidth () == 80);
179  NS_ASSERT (phySta->GetFrequency () == 5210);
180  PrintAttributesIfEnabled (printAttributes);
181  break;
182  case 7:
183  wifi.SetStandard (WIFI_STANDARD_80211ax_2_4GHZ);
184  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
185  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
186  phySta = GetYansWifiPhyPtr (staDevice);
187  // We expect channel 1, width 20, frequency 2412
188  NS_ASSERT (phySta->GetChannelNumber () == 1);
189  NS_ASSERT (phySta->GetChannelWidth () == 20);
190  NS_ASSERT (phySta->GetFrequency () == 2412);
191  PrintAttributesIfEnabled (printAttributes);
192  break;
193  case 8:
194  wifi.SetStandard (WIFI_STANDARD_80211ax_5GHZ);
195  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
196  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
197  phySta = GetYansWifiPhyPtr (staDevice);
198  // We expect channel 42, width 80, frequency 5210
199  NS_ASSERT (phySta->GetChannelNumber () == 42);
200  NS_ASSERT (phySta->GetChannelWidth () == 80);
201  NS_ASSERT (phySta->GetFrequency () == 5210);
202  PrintAttributesIfEnabled (printAttributes);
203  break;
204  case 9:
205  wifi.SetStandard (WIFI_STANDARD_80211ax_6GHZ);
206  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
207  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
208  phySta = GetYansWifiPhyPtr (staDevice);
209  // We expect channel 7, width 80, frequency 5975
210  NS_ASSERT (phySta->GetChannelNumber () == 7);
211  NS_ASSERT (phySta->GetChannelWidth () == 80);
212  NS_ASSERT (phySta->GetFrequency () == 5975);
213  PrintAttributesIfEnabled (printAttributes);
214  break;
215  case 10:
216  wifi.SetStandard (WIFI_STANDARD_80211p);
217  phy.Set ("ChannelWidth", UintegerValue (10));
218  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
219  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
220  phySta = GetYansWifiPhyPtr (staDevice);
221  // We expect channel 172, width 10, frequency 5860
222  NS_ASSERT (phySta->GetChannelNumber () == 172);
223  NS_ASSERT (phySta->GetChannelWidth () == 10);
224  NS_ASSERT (phySta->GetFrequency () == 5860);
225  PrintAttributesIfEnabled (printAttributes);
226  break;
227  case 11:
228  wifi.SetStandard (WIFI_STANDARD_80211p);
229  phy.Set ("ChannelWidth", UintegerValue (5));
230  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
231  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
232  phySta = GetYansWifiPhyPtr (staDevice);
233  // We expect channel 171, width 5, frequency 5860
234  NS_ASSERT (phySta->GetChannelNumber () == 171);
235  NS_ASSERT (phySta->GetChannelWidth () == 5);
236  NS_ASSERT (phySta->GetFrequency () == 5860);
237  PrintAttributesIfEnabled (printAttributes);
238  break;
239  case 12:
240  wifi.SetStandard (WIFI_STANDARD_holland);
241  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
242  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
243  phySta = GetYansWifiPhyPtr (staDevice);
244  // We expect channel 36, width 20, frequency 5180
245  NS_ASSERT (phySta->GetChannelNumber () == 36);
246  NS_ASSERT (phySta->GetChannelWidth () == 20);
247  NS_ASSERT (phySta->GetFrequency () == 5180);
248  PrintAttributesIfEnabled (printAttributes);
249  break;
250  case 13:
251  wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
252  phy.Set ("ChannelNumber", UintegerValue (44));
253  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
254  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
255  phySta = GetYansWifiPhyPtr (staDevice);
256  // We expect channel 44, width 20, frequency 5220
257  NS_ASSERT (phySta->GetChannelNumber () == 44);
258  NS_ASSERT (phySta->GetChannelWidth () == 20);
259  NS_ASSERT (phySta->GetFrequency () == 5220);
260  PrintAttributesIfEnabled (printAttributes);
261  break;
262  case 14:
263  wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
264  phy.Set ("ChannelNumber", UintegerValue (44));
265  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
266  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
267  phySta = GetYansWifiPhyPtr (staDevice);
268  // Post-install reconfiguration to channel number 40
269  Config::Set ("/NodeList/0/DeviceList/*/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/ChannelNumber", UintegerValue (40));
270  Config::Set ("/NodeList/1/DeviceList/*/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/ChannelNumber", UintegerValue (40));
271  // We expect channel 40, width 20, frequency 5200
272  NS_ASSERT (phySta->GetChannelNumber () == 40);
273  NS_ASSERT (phySta->GetChannelWidth () == 20);
274  NS_ASSERT (phySta->GetFrequency () == 5200);
275  PrintAttributesIfEnabled (printAttributes);
276  break;
277  case 15:
278  wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
279  phy.Set ("ChannelNumber", UintegerValue (44));
280  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
281  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
282  phySta = GetYansWifiPhyPtr (staDevice);
283  // Post-install reconfiguration to channel width 40 MHz
284  Config::Set ("/NodeList/0/DeviceList/*/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/ChannelWidth", UintegerValue (40));
285  Config::Set ("/NodeList/1/DeviceList/*/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/ChannelWidth", UintegerValue (40));
286  // Although channel 44 is configured originally for 20 MHz, we
287  // allow it to be used for 40 MHz here
288  NS_ASSERT (phySta->GetChannelNumber () == 44);
289  NS_ASSERT (phySta->GetChannelWidth () == 40);
290  NS_ASSERT (phySta->GetFrequency () == 5220);
291  PrintAttributesIfEnabled (printAttributes);
292  break;
293  case 16:
294  Config::SetDefault ("ns3::WifiPhy::ChannelNumber", UintegerValue (44));
295  wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
296  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
297  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
298  phySta = GetYansWifiPhyPtr (staDevice);
299  // Post-install reconfiguration to channel width 40 MHz
300  Config::Set ("/NodeList/0/DeviceList/*/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/ChannelWidth", UintegerValue (40));
301  Config::Set ("/NodeList/1/DeviceList/*/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/ChannelWidth", UintegerValue (40));
302  // Although channel 44 is configured originally for 20 MHz, we
303  // allow it to be used for 40 MHz here
304  NS_ASSERT (phySta->GetChannelNumber () == 44);
305  NS_ASSERT (phySta->GetChannelWidth () == 40);
306  NS_ASSERT (phySta->GetFrequency () == 5220);
307  PrintAttributesIfEnabled (printAttributes);
308  break;
309  case 17:
310  // Test that setting Frequency to a non-standard value will zero the
311  // channel number
312  Config::SetDefault ("ns3::WifiPhy::Frequency", UintegerValue (5281));
313  wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
314  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
315  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
316  phySta = GetYansWifiPhyPtr (staDevice);
317  // We expect channel number to be zero since frequency doesn't match
318  NS_ASSERT (phySta->GetChannelNumber () == 0);
319  NS_ASSERT (phySta->GetChannelWidth () == 20);
320  NS_ASSERT (phySta->GetFrequency () == 5281);
321  PrintAttributesIfEnabled (printAttributes);
322  break;
323  case 18:
324  // Test that setting Frequency to a standard value will set the
325  // channel number correctly
326  Config::SetDefault ("ns3::WifiPhy::Frequency", UintegerValue (5500));
327  wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
328  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
329  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
330  phySta = GetYansWifiPhyPtr (staDevice);
331  // We expect channel number to be 100 due to frequency 5500
332  NS_ASSERT (phySta->GetChannelNumber () == 100);
333  NS_ASSERT (phySta->GetChannelWidth () == 20);
334  NS_ASSERT (phySta->GetFrequency () == 5500);
335  PrintAttributesIfEnabled (printAttributes);
336  break;
337  case 19:
338  // Define a new channel number
339  wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
340  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
341  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
342  phySta = GetYansWifiPhyPtr (staDevice);
343  // This case will error exit due to invalid channel number unless
344  // we provide the DefineChannelNumber() below
346  phySta->SetAttribute ("ChannelNumber", UintegerValue (99));
347  PrintAttributesIfEnabled (printAttributes);
348  break;
349  case 20:
350  // Test how channel number behaves when frequency is non-standard
351  wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
352  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
353  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
354  phySta = GetYansWifiPhyPtr (staDevice);
355  phySta->SetAttribute ("Frequency", UintegerValue (5181));
356  // We expect channel number to be 0 due to unknown center frequency 5181
357  NS_ASSERT (phySta->GetChannelNumber () == 0);
358  NS_ASSERT (phySta->GetChannelWidth () == 20);
359  NS_ASSERT (phySta->GetFrequency () == 5181);
360  phySta->SetAttribute ("Frequency", UintegerValue (5180));
361  // We expect channel number to be 36 due to known center frequency 5180
362  NS_ASSERT (phySta->GetChannelNumber () == 36);
363  NS_ASSERT (phySta->GetChannelWidth () == 20);
364  NS_ASSERT (phySta->GetFrequency () == 5180);
365  phySta->SetAttribute ("Frequency", UintegerValue (5179));
366  // We expect channel number to be 0 due to unknown center frequency 5179
367  NS_ASSERT (phySta->GetChannelNumber () == 0);
368  NS_ASSERT (phySta->GetChannelWidth () == 20);
369  NS_ASSERT (phySta->GetFrequency () == 5179);
370  phySta->SetAttribute ("ChannelNumber", UintegerValue (36));
371  NS_ASSERT (phySta->GetChannelNumber () == 36);
372  NS_ASSERT (phySta->GetChannelWidth () == 20);
373  NS_ASSERT (phySta->GetFrequency () == 5180);
374  PrintAttributesIfEnabled (printAttributes);
375  break;
376  case 21:
377  // Set both channel and frequency to consistent values
378  wifi.SetStandard (WIFI_STANDARD_80211n_5GHZ);
379  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
380  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
381  phySta = GetYansWifiPhyPtr (staDevice);
382  phySta->SetAttribute ("Frequency", UintegerValue (5200));
383  phySta->SetAttribute ("ChannelNumber", UintegerValue (40));
384  NS_ASSERT (phySta->GetChannelNumber () == 40);
385  NS_ASSERT (phySta->GetChannelWidth () == 20);
386  NS_ASSERT (phySta->GetFrequency () == 5200);
387  // Set both channel and frequency to inconsistent values
388  phySta->SetAttribute ("Frequency", UintegerValue (5200));
389  phySta->SetAttribute ("ChannelNumber", UintegerValue (36));
390  // We expect channel number to be 36
391  NS_ASSERT (phySta->GetChannelNumber () == 36);
392  NS_ASSERT (phySta->GetChannelWidth () == 20);
393  NS_ASSERT (phySta->GetFrequency () == 5180);
394  phySta->SetAttribute ("ChannelNumber", UintegerValue (36));
395  phySta->SetAttribute ("Frequency", UintegerValue (5200));
396  // We expect channel number to be 40
397  NS_ASSERT (phySta->GetChannelNumber () == 40);
398  NS_ASSERT (phySta->GetChannelWidth () == 20);
399  NS_ASSERT (phySta->GetFrequency () == 5200);
400  phySta->SetAttribute ("Frequency", UintegerValue (5179));
401  phySta->SetAttribute ("ChannelNumber", UintegerValue (36));
402  // We expect channel number to be 36
403  NS_ASSERT (phySta->GetChannelNumber () == 36);
404  NS_ASSERT (phySta->GetChannelWidth () == 20);
405  NS_ASSERT (phySta->GetFrequency () == 5180);
406  phySta->SetAttribute ("ChannelNumber", UintegerValue (36));
407  phySta->SetAttribute ("Frequency", UintegerValue (5179));
408  // We expect channel number to be 0
409  NS_ASSERT (phySta->GetChannelNumber () == 0);
410  NS_ASSERT (phySta->GetChannelWidth () == 20);
411  NS_ASSERT (phySta->GetFrequency () == 5179);
412  PrintAttributesIfEnabled (printAttributes);
413  break;
414  default:
415  std::cerr << "Invalid testcase number " << testCase << std::endl;
416  exit (1);
417  break;
418  }
419 
420  // No need to Simulator::Run (); this is a configuration example
422 }
Introspection did not find any typical Config paths.
Definition: config-store.h:59
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
AttributeValue implementation for Boolean.
Definition: boolean.h:36
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.
void Set(std::string path, const AttributeValue &value)
Definition: config.cc:839
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
Definition: assert.h:67
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
void PrintAttributesIfEnabled(bool enabled)
cmd
Definition: second.py:35
The 5 GHz band.
Definition: wifi-phy-band.h:35
static YansWifiPhyHelper Default(void)
Create a PHY helper in a default working state.
helps to create WifiNetDevice objects
Definition: wifi-helper.h:318
channel
Definition: third.py:92
phy
Definition: third.py:93
uint16_t GetChannelWidth(void) const
Definition: wifi-phy.cc:1515
AttributeValue implementation for Time.
Definition: nstime.h:1342
Hold an unsigned integer type.
Definition: uinteger.h:44
ssid
Definition: third.py:100
holds a vector of ns3::NetDevice pointers
Hold together all Wifi-related objects.
wifiApNode
Definition: third.py:90
Parse command-line arguments.
Definition: command-line.h:226
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
Definition: simulator.cc:136
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Definition: object.h:470
Ptr< WifiPhy > GetPhy(void) const
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
uint16_t GetFrequency(void) const
Definition: wifi-phy.cc:1495
802.11 PHY layer modelThis PHY implements a model of 802.11a.
Definition: yans-wifi-phy.h:48
Ptr< YansWifiPhy > GetYansWifiPhyPtr(const NetDeviceContainer &nc)
manage and create wifi channel objects for the YANS model.
uint8_t GetChannelNumber(void) const
Return current channel number.
Definition: wifi-phy.cc:1666
create MAC layers for a ns3::WifiNetDevice.
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())
wifi
Definition: third.py:96
void ConfigureAttributes(void)
Configure the attribute values.
AttributeValue implementation for Ssid.
Definition: ssid.h:105
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:849
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1294
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Definition: object-base.cc:185
bool DefineChannelNumber(uint8_t channelNumber, WifiPhyBand band, WifiPhyStandard standard, uint16_t frequency, uint16_t channelWidth)
Add a channel definition to the WifiPhy.
Definition: wifi-phy.cc:1277