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 #include "ns3/core-module.h"
22 #include "ns3/config-store-module.h"
23 #include "ns3/wifi-module.h"
24 
25 // This example shows (and tests) some possible configurations for
26 // the Wi-Fi physical layer, particularly the interaction between
27 // WifiHelper.SetStandard () and the physical layer channel number,
28 // center frequency, and channel width.
29 
30 using namespace ns3;
31 
32 NS_LOG_COMPONENT_DEFINE ("WifiPhyConfigurationExample");
33 
34 
37 {
38  Ptr<WifiNetDevice> wnd = nc.Get (0)->GetObject<WifiNetDevice> ();
39  Ptr<WifiPhy> wp = wnd->GetPhy ();
40  return wp->GetObject<YansWifiPhy> ();
41 }
42 
43 void
45 {
46  if (enabled)
47  {
48  ConfigStore outputConfig;
49  outputConfig.ConfigureAttributes ();
50  }
51 }
52 
53 int main (int argc, char *argv[])
54 {
55  uint32_t testCase = 0;
56  bool printAttributes = false;
57 
59  cmd.AddValue ("testCase", "Test case", testCase);
60  cmd.AddValue ("printAttributes", "If true, print out attributes", printAttributes);
61  cmd.Parse (argc, argv);
62 
63  NodeContainer wifiStaNode;
64  wifiStaNode.Create (1);
66  wifiApNode.Create (1);
67 
70  phy.SetChannel (channel.Create ());
72  wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
73 
74  // Configure and declare other generic components of this example
75  Ssid ssid;
76  ssid = Ssid ("wifi-phy-configuration");
77  WifiMacHelper macSta;
78  macSta.SetType ("ns3::StaWifiMac",
79  "Ssid", SsidValue (ssid),
80  "ActiveProbing", BooleanValue (false));
81  WifiMacHelper macAp;
82  macAp.SetType ("ns3::ApWifiMac",
83  "Ssid", SsidValue (ssid),
84  "BeaconInterval", TimeValue (MicroSeconds (102400)),
85  "BeaconGeneration", BooleanValue (true));
86  NetDeviceContainer staDevice;
87  NetDeviceContainer apDevice;
88  Ptr<YansWifiPhy> phySta;
89  Config::SetDefault ("ns3::ConfigStore::Filename", StringValue ("output-attributes-" + std::to_string (testCase) + ".txt"));
90  Config::SetDefault ("ns3::ConfigStore::FileFormat", StringValue ("RawText"));
91  Config::SetDefault ("ns3::ConfigStore::Mode", StringValue ("Save"));
92 
93  switch (testCase)
94  {
95  case 0:
96  // Default configuration, without WifiHelper::SetStandard or WifiHelper
97  phySta = CreateObject<YansWifiPhy> ();
98  // The default results in an invalid configuration of channel 0,
99  // width 20, and frequency 0 MHz
100  NS_ASSERT (phySta->GetChannelNumber () == 0);
101  NS_ASSERT (phySta->GetChannelWidth () == 20);
102  NS_ASSERT (phySta->GetFrequency () == 0);
103  PrintAttributesIfEnabled (printAttributes);
104  break;
105 
106  // The following cases test the setting of WifiPhyStandard alone;
107  // i.e. without further channel number/width/frequency configuration
108 
109  case 1:
110  // By default, WifiHelper will use WIFI_PHY_STANDARD_80211a
111  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get(0));
112  apDevice = wifi.Install (phy, macAp, wifiApNode.Get(0));
113  phySta = GetYansWifiPhyPtr (staDevice);
114  // We expect channel 36, width 20, frequency 5180
115  NS_ASSERT (phySta->GetChannelNumber () == 36);
116  NS_ASSERT (phySta->GetChannelWidth () == 20);
117  NS_ASSERT (phySta->GetFrequency () == 5180);
118  PrintAttributesIfEnabled (printAttributes);
119  break;
120  case 2:
122  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get(0));
123  apDevice = wifi.Install (phy, macAp, wifiApNode.Get(0));
124  phySta = GetYansWifiPhyPtr (staDevice);
125  // We expect channel 1, width 22, frequency 2412
126  NS_ASSERT (phySta->GetChannelNumber () == 1);
127  NS_ASSERT (phySta->GetChannelWidth () == 22);
128  NS_ASSERT (phySta->GetFrequency () == 2412);
129  PrintAttributesIfEnabled (printAttributes);
130  break;
131  case 3:
133  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get(0));
134  apDevice = wifi.Install (phy, macAp, wifiApNode.Get(0));
135  phySta = GetYansWifiPhyPtr (staDevice);
136  // We expect channel 1, width 20, frequency 2412
137  NS_ASSERT (phySta->GetChannelNumber () == 1);
138  NS_ASSERT (phySta->GetChannelWidth () == 20);
139  NS_ASSERT (phySta->GetFrequency () == 2412);
140  PrintAttributesIfEnabled (printAttributes);
141  break;
142  case 4:
144  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get(0));
145  apDevice = wifi.Install (phy, macAp, wifiApNode.Get(0));
146  phySta = GetYansWifiPhyPtr (staDevice);
147  // We expect channel 36, width 20, frequency 5180
148  NS_ASSERT (phySta->GetChannelNumber () == 36);
149  NS_ASSERT (phySta->GetChannelWidth () == 20);
150  NS_ASSERT (phySta->GetFrequency () == 5180);
151  PrintAttributesIfEnabled (printAttributes);
152  break;
153  case 5:
155  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get(0));
156  apDevice = wifi.Install (phy, macAp, wifiApNode.Get(0));
157  phySta = GetYansWifiPhyPtr (staDevice);
158  // We expect channel 1, width 20, frequency 2412
159  NS_ASSERT (phySta->GetChannelNumber () == 1);
160  NS_ASSERT (phySta->GetChannelWidth () == 20);
161  NS_ASSERT (phySta->GetFrequency () == 2412);
162  PrintAttributesIfEnabled (printAttributes);
163  break;
164  case 6:
166  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get(0));
167  apDevice = wifi.Install (phy, macAp, wifiApNode.Get(0));
168  phySta = GetYansWifiPhyPtr (staDevice);
169  // We expect channel 42, width 80, frequency 5210
170  NS_ASSERT (phySta->GetChannelNumber () == 42);
171  NS_ASSERT (phySta->GetChannelWidth () == 80);
172  NS_ASSERT (phySta->GetFrequency () == 5210);
173  PrintAttributesIfEnabled (printAttributes);
174  break;
175  case 7:
177  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get(0));
178  apDevice = wifi.Install (phy, macAp, wifiApNode.Get(0));
179  phySta = GetYansWifiPhyPtr (staDevice);
180  // We expect channel 172, width 10, frequency 5860
181  NS_ASSERT (phySta->GetChannelNumber () == 172);
182  NS_ASSERT (phySta->GetChannelWidth () == 10);
183  NS_ASSERT (phySta->GetFrequency () == 5860);
184  PrintAttributesIfEnabled (printAttributes);
185  break;
186  case 8:
188  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get(0));
189  apDevice = wifi.Install (phy, macAp, wifiApNode.Get(0));
190  phySta = GetYansWifiPhyPtr (staDevice);
191  // We expect channel 0, width 5, frequency 5860
192  // Channel 0 because 5MHz channels are not officially defined
193  NS_ASSERT (phySta->GetChannelNumber () == 0);
194  NS_ASSERT (phySta->GetChannelWidth () == 5);
195  NS_ASSERT (phySta->GetFrequency () == 5860);
196  PrintAttributesIfEnabled (printAttributes);
197  break;
198  case 9:
200  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get(0));
201  apDevice = wifi.Install (phy, macAp, wifiApNode.Get(0));
202  phySta = GetYansWifiPhyPtr (staDevice);
203  // We expect channel 36, width 20, frequency 5180
204  NS_ASSERT (phySta->GetChannelNumber () == 36);
205  NS_ASSERT (phySta->GetChannelWidth () == 20);
206  NS_ASSERT (phySta->GetFrequency () == 5180);
207  PrintAttributesIfEnabled (printAttributes);
208  break;
209  case 10:
211  phy.Set ("ChannelNumber", UintegerValue(44));
212  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get(0));
213  apDevice = wifi.Install (phy, macAp, wifiApNode.Get(0));
214  phySta = GetYansWifiPhyPtr (staDevice);
215  // We expect channel 44, width 20, frequency 5220
216  NS_ASSERT (phySta->GetChannelNumber () == 44);
217  NS_ASSERT (phySta->GetChannelWidth () == 20);
218  NS_ASSERT (phySta->GetFrequency () == 5220);
219  PrintAttributesIfEnabled (printAttributes);
220  break;
221 
222  case 11:
224  phy.Set ("ChannelNumber", UintegerValue(44));
225  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get(0));
226  apDevice = wifi.Install (phy, macAp, wifiApNode.Get(0));
227  phySta = GetYansWifiPhyPtr (staDevice);
228  // Post-install reconfiguration to channel number 40
229  Config::Set ("/NodeList/0/DeviceList/*/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/ChannelNumber", UintegerValue(40));
230  Config::Set ("/NodeList/1/DeviceList/*/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/ChannelNumber", UintegerValue(40));
231  // We expect channel 40, width 20, frequency 5200
232  NS_ASSERT (phySta->GetChannelNumber () == 40);
233  NS_ASSERT (phySta->GetChannelWidth () == 20);
234  NS_ASSERT (phySta->GetFrequency () == 5200);
235  PrintAttributesIfEnabled (printAttributes);
236  break;
237 
238  case 12:
240  phy.Set ("ChannelNumber", UintegerValue (44));
241  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get(0));
242  apDevice = wifi.Install (phy, macAp, wifiApNode.Get(0));
243  phySta = GetYansWifiPhyPtr (staDevice);
244  // Post-install reconfiguration to channel width 40 MHz
245  Config::Set ("/NodeList/0/DeviceList/*/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/ChannelWidth", UintegerValue(40));
246  Config::Set ("/NodeList/1/DeviceList/*/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/ChannelWidth", UintegerValue(40));
247  // Although channel 44 is configured originally for 20 MHz, we
248  // allow it to be used for 40 MHz here
249  NS_ASSERT (phySta->GetChannelNumber () == 44);
250  NS_ASSERT (phySta->GetChannelWidth () == 40);
251  NS_ASSERT (phySta->GetFrequency () == 5220);
252  PrintAttributesIfEnabled (printAttributes);
253  break;
254 
255  case 13:
256  Config::SetDefault ("ns3::WifiPhy::ChannelNumber", UintegerValue (44));
258  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get(0));
259  apDevice = wifi.Install (phy, macAp, wifiApNode.Get(0));
260  phySta = GetYansWifiPhyPtr (staDevice);
261  // Post-install reconfiguration to channel width 40 MHz
262  Config::Set ("/NodeList/0/DeviceList/*/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/ChannelWidth", UintegerValue(40));
263  Config::Set ("/NodeList/1/DeviceList/*/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/ChannelWidth", UintegerValue(40));
264  // Although channel 44 is configured originally for 20 MHz, we
265  // allow it to be used for 40 MHz here
266  NS_ASSERT (phySta->GetChannelNumber () == 44);
267  NS_ASSERT (phySta->GetChannelWidth () == 40);
268  NS_ASSERT (phySta->GetFrequency () == 5220);
269  PrintAttributesIfEnabled (printAttributes);
270  break;
271 
272  case 14:
273  // Test that setting Frequency to a non-standard value will zero the
274  // channel number
275  Config::SetDefault ("ns3::WifiPhy::Frequency", UintegerValue (5281));
277  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get(0));
278  apDevice = wifi.Install (phy, macAp, wifiApNode.Get(0));
279  phySta = GetYansWifiPhyPtr (staDevice);
280  // We expect channel number to be zero since frequency doesn't match
281  NS_ASSERT (phySta->GetChannelNumber () == 0);
282  NS_ASSERT (phySta->GetChannelWidth () == 20);
283  NS_ASSERT (phySta->GetFrequency () == 5281);
284  PrintAttributesIfEnabled (printAttributes);
285  break;
286 
287  case 15:
288  // Test that setting Frequency to a standard value will set the
289  // channel number correctly
290  Config::SetDefault ("ns3::WifiPhy::Frequency", UintegerValue (5500));
292  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
293  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
294  phySta = GetYansWifiPhyPtr (staDevice);
295  // We expect channel number to be 100 due to frequency 5500
296  NS_ASSERT (phySta->GetChannelNumber () == 100);
297  NS_ASSERT (phySta->GetChannelWidth () == 20);
298  NS_ASSERT (phySta->GetFrequency () == 5500);
299  PrintAttributesIfEnabled (printAttributes);
300  break;
301 
302  case 16:
303  // Define a new channel number
305  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get (0));
306  apDevice = wifi.Install (phy, macAp, wifiApNode.Get (0));
307  phySta = GetYansWifiPhyPtr (staDevice);
308  // This case will error exit due to invalid channel number unless
309  // we provide the DefineChannelNumber() below
310  phySta->DefineChannelNumber (99, WIFI_PHY_STANDARD_80211n_5GHZ, 5185, 40);
311  phySta->SetAttribute ("ChannelNumber", UintegerValue (99));
312  PrintAttributesIfEnabled (printAttributes);
313  break;
314 
315  case 17:
316  // Test how channel number behaves when frequency is non-standard
318  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get(0));
319  apDevice = wifi.Install (phy, macAp, wifiApNode.Get(0));
320  phySta = GetYansWifiPhyPtr (staDevice);
321  phySta->SetAttribute ("Frequency", UintegerValue (5181));
322  // We expect channel number to be 0 due to unknown center frequency 5181
323  NS_ASSERT (phySta->GetChannelNumber () == 0);
324  NS_ASSERT (phySta->GetChannelWidth () == 20);
325  NS_ASSERT (phySta->GetFrequency () == 5181);
326  phySta->SetAttribute ("Frequency", UintegerValue (5180));
327  // We expect channel number to be 36 due to known center frequency 5180
328  NS_ASSERT (phySta->GetChannelNumber () == 36);
329  NS_ASSERT (phySta->GetChannelWidth () == 20);
330  NS_ASSERT (phySta->GetFrequency () == 5180);
331  phySta->SetAttribute ("Frequency", UintegerValue (5179));
332  // We expect channel number to be 0 due to unknown center frequency 5179
333  NS_ASSERT (phySta->GetChannelNumber () == 0);
334  NS_ASSERT (phySta->GetChannelWidth () == 20);
335  NS_ASSERT (phySta->GetFrequency () == 5179);
336  phySta->SetAttribute ("ChannelNumber", UintegerValue (36));
337  NS_ASSERT (phySta->GetChannelNumber () == 36);
338  NS_ASSERT (phySta->GetChannelWidth () == 20);
339  NS_ASSERT (phySta->GetFrequency () == 5180);
340  PrintAttributesIfEnabled (printAttributes);
341  break;
342 
343  case 18:
344  // Set both channel and frequency to consistent values
346  staDevice = wifi.Install (phy, macSta, wifiStaNode.Get(0));
347  apDevice = wifi.Install (phy, macAp, wifiApNode.Get(0));
348  phySta = GetYansWifiPhyPtr (staDevice);
349  phySta->SetAttribute ("Frequency", UintegerValue (5200));
350  phySta->SetAttribute ("ChannelNumber", UintegerValue (40));
351  NS_ASSERT (phySta->GetChannelNumber () == 40);
352  NS_ASSERT (phySta->GetChannelWidth () == 20);
353  NS_ASSERT (phySta->GetFrequency () == 5200);
354  // Set both channel and frequency to inconsistent values
355  phySta->SetAttribute ("Frequency", UintegerValue (5200));
356  phySta->SetAttribute ("ChannelNumber", UintegerValue (36));
357  // We expect channel number to be 36
358  NS_ASSERT (phySta->GetChannelNumber () == 36);
359  NS_ASSERT (phySta->GetChannelWidth () == 20);
360  NS_ASSERT (phySta->GetFrequency () == 5180);
361  phySta->SetAttribute ("ChannelNumber", UintegerValue (36));
362  phySta->SetAttribute ("Frequency", UintegerValue (5200));
363  // We expect channel number to be 40
364  NS_ASSERT (phySta->GetChannelNumber () == 40);
365  NS_ASSERT (phySta->GetChannelWidth () == 20);
366  NS_ASSERT (phySta->GetFrequency () == 5200);
367  phySta->SetAttribute ("Frequency", UintegerValue (5179));
368  phySta->SetAttribute ("ChannelNumber", UintegerValue (36));
369  // We expect channel number to be 36
370  NS_ASSERT (phySta->GetChannelNumber () == 36);
371  NS_ASSERT (phySta->GetChannelWidth () == 20);
372  NS_ASSERT (phySta->GetFrequency () == 5180);
373  phySta->SetAttribute ("ChannelNumber", UintegerValue (36));
374  phySta->SetAttribute ("Frequency", UintegerValue (5179));
375  // We expect channel number to be 0
376  NS_ASSERT (phySta->GetChannelNumber () == 0);
377  NS_ASSERT (phySta->GetChannelWidth () == 20);
378  NS_ASSERT (phySta->GetFrequency () == 5179);
379  PrintAttributesIfEnabled (printAttributes);
380  break;
381 
382  default:
383  std::cerr << "Invalid testcase number " << testCase << std::endl;
384  exit (1);
385  break;
386  }
387 
388  // No need to Simulator::Run (); this is a configuration example
390 }
ERP-OFDM PHY (Clause 19, Section 19.5)
tuple channel
Definition: third.py:85
void Set(std::string name, const AttributeValue &v)
Definition: wifi-helper.cc:132
Introspection did not find any typical Config paths.
Definition: config-store.h:59
uint8_t GetChannelNumber(void) const
Return current channel number.
Definition: wifi-phy.cc:1496
OFDM PHY for the 5 GHz band (Clause 17 with 5 MHz channel bandwidth)
AttributeValue implementation for Boolean.
Definition: boolean.h:36
HT PHY for the 5 GHz band (clause 20)
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
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Definition: object.h:459
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.
void Set(std::string path, const AttributeValue &value)
Definition: config.cc:777
#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:201
OFDM PHY for the 5 GHz band (Clause 17 with 10 MHz channel bandwidth)
void PrintAttributesIfEnabled(bool enabled)
HT PHY for the 2.4 GHz band (clause 20)
static YansWifiPhyHelper Default(void)
Create a phy helper in a default working state.
helps to create WifiNetDevice objects
Definition: wifi-helper.h:213
uint16_t GetFrequency(void) const
Definition: wifi-phy.cc:1270
tuple cmd
Definition: second.py:35
void SetChannel(Ptr< YansWifiChannel > channel)
Ptr< WifiPhy > GetPhy(void) const
tuple phy
Definition: third.py:86
AttributeValue implementation for Time.
Definition: nstime.h:1055
Hold an unsigned integer type.
Definition: uinteger.h:44
holds a vector of ns3::NetDevice pointers
virtual void SetStandard(enum WifiPhyStandard standard)
Definition: wifi-helper.cc:742
virtual NetDeviceContainer Install(const WifiPhyHelper &phy, const WifiMacHelper &mac, NodeContainer::Iterator first, NodeContainer::Iterator last) const
Definition: wifi-helper.cc:748
Hold together all Wifi-related objects.
Parse command-line arguments.
Definition: command-line.h:205
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
Definition: simulator.cc:190
This is intended to be the configuration used in this paper: Gavin Holland, Nitin Vaidya and Paramvir...
tuple wifiApNode
Definition: third.py:83
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
802.11 PHY layer modelThis PHY implements a model of 802.11a.
Definition: yans-wifi-phy.h:47
DSSS PHY (Clause 15) and HR/DSSS PHY (Clause 18)
Ptr< YansWifiPhy > GetYansWifiPhyPtr(const NetDeviceContainer &nc)
tuple ssid
Definition: third.py:93
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
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())
uint8_t GetChannelWidth(void) const
Definition: wifi-phy.cc:1304
void ConfigureAttributes(void)
Configure the attribute values.
void AddValue(const std::string &name, const std::string &help, T &value)
Add a program argument, assigning to POD.
Definition: command-line.h:498
Ptr< Node > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
AttributeValue implementation for Ssid.
Definition: ssid.h:117
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:782
bool DefineChannelNumber(uint8_t channelNumber, WifiPhyStandard standard, uint16_t frequency, uint8_t channelWidth)
Add a channel definition to the WifiPhy.
Definition: wifi-phy.cc:1052
void Parse(int argc, char *argv[])
Parse the program arguments.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1009
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.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Definition: object-base.cc:185