LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2016 University of Washington | 3 * Copyright (c) 2016 University of Washington |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 25 matching lines...) Expand all Loading... |
36 // --serverChannelWidth and --clientChannelWidth (for 802.11n/ac) | 36 // --serverChannelWidth and --clientChannelWidth (for 802.11n/ac) |
37 // --broadcast instead of unicast (default is unicast) | 37 // --broadcast instead of unicast (default is unicast) |
38 // --rtsThreshold (by default, value of 99999 disables it) | 38 // --rtsThreshold (by default, value of 99999 disables it) |
39 | 39 |
40 #include "ns3/core-module.h" | 40 #include "ns3/core-module.h" |
41 #include "ns3/network-module.h" | 41 #include "ns3/network-module.h" |
42 #include "ns3/wifi-module.h" | 42 #include "ns3/wifi-module.h" |
43 #include "ns3/stats-module.h" | 43 #include "ns3/stats-module.h" |
44 #include "ns3/mobility-module.h" | 44 #include "ns3/mobility-module.h" |
45 #include "ns3/propagation-module.h" | 45 #include "ns3/propagation-module.h" |
| 46 #include "ns3/rng-seed-manager.h" |
46 | 47 |
47 using namespace ns3; | 48 using namespace ns3; |
48 | 49 |
49 NS_LOG_COMPONENT_DEFINE ("WifiManagerExample"); | 50 NS_LOG_COMPONENT_DEFINE ("WifiManagerExample"); |
50 | 51 |
51 // 290K @ 20 MHz | 52 // 290K @ 20 MHz |
52 const double NOISE_DBM_Hz = -174.0; | 53 const double NOISE_DBM_Hz = -174.0; |
53 double noiseDbm = NOISE_DBM_Hz; | 54 double noiseDbm = NOISE_DBM_Hz; |
54 | 55 |
55 double g_intervalBytes = 0; | 56 double g_intervalBytes = 0; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 * | 96 * |
96 * \param name reference name | 97 * \param name reference name |
97 * \param standard wifi phy standard | 98 * \param standard wifi phy standard |
98 * \param width channel width | 99 * \param width channel width |
99 * \param snrLow SNR low | 100 * \param snrLow SNR low |
100 * \param snrHigh SNR high | 101 * \param snrHigh SNR high |
101 * \param xMin x minimum | 102 * \param xMin x minimum |
102 * \param xMax x maximum | 103 * \param xMax x maximum |
103 * \param yMax y maximum | 104 * \param yMax y maximum |
104 */ | 105 */ |
105 StandardInfo (std::string name, enum WifiPhyStandard standard, uint16_t width,
double snrLow, double snrHigh, double xMin, double xMax, double yMax) | 106 StandardInfo (std::string name, WifiPhyStandard standard, uint16_t width, doub
le snrLow, double snrHigh, double xMin, double xMax, double yMax) |
106 : m_name (name), | 107 : m_name (name), |
107 m_standard (standard), | 108 m_standard (standard), |
108 m_width (width), | 109 m_width (width), |
109 m_snrLow (snrLow), | 110 m_snrLow (snrLow), |
110 m_snrHigh (snrHigh), | 111 m_snrHigh (snrHigh), |
111 m_xMin (xMin), | 112 m_xMin (xMin), |
112 m_xMax (xMax), | 113 m_xMax (xMax), |
113 m_yMax (yMax) | 114 m_yMax (yMax) |
114 { | 115 { |
115 } | 116 } |
116 std::string m_name; ///< name | 117 std::string m_name; ///< name |
117 enum WifiPhyStandard m_standard; ///< standard | 118 WifiPhyStandard m_standard; ///< standard |
118 uint16_t m_width; ///< channel width | 119 uint16_t m_width; ///< channel width |
119 double m_snrLow; ///< lowest SNR | 120 double m_snrLow; ///< lowest SNR |
120 double m_snrHigh; ///< highest SNR | 121 double m_snrHigh; ///< highest SNR |
121 double m_xMin; ///< X minimum | 122 double m_xMin; ///< X minimum |
122 double m_xMax; ///< X maximum | 123 double m_xMax; ///< X maximum |
123 double m_yMax; ///< Y maximum | 124 double m_yMax; ///< Y maximum |
124 }; | 125 }; |
125 | 126 |
126 void | 127 void |
127 ChangeSignalAndReportRate (Ptr<FixedRssLossModel> rssModel, struct Step step, do
uble rss, Gnuplot2dDataset& rateDataset, Gnuplot2dDataset& actualDataset) | 128 ChangeSignalAndReportRate (Ptr<FixedRssLossModel> rssModel, struct Step step, do
uble rss, Gnuplot2dDataset& rateDataset, Gnuplot2dDataset& actualDataset) |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 cmd.AddValue ("standard", "Set standard (802.11a, 802.11b, 802.11g, 802.11n-5G
Hz, 802.11n-2.4GHz, 802.11ac, 802.11-holland, 802.11-10MHz, 802.11-5MHz, 802.11a
x-5GHz, 802.11ax-2.4GHz)", standard); | 185 cmd.AddValue ("standard", "Set standard (802.11a, 802.11b, 802.11g, 802.11n-5G
Hz, 802.11n-2.4GHz, 802.11ac, 802.11-holland, 802.11-10MHz, 802.11-5MHz, 802.11a
x-5GHz, 802.11ax-2.4GHz)", standard); |
185 cmd.AddValue ("wifiManager", "Set wifi rate manager (Aarf, Aarfcd, Amrr, Arf,
Cara, Ideal, Minstrel, MinstrelHt, Onoe, Rraa)", wifiManager); | 186 cmd.AddValue ("wifiManager", "Set wifi rate manager (Aarf, Aarfcd, Amrr, Arf,
Cara, Ideal, Minstrel, MinstrelHt, Onoe, Rraa)", wifiManager); |
186 cmd.AddValue ("infrastructure", "Use infrastructure instead of adhoc", infrast
ructure); | 187 cmd.AddValue ("infrastructure", "Use infrastructure instead of adhoc", infrast
ructure); |
187 cmd.Parse (argc,argv); | 188 cmd.Parse (argc,argv); |
188 | 189 |
189 // Print out some explanation of what this program does | 190 // Print out some explanation of what this program does |
190 std::cout << std::endl << "This program demonstrates and plots the operation o
f different " << std::endl; | 191 std::cout << std::endl << "This program demonstrates and plots the operation o
f different " << std::endl; |
191 std::cout << "Wi-Fi rate controls on different station configurations," << std
::endl; | 192 std::cout << "Wi-Fi rate controls on different station configurations," << std
::endl; |
192 std::cout << "by stepping down the received signal strength across a wide rang
e" << std::endl; | 193 std::cout << "by stepping down the received signal strength across a wide rang
e" << std::endl; |
193 std::cout << "and observing the adjustment of the rate." << std::endl; | 194 std::cout << "and observing the adjustment of the rate." << std::endl; |
194 std::cout << "Run 'wifi-manager-example --PrintHelp' to show program options."
<< std::endl << std::endl; | 195 std::cout << "Run 'wifi-manager-example --PrintHelp' to show program options."
<< std::endl << std::endl; |
195 | 196 |
196 if (infrastructure == false) | 197 if (infrastructure == false) |
197 { | 198 { |
198 NS_ABORT_MSG_IF (serverNss != clientNss, "In ad hoc mode, we assume sender
and receiver are similarly configured"); | 199 NS_ABORT_MSG_IF (serverNss != clientNss, "In ad hoc mode, we assume sender
and receiver are similarly configured"); |
199 } | 200 } |
200 | 201 |
201 if (standard == "802.11b") | 202 if (standard == "802.11b") |
202 { | 203 { |
203 NS_ABORT_MSG_IF (serverChannelWidth != 22 && serverChannelWidth != 22, "In
valid channel width for standard " << standard); | 204 NS_ABORT_MSG_IF (serverChannelWidth != 22 && serverChannelWidth != 22, "In
valid channel width for standard " << standard); |
204 NS_ABORT_MSG_IF (serverNss != 1, "Invalid nss for standard " << standard); | 205 NS_ABORT_MSG_IF (serverNss != 1, "Invalid nss for standard " << standard); |
(...skipping 30 matching lines...) Expand all Loading... |
235 } | 236 } |
236 | 237 |
237 std::string plotName = "wifi-manager-example-"; | 238 std::string plotName = "wifi-manager-example-"; |
238 std::string dataName = "wifi-manager-example-"; | 239 std::string dataName = "wifi-manager-example-"; |
239 plotName += wifiManager; | 240 plotName += wifiManager; |
240 dataName += wifiManager; | 241 dataName += wifiManager; |
241 plotName += "-"; | 242 plotName += "-"; |
242 dataName += "-"; | 243 dataName += "-"; |
243 plotName += standard; | 244 plotName += standard; |
244 dataName += standard; | 245 dataName += standard; |
245 if (standard == "802.11n-5GHz" || | 246 if (standard == "802.11n-5GHz" |
246 standard == "802.11n-2.4GHz" || | 247 || standard == "802.11n-2.4GHz" |
247 standard == "802.11ac" || | 248 || standard == "802.11ac" |
248 standard == "802.11ax-5GHz" || | 249 || standard == "802.11ax-5GHz" |
249 standard == "802.11ax-2.4GHz") | 250 || standard == "802.11ax-2.4GHz") |
250 { | 251 { |
251 plotName += "-server="; | 252 plotName += "-server="; |
252 dataName += "-server="; | 253 dataName += "-server="; |
253 std::ostringstream oss; | 254 std::ostringstream oss; |
254 oss << serverChannelWidth << "MHz_" << serverShortGuardInterval << "ns_" <
< serverNss << "SS"; | 255 oss << serverChannelWidth << "MHz_" << serverShortGuardInterval << "ns_" <
< serverNss << "SS"; |
255 plotName += oss.str (); | 256 plotName += oss.str (); |
256 dataName += oss.str (); | 257 dataName += oss.str (); |
257 plotName += "-client="; | 258 plotName += "-client="; |
258 dataName += "-client="; | 259 dataName += "-client="; |
259 oss.str(""); | 260 oss.str (""); |
260 oss << clientChannelWidth << "MHz_" << clientShortGuardInterval << "ns_" <
< clientNss << "SS"; | 261 oss << clientChannelWidth << "MHz_" << clientShortGuardInterval << "ns_" <
< clientNss << "SS"; |
261 plotName += oss.str (); | 262 plotName += oss.str (); |
262 dataName += oss.str (); | 263 dataName += oss.str (); |
263 } | 264 } |
264 plotName += ".eps"; | 265 plotName += ".eps"; |
265 dataName += ".plt"; | 266 dataName += ".plt"; |
266 std::ofstream outfile (dataName.c_str ()); | 267 std::ofstream outfile (dataName.c_str ()); |
267 Gnuplot gnuplot = Gnuplot (plotName); | 268 Gnuplot gnuplot = Gnuplot (plotName); |
268 | 269 |
269 // As channel width increases, scale up plot's yRange value | 270 // As channel width increases, scale up plot's yRange value |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 if (standard == clientStandards[i].m_name) | 310 if (standard == clientStandards[i].m_name) |
310 { | 311 { |
311 clientSelectedStandard = clientStandards[i]; | 312 clientSelectedStandard = clientStandards[i]; |
312 } | 313 } |
313 } | 314 } |
314 | 315 |
315 NS_ABORT_IF (serverSelectedStandard.m_name == "none"); | 316 NS_ABORT_IF (serverSelectedStandard.m_name == "none"); |
316 NS_ABORT_IF (clientSelectedStandard.m_name == "none"); | 317 NS_ABORT_IF (clientSelectedStandard.m_name == "none"); |
317 std::cout << "Testing " << serverSelectedStandard.m_name << " with " << wifiMa
nager << " ..." << std::endl; | 318 std::cout << "Testing " << serverSelectedStandard.m_name << " with " << wifiMa
nager << " ..." << std::endl; |
318 NS_ABORT_MSG_IF (clientSelectedStandard.m_snrLow >= clientSelectedStandard.m_s
nrHigh, "SNR values in wrong order"); | 319 NS_ABORT_MSG_IF (clientSelectedStandard.m_snrLow >= clientSelectedStandard.m_s
nrHigh, "SNR values in wrong order"); |
319 steps = (uint32_t)std::abs ((int) (clientSelectedStandard.m_snrHigh - clientSe
lectedStandard.m_snrLow ) / stepSize) + 1; | 320 steps = static_cast<uint32_t> (std::abs<double> ((clientSelectedStandard.m_snr
High - clientSelectedStandard.m_snrLow ) / stepSize) + 1); |
320 NS_LOG_DEBUG ("Using " << steps << " steps for SNR range " << clientSelectedSt
andard.m_snrLow << ":" << clientSelectedStandard.m_snrHigh); | 321 NS_LOG_DEBUG ("Using " << steps << " steps for SNR range " << clientSelectedSt
andard.m_snrLow << ":" << clientSelectedStandard.m_snrHigh); |
321 Ptr<Node> clientNode = CreateObject<Node> (); | 322 Ptr<Node> clientNode = CreateObject<Node> (); |
322 Ptr<Node> serverNode = CreateObject<Node> (); | 323 Ptr<Node> serverNode = CreateObject<Node> (); |
323 | 324 |
324 Config::SetDefault ("ns3::WifiRemoteStationManager::MaxSlrc", UintegerValue (m
axSlrc)); | 325 Config::SetDefault ("ns3::WifiRemoteStationManager::MaxSlrc", UintegerValue (m
axSlrc)); |
325 Config::SetDefault ("ns3::WifiRemoteStationManager::MaxSsrc", UintegerValue (m
axSsrc)); | 326 Config::SetDefault ("ns3::WifiRemoteStationManager::MaxSsrc", UintegerValue (m
axSsrc)); |
| 327 Config::SetDefault ("ns3::MinstrelWifiManager::PrintStats", BooleanValue (true
)); |
| 328 Config::SetDefault ("ns3::MinstrelWifiManager::PrintSamples", BooleanValue (tr
ue)); |
| 329 Config::SetDefault ("ns3::MinstrelHtWifiManager::PrintStats", BooleanValue (tr
ue)); |
326 | 330 |
327 WifiHelper wifi; | 331 WifiHelper wifi; |
328 wifi.SetStandard (serverSelectedStandard.m_standard); | 332 wifi.SetStandard (serverSelectedStandard.m_standard); |
329 YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); | 333 YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); |
330 wifiPhy.Set ("RxNoiseFigure", DoubleValue (0.0)); | 334 wifiPhy.Set ("RxNoiseFigure", DoubleValue (0.0)); |
331 wifiPhy.Set ("EnergyDetectionThreshold", DoubleValue (-110.0)); | 335 wifiPhy.Set ("EnergyDetectionThreshold", DoubleValue (-110.0)); |
332 wifiPhy.Set ("CcaMode1Threshold", DoubleValue (-110.0)); | 336 wifiPhy.Set ("CcaMode1Threshold", DoubleValue (-110.0)); |
333 | 337 |
334 Ptr<YansWifiChannel> wifiChannel = CreateObject<YansWifiChannel> (); | 338 Ptr<YansWifiChannel> wifiChannel = CreateObject<YansWifiChannel> (); |
335 Ptr<ConstantSpeedPropagationDelayModel> delayModel = CreateObject<ConstantSpee
dPropagationDelayModel> (); | 339 Ptr<ConstantSpeedPropagationDelayModel> delayModel = CreateObject<ConstantSpee
dPropagationDelayModel> (); |
(...skipping 20 matching lines...) Expand all Loading... |
356 "BeaconGeneration", BooleanValue (true)); | 360 "BeaconGeneration", BooleanValue (true)); |
357 clientDevice = wifi.Install (wifiPhy, wifiMac, clientNode); | 361 clientDevice = wifi.Install (wifiPhy, wifiMac, clientNode); |
358 } | 362 } |
359 else | 363 else |
360 { | 364 { |
361 wifiMac.SetType ("ns3::AdhocWifiMac", | 365 wifiMac.SetType ("ns3::AdhocWifiMac", |
362 "BE_MaxAmpduSize", UintegerValue (maxAmpduSize)); | 366 "BE_MaxAmpduSize", UintegerValue (maxAmpduSize)); |
363 serverDevice = wifi.Install (wifiPhy, wifiMac, serverNode); | 367 serverDevice = wifi.Install (wifiPhy, wifiMac, serverNode); |
364 clientDevice = wifi.Install (wifiPhy, wifiMac, clientNode); | 368 clientDevice = wifi.Install (wifiPhy, wifiMac, clientNode); |
365 } | 369 } |
| 370 |
| 371 RngSeedManager::SetSeed (1); |
| 372 RngSeedManager::SetRun (2); |
| 373 wifi.AssignStreams (serverDevice, 100); |
| 374 wifi.AssignStreams (clientDevice, 100); |
366 | 375 |
367 if (wifiManager == "MinstrelHt") | 376 if (wifiManager == "MinstrelHt") |
368 { | 377 { |
369 Config::ConnectWithoutContext ("/NodeList/0/DeviceList/*/$ns3::WifiNetDevi
ce/RemoteStationManager/$ns3::MinstrelHtWifiManager/RateChange", MakeCallback (&
RateChangeMinstrelHt)); | 378 Config::ConnectWithoutContext ("/NodeList/0/DeviceList/*/$ns3::WifiNetDevi
ce/RemoteStationManager/$ns3::MinstrelHtWifiManager/RateChange", MakeCallback (&
RateChangeMinstrelHt)); |
370 } | 379 } |
371 else | 380 else |
372 { | 381 { |
373 Config::ConnectWithoutContext ("/NodeList/0/DeviceList/*/$ns3::WifiNetDevi
ce/RemoteStationManager/$ns3::" + wifiManager + "WifiManager/Rate", MakeCallback
(&RateChange)); | 382 Config::ConnectWithoutContext ("/NodeList/0/DeviceList/*/$ns3::WifiNetDevi
ce/RemoteStationManager/$ns3::" + wifiManager + "WifiManager/Rate", MakeCallback
(&RateChange)); |
374 } | 383 } |
375 // Configure the mobility. | 384 // Configure the mobility. |
(...skipping 17 matching lines...) Expand all Loading... |
393 | 402 |
394 // Perform post-install configuration from defaults for channel width, | 403 // Perform post-install configuration from defaults for channel width, |
395 // guard interval, and nss, if necessary | 404 // guard interval, and nss, if necessary |
396 // Obtain pointer to the WifiPhy | 405 // Obtain pointer to the WifiPhy |
397 Ptr<NetDevice> ndClient = clientDevice.Get (0); | 406 Ptr<NetDevice> ndClient = clientDevice.Get (0); |
398 Ptr<NetDevice> ndServer = serverDevice.Get (0); | 407 Ptr<NetDevice> ndServer = serverDevice.Get (0); |
399 Ptr<WifiNetDevice> wndClient = ndClient->GetObject<WifiNetDevice> (); | 408 Ptr<WifiNetDevice> wndClient = ndClient->GetObject<WifiNetDevice> (); |
400 Ptr<WifiNetDevice> wndServer = ndServer->GetObject<WifiNetDevice> (); | 409 Ptr<WifiNetDevice> wndServer = ndServer->GetObject<WifiNetDevice> (); |
401 Ptr<WifiPhy> wifiPhyPtrClient = wndClient->GetPhy (); | 410 Ptr<WifiPhy> wifiPhyPtrClient = wndClient->GetPhy (); |
402 Ptr<WifiPhy> wifiPhyPtrServer = wndServer->GetPhy (); | 411 Ptr<WifiPhy> wifiPhyPtrServer = wndServer->GetPhy (); |
403 wifiPhyPtrClient->SetNumberOfAntennas ((uint8_t)clientNss); | 412 uint8_t t_clientNss = static_cast<uint8_t> (clientNss); |
404 wifiPhyPtrClient->SetMaxSupportedTxSpatialStreams ((uint8_t)clientNss); | 413 uint8_t t_serverNss = static_cast<uint8_t> (serverNss); |
405 wifiPhyPtrClient->SetMaxSupportedRxSpatialStreams ((uint8_t)clientNss); | 414 wifiPhyPtrClient->SetNumberOfAntennas (t_clientNss); |
406 wifiPhyPtrServer->SetNumberOfAntennas ((uint8_t)serverNss); | 415 wifiPhyPtrClient->SetMaxSupportedTxSpatialStreams (t_clientNss); |
407 wifiPhyPtrServer->SetMaxSupportedTxSpatialStreams ((uint8_t)serverNss); | 416 wifiPhyPtrClient->SetMaxSupportedRxSpatialStreams (t_clientNss); |
408 wifiPhyPtrServer->SetMaxSupportedRxSpatialStreams ((uint8_t)serverNss); | 417 wifiPhyPtrServer->SetNumberOfAntennas (t_serverNss); |
| 418 wifiPhyPtrServer->SetMaxSupportedTxSpatialStreams (t_serverNss); |
| 419 wifiPhyPtrServer->SetMaxSupportedRxSpatialStreams (t_serverNss); |
409 // Only set the channel width and guard interval for HT and VHT modes | 420 // Only set the channel width and guard interval for HT and VHT modes |
410 if (serverSelectedStandard.m_name == "802.11n-5GHz" | 421 if (serverSelectedStandard.m_name == "802.11n-5GHz" |
411 || serverSelectedStandard.m_name == "802.11n-2.4GHz" | 422 || serverSelectedStandard.m_name == "802.11n-2.4GHz" |
412 || serverSelectedStandard.m_name == "802.11ac") | 423 || serverSelectedStandard.m_name == "802.11ac") |
413 { | 424 { |
414 wifiPhyPtrServer->SetChannelWidth ((uint8_t)serverSelectedStandard.m_width
); | 425 wifiPhyPtrServer->SetChannelWidth (serverSelectedStandard.m_width); |
415 wifiPhyPtrServer->SetShortGuardInterval (serverShortGuardInterval == 400); | 426 wifiPhyPtrServer->SetShortGuardInterval (serverShortGuardInterval == 400); |
416 wifiPhyPtrClient->SetChannelWidth ((uint8_t)clientSelectedStandard.m_width
); | 427 wifiPhyPtrClient->SetChannelWidth (clientSelectedStandard.m_width); |
417 wifiPhyPtrClient->SetShortGuardInterval (clientShortGuardInterval == 400); | 428 wifiPhyPtrClient->SetShortGuardInterval (clientShortGuardInterval == 400); |
418 } | 429 } |
419 else if (serverSelectedStandard.m_name == "802.11ax-5GHz" | 430 else if (serverSelectedStandard.m_name == "802.11ax-5GHz" |
420 || serverSelectedStandard.m_name == "802.11ax-2.4GHz") | 431 || serverSelectedStandard.m_name == "802.11ax-2.4GHz") |
421 { | 432 { |
422 wifiPhyPtrServer->SetChannelWidth ((uint8_t)serverSelectedStandard.m_width
); | 433 wifiPhyPtrServer->SetChannelWidth (serverSelectedStandard.m_width); |
423 wifiPhyPtrServer->SetGuardInterval (NanoSeconds (serverShortGuardInterval)
); | 434 wifiPhyPtrServer->SetGuardInterval (NanoSeconds (serverShortGuardInterval)
); |
424 wifiPhyPtrClient->SetChannelWidth ((uint8_t)clientSelectedStandard.m_width
); | 435 wifiPhyPtrClient->SetChannelWidth (clientSelectedStandard.m_width); |
425 wifiPhyPtrClient->SetGuardInterval (NanoSeconds (clientShortGuardInterval)
); | 436 wifiPhyPtrClient->SetGuardInterval (NanoSeconds (clientShortGuardInterval)
); |
426 } | 437 } |
427 NS_LOG_DEBUG ("Channel width " << wifiPhyPtrClient->GetChannelWidth () << " no
iseDbm " << noiseDbm); | 438 NS_LOG_DEBUG ("Channel width " << wifiPhyPtrClient->GetChannelWidth () << " no
iseDbm " << noiseDbm); |
428 NS_LOG_DEBUG ("NSS " << wifiPhyPtrClient->GetMaxSupportedTxSpatialStreams ()); | 439 NS_LOG_DEBUG ("NSS " << wifiPhyPtrClient->GetMaxSupportedTxSpatialStreams ()); |
429 | 440 |
430 // Configure signal and noise, and schedule first iteration | 441 // Configure signal and noise, and schedule first iteration |
431 noiseDbm += 10 * log10 (clientSelectedStandard.m_width * 1000000); | 442 noiseDbm += 10 * log10 (clientSelectedStandard.m_width * 1000000); |
432 double rssCurrent = (clientSelectedStandard.m_snrHigh + noiseDbm); | 443 double rssCurrent = (clientSelectedStandard.m_snrHigh + noiseDbm); |
433 rssLossModel->SetRss (rssCurrent); | 444 rssLossModel->SetRss (rssCurrent); |
434 NS_LOG_INFO ("Setting initial Rss to " << rssCurrent); | 445 NS_LOG_INFO ("Setting initial Rss to " << rssCurrent); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 gnuplot.SetTitle (title); | 550 gnuplot.SetTitle (title); |
540 gnuplot.SetExtra (xRangeStr); | 551 gnuplot.SetExtra (xRangeStr); |
541 gnuplot.AppendExtra (yRangeStr); | 552 gnuplot.AppendExtra (yRangeStr); |
542 gnuplot.AppendExtra ("set key top left"); | 553 gnuplot.AppendExtra ("set key top left"); |
543 gnuplot.GenerateOutput (outfile); | 554 gnuplot.GenerateOutput (outfile); |
544 outfile.close (); | 555 outfile.close (); |
545 | 556 |
546 return 0; | 557 return 0; |
547 } | 558 } |
548 | 559 |
LEFT | RIGHT |