LEFT | RIGHT |
(no file at all) | |
| 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
| 2 /* |
| 3 * Copyright (c) 2017 Orange Labs |
| 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: Rediet <getachew.redieteab@orange.com> |
| 19 */ |
| 20 |
| 21 #include <cmath> |
| 22 #include "ns3/test.h" |
| 23 #include "ns3/log.h" |
| 24 #include "ns3/fatal-error.h" |
| 25 #include "ns3/wifi-spectrum-value-helper.h" |
| 26 #include "ns3/wifi-phy-standard.h" |
| 27 |
| 28 using namespace ns3; |
| 29 |
| 30 NS_LOG_COMPONENT_DEFINE ("WifiTransmitMaskTest"); |
| 31 |
| 32 /** |
| 33 * \ingroup wifi-test |
| 34 * \ingroup tests |
| 35 * |
| 36 * \brief Test checks if Wifi spectrum values for OFDM are generated properly. |
| 37 * Different test cases are configured by defining different standards and bandw
idth. |
| 38 */ |
| 39 class WifiOfdmMaskSlopesTestCase : public TestCase |
| 40 { |
| 41 public: |
| 42 |
| 43 /** |
| 44 * typedef for a pair of sub-band index and relative power value (dBr) |
| 45 */ |
| 46 typedef std::pair<uint32_t, double> IndexPowerPair; |
| 47 |
| 48 /** |
| 49 * typedef for a vector of pairs of sub-band index and relative power value (d
Br) |
| 50 */ |
| 51 typedef std::vector<IndexPowerPair> IndexPowerVect; |
| 52 |
| 53 /** |
| 54 * Constructor |
| 55 * |
| 56 * \param str test reference name |
| 57 * \param standard selected standard |
| 58 * \param bw bandwidth |
| 59 * \param maskRefsLeft vector of expected power values and corresponding index
es of generated PSD |
| 60 * (only start and stop indexes/values given) for left gua
rd bandwidth |
| 61 * \param maskRefsRight vector of expected power values and corresponding inde
xes of generated PSD |
| 62 * (only start and stop indexes/values given) for right g
uard bandwidth |
| 63 * \param tol tolerance (in dB) |
| 64 */ |
| 65 WifiOfdmMaskSlopesTestCase (const char* str, WifiPhyStandard standard, uint8_t
bw, |
| 66 IndexPowerVect maskRefsLeft, IndexPowerVect maskRe
fsRight, double tol); |
| 67 virtual ~WifiOfdmMaskSlopesTestCase (); |
| 68 |
| 69 protected: |
| 70 Ptr<SpectrumValue> m_actualSpectrum; ///< actual spectrum value |
| 71 IndexPowerVect m_expectedLeftPsd; ///< expected power values for left guard
bandwidth |
| 72 IndexPowerVect m_expectedRightPsd; ///< expected power values for right guar
d bandwidth |
| 73 double m_tolerance; ///< tolerance (in dB) |
| 74 |
| 75 private: |
| 76 virtual void DoRun (void); |
| 77 /** |
| 78 * Interpolate PSD values for indexes between provided start and stop and appe
nd to provided |
| 79 * vector. |
| 80 * |
| 81 * \param vect vector of sub-band index and relative power value pairs to whic
h interpolated values |
| 82 should be appended |
| 83 * \param start pair of sub-band index and relative power value (dBr) for inte
rval start |
| 84 * \param stop pair of sub-band index and relative power value (dBr) for inter
val stop |
| 85 * \param tol tolerance (in dB) |
| 86 */ |
| 87 static void InterpolateAndAppendValues (IndexPowerVect &vect, IndexPowerPair s
tart, IndexPowerPair stop, |
| 88 double tol); |
| 89 }; |
| 90 |
| 91 WifiOfdmMaskSlopesTestCase::WifiOfdmMaskSlopesTestCase (const char* str, WifiPhy
Standard standard, uint8_t bw, |
| 92 IndexPowerVect maskRefsL
eft, IndexPowerVect maskRefsRight, |
| 93 double tol) |
| 94 : TestCase (std::string ("SpectrumValue ") + str) |
| 95 { |
| 96 NS_LOG_FUNCTION (this << str << standard << (uint16_t)bw << tol); |
| 97 NS_ASSERT (maskRefsLeft.size () % 2 == 0 && maskRefsRight.size () % 2 == 0); /
/start/stop pairs expected |
| 98 uint16_t freq = 5170 + (bw / 2); // so as to have 5180/5190/5210/5250 for 20/4
0/80/160 |
| 99 double refTxPowerW = 1; // have to work in dBr when comparing though |
| 100 m_tolerance = tol; // in dB |
| 101 |
| 102 switch (standard) |
| 103 { |
| 104 case WIFI_PHY_STANDARD_80211_5MHZ: |
| 105 NS_ASSERT (bw == 5); |
| 106 freq = 5860; |
| 107 m_actualSpectrum = WifiSpectrumValueHelper::CreateOfdmTxPowerSpectralDensi
ty (freq, bw, refTxPowerW, bw); |
| 108 break; |
| 109 case WIFI_PHY_STANDARD_80211_10MHZ: |
| 110 NS_ASSERT (bw == 10); |
| 111 freq = 5860; |
| 112 m_actualSpectrum = WifiSpectrumValueHelper::CreateOfdmTxPowerSpectralDensi
ty (freq, bw, refTxPowerW, bw); |
| 113 break; |
| 114 |
| 115 // 11g and 11a |
| 116 case WIFI_PHY_STANDARD_80211g: |
| 117 freq = 2412; |
| 118 // no break on purpose |
| 119 case WIFI_PHY_STANDARD_80211a: |
| 120 case WIFI_PHY_STANDARD_holland: |
| 121 NS_ASSERT (bw == 20); |
| 122 m_actualSpectrum = WifiSpectrumValueHelper::CreateOfdmTxPowerSpectralDensi
ty (freq, bw, refTxPowerW, bw); |
| 123 break; |
| 124 |
| 125 // 11n |
| 126 case WIFI_PHY_STANDARD_80211n_2_4GHZ: |
| 127 freq = 2402 + (bw / 2); //so as to have 2412/2422 for 20/40 |
| 128 // no break on purpose |
| 129 case WIFI_PHY_STANDARD_80211n_5GHZ: |
| 130 NS_ASSERT (bw == 20 || bw == 40); |
| 131 m_actualSpectrum = WifiSpectrumValueHelper::CreateHtOfdmTxPowerSpectralDen
sity (freq, bw, refTxPowerW, bw); |
| 132 break; |
| 133 |
| 134 // 11ac |
| 135 case WIFI_PHY_STANDARD_80211ac: |
| 136 NS_ASSERT (bw == 20 || bw == 40 || bw == 80 || bw == 160); |
| 137 m_actualSpectrum = WifiSpectrumValueHelper::CreateHtOfdmTxPowerSpectralDen
sity (freq, bw, refTxPowerW, bw); |
| 138 break; |
| 139 |
| 140 // 11ax |
| 141 case WIFI_PHY_STANDARD_80211ax_2_4GHZ: |
| 142 NS_ASSERT (bw != 160); // not enough space in 2.4 GHz bands |
| 143 freq = 2402 + (bw / 2); //so as to have 2412/2422 for 20/40 |
| 144 // no break on purpose |
| 145 case WIFI_PHY_STANDARD_80211ax_5GHZ: |
| 146 NS_ASSERT (bw == 20 || bw == 40 || bw == 80 || bw == 160); |
| 147 m_actualSpectrum = WifiSpectrumValueHelper::CreateHeOfdmTxPowerSpectralDen
sity (freq, bw, refTxPowerW, bw); |
| 148 break; |
| 149 |
| 150 // other |
| 151 default: |
| 152 NS_FATAL_ERROR ("Standard unknown or non-OFDM"); |
| 153 break; |
| 154 } |
| 155 |
| 156 NS_LOG_INFO ("Build expected left PSD"); |
| 157 for (uint32_t i = 0; i < maskRefsLeft.size (); i = i + 2) |
| 158 { |
| 159 InterpolateAndAppendValues (m_expectedLeftPsd, maskRefsLeft[i], maskRefsLe
ft[i + 1], tol); |
| 160 } |
| 161 NS_ASSERT (m_expectedLeftPsd.size () == (m_expectedLeftPsd.back ().first - m_e
xpectedLeftPsd.front ().first + 1)); |
| 162 |
| 163 NS_LOG_INFO ("Build expected right PSD"); |
| 164 for (uint32_t i = 0; i < maskRefsRight.size (); i = i + 2) |
| 165 { |
| 166 InterpolateAndAppendValues (m_expectedRightPsd, maskRefsRight[i], maskRefs
Right[i + 1], tol); |
| 167 } |
| 168 NS_ASSERT (m_expectedRightPsd.size () == (m_expectedRightPsd.back ().first - m
_expectedRightPsd.front ().first + 1)); |
| 169 |
| 170 } |
| 171 |
| 172 WifiOfdmMaskSlopesTestCase::~WifiOfdmMaskSlopesTestCase () |
| 173 { |
| 174 } |
| 175 |
| 176 void |
| 177 WifiOfdmMaskSlopesTestCase::InterpolateAndAppendValues (IndexPowerVect &vect, In
dexPowerPair start, IndexPowerPair stop, |
| 178 double tol) |
| 179 { |
| 180 NS_LOG_FUNCTION (start.first << start.second << stop.first << stop.second); |
| 181 NS_ASSERT (start.first <= stop.first); |
| 182 |
| 183 if (start.first == stop.first) //only one point, no need to interpolate |
| 184 { |
| 185 NS_ASSERT (start.second == stop.second); |
| 186 vect.push_back (start); |
| 187 NS_LOG_LOGIC ("Append (" << start.first << ", " << stop.second << ")"); |
| 188 return; |
| 189 } |
| 190 |
| 191 double slope = (stop.second - start.second) / (stop.first - start.first); |
| 192 for (uint32_t i = start.first; i <= stop.first; i++) |
| 193 { |
| 194 double val = start.second + slope * (i - start.first); |
| 195 vect.push_back (std::make_pair (i, val)); |
| 196 NS_LOG_LOGIC ("Append (" << i << ", " << val << ")"); |
| 197 } |
| 198 NS_ASSERT (vect.back ().first == stop.first |
| 199 && TestDoubleIsEqual(vect.back ().second, stop.second, tol)); |
| 200 } |
| 201 |
| 202 void· |
| 203 WifiOfdmMaskSlopesTestCase::DoRun (void) |
| 204 { |
| 205 NS_LOG_FUNCTION (this); |
| 206 double currentPowerDbr = 0.0; //have to work in dBr so as to compare with expe
cted slopes |
| 207 double maxPowerW = (*m_actualSpectrum)[0]; |
| 208 for (Values::const_iterator vit = m_actualSpectrum->ConstValuesBegin (); vit !
= m_actualSpectrum->ConstValuesEnd (); vit++) |
| 209 { |
| 210 maxPowerW = std::max (maxPowerW, *vit); |
| 211 } |
| 212 |
| 213 NS_LOG_INFO ("Compare expected left PSD"); |
| 214 for (IndexPowerVect::const_iterator it = m_expectedLeftPsd.begin (); it != m_e
xpectedLeftPsd.end (); it++) |
| 215 { |
| 216 currentPowerDbr = 10.0 * std::log10 ((*m_actualSpectrum)[it->first] / maxP
owerW); |
| 217 NS_LOG_LOGIC ("For " << it->first << ", expected: " << it->second << " vs
obtained: " << currentPowerDbr); |
| 218 NS_TEST_EXPECT_MSG_EQ_TOL (currentPowerDbr, it->second, m_tolerance, |
| 219 "Spectrum value mismatch for left guard band ("
<< it->first << ")"); |
| 220 } |
| 221 NS_LOG_INFO ("Compare expected right PSD"); |
| 222 for (IndexPowerVect::const_iterator it = m_expectedRightPsd.begin (); it != m_
expectedRightPsd.end (); it++) |
| 223 { |
| 224 currentPowerDbr = 10.0 * std::log10 ((*m_actualSpectrum)[it->first] / maxP
owerW); |
| 225 NS_LOG_LOGIC ("For " << it->first << ", expected: " << it->second << " vs
obtained: " << currentPowerDbr); |
| 226 NS_TEST_EXPECT_MSG_EQ_TOL (currentPowerDbr, it->second, m_tolerance, |
| 227 "Spectrum value mismatch for right guard band (
" << it->first << ")"); |
| 228 } |
| 229 } |
| 230 |
| 231 |
| 232 |
| 233 /** |
| 234 * \ingroup wifi-test |
| 235 * \ingroup tests |
| 236 * |
| 237 * \brief Test suite for checking the consistency of different OFDM-based transm
it masks. |
| 238 */ |
| 239 class WifiTransmitMaskTestSuite : public TestSuite |
| 240 { |
| 241 public: |
| 242 WifiTransmitMaskTestSuite (); |
| 243 }; |
| 244 |
| 245 static WifiTransmitMaskTestSuite g_WifiTransmitMaskTestSuite; |
| 246 |
| 247 WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () |
| 248 : TestSuite ("wifi-transmit-mask", UNIT) |
| 249 { |
| 250 // LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL
_ALL); |
| 251 // LogComponentEnable ("WifiTransmitMaskTestSuite", logLevel); |
| 252 // LogComponentEnable ("WifiSpectrumValueHelper", logLevel); |
| 253 |
| 254 NS_LOG_INFO ("Creating WifiTransmitMaskTestSuite"); |
| 255 |
| 256 WifiOfdmMaskSlopesTestCase::IndexPowerVect maskSlopesLeft; |
| 257 WifiOfdmMaskSlopesTestCase::IndexPowerVect maskSlopesRight; |
| 258 double tol = 0.001; // in dB |
| 259 |
| 260 // ===========================================================================
================= |
| 261 /* TODO: uncomment these two test cases once bug #2813 has been solved (otherwis
e will surely fail) |
| 262 // 11 5MHz |
| 263 NS_LOG_FUNCTION ("Check slopes for 11 5MHz"); |
| 264 maskSlopesLeft.push_back (std::make_pair (0, -40.0)); // Outer band left (star
t) |
| 265 maskSlopesLeft.push_back (std::make_pair (31, -28.375)); // Outer band left (s
top) |
| 266 maskSlopesLeft.push_back (std::make_pair (32, -28.000)); // Middle band left (
start) |
| 267 maskSlopesLeft.push_back (std::make_pair (60, -20.276)); // Middle band left (
stop) |
| 268 maskSlopesLeft.push_back (std::make_pair (61, -20.0)); // Flat junction band l
eft (start) |
| 269 maskSlopesLeft.push_back (std::make_pair (63, -20.0)); // Flat junction band l
eft (stop) |
| 270 maskSlopesLeft.push_back (std::make_pair (64, -20.0)); // Inner band left (sta
rt) |
| 271 maskSlopesLeft.push_back (std::make_pair (69, -3.333)); // Inner band left (st
op) |
| 272 maskSlopesRight.push_back (std::make_pair (123, -3.333)); // Inner band right
(start) |
| 273 maskSlopesRight.push_back (std::make_pair (128, -20.0)); // Inner band right (
stop) |
| 274 maskSlopesRight.push_back (std::make_pair (129, -20.0)); // Flat junction band
right (start) |
| 275 maskSlopesRight.push_back (std::make_pair (131, -20.0)); // Flat junction band
right (stop) |
| 276 maskSlopesRight.push_back (std::make_pair (132, -20.276)); // Middle band righ
t (start) |
| 277 maskSlopesRight.push_back (std::make_pair (160, -28.000)); // Middle band righ
t (stop) |
| 278 maskSlopesRight.push_back (std::make_pair (161, -28.375)); // Outer band right
(start) |
| 279 maskSlopesRight.push_back (std::make_pair (192, -40.0)); // Outer band right (
stop) |
| 280 AddTestCase (new WifiOfdmMaskSlopesTestCase ("11 5MHz", WIFI_PHY_STANDARD_8021
1_5MHZ, 5, |
| 281 maskSlopesLeft, maskSlopesRight,
tol), |
| 282 TestCase::QUICK); |
| 283 |
| 284 // 11 10MHz |
| 285 NS_LOG_FUNCTION ("Check slopes for 11 10MHz"); |
| 286 maskSlopesLeft.clear (); |
| 287 maskSlopesRight.clear (); |
| 288 maskSlopesLeft.push_back (std::make_pair (0, -40.0)); // Outer band left (star
t) |
| 289 maskSlopesLeft.push_back (std::make_pair (31, -28.375)); // Outer band left (s
top) |
| 290 maskSlopesLeft.push_back (std::make_pair (32, -28.000)); // Middle band left (
start) |
| 291 maskSlopesLeft.push_back (std::make_pair (60, -20.276)); // Middle band left (
stop) |
| 292 maskSlopesLeft.push_back (std::make_pair (61, -20.0)); // Flat junction band l
eft (start) |
| 293 maskSlopesLeft.push_back (std::make_pair (63, -20.0)); // Flat junction band l
eft (stop) |
| 294 maskSlopesLeft.push_back (std::make_pair (64, -20.0)); // Inner band left (sta
rt) |
| 295 maskSlopesLeft.push_back (std::make_pair (69, -3.333)); // Inner band left (st
op) |
| 296 maskSlopesRight.push_back (std::make_pair (123, -3.333)); // Inner band right
(start) |
| 297 maskSlopesRight.push_back (std::make_pair (128, -20.0)); // Inner band right (
stop) |
| 298 maskSlopesRight.push_back (std::make_pair (129, -20.0)); // Flat junction band
right (start) |
| 299 maskSlopesRight.push_back (std::make_pair (131, -20.0)); // Flat junction band
right (stop) |
| 300 maskSlopesRight.push_back (std::make_pair (132, -20.276)); // Middle band righ
t (start) |
| 301 maskSlopesRight.push_back (std::make_pair (160, -28.000)); // Middle band righ
t (stop) |
| 302 maskSlopesRight.push_back (std::make_pair (161, -28.375)); // Outer band right
(start) |
| 303 maskSlopesRight.push_back (std::make_pair (192, -40.0)); // Outer band right (
stop) |
| 304 AddTestCase (new WifiOfdmMaskSlopesTestCase ("11 10MHz", WIFI_PHY_STANDARD_802
11_10MHZ, 10, |
| 305 maskSlopesLeft, maskSlopesRight,
tol), |
| 306 TestCase::QUICK); |
| 307 */ |
| 308 |
| 309 // ===========================================================================
================= |
| 310 // 11a |
| 311 NS_LOG_FUNCTION ("Check slopes for 11a"); |
| 312 maskSlopesLeft.clear (); |
| 313 maskSlopesRight.clear (); |
| 314 maskSlopesLeft.push_back (std::make_pair (0, -40.0)); // Outer band left (star
t) |
| 315 maskSlopesLeft.push_back (std::make_pair (31, -28.375)); // Outer band left (s
top) |
| 316 maskSlopesLeft.push_back (std::make_pair (32, -28.000)); // Middle band left (
start) |
| 317 maskSlopesLeft.push_back (std::make_pair (60, -20.276)); // Middle band left (
stop) |
| 318 maskSlopesLeft.push_back (std::make_pair (61, -20.0)); // Flat junction band l
eft (start) |
| 319 maskSlopesLeft.push_back (std::make_pair (63, -20.0)); // Flat junction band l
eft (stop) |
| 320 maskSlopesLeft.push_back (std::make_pair (64, -20.0)); // Inner band left (sta
rt) |
| 321 maskSlopesLeft.push_back (std::make_pair (69, -3.333)); // Inner band left (st
op) |
| 322 maskSlopesRight.push_back (std::make_pair (123, -3.333)); // Inner band right
(start) |
| 323 maskSlopesRight.push_back (std::make_pair (128, -20.0)); // Inner band right (
stop) |
| 324 maskSlopesRight.push_back (std::make_pair (129, -20.0)); // Flat junction band
right (start) |
| 325 maskSlopesRight.push_back (std::make_pair (131, -20.0)); // Flat junction band
right (stop) |
| 326 maskSlopesRight.push_back (std::make_pair (132, -20.276)); // Middle band righ
t (start) |
| 327 maskSlopesRight.push_back (std::make_pair (160, -28.000)); // Middle band righ
t (stop) |
| 328 maskSlopesRight.push_back (std::make_pair (161, -28.375)); // Outer band right
(start) |
| 329 maskSlopesRight.push_back (std::make_pair (192, -40.0)); // Outer band right (
stop) |
| 330 AddTestCase (new WifiOfdmMaskSlopesTestCase ("11a", WIFI_PHY_STANDARD_80211a,
20, |
| 331 maskSlopesLeft, maskSlopesRight,
tol), |
| 332 TestCase::QUICK); |
| 333 |
| 334 // 11a (holland) |
| 335 NS_LOG_FUNCTION ("Check slopes for 11a (holland)"); |
| 336 // same slopes as 11a (same PHY layer) |
| 337 AddTestCase (new WifiOfdmMaskSlopesTestCase ("11a (holland)", WIFI_PHY_STANDAR
D_holland, 20, |
| 338 maskSlopesLeft, maskSlopesRight,
tol), |
| 339 TestCase::QUICK); |
| 340 |
| 341 // 11g |
| 342 NS_LOG_FUNCTION ("Check slopes for 11g"); |
| 343 // same slppes as 11g |
| 344 AddTestCase (new WifiOfdmMaskSlopesTestCase ("11g", WIFI_PHY_STANDARD_80211g,
20, |
| 345 maskSlopesLeft, maskSlopesRight,
tol), |
| 346 TestCase::QUICK); |
| 347 |
| 348 |
| 349 // ===========================================================================
================= |
| 350 // 11n 20MHz @ 2.4GHz |
| 351 NS_LOG_FUNCTION ("Check slopes for 11n 20MHz @ 2.4GHz "); |
| 352 maskSlopesLeft.clear (); |
| 353 maskSlopesRight.clear (); |
| 354 maskSlopesLeft.push_back (std::make_pair (0, -45.000)); // Outer band left (st
art) |
| 355 maskSlopesLeft.push_back (std::make_pair (31, -28.531)); // Outer band left (s
top) |
| 356 maskSlopesLeft.push_back (std::make_pair (32, -28.000)); // Middle band left (
start) |
| 357 maskSlopesLeft.push_back (std::make_pair (60, -20.276)); // Middle band left (
stop) |
| 358 maskSlopesLeft.push_back (std::make_pair (61, -20.0)); // Flat junction band l
eft (start) |
| 359 maskSlopesLeft.push_back (std::make_pair (61, -20.0)); // Flat junction band l
eft (stop) |
| 360 maskSlopesLeft.push_back (std::make_pair (62, -20.0)); // Inner band left (sta
rt) |
| 361 maskSlopesLeft.push_back (std::make_pair (67, -3.333)); // Inner band left (st
op) |
| 362 maskSlopesRight.push_back (std::make_pair (125, -3.333)); // Inner band right
(start) |
| 363 maskSlopesRight.push_back (std::make_pair (130, -20.0)); // Inner band right (
stop) |
| 364 maskSlopesRight.push_back (std::make_pair (131, -20.0)); // Flat junction band
right (start) |
| 365 maskSlopesRight.push_back (std::make_pair (131, -20.0)); // Flat junction band
right (stop) |
| 366 maskSlopesRight.push_back (std::make_pair (132, -20.276)); // Middle band righ
t (start) |
| 367 maskSlopesRight.push_back (std::make_pair (160, -28.000)); // Middle band righ
t (stop) |
| 368 maskSlopesRight.push_back (std::make_pair (161, -28.531)); // Outer band right
(start) |
| 369 maskSlopesRight.push_back (std::make_pair (192, -45.000)); // Outer band right
(stop) |
| 370 AddTestCase (new WifiOfdmMaskSlopesTestCase ("11n_2.4GHz 20MHz", WIFI_PHY_STAN
DARD_80211n_2_4GHZ, 20, |
| 371 maskSlopesLeft, maskSlopesRight,
tol), |
| 372 TestCase::QUICK); |
| 373 |
| 374 // 11n 20MHz @ 5GHz |
| 375 NS_LOG_FUNCTION ("Check slopes for 11n 20MHz @ 5GHz"); |
| 376 maskSlopesLeft.clear (); |
| 377 maskSlopesRight.clear (); |
| 378 maskSlopesLeft.push_back (std::make_pair (0, -40.0)); // Outer band left (star
t) |
| 379 maskSlopesLeft.push_back (std::make_pair (31, -28.375)); // Outer band left (s
top) |
| 380 maskSlopesLeft.push_back (std::make_pair (32, -28.000)); // Middle band left (
start) |
| 381 maskSlopesLeft.push_back (std::make_pair (60, -20.276)); // Middle band left (
stop) |
| 382 maskSlopesLeft.push_back (std::make_pair (61, -20.0)); // Flat junction band l
eft (start) |
| 383 maskSlopesLeft.push_back (std::make_pair (61, -20.0)); // Flat junction band l
eft (stop) |
| 384 maskSlopesLeft.push_back (std::make_pair (62, -20.0)); // Inner band left (sta
rt) |
| 385 maskSlopesLeft.push_back (std::make_pair (67, -3.333)); // Inner band left (st
op) |
| 386 maskSlopesRight.push_back (std::make_pair (125, -3.333)); // Inner band right
(start) |
| 387 maskSlopesRight.push_back (std::make_pair (130, -20.0)); // Inner band right (
stop) |
| 388 maskSlopesRight.push_back (std::make_pair (131, -20.0)); // Flat junction band
right (start) |
| 389 maskSlopesRight.push_back (std::make_pair (131, -20.0)); // Flat junction band
right (stop) |
| 390 maskSlopesRight.push_back (std::make_pair (132, -20.276)); // Middle band righ
t (start) |
| 391 maskSlopesRight.push_back (std::make_pair (160, -28.000)); // Middle band righ
t (stop) |
| 392 maskSlopesRight.push_back (std::make_pair (161, -28.375)); // Outer band right
(start) |
| 393 maskSlopesRight.push_back (std::make_pair (192, -40.0)); // Outer band right (
stop) |
| 394 AddTestCase (new WifiOfdmMaskSlopesTestCase ("11n_5GHz 20MHz", WIFI_PHY_STANDA
RD_80211n_5GHZ, 20, |
| 395 maskSlopesLeft, maskSlopesRight,
tol), |
| 396 TestCase::QUICK); |
| 397 |
| 398 // 11n 40MHz @ 2.4GHz |
| 399 NS_LOG_FUNCTION ("Check slopes for 11n 40MHz @ 2.4GHz "); |
| 400 maskSlopesLeft.clear (); |
| 401 maskSlopesRight.clear (); |
| 402 maskSlopesLeft.push_back (std::make_pair (0, -45.000)); // Outer band left (st
art) |
| 403 maskSlopesLeft.push_back (std::make_pair (63, -28.266)); // Outer band left (s
top) |
| 404 maskSlopesLeft.push_back (std::make_pair (64, -28.000)); // Middle band left (
start) |
| 405 maskSlopesLeft.push_back (std::make_pair (124, -20.131)); // Middle band left
(stop) |
| 406 maskSlopesLeft.push_back (std::make_pair (125, -20.0)); // Flat junction band
left (start) |
| 407 maskSlopesLeft.push_back (std::make_pair (125, -20.0)); // Flat junction band
left (stop) |
| 408 maskSlopesLeft.push_back (std::make_pair (126, -20.0)); // Inner band left (st
art) |
| 409 maskSlopesLeft.push_back (std::make_pair (131, -3.333)); // Inner band left (s
top) |
| 410 maskSlopesRight.push_back (std::make_pair (253, -3.333)); // Inner band right
(start) |
| 411 maskSlopesRight.push_back (std::make_pair (258, -20.0)); // Inner band right (
stop) |
| 412 maskSlopesRight.push_back (std::make_pair (259, -20.0)); // Flat junction band
right (start) |
| 413 maskSlopesRight.push_back (std::make_pair (259, -20.0)); // Flat junction band
right (stop) |
| 414 maskSlopesRight.push_back (std::make_pair (260, -20.131)); // Middle band righ
t (start) |
| 415 maskSlopesRight.push_back (std::make_pair (320, -28.000)); // Middle band righ
t (stop) |
| 416 maskSlopesRight.push_back (std::make_pair (321, -28.266)); // Outer band right
(start) |
| 417 maskSlopesRight.push_back (std::make_pair (384, -45.000)); // Outer band right
(stop) |
| 418 AddTestCase (new WifiOfdmMaskSlopesTestCase ("11n_2.4GHz 40MHz", WIFI_PHY_STAN
DARD_80211n_2_4GHZ, 40, |
| 419 maskSlopesLeft, maskSlopesRight,
tol), |
| 420 TestCase::QUICK); |
| 421 |
| 422 // 11n 20MHz @ 5GHz |
| 423 NS_LOG_FUNCTION ("Check slopes for 11n 40MHz @ 5GHz"); |
| 424 maskSlopesLeft.clear (); |
| 425 maskSlopesRight.clear (); |
| 426 maskSlopesLeft.push_back (std::make_pair (0, -40.0)); // Outer band left (star
t) |
| 427 maskSlopesLeft.push_back (std::make_pair (63, -28.188)); // Outer band left (s
top) |
| 428 maskSlopesLeft.push_back (std::make_pair (64, -28.000)); // Middle band left (
start) |
| 429 maskSlopesLeft.push_back (std::make_pair (124, -20.131)); // Middle band left
(stop) |
| 430 maskSlopesLeft.push_back (std::make_pair (125, -20.0)); // Flat junction band
left (start) |
| 431 maskSlopesLeft.push_back (std::make_pair (125, -20.0)); // Flat junction band
left (stop) |
| 432 maskSlopesLeft.push_back (std::make_pair (126, -20.0)); // Inner band left (st
art) |
| 433 maskSlopesLeft.push_back (std::make_pair (131, -3.333)); // Inner band left (s
top) |
| 434 maskSlopesRight.push_back (std::make_pair (253, -3.333)); // Inner band right
(start) |
| 435 maskSlopesRight.push_back (std::make_pair (258, -20.0)); // Inner band right (
stop) |
| 436 maskSlopesRight.push_back (std::make_pair (259, -20.0)); // Flat junction band
right (start) |
| 437 maskSlopesRight.push_back (std::make_pair (259, -20.0)); // Flat junction band
right (stop) |
| 438 maskSlopesRight.push_back (std::make_pair (260, -20.131)); // Middle band righ
t (start) |
| 439 maskSlopesRight.push_back (std::make_pair (320, -28.000)); // Middle band righ
t (stop) |
| 440 maskSlopesRight.push_back (std::make_pair (321, -28.188)); // Outer band right
(start) |
| 441 maskSlopesRight.push_back (std::make_pair (384, -40.0)); // Outer band right (
stop) |
| 442 AddTestCase (new WifiOfdmMaskSlopesTestCase ("11n_5GHz 40MHz", WIFI_PHY_STANDA
RD_80211n_5GHZ, 40, |
| 443 maskSlopesLeft, maskSlopesRight,
tol), |
| 444 TestCase::QUICK); |
| 445 |
| 446 |
| 447 // ===========================================================================
================= |
| 448 // 11ac 20MHz |
| 449 NS_LOG_FUNCTION ("Check slopes for 11ac 20MHz"); |
| 450 maskSlopesLeft.clear (); |
| 451 maskSlopesRight.clear (); |
| 452 maskSlopesLeft.push_back (std::make_pair (0, -40.0)); // Outer band left (star
t) |
| 453 maskSlopesLeft.push_back (std::make_pair (31, -28.375)); // Outer band left (s
top) |
| 454 maskSlopesLeft.push_back (std::make_pair (32, -28.000)); // Middle band left (
start) |
| 455 maskSlopesLeft.push_back (std::make_pair (60, -20.276)); // Middle band left (
stop) |
| 456 maskSlopesLeft.push_back (std::make_pair (61, -20.0)); // Flat junction band l
eft (start) |
| 457 maskSlopesLeft.push_back (std::make_pair (61, -20.0)); // Flat junction band l
eft (stop) |
| 458 maskSlopesLeft.push_back (std::make_pair (62, -20.0)); // Inner band left (sta
rt) |
| 459 maskSlopesLeft.push_back (std::make_pair (67, -3.333)); // Inner band left (st
op) |
| 460 maskSlopesRight.push_back (std::make_pair (125, -3.333)); // Inner band right
(start) |
| 461 maskSlopesRight.push_back (std::make_pair (130, -20.0)); // Inner band right (
stop) |
| 462 maskSlopesRight.push_back (std::make_pair (131, -20.0)); // Flat junction band
right (start) |
| 463 maskSlopesRight.push_back (std::make_pair (131, -20.0)); // Flat junction band
right (stop) |
| 464 maskSlopesRight.push_back (std::make_pair (132, -20.276)); // Middle band righ
t (start) |
| 465 maskSlopesRight.push_back (std::make_pair (160, -28.000)); // Middle band righ
t (stop) |
| 466 maskSlopesRight.push_back (std::make_pair (161, -28.375)); // Outer band right
(start) |
| 467 maskSlopesRight.push_back (std::make_pair (192, -40.0)); // Outer band right (
stop) |
| 468 AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ac 20MHz", WIFI_PHY_STANDARD_8
0211ac, 20, |
| 469 maskSlopesLeft, maskSlopesRight,
tol), |
| 470 TestCase::QUICK); |
| 471 |
| 472 // 11ac 20MHz |
| 473 NS_LOG_FUNCTION ("Check slopes for 11ac 40MHz"); |
| 474 maskSlopesLeft.clear (); |
| 475 maskSlopesRight.clear (); |
| 476 maskSlopesLeft.push_back (std::make_pair (0, -40.0)); // Outer band left (star
t) |
| 477 maskSlopesLeft.push_back (std::make_pair (63, -28.188)); // Outer band left (s
top) |
| 478 maskSlopesLeft.push_back (std::make_pair (64, -28.000)); // Middle band left (
start) |
| 479 maskSlopesLeft.push_back (std::make_pair (124, -20.131)); // Middle band left
(stop) |
| 480 maskSlopesLeft.push_back (std::make_pair (125, -20.0)); // Flat junction band
left (start) |
| 481 maskSlopesLeft.push_back (std::make_pair (125, -20.0)); // Flat junction band
left (stop) |
| 482 maskSlopesLeft.push_back (std::make_pair (126, -20.0)); // Inner band left (st
art) |
| 483 maskSlopesLeft.push_back (std::make_pair (131, -3.333)); // Inner band left (s
top) |
| 484 maskSlopesRight.push_back (std::make_pair (253, -3.333)); // Inner band right
(start) |
| 485 maskSlopesRight.push_back (std::make_pair (258, -20.0)); // Inner band right (
stop) |
| 486 maskSlopesRight.push_back (std::make_pair (259, -20.0)); // Flat junction band
right (start) |
| 487 maskSlopesRight.push_back (std::make_pair (259, -20.0)); // Flat junction band
right (stop) |
| 488 maskSlopesRight.push_back (std::make_pair (260, -20.131)); // Middle band righ
t (start) |
| 489 maskSlopesRight.push_back (std::make_pair (320, -28.000)); // Middle band righ
t (stop) |
| 490 maskSlopesRight.push_back (std::make_pair (321, -28.188)); // Outer band right
(start) |
| 491 maskSlopesRight.push_back (std::make_pair (384, -40.0)); // Outer band right (
stop) |
| 492 AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ac 40MHz", WIFI_PHY_STANDARD_8
0211ac, 40, |
| 493 maskSlopesLeft, maskSlopesRight,
tol), |
| 494 TestCase::QUICK); |
| 495 |
| 496 // 11ac 80MHz |
| 497 NS_LOG_FUNCTION ("Check slopes for 11ac 80MHz"); |
| 498 maskSlopesLeft.clear (); |
| 499 maskSlopesRight.clear (); |
| 500 maskSlopesLeft.push_back (std::make_pair (0, -40.0)); // Outer band left (star
t) |
| 501 maskSlopesLeft.push_back (std::make_pair (127, -28.094)); // Outer band left (
stop) |
| 502 maskSlopesLeft.push_back (std::make_pair (128, -28.000)); // Middle band left
(start) |
| 503 maskSlopesLeft.push_back (std::make_pair (252, -20.064)); // Middle band left
(stop) |
| 504 maskSlopesLeft.push_back (std::make_pair (253, -20.0)); // Flat junction band
left (start) |
| 505 maskSlopesLeft.push_back (std::make_pair (253, -20.0)); // Flat junction band
left (stop) |
| 506 maskSlopesLeft.push_back (std::make_pair (254, -20.0)); // Inner band left (st
art) |
| 507 maskSlopesLeft.push_back (std::make_pair (259, -3.333)); // Inner band left (s
top) |
| 508 maskSlopesRight.push_back (std::make_pair (509, -3.333)); // Inner band right
(start) |
| 509 maskSlopesRight.push_back (std::make_pair (514, -20.0)); // Inner band right (
stop) |
| 510 maskSlopesRight.push_back (std::make_pair (515, -20.0)); // Flat junction band
right (start) |
| 511 maskSlopesRight.push_back (std::make_pair (515, -20.0)); // Flat junction band
right (stop) |
| 512 maskSlopesRight.push_back (std::make_pair (516, -20.064)); // Middle band righ
t (start) |
| 513 maskSlopesRight.push_back (std::make_pair (640, -28.000)); // Middle band righ
t (stop) |
| 514 maskSlopesRight.push_back (std::make_pair (641, -28.094)); // Outer band right
(start) |
| 515 maskSlopesRight.push_back (std::make_pair (768, -40.0)); // Outer band right (
stop) |
| 516 AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ac 80MHz", WIFI_PHY_STANDARD_8
0211ac, 80, |
| 517 maskSlopesLeft, maskSlopesRight,
tol), |
| 518 TestCase::QUICK); |
| 519 |
| 520 // 11ac 20MHz |
| 521 NS_LOG_FUNCTION ("Check slopes for 11ac 160MHz"); |
| 522 maskSlopesLeft.clear (); |
| 523 maskSlopesRight.clear (); |
| 524 maskSlopesLeft.push_back (std::make_pair (0, -40.0)); // Outer band left (star
t) |
| 525 maskSlopesLeft.push_back (std::make_pair (255, -28.047)); // Outer band left (
stop) |
| 526 maskSlopesLeft.push_back (std::make_pair (256, -28.000)); // Middle band left
(start) |
| 527 maskSlopesLeft.push_back (std::make_pair (508, -20.032)); // Middle band left
(stop) |
| 528 maskSlopesLeft.push_back (std::make_pair (509, -20.0)); // Flat junction band
left (start) |
| 529 maskSlopesLeft.push_back (std::make_pair (509, -20.0)); // Flat junction band
left (stop) |
| 530 maskSlopesLeft.push_back (std::make_pair (510, -20.0)); // Inner band left (st
art) |
| 531 maskSlopesLeft.push_back (std::make_pair (515, -3.333)); // Inner band left (s
top) |
| 532 maskSlopesRight.push_back (std::make_pair (1021, -3.333)); // Inner band right
(start) |
| 533 maskSlopesRight.push_back (std::make_pair (1026, -20.0)); // Inner band right
(stop) |
| 534 maskSlopesRight.push_back (std::make_pair (1027, -20.0)); // Flat junction ban
d right (start) |
| 535 maskSlopesRight.push_back (std::make_pair (1027, -20.0)); // Flat junction ban
d right (stop) |
| 536 maskSlopesRight.push_back (std::make_pair (1028, -20.032)); // Middle band rig
ht (start) |
| 537 maskSlopesRight.push_back (std::make_pair (1280, -28.000)); // Middle band rig
ht (stop) |
| 538 maskSlopesRight.push_back (std::make_pair (1281, -28.047)); // Outer band righ
t (start) |
| 539 maskSlopesRight.push_back (std::make_pair (1536, -40.0)); // Outer band right
(stop) |
| 540 AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ac 160MHz", WIFI_PHY_STANDARD_
80211ac, 160, |
| 541 maskSlopesLeft, maskSlopesRight,
tol), |
| 542 TestCase::QUICK); |
| 543 |
| 544 |
| 545 // ===========================================================================
================= |
| 546 // 11ax 20MHz @ 2.4GHz |
| 547 NS_LOG_FUNCTION ("Check slopes for 11ax 20MHz @ 2.4GHz "); |
| 548 maskSlopesLeft.clear (); |
| 549 maskSlopesRight.clear (); |
| 550 maskSlopesLeft.push_back (std::make_pair (0, -45.000)); // Outer band left (st
art) |
| 551 maskSlopesLeft.push_back (std::make_pair (127, -28.133)); // Outer band left (
stop) |
| 552 maskSlopesLeft.push_back (std::make_pair (128, -28.000)); // Middle band left
(start) |
| 553 maskSlopesLeft.push_back (std::make_pair (252, -20.064)); // Middle band left
(stop) |
| 554 maskSlopesLeft.push_back (std::make_pair (253, -20.0)); // Flat junction band
left (start) |
| 555 maskSlopesLeft.push_back (std::make_pair (255, -20.0)); // Flat junction band
left (stop) |
| 556 maskSlopesLeft.push_back (std::make_pair (256, -20.0)); // Inner band left (st
art) |
| 557 maskSlopesLeft.push_back (std::make_pair (261, -3.333)); // Inner band left (s
top) |
| 558 maskSlopesRight.push_back (std::make_pair (507, -3.333)); // Inner band right
(start) |
| 559 maskSlopesRight.push_back (std::make_pair (512, -20.0)); // Inner band right (
stop) |
| 560 maskSlopesRight.push_back (std::make_pair (513, -20.0)); // Flat junction band
right (start) |
| 561 maskSlopesRight.push_back (std::make_pair (515, -20.0)); // Flat junction band
right (stop) |
| 562 maskSlopesRight.push_back (std::make_pair (516, -20.064)); // Middle band righ
t (start) |
| 563 maskSlopesRight.push_back (std::make_pair (640, -28.000)); // Middle band righ
t (stop) |
| 564 maskSlopesRight.push_back (std::make_pair (641, -28.133)); // Outer band right
(start) |
| 565 maskSlopesRight.push_back (std::make_pair (768, -45.000)); // Outer band right
(stop) |
| 566 AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_2.4GHz 20MHz", WIFI_PHY_STA
NDARD_80211ax_2_4GHZ, 20, |
| 567 maskSlopesLeft, maskSlopesRight,
tol), |
| 568 TestCase::QUICK); |
| 569 |
| 570 // 11ax 20MHz @ 5GHz |
| 571 NS_LOG_FUNCTION ("Check slopes for 11ax 20MHz @ 5GHz"); |
| 572 maskSlopesLeft.clear (); |
| 573 maskSlopesRight.clear (); |
| 574 maskSlopesLeft.push_back (std::make_pair (0, -40.0)); // Outer band left (star
t) |
| 575 maskSlopesLeft.push_back (std::make_pair (127, -28.094)); // Outer band left (
stop) |
| 576 maskSlopesLeft.push_back (std::make_pair (128, -28.000)); // Middle band left
(start) |
| 577 maskSlopesLeft.push_back (std::make_pair (252, -20.064)); // Middle band left
(stop) |
| 578 maskSlopesLeft.push_back (std::make_pair (253, -20.0)); // Flat junction band
left (start) |
| 579 maskSlopesLeft.push_back (std::make_pair (255, -20.0)); // Flat junction band
left (stop) |
| 580 maskSlopesLeft.push_back (std::make_pair (256, -20.0)); // Inner band left (st
art) |
| 581 maskSlopesLeft.push_back (std::make_pair (261, -3.333)); // Inner band left (s
top) |
| 582 maskSlopesRight.push_back (std::make_pair (507, -3.333)); // Inner band right
(start) |
| 583 maskSlopesRight.push_back (std::make_pair (512, -20.0)); // Inner band right (
stop) |
| 584 maskSlopesRight.push_back (std::make_pair (513, -20.0)); // Flat junction band
right (start) |
| 585 maskSlopesRight.push_back (std::make_pair (515, -20.0)); // Flat junction band
right (stop) |
| 586 maskSlopesRight.push_back (std::make_pair (516, -20.064)); // Middle band righ
t (start) |
| 587 maskSlopesRight.push_back (std::make_pair (640, -28.000)); // Middle band righ
t (stop) |
| 588 maskSlopesRight.push_back (std::make_pair (641, -28.094)); // Outer band right
(start) |
| 589 maskSlopesRight.push_back (std::make_pair (768, -40.0)); // Outer band right (
stop) |
| 590 AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 20MHz", WIFI_PHY_STAND
ARD_80211ax_5GHZ, 20, |
| 591 maskSlopesLeft, maskSlopesRight,
tol), |
| 592 TestCase::QUICK); |
| 593 |
| 594 // 11ax 40MHz @ 2.4GHz |
| 595 NS_LOG_FUNCTION ("Check slopes for 11ax 40MHz @ 2.4GHz "); |
| 596 maskSlopesLeft.clear (); |
| 597 maskSlopesRight.clear (); |
| 598 maskSlopesLeft.push_back (std::make_pair (0, -45.000)); // Outer band left (st
art) |
| 599 maskSlopesLeft.push_back (std::make_pair (255, -28.066)); // Outer band left (
stop) |
| 600 maskSlopesLeft.push_back (std::make_pair (256, -28.000)); // Middle band left
(start) |
| 601 maskSlopesLeft.push_back (std::make_pair (505, -20.032)); // Middle band left
(stop) |
| 602 maskSlopesLeft.push_back (std::make_pair (506, -20.0)); // Flat junction band
left (start) |
| 603 maskSlopesLeft.push_back (std::make_pair (510, -20.0)); // Flat junction band
left (stop) |
| 604 maskSlopesLeft.push_back (std::make_pair (511, -20.0)); // Inner band left (st
art) |
| 605 maskSlopesLeft.push_back (std::make_pair (523, -1.538)); // Inner band left (s
top) |
| 606 maskSlopesRight.push_back (std::make_pair (1013, -1.538)); // Inner band right
(start) |
| 607 maskSlopesRight.push_back (std::make_pair (1025, -20.0)); // Inner band right
(stop) |
| 608 maskSlopesRight.push_back (std::make_pair (1026, -20.0)); // Flat junction ban
d right (start) |
| 609 maskSlopesRight.push_back (std::make_pair (1030, -20.0)); // Flat junction ban
d right (stop) |
| 610 maskSlopesRight.push_back (std::make_pair (1031, -20.032)); // Middle band rig
ht (start) |
| 611 maskSlopesRight.push_back (std::make_pair (1280, -28.000)); // Middle band rig
ht (stop) |
| 612 maskSlopesRight.push_back (std::make_pair (1281, -28.066)); // Outer band righ
t (start) |
| 613 maskSlopesRight.push_back (std::make_pair (1536, -45.000)); // Outer band righ
t (stop) |
| 614 AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_2.4GHz 40MHz", WIFI_PHY_STA
NDARD_80211ax_2_4GHZ, 40, |
| 615 maskSlopesLeft, maskSlopesRight,
tol), |
| 616 TestCase::QUICK); |
| 617 |
| 618 // 11ax 40MHz @ 5GHz |
| 619 NS_LOG_FUNCTION ("Check slopes for 11ax 40MHz @ 5GHz"); |
| 620 maskSlopesLeft.clear (); |
| 621 maskSlopesRight.clear (); |
| 622 maskSlopesLeft.push_back (std::make_pair (0, -40.0)); // Outer band left (star
t) |
| 623 maskSlopesLeft.push_back (std::make_pair (255, -28.047)); // Outer band left (
stop) |
| 624 maskSlopesLeft.push_back (std::make_pair (256, -28.000)); // Middle band left
(start) |
| 625 maskSlopesLeft.push_back (std::make_pair (505, -20.032)); // Middle band left
(stop) |
| 626 maskSlopesLeft.push_back (std::make_pair (506, -20.0)); // Flat junction band
left (start) |
| 627 maskSlopesLeft.push_back (std::make_pair (510, -20.0)); // Flat junction band
left (stop) |
| 628 maskSlopesLeft.push_back (std::make_pair (511, -20.0)); // Inner band left (st
art) |
| 629 maskSlopesLeft.push_back (std::make_pair (523, -1.538)); // Inner band left (s
top) |
| 630 maskSlopesRight.push_back (std::make_pair (1013, -1.538)); // Inner band right
(start) |
| 631 maskSlopesRight.push_back (std::make_pair (1025, -20.0)); // Inner band right
(stop) |
| 632 maskSlopesRight.push_back (std::make_pair (1026, -20.0)); // Flat junction ban
d right (start) |
| 633 maskSlopesRight.push_back (std::make_pair (1030, -20.0)); // Flat junction ban
d right (stop) |
| 634 maskSlopesRight.push_back (std::make_pair (1031, -20.032)); // Middle band rig
ht (start) |
| 635 maskSlopesRight.push_back (std::make_pair (1280, -28.000)); // Middle band rig
ht (stop) |
| 636 maskSlopesRight.push_back (std::make_pair (1281, -28.047)); // Outer band righ
t (start) |
| 637 maskSlopesRight.push_back (std::make_pair (1536, -40.0)); // Outer band right
(stop) |
| 638 AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 40MHz", WIFI_PHY_STAND
ARD_80211ax_5GHZ, 40, |
| 639 maskSlopesLeft, maskSlopesRight,
tol), |
| 640 TestCase::QUICK); |
| 641 |
| 642 // 11ax 80MHz @ 2.4GHz |
| 643 NS_LOG_FUNCTION ("Check slopes for 11ax 80MHz @ 2.4GHz "); |
| 644 maskSlopesLeft.clear (); |
| 645 maskSlopesRight.clear (); |
| 646 maskSlopesLeft.push_back (std::make_pair (0, -45.000)); // Outer band left (st
art) |
| 647 maskSlopesLeft.push_back (std::make_pair (511, -28.033)); // Outer band left (
stop) |
| 648 maskSlopesLeft.push_back (std::make_pair (512, -28.000)); // Middle band left
(start) |
| 649 maskSlopesLeft.push_back (std::make_pair (1017, -20.016)); // Middle band left
(stop) |
| 650 maskSlopesLeft.push_back (std::make_pair (1018, -20.0)); // Flat junction band
left (start) |
| 651 maskSlopesLeft.push_back (std::make_pair (1022, -20.0)); // Flat junction band
left (stop) |
| 652 maskSlopesLeft.push_back (std::make_pair (1023, -20.0)); // Inner band left (s
tart) |
| 653 maskSlopesLeft.push_back (std::make_pair (1035, -1.538)); // Inner band left (
stop) |
| 654 maskSlopesRight.push_back (std::make_pair (2037, -1.538)); // Inner band right
(start) |
| 655 maskSlopesRight.push_back (std::make_pair (2049, -20.0)); // Inner band right
(stop) |
| 656 maskSlopesRight.push_back (std::make_pair (2050, -20.0)); // Flat junction ban
d right (start) |
| 657 maskSlopesRight.push_back (std::make_pair (2054, -20.0)); // Flat junction ban
d right (stop) |
| 658 maskSlopesRight.push_back (std::make_pair (2055, -20.016)); // Middle band rig
ht (start) |
| 659 maskSlopesRight.push_back (std::make_pair (2560, -28.000)); // Middle band rig
ht (stop) |
| 660 maskSlopesRight.push_back (std::make_pair (2561, -28.033)); // Outer band righ
t (start) |
| 661 maskSlopesRight.push_back (std::make_pair (3072, -45.000)); // Outer band righ
t (stop) |
| 662 AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_2.4GHz 80MHz", WIFI_PHY_STA
NDARD_80211ax_2_4GHZ, 80, |
| 663 maskSlopesLeft, maskSlopesRight,
tol), |
| 664 TestCase::QUICK); |
| 665 |
| 666 // 11ax 80MHz @ 5GHz |
| 667 NS_LOG_FUNCTION ("Check slopes for 11ax 80MHz @ 5GHz"); |
| 668 maskSlopesLeft.clear (); |
| 669 maskSlopesRight.clear (); |
| 670 maskSlopesLeft.push_back (std::make_pair (0, -40.0)); // Outer band left (star
t) |
| 671 maskSlopesLeft.push_back (std::make_pair (511, -28.023)); // Outer band left (
stop) |
| 672 maskSlopesLeft.push_back (std::make_pair (512, -28.000)); // Middle band left
(start) |
| 673 maskSlopesLeft.push_back (std::make_pair (1017, -20.016)); // Middle band left
(stop) |
| 674 maskSlopesLeft.push_back (std::make_pair (1018, -20.0)); // Flat junction band
left (start) |
| 675 maskSlopesLeft.push_back (std::make_pair (1022, -20.0)); // Flat junction band
left (stop) |
| 676 maskSlopesLeft.push_back (std::make_pair (1023, -20.0)); // Inner band left (s
tart) |
| 677 maskSlopesLeft.push_back (std::make_pair (1035, -1.538)); // Inner band left (
stop) |
| 678 maskSlopesRight.push_back (std::make_pair (2037, -1.538)); // Inner band right
(start) |
| 679 maskSlopesRight.push_back (std::make_pair (2049, -20.0)); // Inner band right
(stop) |
| 680 maskSlopesRight.push_back (std::make_pair (2050, -20.0)); // Flat junction ban
d right (start) |
| 681 maskSlopesRight.push_back (std::make_pair (2054, -20.0)); // Flat junction ban
d right (stop) |
| 682 maskSlopesRight.push_back (std::make_pair (2055, -20.016)); // Middle band rig
ht (start) |
| 683 maskSlopesRight.push_back (std::make_pair (2560, -28.000)); // Middle band rig
ht (stop) |
| 684 maskSlopesRight.push_back (std::make_pair (2561, -28.023)); // Outer band righ
t (start) |
| 685 maskSlopesRight.push_back (std::make_pair (3072, -40.0)); // Outer band right
(stop) |
| 686 AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 80MHz", WIFI_PHY_STAND
ARD_80211ax_5GHZ, 80, |
| 687 maskSlopesLeft, maskSlopesRight,
tol), |
| 688 TestCase::QUICK); |
| 689 |
| 690 // 11ax 160MHz @ 2.4GHz -> not enough space so skip |
| 691 |
| 692 // 11ax 160MHz @ 5GHz |
| 693 NS_LOG_FUNCTION ("Check slopes for 11ax 160MHz @ 5GHz"); |
| 694 maskSlopesLeft.clear (); |
| 695 maskSlopesRight.clear (); |
| 696 maskSlopesLeft.push_back (std::make_pair (0, -40.0)); // Outer band left (star
t) |
| 697 maskSlopesLeft.push_back (std::make_pair (1023, -28.012)); // Outer band left
(stop) |
| 698 maskSlopesLeft.push_back (std::make_pair (1024, -28.000)); // Middle band left
(start) |
| 699 maskSlopesLeft.push_back (std::make_pair (2041, -20.008)); // Middle band left
(stop) |
| 700 maskSlopesLeft.push_back (std::make_pair (2042, -20.0)); // Flat junction band
left (start) |
| 701 maskSlopesLeft.push_back (std::make_pair (2046, -20.0)); // Flat junction band
left (stop) |
| 702 maskSlopesLeft.push_back (std::make_pair (2047, -20.0)); // Inner band left (s
tart) |
| 703 maskSlopesLeft.push_back (std::make_pair (2059, -1.538)); // Inner band left (
stop) |
| 704 maskSlopesRight.push_back (std::make_pair (4085, -1.538)); // Inner band right
(start) |
| 705 maskSlopesRight.push_back (std::make_pair (4097, -20.0)); // Inner band right
(stop) |
| 706 maskSlopesRight.push_back (std::make_pair (4098, -20.0)); // Flat junction ban
d right (start) |
| 707 maskSlopesRight.push_back (std::make_pair (4102, -20.0)); // Flat junction ban
d right (stop) |
| 708 maskSlopesRight.push_back (std::make_pair (4103, -20.008)); // Middle band rig
ht (start) |
| 709 maskSlopesRight.push_back (std::make_pair (5120, -28.000)); // Middle band rig
ht (stop) |
| 710 maskSlopesRight.push_back (std::make_pair (5121, -28.012)); // Outer band righ
t (start) |
| 711 maskSlopesRight.push_back (std::make_pair (6144, -40.0)); // Outer band right
(stop) |
| 712 AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 160MHz", WIFI_PHY_STAN
DARD_80211ax_5GHZ, 160, |
| 713 maskSlopesLeft, maskSlopesRight,
tol), |
| 714 TestCase::QUICK); |
| 715 |
| 716 } |
LEFT | RIGHT |