LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2005,2006 INRIA | 3 * Copyright (c) 2005,2006 INRIA |
4 * 2010 NICTA | 4 * 2010 NICTA |
5 * | 5 * |
6 * This program is free software; you can redistribute it and/or modify | 6 * This program is free software; you can redistribute it and/or modify |
7 * it under the terms of the GNU General Public License version 2 as | 7 * it under the terms of the GNU General Public License version 2 as |
8 * published by the Free Software Foundation; | 8 * published by the Free Software Foundation; |
9 * | 9 * |
10 * This program is distributed in the hope that it will be useful, | 10 * This program is distributed in the hope that it will be useful, |
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1325 Config::Connect ("/ChannelList/*/$ns3::MultiModelSpectrumChannel/TxSigParams",
MakeCallback (&Bug2483TestCase::StoreDistinctTuple, this)); | 1325 Config::Connect ("/ChannelList/*/$ns3::MultiModelSpectrumChannel/TxSigParams",
MakeCallback (&Bug2483TestCase::StoreDistinctTuple, this)); |
1326 | 1326 |
1327 Simulator::Stop (Seconds (0.8)); | 1327 Simulator::Stop (Seconds (0.8)); |
1328 Simulator::Run (); | 1328 Simulator::Run (); |
1329 | 1329 |
1330 Simulator::Destroy (); | 1330 Simulator::Destroy (); |
1331 | 1331 |
1332 // {starting frequency, channelWidth, Number of subbands in SpectrumModel, mod
ulation type} tuples | 1332 // {starting frequency, channelWidth, Number of subbands in SpectrumModel, mod
ulation type} tuples |
1333 uint8_t numberTuples = m_distinctTuples.size (); | 1333 uint8_t numberTuples = m_distinctTuples.size (); |
1334 NS_TEST_ASSERT_MSG_EQ (numberTuples, 2, "Only two distinct tuples expected"); | 1334 NS_TEST_ASSERT_MSG_EQ (numberTuples, 2, "Only two distinct tuples expected"); |
1335 NS_TEST_ASSERT_MSG_EQ (std::get<0> (m_distinctTuples[0]) - 20e6, std::get<0> (
m_distinctTuples[1]), "The starting frequency of the first tuple should be shift
ed 20 MHz to the right wrt second tuple"); | 1335 NS_TEST_ASSERT_MSG_EQ (std::get<0> (m_distinctTuples[0]), std::get<0> (m_disti
nctTuples[1]), "Both tuples should have same starting frequency"); |
1336 // Note that the first tuple should the one initiated by the beacon, i.e. lega
cy OFDM (20 MHz) | 1336 // Note that the first tuple should the one initiated by the beacon, i.e. lega
cy OFDM (20 MHz) |
1337 NS_TEST_ASSERT_MSG_EQ (std::get<1> (m_distinctTuples[0]), 20, "First tuple's c
hannel width should be 20 MHz"); | 1337 NS_TEST_ASSERT_MSG_EQ (std::get<1> (m_distinctTuples[0]), 20, "First tuple's c
hannel width should be 20 MHz"); |
1338 NS_TEST_ASSERT_MSG_EQ (std::get<2> (m_distinctTuples[0]), 193, "First tuple sh
ould have 193 subbands (64+DC, 20MHz+DC, inband and 64*2 out-of-band, 20MHz on e
ach side)"); | 1338 NS_TEST_ASSERT_MSG_EQ (std::get<2> (m_distinctTuples[0]), 193, "First tuple sh
ould have 193 subbands (64+DC, 20MHz+DC, inband and 64*2 out-of-band, 20MHz on e
ach side)"); |
1339 NS_TEST_ASSERT_MSG_EQ (std::get<3> (m_distinctTuples[0]), WifiModulationClass:
:WIFI_MOD_CLASS_OFDM, "First tuple should be OFDM"); | 1339 NS_TEST_ASSERT_MSG_EQ (std::get<3> (m_distinctTuples[0]), WifiModulationClass:
:WIFI_MOD_CLASS_OFDM, "First tuple should be OFDM"); |
1340 // Second tuple | 1340 // Second tuple |
1341 NS_TEST_ASSERT_MSG_EQ (std::get<1> (m_distinctTuples[1]), channelWidth, "Secon
d tuple's channel width should be 40 MHz"); | 1341 NS_TEST_ASSERT_MSG_EQ (std::get<1> (m_distinctTuples[1]), channelWidth, "Secon
d tuple's channel width should be 40 MHz"); |
1342 NS_TEST_ASSERT_MSG_EQ (std::get<2> (m_distinctTuples[1]), 385, "Second tuple s
hould have 385 subbands (128+DC, 40MHz+DC, inband and 128*2 out-of-band, 40MHz o
n each side)"); | 1342 NS_TEST_ASSERT_MSG_EQ (std::get<2> (m_distinctTuples[1]), 257, "Second tuple s
hould have 257 subbands (128+DC, 40MHz+DC, inband and 64*2 out-of-band, 20MHz on
each side)"); |
1343 NS_TEST_ASSERT_MSG_EQ (std::get<3> (m_distinctTuples[1]), WifiModulationClass:
:WIFI_MOD_CLASS_VHT, "Second tuple should be VHT_OFDM"); | 1343 NS_TEST_ASSERT_MSG_EQ (std::get<3> (m_distinctTuples[1]), WifiModulationClass:
:WIFI_MOD_CLASS_VHT, "Second tuple should be VHT_OFDM"); |
1344 } | 1344 } |
1345 | 1345 |
1346 //----------------------------------------------------------------------------- | 1346 //----------------------------------------------------------------------------- |
1347 /** | 1347 /** |
1348 * Make sure that the channel width and the channel number can be changed at run
time. | 1348 * Make sure that the channel width and the channel number can be changed at run
time. |
1349 * | 1349 * |
1350 * The scenario considers an access point and a station using a 20 MHz channel w
idth. | 1350 * The scenario considers an access point and a station using a 20 MHz channel w
idth. |
1351 * After 1s, we change the channel width and the channel number to use a 40 MHz
channel. | 1351 * After 1s, we change the channel width and the channel number to use a 40 MHz
channel. |
1352 * The tests checks the operational channel width sent in Beacon frames | 1352 * The tests checks the operational channel width sent in Beacon frames |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1475 | 1475 |
1476 Ptr<ConstantPositionMobilityModel> staMobility = CreateObject<ConstantPosition
MobilityModel> (); | 1476 Ptr<ConstantPositionMobilityModel> staMobility = CreateObject<ConstantPosition
MobilityModel> (); |
1477 staMobility->SetPosition (Vector (1.0, 0.0, 0.0)); | 1477 staMobility->SetPosition (Vector (1.0, 0.0, 0.0)); |
1478 staNode->AggregateObject (staMobility); | 1478 staNode->AggregateObject (staMobility); |
1479 | 1479 |
1480 m_staPhy = CreateObject<YansWifiPhy> (); | 1480 m_staPhy = CreateObject<YansWifiPhy> (); |
1481 m_staPhy->SetErrorRateModel (error); | 1481 m_staPhy->SetErrorRateModel (error); |
1482 m_staPhy->SetChannel (channel); | 1482 m_staPhy->SetChannel (channel); |
1483 m_staPhy->SetMobility (staMobility); | 1483 m_staPhy->SetMobility (staMobility); |
1484 m_staPhy->SetDevice (apDev); | 1484 m_staPhy->SetDevice (apDev); |
1485 m_staPhy->ConfigureStandard (WIFI_PHY_STANDARD_80211n_5GHZ); | 1485 m_staPhy->ConfigureStandard (WIFI_PHY_STANDARD_80211ac); |
1486 m_staPhy->SetChannelNumber (36); | 1486 m_staPhy->SetChannelNumber (36); |
1487 m_staPhy->SetChannelWidth (20); | 1487 m_staPhy->SetChannelWidth (20); |
1488 | 1488 |
1489 apMac->SetAddress (Mac48Address::Allocate ()); | 1489 apMac->SetAddress (Mac48Address::Allocate ()); |
1490 apDev->SetMac (apMac); | 1490 apDev->SetMac (apMac); |
1491 apDev->SetPhy (m_apPhy); | 1491 apDev->SetPhy (m_apPhy); |
1492 ObjectFactory manager; | 1492 ObjectFactory manager; |
1493 manager.SetTypeId ("ns3::ConstantRateWifiManager"); | 1493 manager.SetTypeId ("ns3::ConstantRateWifiManager"); |
1494 apDev->SetRemoteStationManager (manager.Create<WifiRemoteStationManager> ()); | 1494 apDev->SetRemoteStationManager (manager.Create<WifiRemoteStationManager> ()); |
1495 apNode->AddDevice (apDev); | 1495 apNode->AddDevice (apDev); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1534 AddTestCase (new InterferenceHelperSequenceTest, TestCase::QUICK); //Bug 991 | 1534 AddTestCase (new InterferenceHelperSequenceTest, TestCase::QUICK); //Bug 991 |
1535 AddTestCase (new DcfImmediateAccessBroadcastTestCase, TestCase::QUICK); | 1535 AddTestCase (new DcfImmediateAccessBroadcastTestCase, TestCase::QUICK); |
1536 AddTestCase (new Bug730TestCase, TestCase::QUICK); //Bug 730 | 1536 AddTestCase (new Bug730TestCase, TestCase::QUICK); //Bug 730 |
1537 AddTestCase (new SetChannelFrequencyTest, TestCase::QUICK); | 1537 AddTestCase (new SetChannelFrequencyTest, TestCase::QUICK); |
1538 AddTestCase (new Bug2222TestCase, TestCase::QUICK); //Bug 2222 | 1538 AddTestCase (new Bug2222TestCase, TestCase::QUICK); //Bug 2222 |
1539 AddTestCase (new Bug2483TestCase, TestCase::QUICK); //Bug 2483 | 1539 AddTestCase (new Bug2483TestCase, TestCase::QUICK); //Bug 2483 |
1540 AddTestCase (new Bug2831TestCase, TestCase::QUICK); //Bug 2831 | 1540 AddTestCase (new Bug2831TestCase, TestCase::QUICK); //Bug 2831 |
1541 } | 1541 } |
1542 | 1542 |
1543 static WifiTestSuite g_wifiTestSuite; ///< the test suite | 1543 static WifiTestSuite g_wifiTestSuite; ///< the test suite |
LEFT | RIGHT |