DL-OFDMA PHY puncturing test. More...
Inheritance diagram for TestDlOfdmaPhyPuncturing:
Collaboration diagram for TestDlOfdmaPhyPuncturing:Public Member Functions | |
| TestDlOfdmaPhyPuncturing () | |
Public Member Functions inherited from ns3::TestCase | |
| TestCase (const TestCase &)=delete | |
| virtual | ~TestCase () |
| Destructor. | |
| std::string | GetName () const |
| TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
| void | CheckPhyState (Ptr< OfdmaSpectrumWifiPhy< HePhy > > phy, WifiPhyState expectedState) |
| Schedule now to check the PHY state. | |
| void | CheckResultsSta1 (uint32_t expectedRxSuccess, uint32_t expectedRxFailure, uint32_t expectedRxBytes) |
| Check the results for STA 1. | |
| void | CheckResultsSta2 (uint32_t expectedRxSuccess, uint32_t expectedRxFailure, uint32_t expectedRxBytes) |
| Check the results for STA 2. | |
| void | DoCheckPhyState (Ptr< OfdmaSpectrumWifiPhy< HePhy > > phy, WifiPhyState expectedState) |
| Check the PHY state now. | |
| void | DoRun () override |
| Implementation to actually run this TestCase. | |
| void | DoSetup () override |
| Implementation to do any local setup required for this TestCase. | |
| void | DoTeardown () override |
| Implementation to do any local setup required for this TestCase. | |
| void | GenerateInterference (Ptr< SpectrumValue > interferencePsd, Time duration) |
| Generate interference function. | |
| void | ResetResults () |
| Reset the results. | |
| void | RunOne () |
| Run one function. | |
| void | RxFailureSta1 (Ptr< const WifiPsdu > psdu) |
| Receive failure function for STA 1. | |
| void | RxFailureSta2 (Ptr< const WifiPsdu > psdu) |
| Receive failure function for STA 2. | |
| void | RxSuccessSta1 (Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, const std::vector< bool > &statusPerMpdu) |
| Receive success function for STA 1. | |
| void | RxSuccessSta2 (Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, const std::vector< bool > &statusPerMpdu) |
| Receive success function for STA 2. | |
| void | SendMuPpdu (uint16_t rxStaId1, uint16_t rxStaId2, const std::vector< bool > &puncturedSubchannels) |
| Send MU-PPDU function. | |
| void | StopInterference () |
| Stop interference function. | |
Private Attributes | |
| MHz_u | m_channelWidth |
| channel width | |
| uint32_t | m_countRxBytesSta1 |
| count RX bytes for STA 1 | |
| uint32_t | m_countRxBytesSta2 |
| count RX bytes for STA 2 | |
| uint32_t | m_countRxFailureSta1 |
| count RX failure for STA 1 | |
| uint32_t | m_countRxFailureSta2 |
| count RX failure for STA 2 | |
| uint32_t | m_countRxSuccessSta1 |
| count RX success for STA 1 | |
| uint32_t | m_countRxSuccessSta2 |
| count RX success for STA 2 | |
| Time | m_expectedPpduDuration20Mhz |
| expected duration to send MU PPDU on 20 MHz RU | |
| Time | m_expectedPpduDuration40Mhz |
| expected duration to send MU PPDU on 40 MHz RU | |
| MHz_u | m_frequency |
| frequency | |
| uint8_t | m_indexSubchannel |
| Index of the subchannel (starting from 0) that should contain an interference and be punctured during the test run. | |
| Ptr< SpectrumWifiPhy > | m_phyAp |
| PHY of AP. | |
| Ptr< WaveformGenerator > | m_phyInterferer |
| PHY of interferer. | |
| Ptr< OfdmaSpectrumWifiPhy< HePhy > > | m_phySta1 |
| PHY of STA 1. | |
| Ptr< OfdmaSpectrumWifiPhy< HePhy > > | m_phySta2 |
| PHY of STA 2. | |
Additional Inherited Members | |
Public Types inherited from ns3::TestCase | |
| enum class | Duration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 } |
| How long the test takes to execute. More... | |
Protected Member Functions inherited from ns3::TestCase | |
| TestCase (std::string name) | |
| Constructor. | |
| void | AddTestCase (TestCase *testCase, Duration duration=Duration::QUICK) |
| Add an individual child TestCase to this test suite. | |
| TestCase * | GetParent () const |
| Get the parent of this TestCase. | |
| bool | IsStatusFailure () const |
| Check if any tests failed. | |
| bool | IsStatusSuccess () const |
| Check if all tests passed. | |
| void | SetDataDir (std::string directory) |
| Set the data directory where reference trace files can be found. | |
| void | ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line) |
| Log the failure of this TestCase. | |
| bool | MustAssertOnFailure () const |
| Check if this run should assert on failure. | |
| bool | MustContinueOnFailure () const |
| Check if this run should continue on failure. | |
| std::string | CreateDataDirFilename (std::string filename) |
| Construct the full path to a file in the data directory. | |
| std::string | CreateTempDirFilename (std::string filename) |
| Construct the full path to a file in a temporary directory. | |
DL-OFDMA PHY puncturing test.
Definition at line 1431 of file wifi-phy-ofdma-test.cc.
| TestDlOfdmaPhyPuncturing::TestDlOfdmaPhyPuncturing | ( | ) |
Definition at line 1566 of file wifi-phy-ofdma-test.cc.
References ns3::TestCase::TestCase(), m_channelWidth, m_countRxBytesSta1, m_countRxBytesSta2, m_countRxFailureSta1, m_countRxFailureSta2, m_countRxSuccessSta1, m_countRxSuccessSta2, m_expectedPpduDuration20Mhz, m_expectedPpduDuration40Mhz, m_frequency, m_indexSubchannel, and ns3::NanoSeconds().
Here is the call graph for this function:
|
private |
Schedule now to check the PHY state.
| phy | the PHY |
| expectedState | the expected state of the PHY |
Definition at line 1762 of file wifi-phy-ofdma-test.cc.
References DoCheckPhyState(), and ns3::Simulator::ScheduleNow().
Referenced by RunOne().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Check the results for STA 1.
| expectedRxSuccess | the expected number of RX success |
| expectedRxFailure | the expected number of RX failures |
| expectedRxBytes | the expected number of RX bytes |
Definition at line 1730 of file wifi-phy-ofdma-test.cc.
References m_countRxBytesSta1, m_countRxFailureSta1, m_countRxSuccessSta1, and NS_TEST_ASSERT_MSG_EQ.
Referenced by RunOne().
Here is the caller graph for this function:
|
private |
Check the results for STA 2.
| expectedRxSuccess | the expected number of RX success |
| expectedRxFailure | the expected number of RX failures |
| expectedRxBytes | the expected number of RX bytes |
Definition at line 1746 of file wifi-phy-ofdma-test.cc.
References m_countRxBytesSta2, m_countRxFailureSta2, m_countRxSuccessSta2, and NS_TEST_ASSERT_MSG_EQ.
Referenced by RunOne().
Here is the caller graph for this function:
|
private |
Check the PHY state now.
| phy | the PHY |
| expectedState | the expected state of the PHY |
Definition at line 1771 of file wifi-phy-ofdma-test.cc.
References ns3::DynamicCast(), ns3::PointerValue::Get(), ns3::Simulator::Now(), NS_LOG_FUNCTION, and NS_TEST_ASSERT_MSG_EQ.
Referenced by CheckPhyState().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 2058 of file wifi-phy-ofdma-test.cc.
References ns3::Simulator::Destroy(), m_indexSubchannel, and RunOne().
Here is the call graph for this function:
|
overrideprivatevirtual |
Implementation to do any local setup required for this TestCase.
Subclasses should override this method to perform any costly per-test setup before DoRun is invoked.
Reimplemented from ns3::TestCase.
Definition at line 1787 of file wifi-phy-ofdma-test.cc.
References ns3::CreateObject(), m_frequency, m_phyAp, m_phyInterferer, m_phySta1, m_phySta2, ns3::MakeCallback(), ns3::MHzToHz(), RxFailureSta1(), RxFailureSta2(), RxSuccessSta1(), RxSuccessSta2(), and ns3::WIFI_STANDARD_80211ax.
Here is the call graph for this function:
|
overrideprivatevirtual |
Implementation to do any local setup required for this TestCase.
Subclasses should override this method to perform any costly per-test teardown
Reimplemented from ns3::TestCase.
Definition at line 1864 of file wifi-phy-ofdma-test.cc.
References m_phyAp, m_phyInterferer, m_phySta1, and m_phySta2.
|
private |
Generate interference function.
| interferencePsd | the PSD of the interference to be generated |
| duration | the duration of the interference |
Definition at line 1677 of file wifi-phy-ofdma-test.cc.
References m_phyInterferer, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), and StopInterference().
Referenced by RunOne().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Reset the results.
Definition at line 1583 of file wifi-phy-ofdma-test.cc.
References m_countRxBytesSta1, m_countRxBytesSta2, m_countRxFailureSta1, m_countRxFailureSta2, m_countRxSuccessSta1, and m_countRxSuccessSta2.
Referenced by RunOne().
Here is the caller graph for this function:
|
private |
Run one function.
Definition at line 1877 of file wifi-phy-ofdma-test.cc.
References CheckPhyState(), CheckResultsSta1(), CheckResultsSta2(), ns3::Count20MHzSubchannels(), ns3::Create(), ns3::BandInfo::fc, ns3::BandInfo::fh, ns3::WifiPhyOperatingChannel::FindFirst(), ns3::BandInfo::fl, GenerateInterference(), ns3::IDLE, m_channelWidth, m_expectedPpduDuration20Mhz, m_expectedPpduDuration40Mhz, m_frequency, m_indexSubchannel, m_phyAp, m_phySta1, m_phySta2, ns3::MHzToHz(), ns3::NanoSeconds(), ResetResults(), ns3::Simulator::Run(), ns3::RX, ns3::Simulator::Schedule(), ns3::Seconds(), SendMuPpdu(), ns3::RngSeedManager::SetRun(), ns3::RngSeedManager::SetSeed(), ns3::WIFI_PHY_BAND_5GHZ, and ns3::WIFI_STANDARD_80211ax.
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:Receive failure function for STA 1.
| psdu | the PSDU |
Definition at line 1716 of file wifi-phy-ofdma-test.cc.
References m_countRxFailureSta1, and NS_LOG_FUNCTION.
Referenced by DoSetup().
Here is the caller graph for this function:Receive failure function for STA 2.
| psdu | the PSDU |
Definition at line 1723 of file wifi-phy-ofdma-test.cc.
References m_countRxFailureSta2, and NS_LOG_FUNCTION.
Referenced by DoSetup().
Here is the caller graph for this function:
|
private |
Receive success function for STA 1.
| psdu | the PSDU |
| rxSignalInfo | the info on the received signal ( |
| txVector | the transmit vector |
| statusPerMpdu | reception status per MPDU |
Definition at line 1694 of file wifi-phy-ofdma-test.cc.
References m_countRxBytesSta1, m_countRxSuccessSta1, and NS_LOG_FUNCTION.
Referenced by DoSetup().
Here is the caller graph for this function:
|
private |
Receive success function for STA 2.
| psdu | the PSDU |
| rxSignalInfo | the info on the received signal ( |
| txVector | the transmit vector |
| statusPerMpdu | reception status per MPDU |
Definition at line 1705 of file wifi-phy-ofdma-test.cc.
References m_countRxBytesSta2, m_countRxSuccessSta2, and NS_LOG_FUNCTION.
Referenced by DoSetup().
Here is the caller graph for this function:
|
private |
Send MU-PPDU function.
| rxStaId1 | the ID of the recipient STA for the first PSDU |
| rxStaId2 | the ID of the recipient STA for the second PSDU |
| puncturedSubchannels | indicates for each subchannel whether it is punctured or not. if empty, preamble puncturing is not used. |
Definition at line 1594 of file wifi-phy-ofdma-test.cc.
References ns3::Create(), ns3::HePhy::GetHeMcs7(), ns3::HePhy::GetHeMcs9(), ns3::VhtPhy::GetVhtMcs5(), m_channelWidth, m_phyAp, ns3::NanoSeconds(), NS_LOG_FUNCTION, ns3::RU_242_TONE, ns3::RU_484_TONE, ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiMacHeader::SetSequenceNumber(), ns3::WifiMacHeader::SetType(), ns3::WIFI_MAC_QOSDATA, and ns3::WIFI_PREAMBLE_HE_MU.
Referenced by RunOne().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Stop interference function.
Definition at line 1687 of file wifi-phy-ofdma-test.cc.
References m_phyInterferer, and NS_LOG_FUNCTION.
Referenced by GenerateInterference().
Here is the caller graph for this function:
|
private |
channel width
Definition at line 1557 of file wifi-phy-ofdma-test.cc.
Referenced by TestDlOfdmaPhyPuncturing(), RunOne(), and SendMuPpdu().
|
private |
count RX bytes for STA 1
Definition at line 1548 of file wifi-phy-ofdma-test.cc.
Referenced by TestDlOfdmaPhyPuncturing(), CheckResultsSta1(), ResetResults(), and RxSuccessSta1().
|
private |
count RX bytes for STA 2
Definition at line 1549 of file wifi-phy-ofdma-test.cc.
Referenced by TestDlOfdmaPhyPuncturing(), CheckResultsSta2(), ResetResults(), and RxSuccessSta2().
|
private |
count RX failure for STA 1
Definition at line 1546 of file wifi-phy-ofdma-test.cc.
Referenced by TestDlOfdmaPhyPuncturing(), CheckResultsSta1(), ResetResults(), and RxFailureSta1().
|
private |
count RX failure for STA 2
Definition at line 1547 of file wifi-phy-ofdma-test.cc.
Referenced by TestDlOfdmaPhyPuncturing(), CheckResultsSta2(), ResetResults(), and RxFailureSta2().
|
private |
count RX success for STA 1
Definition at line 1544 of file wifi-phy-ofdma-test.cc.
Referenced by TestDlOfdmaPhyPuncturing(), CheckResultsSta1(), ResetResults(), and RxSuccessSta1().
|
private |
count RX success for STA 2
Definition at line 1545 of file wifi-phy-ofdma-test.cc.
Referenced by TestDlOfdmaPhyPuncturing(), CheckResultsSta2(), ResetResults(), and RxSuccessSta2().
|
private |
expected duration to send MU PPDU on 20 MHz RU
Definition at line 1562 of file wifi-phy-ofdma-test.cc.
Referenced by TestDlOfdmaPhyPuncturing(), and RunOne().
|
private |
expected duration to send MU PPDU on 40 MHz RU
Definition at line 1563 of file wifi-phy-ofdma-test.cc.
Referenced by TestDlOfdmaPhyPuncturing(), and RunOne().
|
private |
frequency
Definition at line 1556 of file wifi-phy-ofdma-test.cc.
Referenced by TestDlOfdmaPhyPuncturing(), DoSetup(), and RunOne().
|
private |
Index of the subchannel (starting from 0) that should contain an interference and be punctured during the test run.
Definition at line 1559 of file wifi-phy-ofdma-test.cc.
Referenced by TestDlOfdmaPhyPuncturing(), DoRun(), and RunOne().
|
private |
PHY of AP.
Definition at line 1551 of file wifi-phy-ofdma-test.cc.
Referenced by DoSetup(), DoTeardown(), RunOne(), and SendMuPpdu().
|
private |
PHY of interferer.
Definition at line 1554 of file wifi-phy-ofdma-test.cc.
Referenced by DoSetup(), DoTeardown(), GenerateInterference(), and StopInterference().
|
private |
PHY of STA 1.
Definition at line 1552 of file wifi-phy-ofdma-test.cc.
Referenced by DoSetup(), DoTeardown(), and RunOne().
|
private |
PHY of STA 2.
Definition at line 1553 of file wifi-phy-ofdma-test.cc.
Referenced by DoSetup(), DoTeardown(), and RunOne().