diff --git a/examples/routing/global-routing-multi-switch-plus-router.cc b/examples/routing/global-routing-multi-switch-plus-router.cc index c14e64e52..d5711db06 100644 --- a/examples/routing/global-routing-multi-switch-plus-router.cc +++ b/examples/routing/global-routing-multi-switch-plus-router.cc @@ -320,15 +320,16 @@ main (int argc, char *argv[]) // ====================================================================== // Define the list of valid PCAP taps // ---------------------------------------------------------------------- - std::vector pcapTaps; - pcapTaps.push_back ("t2"); // multi-switch UDP echo client - pcapTaps.push_back ("t3"); // single-switch UDP echo server - pcapTaps.push_back ("b2"); // multi-switch UDP echo server - pcapTaps.push_back ("b3"); // single-switch UDP echo client - pcapTaps.push_back ("trlan"); // top router LAN side - pcapTaps.push_back ("trwan"); // top router WAN side - pcapTaps.push_back ("brlan"); // bottom router LAN side - pcapTaps.push_back ("brwan"); // bottom router WAN side + const std::vector pcapTaps { + "t2", // multi-switch UDP echo client + "t3", // single-switch UDP echo server + "b2", // multi-switch UDP echo server + "b3", // single-switch UDP echo client + "trlan", // top router LAN side + "trwan", // top router WAN side + "brlan", // bottom router LAN side + "brwan", // bottom router WAN side + }; // ---------------------------------------------------------------------- // Parse the pcapLocations string into pcapLocationVec diff --git a/examples/wireless/wifi-clear-channel-cmu.cc b/examples/wireless/wifi-clear-channel-cmu.cc index f33868e40..672b2c6a6 100644 --- a/examples/wireless/wifi-clear-channel-cmu.cc +++ b/examples/wireless/wifi-clear-channel-cmu.cc @@ -211,12 +211,13 @@ Experiment::Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy, int main (int argc, char *argv[]) { std::ofstream outfile ("clear-channel.plt"); - std::vector modes; - modes.push_back ("DsssRate1Mbps"); - modes.push_back ("DsssRate2Mbps"); - modes.push_back ("DsssRate5_5Mbps"); - modes.push_back ("DsssRate11Mbps"); + const std::vector modes { + "DsssRate1Mbps", + "DsssRate2Mbps", + "DsssRate5_5Mbps", + "DsssRate11Mbps", + }; CommandLine cmd (__FILE__); cmd.Parse (argc, argv); diff --git a/examples/wireless/wifi-dsss-validation.cc b/examples/wireless/wifi-dsss-validation.cc index 2d5ecb5db..dfbb49380 100644 --- a/examples/wireless/wifi-dsss-validation.cc +++ b/examples/wireless/wifi-dsss-validation.cc @@ -36,12 +36,13 @@ int main (int argc, char *argv[]) { uint32_t FrameSize = 1500; //bytes std::ofstream file ("frame-success-rate-dsss.plt"); - std::vector modes; - modes.push_back ("DsssRate1Mbps"); - modes.push_back ("DsssRate2Mbps"); - modes.push_back ("DsssRate5_5Mbps"); - modes.push_back ("DsssRate11Mbps"); + const std::vector modes { + "DsssRate1Mbps", + "DsssRate2Mbps", + "DsssRate5_5Mbps", + "DsssRate11Mbps", + }; CommandLine cmd (__FILE__); cmd.AddValue ("FrameSize", "The frame size in bytes", FrameSize); diff --git a/src/dsr/test/dsr-test-suite.cc b/src/dsr/test/dsr-test-suite.cc index c4e6d6b96..64c216fe0 100644 --- a/src/dsr/test/dsr-test-suite.cc +++ b/src/dsr/test/dsr-test-suite.cc @@ -123,10 +123,12 @@ void DsrRreqHeaderTest::DoRun () { dsr::DsrOptionRreqHeader h; - std::vector nodeList; - nodeList.push_back (Ipv4Address ("1.1.1.0")); - nodeList.push_back (Ipv4Address ("1.1.1.1")); - nodeList.push_back (Ipv4Address ("1.1.1.2")); + + const std::vector nodeList { + Ipv4Address ("1.1.1.0"), + Ipv4Address ("1.1.1.1"), + Ipv4Address ("1.1.1.2"), + }; h.SetTarget (Ipv4Address ("1.1.1.3")); NS_TEST_EXPECT_MSG_EQ (h.GetTarget (), Ipv4Address ("1.1.1.3"), "trivial"); @@ -175,10 +177,12 @@ DsrRrepHeaderTest::DoRun () { dsr::DsrOptionRrepHeader h; - std::vector nodeList; - nodeList.push_back (Ipv4Address ("1.1.1.0")); - nodeList.push_back (Ipv4Address ("1.1.1.1")); - nodeList.push_back (Ipv4Address ("1.1.1.2")); + const std::vector nodeList { + Ipv4Address ("1.1.1.0"), + Ipv4Address ("1.1.1.1"), + Ipv4Address ("1.1.1.2"), + }; + h.SetNodesAddress (nodeList); NS_TEST_EXPECT_MSG_EQ (h.GetNodeAddress (0), Ipv4Address ("1.1.1.0"), "trivial"); NS_TEST_EXPECT_MSG_EQ (h.GetNodeAddress (1), Ipv4Address ("1.1.1.1"), "trivial"); @@ -221,10 +225,13 @@ void DsrSRHeaderTest::DoRun () { dsr::DsrOptionSRHeader h; - std::vector nodeList; - nodeList.push_back (Ipv4Address ("1.1.1.0")); - nodeList.push_back (Ipv4Address ("1.1.1.1")); - nodeList.push_back (Ipv4Address ("1.1.1.2")); + + const std::vector nodeList { + Ipv4Address ("1.1.1.0"), + Ipv4Address ("1.1.1.1"), + Ipv4Address ("1.1.1.2"), + }; + h.SetNodesAddress (nodeList); NS_TEST_EXPECT_MSG_EQ (h.GetNodeAddress (0), Ipv4Address ("1.1.1.0"), "trivial"); NS_TEST_EXPECT_MSG_EQ (h.GetNodeAddress (1), Ipv4Address ("1.1.1.1"), "trivial"); @@ -405,9 +412,12 @@ void DsrCacheEntryTest::DoRun () { Ptr rcache = CreateObject (); - std::vector ip; - ip.push_back (Ipv4Address ("0.0.0.0")); - ip.push_back (Ipv4Address ("0.0.0.1")); + + std::vector ip { + Ipv4Address ("0.0.0.0"), + Ipv4Address ("0.0.0.1"), + }; + Ipv4Address dst = Ipv4Address ("0.0.0.1"); dsr::DsrRouteCacheEntry entry (ip, dst, Seconds (1)); NS_TEST_EXPECT_MSG_EQ (entry.GetVector ().size (), 2, "trivial"); @@ -424,9 +434,11 @@ DsrCacheEntryTest::DoRun () NS_TEST_EXPECT_MSG_EQ (rcache->AddRoute (entry), true, "trivial"); - std::vector ip2; - ip2.push_back (Ipv4Address ("1.1.1.0")); - ip2.push_back (Ipv4Address ("1.1.1.1")); + std::vector ip2 { + Ipv4Address ("1.1.1.0"), + Ipv4Address ("1.1.1.1"), + }; + Ipv4Address dst2 = Ipv4Address ("1.1.1.1"); dsr::DsrRouteCacheEntry entry2 (ip2, dst2, Seconds (2)); dsr::DsrRouteCacheEntry newEntry; diff --git a/src/lte/test/lte-test-cell-selection.cc b/src/lte/test/lte-test-cell-selection.cc index 14cde1b39..c0b8e5bc9 100644 --- a/src/lte/test/lte-test-cell-selection.cc +++ b/src/lte/test/lte-test-cell-selection.cc @@ -71,21 +71,15 @@ LteCellSelectionTestSuite::LteCellSelectionTestSuite () // REAL RRC PROTOCOL - w.clear (); - // x y csgMember - // checkPoint cell1, cell2 - w.push_back (LteCellSelectionTestCase::UeSetup_t (0.0, 0.55, false, - MilliSeconds (283), 1, 0)); - w.push_back (LteCellSelectionTestCase::UeSetup_t (0.0, 0.45, false, - MilliSeconds (283), 1, 0)); - w.push_back (LteCellSelectionTestCase::UeSetup_t (0.5, 0.45, false, - MilliSeconds (363), 1, 3)); - w.push_back (LteCellSelectionTestCase::UeSetup_t (0.5, 0.0, true, - MilliSeconds (283), 2, 4)); - w.push_back (LteCellSelectionTestCase::UeSetup_t (1.0, 0.55, true, - MilliSeconds (283), 3, 0)); - w.push_back (LteCellSelectionTestCase::UeSetup_t (1.0, 0.45, true, - MilliSeconds (283), 4, 0)); + w = { + // x, y, csgMember, checkPoint, cell1, cell2 + LteCellSelectionTestCase::UeSetup_t (0.0, 0.55, false, MilliSeconds (283), 1, 0), + LteCellSelectionTestCase::UeSetup_t (0.0, 0.45, false, MilliSeconds (283), 1, 0), + LteCellSelectionTestCase::UeSetup_t (0.5, 0.45, false, MilliSeconds (363), 1, 3), + LteCellSelectionTestCase::UeSetup_t (0.5, 0.0, true, MilliSeconds (283), 2, 4), + LteCellSelectionTestCase::UeSetup_t (1.0, 0.55, true, MilliSeconds (283), 3, 0), + LteCellSelectionTestCase::UeSetup_t (1.0, 0.45, true, MilliSeconds (283), 4, 0), + }; AddTestCase (new LteCellSelectionTestCase ("EPC, real RRC", true, false, 60.0 /* isd */, w), @@ -93,21 +87,15 @@ LteCellSelectionTestSuite::LteCellSelectionTestSuite () // IDEAL RRC PROTOCOL - w.clear (); - // x y csgMember - // checkPoint cell1, cell2 - w.push_back (LteCellSelectionTestCase::UeSetup_t (0.0, 0.55, false, - MilliSeconds (266), 1, 0)); - w.push_back (LteCellSelectionTestCase::UeSetup_t (0.0, 0.45, false, - MilliSeconds (266), 1, 0)); - w.push_back (LteCellSelectionTestCase::UeSetup_t (0.5, 0.45, false, - MilliSeconds (346), 1, 3)); - w.push_back (LteCellSelectionTestCase::UeSetup_t (0.5, 0.0, true, - MilliSeconds (266), 2, 4)); - w.push_back (LteCellSelectionTestCase::UeSetup_t (1.0, 0.55, true, - MilliSeconds (266), 3, 0)); - w.push_back (LteCellSelectionTestCase::UeSetup_t (1.0, 0.45, true, - MilliSeconds (266), 4, 0)); + w = { + // x, y, csgMember, checkPoint, cell1, cell2 + LteCellSelectionTestCase::UeSetup_t (0.0, 0.55, false, MilliSeconds (266), 1, 0), + LteCellSelectionTestCase::UeSetup_t (0.0, 0.45, false, MilliSeconds (266), 1, 0), + LteCellSelectionTestCase::UeSetup_t (0.5, 0.45, false, MilliSeconds (346), 1, 3), + LteCellSelectionTestCase::UeSetup_t (0.5, 0.0, true, MilliSeconds (266), 2, 4), + LteCellSelectionTestCase::UeSetup_t (1.0, 0.55, true, MilliSeconds (266), 3, 0), + LteCellSelectionTestCase::UeSetup_t (1.0, 0.45, true, MilliSeconds (266), 4, 0), + }; AddTestCase (new LteCellSelectionTestCase ("EPC, ideal RRC", true, true, 60.0 /* isd */, w), diff --git a/src/lte/test/test-lte-rlc-header.cc b/src/lte/test/test-lte-rlc-header.cc index beec2ac4f..225719310 100644 --- a/src/lte/test/test-lte-rlc-header.cc +++ b/src/lte/test/test-lte-rlc-header.cc @@ -221,8 +221,9 @@ LteRlcHeaderTestSuite::LteRlcHeaderTestSuite () { SequenceNumber10 ackSn (2); - std::list nackSnList; - nackSnList.push_back (SequenceNumber10 (873)); + const std::list nackSnList { + SequenceNumber10 (873), + }; std::string hex ("000bb480"); AddTestCase (new RlcAmStatusPduTestCase (ackSn, nackSnList, hex), TestCase::QUICK); } @@ -230,9 +231,10 @@ LteRlcHeaderTestSuite::LteRlcHeaderTestSuite () { SequenceNumber10 ackSn (2); - std::list nackSnList; - nackSnList.push_back (SequenceNumber10 (1021)); - nackSnList.push_back (SequenceNumber10 (754)); + const std::list nackSnList { + SequenceNumber10 (1021), + SequenceNumber10 (754), + }; std::string hex ("000bfed790"); AddTestCase (new RlcAmStatusPduTestCase (ackSn, nackSnList, hex), TestCase::QUICK); } @@ -240,10 +242,11 @@ LteRlcHeaderTestSuite::LteRlcHeaderTestSuite () { SequenceNumber10 ackSn (2); - std::list nackSnList; - nackSnList.push_back (SequenceNumber10 (1021)); - nackSnList.push_back (SequenceNumber10 (754)); - nackSnList.push_back (SequenceNumber10 (947)); + const std::list nackSnList { + SequenceNumber10 (1021), + SequenceNumber10 (754), + SequenceNumber10 (947), + }; std::string hex ("000bfed795d980"); AddTestCase (new RlcAmStatusPduTestCase (ackSn, nackSnList, hex), TestCase::QUICK); } @@ -251,11 +254,12 @@ LteRlcHeaderTestSuite::LteRlcHeaderTestSuite () { SequenceNumber10 ackSn (2); - std::list nackSnList; - nackSnList.push_back (SequenceNumber10 (1021)); - nackSnList.push_back (SequenceNumber10 (754)); - nackSnList.push_back (SequenceNumber10 (947)); - nackSnList.push_back (SequenceNumber10 (347)); + const std::list nackSnList { + SequenceNumber10 (1021), + SequenceNumber10 (754), + SequenceNumber10 (947), + SequenceNumber10 (347), + }; std::string hex ("000bfed795d9cad8"); AddTestCase (new RlcAmStatusPduTestCase (ackSn, nackSnList, hex), TestCase::QUICK); } diff --git a/src/lte/test/test-lte-x2-handover-measures.cc b/src/lte/test/test-lte-x2-handover-measures.cc index 3b4634865..f5f011409 100644 --- a/src/lte/test/test-lte-x2-handover-measures.cc +++ b/src/lte/test/test-lte-x2-handover-measures.cc @@ -706,22 +706,25 @@ LteX2HandoverMeasuresTestSuite::LteX2HandoverMeasuresTestSuite () Time checkInterval = Seconds (1); std::string cel1name ("ho: 0 -> 1"); - std::list cel1; - cel1.push_back (CheckPointEvent (Seconds (1), Seconds (10.1), checkInterval, 0, 0)); - cel1.push_back (CheckPointEvent (Seconds (11), Seconds (17), checkInterval, 0, 1)); + const std::list cel1 { + CheckPointEvent (Seconds (1), Seconds (10.1), checkInterval, 0, 0), + CheckPointEvent (Seconds (11), Seconds (17), checkInterval, 0, 1), + }; std::string cel2name ("ho: 0 -> 1 -> 2"); - std::list cel2; - cel2.push_back (CheckPointEvent (Seconds (1), Seconds (10.1), checkInterval, 0, 0)); - cel2.push_back (CheckPointEvent (Seconds (11), Seconds (17.1), checkInterval, 0, 1)); - cel2.push_back (CheckPointEvent (Seconds (18), Seconds (24), checkInterval, 0, 2)); + const std::list cel2 { + CheckPointEvent (Seconds (1), Seconds (10.1), checkInterval, 0, 0), + CheckPointEvent (Seconds (11), Seconds (17.1), checkInterval, 0, 1), + CheckPointEvent (Seconds (18), Seconds (24), checkInterval, 0, 2), + }; std::string cel3name ("ho: 0 -> 1 -> 2 -> 3"); - std::list cel3; - cel3.push_back (CheckPointEvent (Seconds (1), Seconds (10.1), checkInterval, 0, 0)); - cel3.push_back (CheckPointEvent (Seconds (11), Seconds (17.1), checkInterval, 0, 1)); - cel3.push_back (CheckPointEvent (Seconds (18), Seconds (24.1), checkInterval, 0, 2)); - cel3.push_back (CheckPointEvent (Seconds (25), Seconds (37), checkInterval, 0, 3)); + const std::list cel3 { + CheckPointEvent (Seconds (1), Seconds (10.1), checkInterval, 0, 0), + CheckPointEvent (Seconds (11), Seconds (17.1), checkInterval, 0, 1), + CheckPointEvent (Seconds (18), Seconds (24.1), checkInterval, 0, 2), + CheckPointEvent (Seconds (25), Seconds (37), checkInterval, 0, 3), + }; int32_t useIdealRrc; diff --git a/src/lte/test/test-lte-x2-handover.cc b/src/lte/test/test-lte-x2-handover.cc index b4261887e..d0f6af19c 100644 --- a/src/lte/test/test-lte-x2-handover.cc +++ b/src/lte/test/test-lte-x2-handover.cc @@ -667,44 +667,53 @@ LteX2HandoverTestSuite::LteX2HandoverTestSuite () std::list hel0; std::string hel1name ("1 fwd"); - std::list hel1; - hel1.push_back (ue1fwd); + const std::list hel1 { + ue1fwd, + }; std::string hel2name ("1 fwd & bwd"); - std::list hel2; - hel2.push_back (ue1fwd); - hel2.push_back (ue1bwd); + const std::list hel2 { + ue1fwd, + ue1bwd, + }; std::string hel3name ("1 fwd & bwd & fwd"); - std::list hel3; - hel3.push_back (ue1fwd); - hel3.push_back (ue1bwd); - hel3.push_back (ue1fwdagain); + const std::list hel3 { + ue1fwd, + ue1bwd, + ue1fwdagain, + }; std::string hel4name ("1+2 fwd"); - std::list hel4; - hel4.push_back (ue1fwd); - hel4.push_back (ue2fwd); + const std::list hel4 { + ue1fwd, + ue2fwd, + }; std::string hel5name ("1+2 fwd & bwd"); - std::list hel5; - hel5.push_back (ue1fwd); - hel5.push_back (ue1bwd); - hel5.push_back (ue2fwd); - hel5.push_back (ue2bwd); + const std::list hel5 { + ue1fwd, + ue1bwd, + ue2fwd, + ue2bwd, + }; std::string hel6name ("2 fwd"); - std::list hel6; - hel6.push_back (ue2fwd); + const std::list hel6 { + ue2fwd, + }; std::string hel7name ("2 fwd & bwd"); - std::list hel7; - hel7.push_back (ue2fwd); - hel7.push_back (ue2bwd); + const std::list hel7 { + ue2fwd, + ue2bwd, + }; + + std::vector schedulers { + "ns3::RrFfMacScheduler", + "ns3::PfFfMacScheduler", + }; - std::vector schedulers; - schedulers.push_back ("ns3::RrFfMacScheduler"); - schedulers.push_back ("ns3::PfFfMacScheduler"); for (std::vector::iterator schedIt = schedulers.begin (); schedIt != schedulers.end (); ++schedIt) { for (int32_t useIdealRrc = 1; useIdealRrc >= 0; --useIdealRrc) diff --git a/src/spectrum/model/wifi-spectrum-value-helper.cc b/src/spectrum/model/wifi-spectrum-value-helper.cc index d9fde63fb..87a80acfb 100644 --- a/src/spectrum/model/wifi-spectrum-value-helper.cc +++ b/src/spectrum/model/wifi-spectrum-value-helper.cc @@ -199,9 +199,10 @@ WifiSpectrumValueHelper::CreateOfdmTxPowerSpectralDensity (uint32_t centerFreque uint32_t stop2 = start2 + 26 - 1; //Build transmit spectrum mask - std::vector subBands; - subBands.push_back (std::make_pair (start1, stop1)); - subBands.push_back (std::make_pair (start2, stop2)); + std::vector subBands { + std::make_pair (start1, stop1), + std::make_pair (start2, stop2), + }; WifiSpectrumBand maskBand (0, nAllocatedBands + nGuardBands); CreateSpectrumMaskForOfdm (c, subBands, maskBand, txPowerPerBandW, nGuardBands, diff --git a/src/wifi/examples/wifi-manager-example.cc b/src/wifi/examples/wifi-manager-example.cc index ca0ae53d7..6f227826b 100644 --- a/src/wifi/examples/wifi-manager-example.cc +++ b/src/wifi/examples/wifi-manager-example.cc @@ -314,29 +314,33 @@ int main (int argc, char *argv[]) // The first number is channel width, second is minimum SNR, third is maximum // SNR, fourth and fifth provide xrange axis limits, and sixth the yaxis // maximum - serverStandards.push_back (StandardInfo ("802.11a", WIFI_STANDARD_80211a, WIFI_PHY_BAND_5GHZ, 20, 3, 27, 0, 30, 60)); - serverStandards.push_back (StandardInfo ("802.11b", WIFI_STANDARD_80211b, WIFI_PHY_BAND_2_4GHZ, 22, -5, 11, -6, 15, 15)); - serverStandards.push_back (StandardInfo ("802.11g", WIFI_STANDARD_80211g, WIFI_PHY_BAND_2_4GHZ, 20, -5, 27, -6, 30, 60)); - serverStandards.push_back (StandardInfo ("802.11n-5GHz", WIFI_STANDARD_80211n, WIFI_PHY_BAND_5GHZ, serverChannelWidth, 3, 30, 0, 35, 80 * channelRateFactor)); - serverStandards.push_back (StandardInfo ("802.11n-2.4GHz", WIFI_STANDARD_80211n, WIFI_PHY_BAND_2_4GHZ, serverChannelWidth, 3, 30, 0, 35, 80 * channelRateFactor)); - serverStandards.push_back (StandardInfo ("802.11ac", WIFI_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ, serverChannelWidth, 5, 50, 0, 55, 120 * channelRateFactor)); - serverStandards.push_back (StandardInfo ("802.11p-10MHz", WIFI_STANDARD_80211p, WIFI_PHY_BAND_5GHZ, 10, 3, 27, 0, 30, 60)); - serverStandards.push_back (StandardInfo ("802.11p-5MHz", WIFI_STANDARD_80211p, WIFI_PHY_BAND_5GHZ, 5, 3, 27, 0, 30, 60)); - serverStandards.push_back (StandardInfo ("802.11ax-6GHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_6GHZ, serverChannelWidth, 5, 55, 0, 60, 120 * channelRateFactor)); - serverStandards.push_back (StandardInfo ("802.11ax-5GHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ, serverChannelWidth, 5, 55, 0, 60, 120 * channelRateFactor)); - serverStandards.push_back (StandardInfo ("802.11ax-2.4GHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_2_4GHZ, serverChannelWidth, 5, 55, 0, 60, 120 * channelRateFactor)); + serverStandards = { + StandardInfo ("802.11a", WIFI_STANDARD_80211a, WIFI_PHY_BAND_5GHZ, 20, 3, 27, 0, 30, 60), + StandardInfo ("802.11b", WIFI_STANDARD_80211b, WIFI_PHY_BAND_2_4GHZ, 22, -5, 11, -6, 15, 15), + StandardInfo ("802.11g", WIFI_STANDARD_80211g, WIFI_PHY_BAND_2_4GHZ, 20, -5, 27, -6, 30, 60), + StandardInfo ("802.11n-5GHz", WIFI_STANDARD_80211n, WIFI_PHY_BAND_5GHZ, serverChannelWidth, 3, 30, 0, 35, 80 * channelRateFactor), + StandardInfo ("802.11n-2.4GHz", WIFI_STANDARD_80211n, WIFI_PHY_BAND_2_4GHZ, serverChannelWidth, 3, 30, 0, 35, 80 * channelRateFactor), + StandardInfo ("802.11ac", WIFI_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ, serverChannelWidth, 5, 50, 0, 55, 120 * channelRateFactor), + StandardInfo ("802.11p-10MHz", WIFI_STANDARD_80211p, WIFI_PHY_BAND_5GHZ, 10, 3, 27, 0, 30, 60), + StandardInfo ("802.11p-5MHz", WIFI_STANDARD_80211p, WIFI_PHY_BAND_5GHZ, 5, 3, 27, 0, 30, 60), + StandardInfo ("802.11ax-6GHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_6GHZ, serverChannelWidth, 5, 55, 0, 60, 120 * channelRateFactor), + StandardInfo ("802.11ax-5GHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ, serverChannelWidth, 5, 55, 0, 60, 120 * channelRateFactor), + StandardInfo ("802.11ax-2.4GHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_2_4GHZ, serverChannelWidth, 5, 55, 0, 60, 120 * channelRateFactor), + }; - clientStandards.push_back (StandardInfo ("802.11a", WIFI_STANDARD_80211a, WIFI_PHY_BAND_5GHZ, 20, 3, 27, 0, 30, 60)); - clientStandards.push_back (StandardInfo ("802.11b", WIFI_STANDARD_80211b, WIFI_PHY_BAND_2_4GHZ, 22, -5, 11, -6, 15, 15)); - clientStandards.push_back (StandardInfo ("802.11g", WIFI_STANDARD_80211g, WIFI_PHY_BAND_2_4GHZ, 20, -5, 27, -6, 30, 60)); - clientStandards.push_back (StandardInfo ("802.11n-5GHz", WIFI_STANDARD_80211n, WIFI_PHY_BAND_5GHZ, clientChannelWidth, 3, 30, 0, 35, 80 * channelRateFactor)); - clientStandards.push_back (StandardInfo ("802.11n-2.4GHz", WIFI_STANDARD_80211n, WIFI_PHY_BAND_2_4GHZ, clientChannelWidth, 3, 30, 0, 35, 80 * channelRateFactor)); - clientStandards.push_back (StandardInfo ("802.11ac", WIFI_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ, clientChannelWidth, 5, 50, 0, 55, 120 * channelRateFactor)); - clientStandards.push_back (StandardInfo ("802.11p-10MHz", WIFI_STANDARD_80211p, WIFI_PHY_BAND_5GHZ, 10, 3, 27, 0, 30, 60)); - clientStandards.push_back (StandardInfo ("802.11p-5MHz", WIFI_STANDARD_80211p, WIFI_PHY_BAND_5GHZ, 5, 3, 27, 0, 30, 60)); - clientStandards.push_back (StandardInfo ("802.11ax-6GHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_6GHZ, clientChannelWidth, 5, 55, 0, 60, 160 * channelRateFactor)); - clientStandards.push_back (StandardInfo ("802.11ax-5GHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ, clientChannelWidth, 5, 55, 0, 60, 160 * channelRateFactor)); - clientStandards.push_back (StandardInfo ("802.11ax-2.4GHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_2_4GHZ, clientChannelWidth, 5, 55, 0, 60, 160 * channelRateFactor)); + clientStandards = { + StandardInfo ("802.11a", WIFI_STANDARD_80211a, WIFI_PHY_BAND_5GHZ, 20, 3, 27, 0, 30, 60), + StandardInfo ("802.11b", WIFI_STANDARD_80211b, WIFI_PHY_BAND_2_4GHZ, 22, -5, 11, -6, 15, 15), + StandardInfo ("802.11g", WIFI_STANDARD_80211g, WIFI_PHY_BAND_2_4GHZ, 20, -5, 27, -6, 30, 60), + StandardInfo ("802.11n-5GHz", WIFI_STANDARD_80211n, WIFI_PHY_BAND_5GHZ, clientChannelWidth, 3, 30, 0, 35, 80 * channelRateFactor), + StandardInfo ("802.11n-2.4GHz", WIFI_STANDARD_80211n, WIFI_PHY_BAND_2_4GHZ, clientChannelWidth, 3, 30, 0, 35, 80 * channelRateFactor), + StandardInfo ("802.11ac", WIFI_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ, clientChannelWidth, 5, 50, 0, 55, 120 * channelRateFactor), + StandardInfo ("802.11p-10MHz", WIFI_STANDARD_80211p, WIFI_PHY_BAND_5GHZ, 10, 3, 27, 0, 30, 60), + StandardInfo ("802.11p-5MHz", WIFI_STANDARD_80211p, WIFI_PHY_BAND_5GHZ, 5, 3, 27, 0, 30, 60), + StandardInfo ("802.11ax-6GHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_6GHZ, clientChannelWidth, 5, 55, 0, 60, 160 * channelRateFactor), + StandardInfo ("802.11ax-5GHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ, clientChannelWidth, 5, 55, 0, 60, 160 * channelRateFactor), + StandardInfo ("802.11ax-2.4GHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_2_4GHZ, clientChannelWidth, 5, 55, 0, 60, 160 * channelRateFactor), + }; for (std::vector::size_type i = 0; i != serverStandards.size (); i++) { diff --git a/src/wifi/test/wifi-transmit-mask-test.cc b/src/wifi/test/wifi-transmit-mask-test.cc index bd6791d82..00a12774b 100644 --- a/src/wifi/test/wifi-transmit-mask-test.cc +++ b/src/wifi/test/wifi-transmit-mask-test.cc @@ -278,23 +278,25 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11p 5MHz NS_LOG_FUNCTION ("Check slopes for 11p 5MHz"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (31, -28.375)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (32, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (60, -20.276)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (61, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (63, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (64, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (69, -3.333)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (123, -3.333)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (128, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (129, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (131, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (132, -20.276)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (160, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (161, -28.375)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (192, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (31, -28.375), // Outer band left (stop) + std::make_pair (32, -28.000), // Middle band left (start) + std::make_pair (60, -20.276), // Middle band left (stop) + std::make_pair (61, -20.0), // Flat junction band left (start) + std::make_pair (63, -20.0), // Flat junction band left (stop) + std::make_pair (64, -20.0), // Inner band left (start) + std::make_pair (69, -3.333), // Inner band left (stop) + std::make_pair (123, -3.333), // Inner band right (start) + std::make_pair (128, -20.0), // Inner band right (stop) + std::make_pair (129, -20.0), // Flat junction band right (start) + std::make_pair (131, -20.0), // Flat junction band right (stop) + std::make_pair (132, -20.276), // Middle band right (start) + std::make_pair (160, -28.000), // Middle band right (stop) + std::make_pair (161, -28.375), // Outer band right (start) + std::make_pair (192, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11p 5MHz", WIFI_STANDARD_80211p, WIFI_PHY_BAND_5GHZ, 5, maskSlopes, tol, prec), TestCase::QUICK); @@ -302,23 +304,25 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11p 10MHz NS_LOG_FUNCTION ("Check slopes for 11p 10MHz"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (31, -28.375)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (32, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (60, -20.276)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (61, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (63, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (64, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (69, -3.333)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (123, -3.333)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (128, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (129, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (131, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (132, -20.276)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (160, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (161, -28.375)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (192, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (31, -28.375), // Outer band left (stop) + std::make_pair (32, -28.000), // Middle band left (start) + std::make_pair (60, -20.276), // Middle band left (stop) + std::make_pair (61, -20.0), // Flat junction band left (start) + std::make_pair (63, -20.0), // Flat junction band left (stop) + std::make_pair (64, -20.0), // Inner band left (start) + std::make_pair (69, -3.333), // Inner band left (stop) + std::make_pair (123, -3.333), // Inner band right (start) + std::make_pair (128, -20.0), // Inner band right (stop) + std::make_pair (129, -20.0), // Flat junction band right (start) + std::make_pair (131, -20.0), // Flat junction band right (stop) + std::make_pair (132, -20.276), // Middle band right (start) + std::make_pair (160, -28.000), // Middle band right (stop) + std::make_pair (161, -28.375), // Outer band right (start) + std::make_pair (192, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11p 10MHz", WIFI_STANDARD_80211p, WIFI_PHY_BAND_5GHZ, 10, maskSlopes, tol, prec), TestCase::QUICK); @@ -326,23 +330,25 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11a NS_LOG_FUNCTION ("Check slopes for 11a"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (31, -28.375)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (32, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (60, -20.276)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (61, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (63, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (64, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (69, -3.333)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (123, -3.333)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (128, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (129, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (131, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (132, -20.276)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (160, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (161, -28.375)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (192, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (31, -28.375), // Outer band left (stop) + std::make_pair (32, -28.000), // Middle band left (start) + std::make_pair (60, -20.276), // Middle band left (stop) + std::make_pair (61, -20.0), // Flat junction band left (start) + std::make_pair (63, -20.0), // Flat junction band left (stop) + std::make_pair (64, -20.0), // Inner band left (start) + std::make_pair (69, -3.333), // Inner band left (stop) + std::make_pair (123, -3.333), // Inner band right (start) + std::make_pair (128, -20.0), // Inner band right (stop) + std::make_pair (129, -20.0), // Flat junction band right (start) + std::make_pair (131, -20.0), // Flat junction band right (stop) + std::make_pair (132, -20.276), // Middle band right (start) + std::make_pair (160, -28.000), // Middle band right (stop) + std::make_pair (161, -28.375), // Outer band right (start) + std::make_pair (192, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11a", WIFI_STANDARD_80211a, WIFI_PHY_BAND_5GHZ, 20, maskSlopes, tol, prec), TestCase::QUICK); @@ -358,23 +364,25 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11n 20MHz @ 2.4GHz NS_LOG_FUNCTION ("Check slopes for 11n 20MHz @ 2.4GHz"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -45.000)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (31, -28.531)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (32, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (60, -20.276)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (61, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (61, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (62, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (67, -3.333)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (125, -3.333)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (130, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (131, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (131, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (132, -20.276)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (160, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (161, -28.531)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (192, -45.000)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -45.000), // Outer band left (start) + std::make_pair (31, -28.531), // Outer band left (stop) + std::make_pair (32, -28.000), // Middle band left (start) + std::make_pair (60, -20.276), // Middle band left (stop) + std::make_pair (61, -20.0), // Flat junction band left (start) + std::make_pair (61, -20.0), // Flat junction band left (stop) + std::make_pair (62, -20.0), // Inner band left (start) + std::make_pair (67, -3.333), // Inner band left (stop) + std::make_pair (125, -3.333), // Inner band right (start) + std::make_pair (130, -20.0), // Inner band right (stop) + std::make_pair (131, -20.0), // Flat junction band right (start) + std::make_pair (131, -20.0), // Flat junction band right (stop) + std::make_pair (132, -20.276), // Middle band right (start) + std::make_pair (160, -28.000), // Middle band right (stop) + std::make_pair (161, -28.531), // Outer band right (start) + std::make_pair (192, -45.000), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11n_2.4GHz 20MHz", WIFI_STANDARD_80211n, WIFI_PHY_BAND_2_4GHZ, 20, maskSlopes, tol, prec), TestCase::QUICK); @@ -382,23 +390,25 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11n 20MHz @ 5GHz NS_LOG_FUNCTION ("Check slopes for 11n 20MHz @ 5GHz"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (31, -28.375)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (32, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (60, -20.276)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (61, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (61, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (62, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (67, -3.333)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (125, -3.333)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (130, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (131, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (131, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (132, -20.276)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (160, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (161, -28.375)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (192, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (31, -28.375), // Outer band left (stop) + std::make_pair (32, -28.000), // Middle band left (start) + std::make_pair (60, -20.276), // Middle band left (stop) + std::make_pair (61, -20.0), // Flat junction band left (start) + std::make_pair (61, -20.0), // Flat junction band left (stop) + std::make_pair (62, -20.0), // Inner band left (start) + std::make_pair (67, -3.333), // Inner band left (stop) + std::make_pair (125, -3.333), // Inner band right (start) + std::make_pair (130, -20.0), // Inner band right (stop) + std::make_pair (131, -20.0), // Flat junction band right (start) + std::make_pair (131, -20.0), // Flat junction band right (stop) + std::make_pair (132, -20.276), // Middle band right (start) + std::make_pair (160, -28.000), // Middle band right (stop) + std::make_pair (161, -28.375), // Outer band right (start) + std::make_pair (192, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11n_5GHz 20MHz", WIFI_STANDARD_80211n, WIFI_PHY_BAND_5GHZ, 20, maskSlopes, tol, prec), TestCase::QUICK); @@ -406,23 +416,25 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11n 40MHz @ 2.4GHz NS_LOG_FUNCTION ("Check slopes for 11n 40MHz @ 2.4GHz"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -45.000)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (63, -28.266)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (64, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (124, -20.131)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (125, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (125, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (126, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (131, -3.333)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (253, -3.333)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (258, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (259, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (259, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (260, -20.131)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (320, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (321, -28.266)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (384, -45.000)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -45.000), // Outer band left (start) + std::make_pair (63, -28.266), // Outer band left (stop) + std::make_pair (64, -28.000), // Middle band left (start) + std::make_pair (124, -20.131), // Middle band left (stop) + std::make_pair (125, -20.0), // Flat junction band left (start) + std::make_pair (125, -20.0), // Flat junction band left (stop) + std::make_pair (126, -20.0), // Inner band left (start) + std::make_pair (131, -3.333), // Inner band left (stop) + std::make_pair (253, -3.333), // Inner band right (start) + std::make_pair (258, -20.0), // Inner band right (stop) + std::make_pair (259, -20.0), // Flat junction band right (start) + std::make_pair (259, -20.0), // Flat junction band right (stop) + std::make_pair (260, -20.131), // Middle band right (start) + std::make_pair (320, -28.000), // Middle band right (stop) + std::make_pair (321, -28.266), // Outer band right (start) + std::make_pair (384, -45.000), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11n_2.4GHz 40MHz", WIFI_STANDARD_80211n, WIFI_PHY_BAND_2_4GHZ, 40, maskSlopes, tol, prec), TestCase::QUICK); @@ -430,23 +442,25 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11n 20MHz @ 5GHz NS_LOG_FUNCTION ("Check slopes for 11n 40MHz @ 5GHz"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (63, -28.188)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (64, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (124, -20.131)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (125, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (125, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (126, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (131, -3.333)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (253, -3.333)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (258, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (259, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (259, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (260, -20.131)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (320, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (321, -28.188)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (384, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (63, -28.188), // Outer band left (stop) + std::make_pair (64, -28.000), // Middle band left (start) + std::make_pair (124, -20.131), // Middle band left (stop) + std::make_pair (125, -20.0), // Flat junction band left (start) + std::make_pair (125, -20.0), // Flat junction band left (stop) + std::make_pair (126, -20.0), // Inner band left (start) + std::make_pair (131, -3.333), // Inner band left (stop) + std::make_pair (253, -3.333), // Inner band right (start) + std::make_pair (258, -20.0), // Inner band right (stop) + std::make_pair (259, -20.0), // Flat junction band right (start) + std::make_pair (259, -20.0), // Flat junction band right (stop) + std::make_pair (260, -20.131), // Middle band right (start) + std::make_pair (320, -28.000), // Middle band right (stop) + std::make_pair (321, -28.188), // Outer band right (start) + std::make_pair (384, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11n_5GHz 40MHz", WIFI_STANDARD_80211n, WIFI_PHY_BAND_5GHZ, 40, maskSlopes, tol, prec), TestCase::QUICK); @@ -454,23 +468,25 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11ac 20MHz NS_LOG_FUNCTION ("Check slopes for 11ac 20MHz"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (31, -28.375)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (32, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (60, -20.276)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (61, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (61, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (62, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (67, -3.333)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (125, -3.333)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (130, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (131, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (131, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (132, -20.276)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (160, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (161, -28.375)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (192, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (31, -28.375), // Outer band left (stop) + std::make_pair (32, -28.000), // Middle band left (start) + std::make_pair (60, -20.276), // Middle band left (stop) + std::make_pair (61, -20.0), // Flat junction band left (start) + std::make_pair (61, -20.0), // Flat junction band left (stop) + std::make_pair (62, -20.0), // Inner band left (start) + std::make_pair (67, -3.333), // Inner band left (stop) + std::make_pair (125, -3.333), // Inner band right (start) + std::make_pair (130, -20.0), // Inner band right (stop) + std::make_pair (131, -20.0), // Flat junction band right (start) + std::make_pair (131, -20.0), // Flat junction band right (stop) + std::make_pair (132, -20.276), // Middle band right (start) + std::make_pair (160, -28.000), // Middle band right (stop) + std::make_pair (161, -28.375), // Outer band right (start) + std::make_pair (192, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ac 20MHz", WIFI_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ, 20, maskSlopes, tol, prec), TestCase::QUICK); @@ -478,23 +494,25 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11ac 20MHz NS_LOG_FUNCTION ("Check slopes for 11ac 40MHz"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (63, -28.188)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (64, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (124, -20.131)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (125, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (125, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (126, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (131, -3.333)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (253, -3.333)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (258, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (259, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (259, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (260, -20.131)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (320, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (321, -28.188)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (384, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (63, -28.188), // Outer band left (stop) + std::make_pair (64, -28.000), // Middle band left (start) + std::make_pair (124, -20.131), // Middle band left (stop) + std::make_pair (125, -20.0), // Flat junction band left (start) + std::make_pair (125, -20.0), // Flat junction band left (stop) + std::make_pair (126, -20.0), // Inner band left (start) + std::make_pair (131, -3.333), // Inner band left (stop) + std::make_pair (253, -3.333), // Inner band right (start) + std::make_pair (258, -20.0), // Inner band right (stop) + std::make_pair (259, -20.0), // Flat junction band right (start) + std::make_pair (259, -20.0), // Flat junction band right (stop) + std::make_pair (260, -20.131), // Middle band right (start) + std::make_pair (320, -28.000), // Middle band right (stop) + std::make_pair (321, -28.188), // Outer band right (start) + std::make_pair (384, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ac 40MHz", WIFI_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ, 40, maskSlopes, tol, prec), TestCase::QUICK); @@ -502,24 +520,25 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11ac 80MHz NS_LOG_FUNCTION ("Check slopes for 11ac 80MHz"); - maskSlopes.clear (); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (127, -28.094)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (128, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (252, -20.064)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (253, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (253, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (254, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (259, -3.333)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (509, -3.333)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (514, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (515, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (515, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (516, -20.064)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (640, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (641, -28.094)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (768, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (127, -28.094), // Outer band left (stop) + std::make_pair (128, -28.000), // Middle band left (start) + std::make_pair (252, -20.064), // Middle band left (stop) + std::make_pair (253, -20.0), // Flat junction band left (start) + std::make_pair (253, -20.0), // Flat junction band left (stop) + std::make_pair (254, -20.0), // Inner band left (start) + std::make_pair (259, -3.333), // Inner band left (stop) + std::make_pair (509, -3.333), // Inner band right (start) + std::make_pair (514, -20.0), // Inner band right (stop) + std::make_pair (515, -20.0), // Flat junction band right (start) + std::make_pair (515, -20.0), // Flat junction band right (stop) + std::make_pair (516, -20.064), // Middle band right (start) + std::make_pair (640, -28.000), // Middle band right (stop) + std::make_pair (641, -28.094), // Outer band right (start) + std::make_pair (768, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ac 80MHz", WIFI_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ, 80, maskSlopes, tol, prec), TestCase::QUICK); @@ -527,23 +546,25 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11ac 20MHz NS_LOG_FUNCTION ("Check slopes for 11ac 160MHz"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (255, -28.047)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (256, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (508, -20.032)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (509, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (509, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (510, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (515, -3.333)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (1021, -3.333)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (1026, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (1027, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (1027, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (1028, -20.032)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (1280, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (1281, -28.047)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (1536, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (255, -28.047), // Outer band left (stop) + std::make_pair (256, -28.000), // Middle band left (start) + std::make_pair (508, -20.032), // Middle band left (stop) + std::make_pair (509, -20.0), // Flat junction band left (start) + std::make_pair (509, -20.0), // Flat junction band left (stop) + std::make_pair (510, -20.0), // Inner band left (start) + std::make_pair (515, -3.333), // Inner band left (stop) + std::make_pair (1021, -3.333), // Inner band right (start) + std::make_pair (1026, -20.0), // Inner band right (stop) + std::make_pair (1027, -20.0), // Flat junction band right (start) + std::make_pair (1027, -20.0), // Flat junction band right (stop) + std::make_pair (1028, -20.032), // Middle band right (start) + std::make_pair (1280, -28.000), // Middle band right (stop) + std::make_pair (1281, -28.047), // Outer band right (start) + std::make_pair (1536, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ac 160MHz", WIFI_STANDARD_80211ac, WIFI_PHY_BAND_5GHZ, 160, maskSlopes, tol, prec), TestCase::QUICK); @@ -551,29 +572,31 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11ax 20MHz @ 2.4GHz NS_LOG_FUNCTION ("Check slopes for 11ax 20MHz @ 2.4GHz"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -45.000)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (127, -28.133)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (128, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (252, -20.064)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (253, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (255, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (256, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (261, -3.333)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (262, 0.0)); // allocated band left (start) - maskSlopes.push_back (std::make_pair (382, 0.0)); // allocated band left (stop) - maskSlopes.push_back (std::make_pair (383, -20.0)); // DC band (start) - maskSlopes.push_back (std::make_pair (385, -20.0)); // DC band (stop) - maskSlopes.push_back (std::make_pair (386, 0.0)); // allocated band right (start) - maskSlopes.push_back (std::make_pair (506, 0.0)); // allocated band right (stop) - maskSlopes.push_back (std::make_pair (507, -3.333)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (512, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (513, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (515, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (516, -20.064)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (640, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (641, -28.133)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (768, -45.000)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -45.000), // Outer band left (start) + std::make_pair (127, -28.133), // Outer band left (stop) + std::make_pair (128, -28.000), // Middle band left (start) + std::make_pair (252, -20.064), // Middle band left (stop) + std::make_pair (253, -20.0), // Flat junction band left (start) + std::make_pair (255, -20.0), // Flat junction band left (stop) + std::make_pair (256, -20.0), // Inner band left (start) + std::make_pair (261, -3.333), // Inner band left (stop) + std::make_pair (262, 0.0), // allocated band left (start) + std::make_pair (382, 0.0), // allocated band left (stop) + std::make_pair (383, -20.0), // DC band (start) + std::make_pair (385, -20.0), // DC band (stop) + std::make_pair (386, 0.0), // allocated band right (start) + std::make_pair (506, 0.0), // allocated band right (stop) + std::make_pair (507, -3.333), // Inner band right (start) + std::make_pair (512, -20.0), // Inner band right (stop) + std::make_pair (513, -20.0), // Flat junction band right (start) + std::make_pair (515, -20.0), // Flat junction band right (stop) + std::make_pair (516, -20.064), // Middle band right (start) + std::make_pair (640, -28.000), // Middle band right (stop) + std::make_pair (641, -28.133), // Outer band right (start) + std::make_pair (768, -45.000), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_2.4GHz 20MHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_2_4GHZ, 20, maskSlopes, tol, prec), TestCase::QUICK); @@ -581,30 +604,31 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11ax 20MHz @ 5GHz NS_LOG_FUNCTION ("Check slopes for 11ax 20MHz @ 5GHz"); - maskSlopes.clear (); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (127, -28.094)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (128, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (252, -20.064)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (253, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (255, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (256, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (261, -3.333)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (262, 0.0)); // allocated band left (start) - maskSlopes.push_back (std::make_pair (382, 0.0)); // allocated band left (stop) - maskSlopes.push_back (std::make_pair (383, -20.0)); // DC band (start) - maskSlopes.push_back (std::make_pair (385, -20.0)); // DC band (stop) - maskSlopes.push_back (std::make_pair (386, 0.0)); // allocated band right (start) - maskSlopes.push_back (std::make_pair (506, 0.0)); // allocated band right (stop) - maskSlopes.push_back (std::make_pair (507, -3.333)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (512, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (513, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (515, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (516, -20.064)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (640, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (641, -28.094)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (768, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (127, -28.094), // Outer band left (stop) + std::make_pair (128, -28.000), // Middle band left (start) + std::make_pair (252, -20.064), // Middle band left (stop) + std::make_pair (253, -20.0), // Flat junction band left (start) + std::make_pair (255, -20.0), // Flat junction band left (stop) + std::make_pair (256, -20.0), // Inner band left (start) + std::make_pair (261, -3.333), // Inner band left (stop) + std::make_pair (262, 0.0), // allocated band left (start) + std::make_pair (382, 0.0), // allocated band left (stop) + std::make_pair (383, -20.0), // DC band (start) + std::make_pair (385, -20.0), // DC band (stop) + std::make_pair (386, 0.0), // allocated band right (start) + std::make_pair (506, 0.0), // allocated band right (stop) + std::make_pair (507, -3.333), // Inner band right (start) + std::make_pair (512, -20.0), // Inner band right (stop) + std::make_pair (513, -20.0), // Flat junction band right (start) + std::make_pair (515, -20.0), // Flat junction band right (stop) + std::make_pair (516, -20.064), // Middle band right (start) + std::make_pair (640, -28.000), // Middle band right (stop) + std::make_pair (641, -28.094), // Outer band right (start) + std::make_pair (768, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 20MHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ, 20, maskSlopes, tol, prec), TestCase::QUICK); @@ -612,29 +636,31 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11ax 40MHz @ 2.4GHz NS_LOG_FUNCTION ("Check slopes for 11ax 40MHz @ 2.4GHz"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -45.000)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (255, -28.066)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (256, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (505, -20.032)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (506, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (510, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (511, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (523, -1.538)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (524, 0.0)); // allocated band left (start) - maskSlopes.push_back (std::make_pair (765, 0.0)); // allocated band left (stop) - maskSlopes.push_back (std::make_pair (766, -20.0)); // DC band (start) - maskSlopes.push_back (std::make_pair (770, -20.0)); // DC band (stop) - maskSlopes.push_back (std::make_pair (771, 0.0)); // allocated band right (start) - maskSlopes.push_back (std::make_pair (1012, 0.0)); // allocated band right (stop) - maskSlopes.push_back (std::make_pair (1013, -1.538)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (1025, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (1026, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (1030, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (1031, -20.032)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (1280, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (1281, -28.066)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (1536, -45.000)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -45.000), // Outer band left (start) + std::make_pair (255, -28.066), // Outer band left (stop) + std::make_pair (256, -28.000), // Middle band left (start) + std::make_pair (505, -20.032), // Middle band left (stop) + std::make_pair (506, -20.0), // Flat junction band left (start) + std::make_pair (510, -20.0), // Flat junction band left (stop) + std::make_pair (511, -20.0), // Inner band left (start) + std::make_pair (523, -1.538), // Inner band left (stop) + std::make_pair (524, 0.0), // allocated band left (start) + std::make_pair (765, 0.0), // allocated band left (stop) + std::make_pair (766, -20.0), // DC band (start) + std::make_pair (770, -20.0), // DC band (stop) + std::make_pair (771, 0.0), // allocated band right (start) + std::make_pair (1012, 0.0), // allocated band right (stop) + std::make_pair (1013, -1.538), // Inner band right (start) + std::make_pair (1025, -20.0), // Inner band right (stop) + std::make_pair (1026, -20.0), // Flat junction band right (start) + std::make_pair (1030, -20.0), // Flat junction band right (stop) + std::make_pair (1031, -20.032), // Middle band right (start) + std::make_pair (1280, -28.000), // Middle band right (stop) + std::make_pair (1281, -28.066), // Outer band right (start) + std::make_pair (1536, -45.000), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_2.4GHz 40MHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_2_4GHZ, 40, maskSlopes, tol, prec), TestCase::QUICK); @@ -642,29 +668,31 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11ax 40MHz @ 5GHz NS_LOG_FUNCTION ("Check slopes for 11ax 40MHz @ 5GHz"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (255, -28.047)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (256, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (505, -20.032)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (506, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (510, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (511, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (523, -1.538)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (524, 0.0)); // allocated band left (start) - maskSlopes.push_back (std::make_pair (765, 0.0)); // allocated band left (stop) - maskSlopes.push_back (std::make_pair (766, -20.0)); // DC band (start) - maskSlopes.push_back (std::make_pair (770, -20.0)); // DC band (stop) - maskSlopes.push_back (std::make_pair (771, 0.0)); // allocated band right (start) - maskSlopes.push_back (std::make_pair (1012, 0.0)); // allocated band right (stop) - maskSlopes.push_back (std::make_pair (1013, -1.538)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (1025, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (1026, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (1030, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (1031, -20.032)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (1280, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (1281, -28.047)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (1536, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (255, -28.047), // Outer band left (stop) + std::make_pair (256, -28.000), // Middle band left (start) + std::make_pair (505, -20.032), // Middle band left (stop) + std::make_pair (506, -20.0), // Flat junction band left (start) + std::make_pair (510, -20.0), // Flat junction band left (stop) + std::make_pair (511, -20.0), // Inner band left (start) + std::make_pair (523, -1.538), // Inner band left (stop) + std::make_pair (524, 0.0), // allocated band left (start) + std::make_pair (765, 0.0), // allocated band left (stop) + std::make_pair (766, -20.0), // DC band (start) + std::make_pair (770, -20.0), // DC band (stop) + std::make_pair (771, 0.0), // allocated band right (start) + std::make_pair (1012, 0.0), // allocated band right (stop) + std::make_pair (1013, -1.538), // Inner band right (start) + std::make_pair (1025, -20.0), // Inner band right (stop) + std::make_pair (1026, -20.0), // Flat junction band right (start) + std::make_pair (1030, -20.0), // Flat junction band right (stop) + std::make_pair (1031, -20.032), // Middle band right (start) + std::make_pair (1280, -28.000), // Middle band right (stop) + std::make_pair (1281, -28.047), // Outer band right (start) + std::make_pair (1536, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 40MHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ, 40, maskSlopes, tol, prec), TestCase::QUICK); @@ -672,29 +700,31 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11ax 80MHz @ 2.4GHz NS_LOG_FUNCTION ("Check slopes for 11ax 80MHz @ 2.4GHz"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -45.000)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (511, -28.033)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (512, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (1017, -20.016)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (1018, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (1022, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (1023, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (1035, -1.538)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (1036, 0.0)); // allocated band left (start) - maskSlopes.push_back (std::make_pair (1533, 0.0)); // allocated band left (stop) - maskSlopes.push_back (std::make_pair (1534, -20.0)); // DC band (start) - maskSlopes.push_back (std::make_pair (1538, -20.0)); // DC band (stop) - maskSlopes.push_back (std::make_pair (1539, 0.0)); // allocated band right (start) - maskSlopes.push_back (std::make_pair (2036, 0.0)); // allocated band right (stop) - maskSlopes.push_back (std::make_pair (2037, -1.538)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (2049, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (2050, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (2054, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (2055, -20.016)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (2560, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (2561, -28.033)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (3072, -45.000)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -45.000), // Outer band left (start) + std::make_pair (511, -28.033), // Outer band left (stop) + std::make_pair (512, -28.000), // Middle band left (start) + std::make_pair (1017, -20.016), // Middle band left (stop) + std::make_pair (1018, -20.0), // Flat junction band left (start) + std::make_pair (1022, -20.0), // Flat junction band left (stop) + std::make_pair (1023, -20.0), // Inner band left (start) + std::make_pair (1035, -1.538), // Inner band left (stop) + std::make_pair (1036, 0.0), // allocated band left (start) + std::make_pair (1533, 0.0), // allocated band left (stop) + std::make_pair (1534, -20.0), // DC band (start) + std::make_pair (1538, -20.0), // DC band (stop) + std::make_pair (1539, 0.0), // allocated band right (start) + std::make_pair (2036, 0.0), // allocated band right (stop) + std::make_pair (2037, -1.538), // Inner band right (start) + std::make_pair (2049, -20.0), // Inner band right (stop) + std::make_pair (2050, -20.0), // Flat junction band right (start) + std::make_pair (2054, -20.0), // Flat junction band right (stop) + std::make_pair (2055, -20.016), // Middle band right (start) + std::make_pair (2560, -28.000), // Middle band right (stop) + std::make_pair (2561, -28.033), // Outer band right (start) + std::make_pair (3072, -45.000), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_2.4GHz 80MHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_2_4GHZ, 80, maskSlopes, tol, prec), TestCase::QUICK); @@ -702,29 +732,31 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11ax 80MHz @ 5GHz NS_LOG_FUNCTION ("Check slopes for 11ax 80MHz @ 5GHz"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (511, -28.023)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (512, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (1017, -20.016)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (1018, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (1022, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (1023, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (1035, -1.538)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (1036, 0.0)); // allocated band left (start) - maskSlopes.push_back (std::make_pair (1533, 0.0)); // allocated band left (stop) - maskSlopes.push_back (std::make_pair (1534, -20.0)); // DC band (start) - maskSlopes.push_back (std::make_pair (1538, -20.0)); // DC band (stop) - maskSlopes.push_back (std::make_pair (1539, 0.0)); // allocated band right (start) - maskSlopes.push_back (std::make_pair (2036, 0.0)); // allocated band right (stop) - maskSlopes.push_back (std::make_pair (2037, -1.538)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (2049, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (2050, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (2054, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (2055, -20.016)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (2560, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (2561, -28.023)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (3072, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (511, -28.023), // Outer band left (stop) + std::make_pair (512, -28.000), // Middle band left (start) + std::make_pair (1017, -20.016), // Middle band left (stop) + std::make_pair (1018, -20.0), // Flat junction band left (start) + std::make_pair (1022, -20.0), // Flat junction band left (stop) + std::make_pair (1023, -20.0), // Inner band left (start) + std::make_pair (1035, -1.538), // Inner band left (stop) + std::make_pair (1036, 0.0), // allocated band left (start) + std::make_pair (1533, 0.0), // allocated band left (stop) + std::make_pair (1534, -20.0), // DC band (start) + std::make_pair (1538, -20.0), // DC band (stop) + std::make_pair (1539, 0.0), // allocated band right (start) + std::make_pair (2036, 0.0), // allocated band right (stop) + std::make_pair (2037, -1.538), // Inner band right (start) + std::make_pair (2049, -20.0), // Inner band right (stop) + std::make_pair (2050, -20.0), // Flat junction band right (start) + std::make_pair (2054, -20.0), // Flat junction band right (stop) + std::make_pair (2055, -20.016), // Middle band right (start) + std::make_pair (2560, -28.000), // Middle band right (stop) + std::make_pair (2561, -28.023), // Outer band right (start) + std::make_pair (3072, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 80MHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ, 80, maskSlopes, tol, prec), TestCase::QUICK); @@ -735,37 +767,39 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11ax 160MHz @ 5GHz NS_LOG_FUNCTION ("Check slopes for 11ax 160MHz @ 5GHz"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (1023, -28.012)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (1024, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (2041, -20.008)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (2042, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (2046, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (2047, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (2059, -1.538)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (2060, 0.0)); // first 80 MHz allocated band left (start) - maskSlopes.push_back (std::make_pair (2557, 0.0)); // first 80 MHz allocated band left (stop) - maskSlopes.push_back (std::make_pair (2558, -20.0)); // first 80 MHz DC band (start) - maskSlopes.push_back (std::make_pair (2562, -20.0)); // first 80 MHz DC band (stop) - maskSlopes.push_back (std::make_pair (2563, 0.0)); // first 80 MHz allocated band right (start) - maskSlopes.push_back (std::make_pair (3060, 0.0)); // first 80 MHz allocated band right (stop) - maskSlopes.push_back (std::make_pair (3061, -20.0)); // gap between 80 MHz bands (start) - maskSlopes.push_back (std::make_pair (3083, -20.0)); // gap between 80 MHz bands (start) - maskSlopes.push_back (std::make_pair (3084, 0.0)); // second 80 MHz allocated band left (start) - maskSlopes.push_back (std::make_pair (3581, 0.0)); // second 80 MHz allocated band left (stop) - maskSlopes.push_back (std::make_pair (3582, -20.0)); // second 80 MHz DC band (start) - maskSlopes.push_back (std::make_pair (3586, -20.0)); // second 80 MHz DC band (stop) - maskSlopes.push_back (std::make_pair (3587, 0.0)); // second 80 MHz allocated band right (start) - maskSlopes.push_back (std::make_pair (4084, 0.0)); // second 80 MHz allocated band right (stop) - maskSlopes.push_back (std::make_pair (4085, -1.538)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (4097, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (4098, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (4102, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (4103, -20.008)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (5120, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (5121, -28.012)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (6144, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (1023, -28.012), // Outer band left (stop) + std::make_pair (1024, -28.000), // Middle band left (start) + std::make_pair (2041, -20.008), // Middle band left (stop) + std::make_pair (2042, -20.0), // Flat junction band left (start) + std::make_pair (2046, -20.0), // Flat junction band left (stop) + std::make_pair (2047, -20.0), // Inner band left (start) + std::make_pair (2059, -1.538), // Inner band left (stop) + std::make_pair (2060, 0.0), // first 80 MHz allocated band left (start) + std::make_pair (2557, 0.0), // first 80 MHz allocated band left (stop) + std::make_pair (2558, -20.0), // first 80 MHz DC band (start) + std::make_pair (2562, -20.0), // first 80 MHz DC band (stop) + std::make_pair (2563, 0.0), // first 80 MHz allocated band right (start) + std::make_pair (3060, 0.0), // first 80 MHz allocated band right (stop) + std::make_pair (3061, -20.0), // gap between 80 MHz bands (start) + std::make_pair (3083, -20.0), // gap between 80 MHz bands (start) + std::make_pair (3084, 0.0), // second 80 MHz allocated band left (start) + std::make_pair (3581, 0.0), // second 80 MHz allocated band left (stop) + std::make_pair (3582, -20.0), // second 80 MHz DC band (start) + std::make_pair (3586, -20.0), // second 80 MHz DC band (stop) + std::make_pair (3587, 0.0), // second 80 MHz allocated band right (start) + std::make_pair (4084, 0.0), // second 80 MHz allocated band right (stop) + std::make_pair (4085, -1.538), // Inner band right (start) + std::make_pair (4097, -20.0), // Inner band right (stop) + std::make_pair (4098, -20.0), // Flat junction band right (start) + std::make_pair (4102, -20.0), // Flat junction band right (stop) + std::make_pair (4103, -20.008), // Middle band right (start) + std::make_pair (5120, -28.000), // Middle band right (stop) + std::make_pair (5121, -28.012), // Outer band right (start) + std::make_pair (6144, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 160MHz", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ, 160, maskSlopes, tol, prec), TestCase::QUICK); @@ -773,31 +807,33 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11ax 80MHz @ 5GHz - first 20 MHz subchannel punctured NS_LOG_FUNCTION ("Check slopes for 11ax 80MHz @ 5GHz with first 20 MHz subchannel punctured"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (511, -28.023)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (512, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (1017, -20.016)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (1018, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (1022, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (1023, -20.0)); // punctured band (start) - maskSlopes.push_back (std::make_pair (1272, -20.0)); // punctured band (stop) - maskSlopes.push_back (std::make_pair (1273, -20.0)); // punctured band increasing slope (start) - maskSlopes.push_back (std::make_pair (1279, 0.0)); // punctured band increasing slope (stop) - maskSlopes.push_back (std::make_pair (1280, 0.0)); // allocated band left (start) - maskSlopes.push_back (std::make_pair (1533, 0.0)); // allocated band left (stop) - maskSlopes.push_back (std::make_pair (1534, -20.0)); // DC band (start) - maskSlopes.push_back (std::make_pair (1538, -20.0)); // DC band (stop) - maskSlopes.push_back (std::make_pair (1539, 0.0)); // allocated band right (start) - maskSlopes.push_back (std::make_pair (2036, 0.0)); // allocated band right (stop) - maskSlopes.push_back (std::make_pair (2037, -1.538)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (2049, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (2050, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (2054, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (2055, -20.016)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (2560, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (2561, -28.023)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (3072, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (511, -28.023), // Outer band left (stop) + std::make_pair (512, -28.000), // Middle band left (start) + std::make_pair (1017, -20.016), // Middle band left (stop) + std::make_pair (1018, -20.0), // Flat junction band left (start) + std::make_pair (1022, -20.0), // Flat junction band left (stop) + std::make_pair (1023, -20.0), // punctured band (start) + std::make_pair (1272, -20.0), // punctured band (stop) + std::make_pair (1273, -20.0), // punctured band increasing slope (start) + std::make_pair (1279, 0.0), // punctured band increasing slope (stop) + std::make_pair (1280, 0.0), // allocated band left (start) + std::make_pair (1533, 0.0), // allocated band left (stop) + std::make_pair (1534, -20.0), // DC band (start) + std::make_pair (1538, -20.0), // DC band (stop) + std::make_pair (1539, 0.0), // allocated band right (start) + std::make_pair (2036, 0.0), // allocated band right (stop) + std::make_pair (2037, -1.538), // Inner band right (start) + std::make_pair (2049, -20.0), // Inner band right (stop) + std::make_pair (2050, -20.0), // Flat junction band right (start) + std::make_pair (2054, -20.0), // Flat junction band right (stop) + std::make_pair (2055, -20.016), // Middle band right (start) + std::make_pair (2560, -28.000), // Middle band right (stop) + std::make_pair (2561, -28.023), // Outer band right (start) + std::make_pair (3072, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 80MHz first subchannel punctured", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ, 80, maskSlopes, tol, prec, {1, 0, 0, 0}), TestCase::QUICK); @@ -805,35 +841,37 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11ax 80MHz @ 5GHz - second 20 MHz subchannel punctured NS_LOG_FUNCTION ("Check slopes for 11ax 80MHz @ 5GHz with second 20 MHz subchannel punctured"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (511, -28.023)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (512, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (1017, -20.016)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (1018, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (1022, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (1023, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (1035, -1.538)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (1036, 0.0)); // allocated band left (start) - maskSlopes.push_back (std::make_pair (1279, 0.0)); // allocated band left (stop) - maskSlopes.push_back (std::make_pair (1280, 0.0)); // punctured band decreasing slope (start) - maskSlopes.push_back (std::make_pair (1286, -20.0)); // punctured band decreasing slope (stop) - maskSlopes.push_back (std::make_pair (1287, -20.0)); // punctured band (start) - maskSlopes.push_back (std::make_pair (1528, -20.0)); // punctured band (stop) - maskSlopes.push_back (std::make_pair (1529, -20.0)); // punctured band increasing slope (start) - maskSlopes.push_back (std::make_pair (1533, -6.667)); // punctured band increasing slope (stop) - maskSlopes.push_back (std::make_pair (1534, -20.0)); // DC band (start) - maskSlopes.push_back (std::make_pair (1538, -20.0)); // DC band (stop) - maskSlopes.push_back (std::make_pair (1539, 0.0)); // allocated band right (start) - maskSlopes.push_back (std::make_pair (2036, 0.0)); // allocated band right (stop) - maskSlopes.push_back (std::make_pair (2037, -1.538)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (2049, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (2050, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (2054, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (2055, -20.016)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (2560, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (2561, -28.023)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (3072, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (511, -28.023), // Outer band left (stop) + std::make_pair (512, -28.000), // Middle band left (start) + std::make_pair (1017, -20.016), // Middle band left (stop) + std::make_pair (1018, -20.0), // Flat junction band left (start) + std::make_pair (1022, -20.0), // Flat junction band left (stop) + std::make_pair (1023, -20.0), // Inner band left (start) + std::make_pair (1035, -1.538), // Inner band left (stop) + std::make_pair (1036, 0.0), // allocated band left (start) + std::make_pair (1279, 0.0), // allocated band left (stop) + std::make_pair (1280, 0.0), // punctured band decreasing slope (start) + std::make_pair (1286, -20.0), // punctured band decreasing slope (stop) + std::make_pair (1287, -20.0), // punctured band (start) + std::make_pair (1528, -20.0), // punctured band (stop) + std::make_pair (1529, -20.0), // punctured band increasing slope (start) + std::make_pair (1533, -6.667), // punctured band increasing slope (stop) + std::make_pair (1534, -20.0), // DC band (start) + std::make_pair (1538, -20.0), // DC band (stop) + std::make_pair (1539, 0.0), // allocated band right (start) + std::make_pair (2036, 0.0), // allocated band right (stop) + std::make_pair (2037, -1.538), // Inner band right (start) + std::make_pair (2049, -20.0), // Inner band right (stop) + std::make_pair (2050, -20.0), // Flat junction band right (start) + std::make_pair (2054, -20.0), // Flat junction band right (stop) + std::make_pair (2055, -20.016), // Middle band right (start) + std::make_pair (2560, -28.000), // Middle band right (stop) + std::make_pair (2561, -28.023), // Outer band right (start) + std::make_pair (3072, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 80MHz second subchannel punctured", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ, 80, maskSlopes, tol, prec, {0, 1, 0, 0}), TestCase::QUICK); @@ -841,35 +879,37 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11ax 80MHz @ 5GHz - third 20 MHz subchannel punctured NS_LOG_FUNCTION ("Check slopes for 11ax 80MHz @ 5GHz with third 20 MHz subchannel punctured"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (511, -28.023)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (512, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (1017, -20.016)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (1018, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (1022, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (1023, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (1035, -1.538)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (1036, 0.0)); // allocated band left (start) - maskSlopes.push_back (std::make_pair (1533, 0.0)); // allocated band left (stop) - maskSlopes.push_back (std::make_pair (1534, -20.0)); // DC band (start) - maskSlopes.push_back (std::make_pair (1535, -20.0)); // DC band (stop) - maskSlopes.push_back (std::make_pair (1539, -10.0)); // punctured band decreasing slope (start) - maskSlopes.push_back (std::make_pair (1542, -20.0)); // punctured band decreasing slope (stop) - maskSlopes.push_back (std::make_pair (1543, -20.0)); // punctured band (start) - maskSlopes.push_back (std::make_pair (1784, -20.0)); // punctured band (stop) - maskSlopes.push_back (std::make_pair (1785, -20.0)); // punctured band increasing slope (start) - maskSlopes.push_back (std::make_pair (1791, 0.0)); // punctured band increasing slope (stop) - maskSlopes.push_back (std::make_pair (1792, 0.0)); // allocated band right (start) - maskSlopes.push_back (std::make_pair (2036, 0.0)); // allocated band right (stop) - maskSlopes.push_back (std::make_pair (2037, -1.538)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (2049, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (2050, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (2054, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (2055, -20.016)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (2560, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (2561, -28.023)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (3072, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (511, -28.023), // Outer band left (stop) + std::make_pair (512, -28.000), // Middle band left (start) + std::make_pair (1017, -20.016), // Middle band left (stop) + std::make_pair (1018, -20.0), // Flat junction band left (start) + std::make_pair (1022, -20.0), // Flat junction band left (stop) + std::make_pair (1023, -20.0), // Inner band left (start) + std::make_pair (1035, -1.538), // Inner band left (stop) + std::make_pair (1036, 0.0), // allocated band left (start) + std::make_pair (1533, 0.0), // allocated band left (stop) + std::make_pair (1534, -20.0), // DC band (start) + std::make_pair (1535, -20.0), // DC band (stop) + std::make_pair (1539, -10.0), // punctured band decreasing slope (start) + std::make_pair (1542, -20.0), // punctured band decreasing slope (stop) + std::make_pair (1543, -20.0), // punctured band (start) + std::make_pair (1784, -20.0), // punctured band (stop) + std::make_pair (1785, -20.0), // punctured band increasing slope (start) + std::make_pair (1791, 0.0), // punctured band increasing slope (stop) + std::make_pair (1792, 0.0), // allocated band right (start) + std::make_pair (2036, 0.0), // allocated band right (stop) + std::make_pair (2037, -1.538), // Inner band right (start) + std::make_pair (2049, -20.0), // Inner band right (stop) + std::make_pair (2050, -20.0), // Flat junction band right (start) + std::make_pair (2054, -20.0), // Flat junction band right (stop) + std::make_pair (2055, -20.016), // Middle band right (start) + std::make_pair (2560, -28.000), // Middle band right (stop) + std::make_pair (2561, -28.023), // Outer band right (start) + std::make_pair (3072, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 80MHz third subchannel punctured", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ, 80, maskSlopes, tol, prec, {0, 0, 1, 0}), TestCase::QUICK); @@ -877,31 +917,33 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11ax 80MHz @ 5GHz - last 20 MHz subchannel punctured NS_LOG_FUNCTION ("Check slopes for 11ax 80MHz @ 5GHz with last 20 MHz subchannel punctured"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (511, -28.023)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (512, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (1017, -20.016)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (1018, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (1022, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (1023, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (1035, -1.538)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (1036, 0.0)); // allocated band left (start) - maskSlopes.push_back (std::make_pair (1533, 0.0)); // allocated band left (stop) - maskSlopes.push_back (std::make_pair (1534, -20.0)); // DC band (start) - maskSlopes.push_back (std::make_pair (1538, -20.0)); // DC band (stop) - maskSlopes.push_back (std::make_pair (1539, 0.0)); // allocated band right (start) - maskSlopes.push_back (std::make_pair (1791, 0.0)); // allocated band right (stop) - maskSlopes.push_back (std::make_pair (1792, 0.0)); // punctured band decreasing slope (start) - maskSlopes.push_back (std::make_pair (1798, -20.0)); // punctured band decreasing slope (stop) - maskSlopes.push_back (std::make_pair (1799, -20.0)); // punctured band (start) - maskSlopes.push_back (std::make_pair (2049, -20.0)); // punctured band (stop) - maskSlopes.push_back (std::make_pair (2050, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (2054, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (2055, -20.016)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (2560, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (2561, -28.023)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (3072, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (511, -28.023), // Outer band left (stop) + std::make_pair (512, -28.000), // Middle band left (start) + std::make_pair (1017, -20.016), // Middle band left (stop) + std::make_pair (1018, -20.0), // Flat junction band left (start) + std::make_pair (1022, -20.0), // Flat junction band left (stop) + std::make_pair (1023, -20.0), // Inner band left (start) + std::make_pair (1035, -1.538), // Inner band left (stop) + std::make_pair (1036, 0.0), // allocated band left (start) + std::make_pair (1533, 0.0), // allocated band left (stop) + std::make_pair (1534, -20.0), // DC band (start) + std::make_pair (1538, -20.0), // DC band (stop) + std::make_pair (1539, 0.0), // allocated band right (start) + std::make_pair (1791, 0.0), // allocated band right (stop) + std::make_pair (1792, 0.0), // punctured band decreasing slope (start) + std::make_pair (1798, -20.0), // punctured band decreasing slope (stop) + std::make_pair (1799, -20.0), // punctured band (start) + std::make_pair (2049, -20.0), // punctured band (stop) + std::make_pair (2050, -20.0), // Flat junction band right (start) + std::make_pair (2054, -20.0), // Flat junction band right (stop) + std::make_pair (2055, -20.016), // Middle band right (start) + std::make_pair (2560, -28.000), // Middle band right (stop) + std::make_pair (2561, -28.023), // Outer band right (start) + std::make_pair (3072, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 80MHz last subchannel punctured", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ, 80, maskSlopes, tol, prec, {0, 0, 0, 1}), TestCase::QUICK); @@ -909,37 +951,39 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11ax 160MHz @ 5GHz - first two 20 MHz subchannels punctured NS_LOG_FUNCTION ("Check slopes for 11ax 160MHz @ 5GHz with two first 20 MHz subchannels punctured"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (1023, -28.012)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (1024, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (2041, -20.008)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (2042, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (2046, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (2047, -20.0)); // punctured band (start) - maskSlopes.push_back (std::make_pair (2552, -20.0)); // punctured band (stop) - maskSlopes.push_back (std::make_pair (2553, -20.0)); // punctured band increasing slope (start) - maskSlopes.push_back (std::make_pair (2557, -6.66667)); // punctured band increasing slope (stop) - maskSlopes.push_back (std::make_pair (2558, -20.0)); // first 80 MHz DC band (start) - maskSlopes.push_back (std::make_pair (2562, -20.0)); // first 80 MHz DC band (stop) - maskSlopes.push_back (std::make_pair (2563, 0.0)); // first 80 MHz allocated band right (start) - maskSlopes.push_back (std::make_pair (3060, 0.0)); // first 80 MHz allocated band right (stop) - maskSlopes.push_back (std::make_pair (3061, -20.0)); // gap between 80 MHz bands (start) - maskSlopes.push_back (std::make_pair (3083, -20.0)); // gap between 80 MHz bands (start) - maskSlopes.push_back (std::make_pair (3084, 0.0)); // second 80 MHz allocated band left (start) - maskSlopes.push_back (std::make_pair (3581, 0.0)); // second 80 MHz allocated band left (stop) - maskSlopes.push_back (std::make_pair (3582, -20.0)); // second 80 MHz DC band (start) - maskSlopes.push_back (std::make_pair (3586, -20.0)); // second 80 MHz DC band (stop) - maskSlopes.push_back (std::make_pair (3587, 0.0)); // second 80 MHz allocated band right (start) - maskSlopes.push_back (std::make_pair (4084, 0.0)); // second 80 MHz allocated band right (stop) - maskSlopes.push_back (std::make_pair (4085, -1.538)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (4097, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (4098, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (4102, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (4103, -20.008)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (5120, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (5121, -28.012)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (6144, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (1023, -28.012), // Outer band left (stop) + std::make_pair (1024, -28.000), // Middle band left (start) + std::make_pair (2041, -20.008), // Middle band left (stop) + std::make_pair (2042, -20.0), // Flat junction band left (start) + std::make_pair (2046, -20.0), // Flat junction band left (stop) + std::make_pair (2047, -20.0), // punctured band (start) + std::make_pair (2552, -20.0), // punctured band (stop) + std::make_pair (2553, -20.0), // punctured band increasing slope (start) + std::make_pair (2557, -6.66667), // punctured band increasing slope (stop) + std::make_pair (2558, -20.0), // first 80 MHz DC band (start) + std::make_pair (2562, -20.0), // first 80 MHz DC band (stop) + std::make_pair (2563, 0.0), // first 80 MHz allocated band right (start) + std::make_pair (3060, 0.0), // first 80 MHz allocated band right (stop) + std::make_pair (3061, -20.0), // gap between 80 MHz bands (start) + std::make_pair (3083, -20.0), // gap between 80 MHz bands (start) + std::make_pair (3084, 0.0), // second 80 MHz allocated band left (start) + std::make_pair (3581, 0.0), // second 80 MHz allocated band left (stop) + std::make_pair (3582, -20.0), // second 80 MHz DC band (start) + std::make_pair (3586, -20.0), // second 80 MHz DC band (stop) + std::make_pair (3587, 0.0), // second 80 MHz allocated band right (start) + std::make_pair (4084, 0.0), // second 80 MHz allocated band right (stop) + std::make_pair (4085, -1.538), // Inner band right (start) + std::make_pair (4097, -20.0), // Inner band right (stop) + std::make_pair (4098, -20.0), // Flat junction band right (start) + std::make_pair (4102, -20.0), // Flat junction band right (stop) + std::make_pair (4103, -20.008), // Middle band right (start) + std::make_pair (5120, -28.000), // Middle band right (stop) + std::make_pair (5121, -28.012), // Outer band right (start) + std::make_pair (6144, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 160MHz first subchannels punctured", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ, 160, maskSlopes, tol, prec, {1, 1, 0, 0, 0, 0, 0, 0}), TestCase::QUICK); @@ -947,39 +991,41 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11ax 160MHz @ 5GHz - third and fourth 20 MHz subchannels punctured NS_LOG_FUNCTION ("Check slopes for 11ax 160MHz @ 5GHz with third and fourth 20 MHz subchannels punctured"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (1023, -28.012)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (1024, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (2041, -20.008)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (2042, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (2046, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (2047, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (2059, -1.538)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (2060, 0.0)); // first 80 MHz allocated band left (start) - maskSlopes.push_back (std::make_pair (2557, 0.0)); // first 80 MHz allocated band left (stop) - maskSlopes.push_back (std::make_pair (2558, -20.0)); // first 80 MHz DC band (start) - maskSlopes.push_back (std::make_pair (2562, -20.0)); // first 80 MHz DC band (stop) - maskSlopes.push_back (std::make_pair (2563, -10.0)); // punctured band decreasing slope (start) - maskSlopes.push_back (std::make_pair (2566, -20.0)); // punctured band decreasing slope (stop) - maskSlopes.push_back (std::make_pair (2567, -20.0)); // punctured band (start) - maskSlopes.push_back (std::make_pair (3060, -20.0)); // punctured band (stop) - maskSlopes.push_back (std::make_pair (3061, -20.0)); // gap between 80 MHz bands (start) - maskSlopes.push_back (std::make_pair (3083, -20.0)); // gap between 80 MHz bands (start) - maskSlopes.push_back (std::make_pair (3084, 0.0)); // second 80 MHz allocated band left (start) - maskSlopes.push_back (std::make_pair (3581, 0.0)); // second 80 MHz allocated band left (stop) - maskSlopes.push_back (std::make_pair (3582, -20.0)); // second 80 MHz DC band (start) - maskSlopes.push_back (std::make_pair (3586, -20.0)); // second 80 MHz DC band (stop) - maskSlopes.push_back (std::make_pair (3587, 0.0)); // second 80 MHz allocated band right (start) - maskSlopes.push_back (std::make_pair (4084, 0.0)); // second 80 MHz allocated band right (stop) - maskSlopes.push_back (std::make_pair (4085, -1.538)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (4097, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (4098, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (4102, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (4103, -20.008)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (5120, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (5121, -28.012)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (6144, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (1023, -28.012), // Outer band left (stop) + std::make_pair (1024, -28.000), // Middle band left (start) + std::make_pair (2041, -20.008), // Middle band left (stop) + std::make_pair (2042, -20.0), // Flat junction band left (start) + std::make_pair (2046, -20.0), // Flat junction band left (stop) + std::make_pair (2047, -20.0), // Inner band left (start) + std::make_pair (2059, -1.538), // Inner band left (stop) + std::make_pair (2060, 0.0), // first 80 MHz allocated band left (start) + std::make_pair (2557, 0.0), // first 80 MHz allocated band left (stop) + std::make_pair (2558, -20.0), // first 80 MHz DC band (start) + std::make_pair (2562, -20.0), // first 80 MHz DC band (stop) + std::make_pair (2563, -10.0), // punctured band decreasing slope (start) + std::make_pair (2566, -20.0), // punctured band decreasing slope (stop) + std::make_pair (2567, -20.0), // punctured band (start) + std::make_pair (3060, -20.0), // punctured band (stop) + std::make_pair (3061, -20.0), // gap between 80 MHz bands (start) + std::make_pair (3083, -20.0), // gap between 80 MHz bands (start) + std::make_pair (3084, 0.0), // second 80 MHz allocated band left (start) + std::make_pair (3581, 0.0), // second 80 MHz allocated band left (stop) + std::make_pair (3582, -20.0), // second 80 MHz DC band (start) + std::make_pair (3586, -20.0), // second 80 MHz DC band (stop) + std::make_pair (3587, 0.0), // second 80 MHz allocated band right (start) + std::make_pair (4084, 0.0), // second 80 MHz allocated band right (stop) + std::make_pair (4085, -1.538), // Inner band right (start) + std::make_pair (4097, -20.0), // Inner band right (stop) + std::make_pair (4098, -20.0), // Flat junction band right (start) + std::make_pair (4102, -20.0), // Flat junction band right (stop) + std::make_pair (4103, -20.008), // Middle band right (start) + std::make_pair (5120, -28.000), // Middle band right (stop) + std::make_pair (5121, -28.012), // Outer band right (start) + std::make_pair (6144, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 160MHz third and fourth subchannels punctured", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ, 160, maskSlopes, tol, prec, {0, 0, 1, 1, 0, 0, 0, 0}), TestCase::QUICK); @@ -987,39 +1033,41 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11ax 160MHz @ 5GHz - fifth and sixth 20 MHz subchannels punctured NS_LOG_FUNCTION ("Check slopes for 11ax 160MHz @ 5GHz with fifth and sixth 20 MHz subchannels punctured"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (1023, -28.012)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (1024, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (2041, -20.008)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (2042, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (2046, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (2047, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (2059, -1.538)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (2060, 0.0)); // first 80 MHz allocated band left (start) - maskSlopes.push_back (std::make_pair (2557, 0.0)); // first 80 MHz allocated band left (stop) - maskSlopes.push_back (std::make_pair (2558, -20.0)); // first 80 MHz DC band (start) - maskSlopes.push_back (std::make_pair (2562, -20.0)); // first 80 MHz DC band (stop) - maskSlopes.push_back (std::make_pair (2563, 0.0)); // first 80 MHz allocated band right (start) - maskSlopes.push_back (std::make_pair (3060, 0.0)); // first 80 MHz allocated band right (stop) - maskSlopes.push_back (std::make_pair (3061, -20.0)); // gap between 80 MHz bands (start) - maskSlopes.push_back (std::make_pair (3083, -20.0)); // gap between 80 MHz bands (start) - maskSlopes.push_back (std::make_pair (3084, -20.0)); // punctured band (start) - maskSlopes.push_back (std::make_pair (3576, -20.0)); // punctured band (stop) - maskSlopes.push_back (std::make_pair (3577, -20.0)); // punctured band increasing slope (start) - maskSlopes.push_back (std::make_pair (3581, -6.667)); // punctured band increasing slope (stop) - maskSlopes.push_back (std::make_pair (3582, -20.0)); // second 80 MHz DC band (start) - maskSlopes.push_back (std::make_pair (3586, -20.0)); // second 80 MHz DC band (stop) - maskSlopes.push_back (std::make_pair (3587, 0.0)); // second 80 MHz allocated band right (start) - maskSlopes.push_back (std::make_pair (4084, 0.0)); // second 80 MHz allocated band right (stop) - maskSlopes.push_back (std::make_pair (4085, -1.538)); // Inner band right (start) - maskSlopes.push_back (std::make_pair (4097, -20.0)); // Inner band right (stop) - maskSlopes.push_back (std::make_pair (4098, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (4102, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (4103, -20.008)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (5120, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (5121, -28.012)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (6144, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (1023, -28.012), // Outer band left (stop) + std::make_pair (1024, -28.000), // Middle band left (start) + std::make_pair (2041, -20.008), // Middle band left (stop) + std::make_pair (2042, -20.0), // Flat junction band left (start) + std::make_pair (2046, -20.0), // Flat junction band left (stop) + std::make_pair (2047, -20.0), // Inner band left (start) + std::make_pair (2059, -1.538), // Inner band left (stop) + std::make_pair (2060, 0.0), // first 80 MHz allocated band left (start) + std::make_pair (2557, 0.0), // first 80 MHz allocated band left (stop) + std::make_pair (2558, -20.0), // first 80 MHz DC band (start) + std::make_pair (2562, -20.0), // first 80 MHz DC band (stop) + std::make_pair (2563, 0.0), // first 80 MHz allocated band right (start) + std::make_pair (3060, 0.0), // first 80 MHz allocated band right (stop) + std::make_pair (3061, -20.0), // gap between 80 MHz bands (start) + std::make_pair (3083, -20.0), // gap between 80 MHz bands (start) + std::make_pair (3084, -20.0), // punctured band (start) + std::make_pair (3576, -20.0), // punctured band (stop) + std::make_pair (3577, -20.0), // punctured band increasing slope (start) + std::make_pair (3581, -6.667), // punctured band increasing slope (stop) + std::make_pair (3582, -20.0), // second 80 MHz DC band (start) + std::make_pair (3586, -20.0), // second 80 MHz DC band (stop) + std::make_pair (3587, 0.0), // second 80 MHz allocated band right (start) + std::make_pair (4084, 0.0), // second 80 MHz allocated band right (stop) + std::make_pair (4085, -1.538), // Inner band right (start) + std::make_pair (4097, -20.0), // Inner band right (stop) + std::make_pair (4098, -20.0), // Flat junction band right (start) + std::make_pair (4102, -20.0), // Flat junction band right (stop) + std::make_pair (4103, -20.008), // Middle band right (start) + std::make_pair (5120, -28.000), // Middle band right (stop) + std::make_pair (5121, -28.012), // Outer band right (start) + std::make_pair (6144, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 160MHz fifth and sixth subchannels punctured", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ, 160, maskSlopes, tol, prec, {0, 0, 0, 0, 1, 1, 0, 0}), TestCase::QUICK); @@ -1027,37 +1075,39 @@ WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite () // ============================================================================================ // 11ax 160MHz @ 5GHz - last two 20 MHz subchannels punctured NS_LOG_FUNCTION ("Check slopes for 11ax 160MHz @ 5GHz with two last 20 MHz subchannels punctured"); - maskSlopes.clear (); - maskSlopes.push_back (std::make_pair (0, -40.0)); // Outer band left (start) - maskSlopes.push_back (std::make_pair (1023, -28.012)); // Outer band left (stop) - maskSlopes.push_back (std::make_pair (1024, -28.000)); // Middle band left (start) - maskSlopes.push_back (std::make_pair (2041, -20.008)); // Middle band left (stop) - maskSlopes.push_back (std::make_pair (2042, -20.0)); // Flat junction band left (start) - maskSlopes.push_back (std::make_pair (2046, -20.0)); // Flat junction band left (stop) - maskSlopes.push_back (std::make_pair (2047, -20.0)); // Inner band left (start) - maskSlopes.push_back (std::make_pair (2059, -1.538)); // Inner band left (stop) - maskSlopes.push_back (std::make_pair (2060, 0.0)); // first 80 MHz allocated band left (start) - maskSlopes.push_back (std::make_pair (2557, 0.0)); // first 80 MHz allocated band left (stop) - maskSlopes.push_back (std::make_pair (2558, -20.0)); // first 80 MHz DC band (start) - maskSlopes.push_back (std::make_pair (2562, -20.0)); // first 80 MHz DC band (stop) - maskSlopes.push_back (std::make_pair (2563, 0.0)); // first 80 MHz allocated band right (start) - maskSlopes.push_back (std::make_pair (3060, 0.0)); // first 80 MHz allocated band right (stop) - maskSlopes.push_back (std::make_pair (3061, -20.0)); // gap between 80 MHz bands (start) - maskSlopes.push_back (std::make_pair (3083, -20.0)); // gap between 80 MHz bands (start) - maskSlopes.push_back (std::make_pair (3084, 0.0)); // second 80 MHz allocated band left (start) - maskSlopes.push_back (std::make_pair (3581, 0.0)); // second 80 MHz allocated band left (stop) - maskSlopes.push_back (std::make_pair (3582, -20.0)); // second 80 MHz DC band (start) - maskSlopes.push_back (std::make_pair (3586, -20.0)); // second 80 MHz DC band (stop) - maskSlopes.push_back (std::make_pair (3587, -10.0)); // punctured band decreasing slope (start) - maskSlopes.push_back (std::make_pair (3590, -20.0)); // punctured band decreasing slope (stop) - maskSlopes.push_back (std::make_pair (3591, -20.0)); // punctured band (start) - maskSlopes.push_back (std::make_pair (4097, -20.0)); // punctured band (stop) - maskSlopes.push_back (std::make_pair (4098, -20.0)); // Flat junction band right (start) - maskSlopes.push_back (std::make_pair (4102, -20.0)); // Flat junction band right (stop) - maskSlopes.push_back (std::make_pair (4103, -20.008)); // Middle band right (start) - maskSlopes.push_back (std::make_pair (5120, -28.000)); // Middle band right (stop) - maskSlopes.push_back (std::make_pair (5121, -28.012)); // Outer band right (start) - maskSlopes.push_back (std::make_pair (6144, -40.0)); // Outer band right (stop) + maskSlopes = { + std::make_pair (0, -40.0), // Outer band left (start) + std::make_pair (1023, -28.012), // Outer band left (stop) + std::make_pair (1024, -28.000), // Middle band left (start) + std::make_pair (2041, -20.008), // Middle band left (stop) + std::make_pair (2042, -20.0), // Flat junction band left (start) + std::make_pair (2046, -20.0), // Flat junction band left (stop) + std::make_pair (2047, -20.0), // Inner band left (start) + std::make_pair (2059, -1.538), // Inner band left (stop) + std::make_pair (2060, 0.0), // first 80 MHz allocated band left (start) + std::make_pair (2557, 0.0), // first 80 MHz allocated band left (stop) + std::make_pair (2558, -20.0), // first 80 MHz DC band (start) + std::make_pair (2562, -20.0), // first 80 MHz DC band (stop) + std::make_pair (2563, 0.0), // first 80 MHz allocated band right (start) + std::make_pair (3060, 0.0), // first 80 MHz allocated band right (stop) + std::make_pair (3061, -20.0), // gap between 80 MHz bands (start) + std::make_pair (3083, -20.0), // gap between 80 MHz bands (start) + std::make_pair (3084, 0.0), // second 80 MHz allocated band left (start) + std::make_pair (3581, 0.0), // second 80 MHz allocated band left (stop) + std::make_pair (3582, -20.0), // second 80 MHz DC band (start) + std::make_pair (3586, -20.0), // second 80 MHz DC band (stop) + std::make_pair (3587, -10.0), // punctured band decreasing slope (start) + std::make_pair (3590, -20.0), // punctured band decreasing slope (stop) + std::make_pair (3591, -20.0), // punctured band (start) + std::make_pair (4097, -20.0), // punctured band (stop) + std::make_pair (4098, -20.0), // Flat junction band right (start) + std::make_pair (4102, -20.0), // Flat junction band right (stop) + std::make_pair (4103, -20.008), // Middle band right (start) + std::make_pair (5120, -28.000), // Middle band right (stop) + std::make_pair (5121, -28.012), // Outer band right (start) + std::make_pair (6144, -40.0), // Outer band right (stop) + }; + AddTestCase (new WifiOfdmMaskSlopesTestCase ("11ax_5GHz 160MHz last subchannels punctured", WIFI_STANDARD_80211ax, WIFI_PHY_BAND_5GHZ, 160, maskSlopes, tol, prec, {0, 0, 0, 0, 0, 0, 1, 1}), TestCase::QUICK);