DL MU-MIMO PHY test. More...
Classes | |
| struct | StaInfo |
| STA info. More... | |
Public Member Functions | |
| TestDlMuMimoPhyTransmission () | |
| 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< MuMimoSpectrumWifiPhy > 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 | CheckResultsSta3 (uint32_t expectedRxSuccess, uint32_t expectedRxFailure, uint32_t expectedRxBytes) |
| Check the results for STA 3. | |
| void | DoCheckPhyState (Ptr< MuMimoSpectrumWifiPhy > 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 | RxFailureSta3 (Ptr< const WifiPsdu > psdu) |
| Receive failure function for STA 3. | |
| 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 | RxSuccessSta3 (Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, const std::vector< bool > &statusPerMpdu) |
| Receive success function for STA 3. | |
| void | SendMuPpdu (const std::vector< StaInfo > &staInfos) |
| Send DL MU-MIMO 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_countRxBytesSta3 |
| count RX bytes for STA 3 | |
| uint32_t | m_countRxFailureSta1 |
| count RX failure for STA 1 | |
| uint32_t | m_countRxFailureSta2 |
| count RX failure for STA 2 | |
| uint32_t | m_countRxFailureSta3 |
| count RX failure for STA 3 | |
| uint32_t | m_countRxSuccessSta1 |
| count RX success for STA 1 | |
| uint32_t | m_countRxSuccessSta2 |
| count RX success for STA 2 | |
| uint32_t | m_countRxSuccessSta3 |
| count RX success for STA 3 | |
| Time | m_expectedPpduDuration |
| expected duration to send MU PPDU | |
| MHz_u | m_frequency |
| frequency | |
| uint8_t | m_nss |
| number of spatial streams per STA | |
| Ptr< SpectrumWifiPhy > | m_phyAp |
| PHY of AP. | |
| Ptr< MuMimoSpectrumWifiPhy > | m_phySta1 |
| PHY of STA 1. | |
| Ptr< MuMimoSpectrumWifiPhy > | m_phySta2 |
| PHY of STA 2. | |
| Ptr< MuMimoSpectrumWifiPhy > | m_phySta3 |
| PHY of STA 3. | |
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... | |
| Static Public Attributes inherited from ns3::TestCase | |
| static constexpr auto | QUICK = Duration::QUICK |
| Deprecated test duration simple enums. | |
| static constexpr auto | EXTENSIVE = Duration::EXTENSIVE |
| static constexpr auto | TAKES_FOREVER = Duration::TAKES_FOREVER |
| 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 MU-MIMO PHY test.
Definition at line 340 of file wifi-phy-mu-mimo-test.cc.
| TestDlMuMimoPhyTransmission::TestDlMuMimoPhyTransmission | ( | ) |
Definition at line 498 of file wifi-phy-mu-mimo-test.cc.
References ns3::TestCase::TestCase(), DEFAULT_CHANNEL_WIDTH, DEFAULT_FREQUENCY, m_channelWidth, m_countRxBytesSta1, m_countRxBytesSta2, m_countRxBytesSta3, m_countRxFailureSta1, m_countRxFailureSta2, m_countRxFailureSta3, m_countRxSuccessSta1, m_countRxSuccessSta2, m_countRxSuccessSta3, m_expectedPpduDuration, m_frequency, m_nss, and ns3::NanoSeconds().
|
private |
Schedule now to check the PHY state.
| phy | the PHY |
| expectedState | the expected state of the PHY |
Definition at line 678 of file wifi-phy-mu-mimo-test.cc.
References DoCheckPhyState(), and ns3::Simulator::ScheduleNow().
Referenced by RunOne().
|
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 630 of file wifi-phy-mu-mimo-test.cc.
References m_countRxBytesSta1, m_countRxFailureSta1, m_countRxSuccessSta1, and NS_TEST_ASSERT_MSG_EQ.
Referenced by RunOne().
|
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 646 of file wifi-phy-mu-mimo-test.cc.
References m_countRxBytesSta2, m_countRxFailureSta2, m_countRxSuccessSta2, and NS_TEST_ASSERT_MSG_EQ.
Referenced by RunOne().
|
private |
Check the results for STA 3.
| expectedRxSuccess | the expected number of RX success |
| expectedRxFailure | the expected number of RX failures |
| expectedRxBytes | the expected number of RX bytes |
Definition at line 662 of file wifi-phy-mu-mimo-test.cc.
References m_countRxBytesSta3, m_countRxFailureSta3, m_countRxSuccessSta3, and NS_TEST_ASSERT_MSG_EQ.
Referenced by RunOne().
|
private |
Check the PHY state now.
| phy | the PHY |
| expectedState | the expected state of the PHY |
Definition at line 687 of file wifi-phy-mu-mimo-test.cc.
References ns3::DynamicCast(), ns3::PointerValue::Get(), ns3::Simulator::Now(), NS_LOG_FUNCTION, and NS_TEST_ASSERT_MSG_EQ.
Referenced by CheckPhyState().
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 1087 of file wifi-phy-mu-mimo-test.cc.
References ns3::Simulator::Destroy(), m_channelWidth, m_expectedPpduDuration, m_frequency, m_nss, ns3::NanoSeconds(), and RunOne().
|
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 703 of file wifi-phy-mu-mimo-test.cc.
References ns3::CreateObject(), m_phyAp, m_phySta1, m_phySta2, m_phySta3, ns3::MakeCallback(), RxFailureSta1(), RxFailureSta2(), RxFailureSta3(), RxSuccessSta1(), RxSuccessSta2(), RxSuccessSta3(), and ns3::WIFI_STANDARD_80211ax.
|
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 776 of file wifi-phy-mu-mimo-test.cc.
|
private |
Generate interference function.
| interferencePsd | the PSD of the interference to be generated |
| duration | the duration of the interference |
|
private |
Reset the results.
Definition at line 517 of file wifi-phy-mu-mimo-test.cc.
References m_countRxBytesSta1, m_countRxBytesSta2, m_countRxBytesSta3, m_countRxFailureSta1, m_countRxFailureSta2, m_countRxFailureSta3, m_countRxSuccessSta1, m_countRxSuccessSta2, and m_countRxSuccessSta3.
Referenced by RunOne().
|
private |
Run one function.
Definition at line 789 of file wifi-phy-mu-mimo-test.cc.
References ns3::CCA_BUSY, CheckPhyState(), CheckResultsSta1(), CheckResultsSta2(), CheckResultsSta3(), ns3::WifiPhyOperatingChannel::FindFirst(), ns3::IDLE, m_channelWidth, m_expectedPpduDuration, m_frequency, m_nss, m_phyAp, m_phySta1, m_phySta2, m_phySta3, 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().
Receive failure function for STA 1.
| psdu | the PSDU |
Definition at line 609 of file wifi-phy-mu-mimo-test.cc.
References m_countRxFailureSta1, and NS_LOG_FUNCTION.
Referenced by DoSetup().
Receive failure function for STA 2.
| psdu | the PSDU |
Definition at line 616 of file wifi-phy-mu-mimo-test.cc.
References m_countRxFailureSta2, and NS_LOG_FUNCTION.
Referenced by DoSetup().
Receive failure function for STA 3.
| psdu | the PSDU |
Definition at line 623 of file wifi-phy-mu-mimo-test.cc.
References m_countRxFailureSta3, and NS_LOG_FUNCTION.
Referenced by DoSetup().
|
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 576 of file wifi-phy-mu-mimo-test.cc.
References m_countRxBytesSta1, m_countRxSuccessSta1, and NS_LOG_FUNCTION.
Referenced by DoSetup().
|
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 587 of file wifi-phy-mu-mimo-test.cc.
References m_countRxBytesSta2, m_countRxSuccessSta2, and NS_LOG_FUNCTION.
Referenced by DoSetup().
|
private |
Receive success function for STA 3.
| psdu | the PSDU |
| rxSignalInfo | the info on the received signal ( |
| txVector | the transmit vector |
| statusPerMpdu | reception status per MPDU |
Definition at line 598 of file wifi-phy-mu-mimo-test.cc.
References m_countRxBytesSta3, m_countRxSuccessSta3, and NS_LOG_FUNCTION.
Referenced by DoSetup().
|
private |
Send DL MU-MIMO PPDU function.
| staInfos | the STAs infos |
Definition at line 531 of file wifi-phy-mu-mimo-test.cc.
References ns3::Create(), ns3::HePhy::GetHeMcs7(), ns3::WifiRu::GetRuType(), ns3::VhtPhy::GetVhtMcs5(), ns3::WifiTxVector::IsDlMuMimo(), ns3::WifiTxVector::IsDlOfdma(), m_channelWidth, m_phyAp, ns3::NanoSeconds(), NS_ASSERT, NS_LOG_FUNCTION, ns3::WifiMacHeader::SetAddr1(), ns3::WifiTxVector::SetMode(), ns3::WifiTxVector::SetNss(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiTxVector::SetRu(), ns3::WifiMacHeader::SetSequenceNumber(), ns3::WifiTxVector::SetSigBMode(), ns3::WifiMacHeader::SetType(), ns3::WIFI_MAC_QOSDATA, and ns3::WIFI_PREAMBLE_HE_MU.
Referenced by RunOne().
|
private |
Stop interference function.
|
private |
channel width
Definition at line 494 of file wifi-phy-mu-mimo-test.cc.
Referenced by TestDlMuMimoPhyTransmission(), DoRun(), RunOne(), and SendMuPpdu().
|
private |
count RX bytes for STA 1
Definition at line 483 of file wifi-phy-mu-mimo-test.cc.
Referenced by TestDlMuMimoPhyTransmission(), CheckResultsSta1(), ResetResults(), and RxSuccessSta1().
|
private |
count RX bytes for STA 2
Definition at line 484 of file wifi-phy-mu-mimo-test.cc.
Referenced by TestDlMuMimoPhyTransmission(), CheckResultsSta2(), ResetResults(), and RxSuccessSta2().
|
private |
count RX bytes for STA 3
Definition at line 485 of file wifi-phy-mu-mimo-test.cc.
Referenced by TestDlMuMimoPhyTransmission(), CheckResultsSta3(), ResetResults(), and RxSuccessSta3().
|
private |
count RX failure for STA 1
Definition at line 480 of file wifi-phy-mu-mimo-test.cc.
Referenced by TestDlMuMimoPhyTransmission(), CheckResultsSta1(), ResetResults(), and RxFailureSta1().
|
private |
count RX failure for STA 2
Definition at line 481 of file wifi-phy-mu-mimo-test.cc.
Referenced by TestDlMuMimoPhyTransmission(), CheckResultsSta2(), ResetResults(), and RxFailureSta2().
|
private |
count RX failure for STA 3
Definition at line 482 of file wifi-phy-mu-mimo-test.cc.
Referenced by TestDlMuMimoPhyTransmission(), CheckResultsSta3(), ResetResults(), and RxFailureSta3().
|
private |
count RX success for STA 1
Definition at line 477 of file wifi-phy-mu-mimo-test.cc.
Referenced by TestDlMuMimoPhyTransmission(), CheckResultsSta1(), ResetResults(), and RxSuccessSta1().
|
private |
count RX success for STA 2
Definition at line 478 of file wifi-phy-mu-mimo-test.cc.
Referenced by TestDlMuMimoPhyTransmission(), CheckResultsSta2(), ResetResults(), and RxSuccessSta2().
|
private |
count RX success for STA 3
Definition at line 479 of file wifi-phy-mu-mimo-test.cc.
Referenced by TestDlMuMimoPhyTransmission(), CheckResultsSta3(), ResetResults(), and RxSuccessSta3().
|
private |
expected duration to send MU PPDU
Definition at line 495 of file wifi-phy-mu-mimo-test.cc.
Referenced by TestDlMuMimoPhyTransmission(), DoRun(), and RunOne().
|
private |
frequency
Definition at line 493 of file wifi-phy-mu-mimo-test.cc.
Referenced by TestDlMuMimoPhyTransmission(), DoRun(), and RunOne().
|
private |
number of spatial streams per STA
Definition at line 492 of file wifi-phy-mu-mimo-test.cc.
Referenced by TestDlMuMimoPhyTransmission(), DoRun(), and RunOne().
|
private |
PHY of AP.
Definition at line 487 of file wifi-phy-mu-mimo-test.cc.
Referenced by DoSetup(), DoTeardown(), RunOne(), and SendMuPpdu().
|
private |
PHY of STA 1.
Definition at line 488 of file wifi-phy-mu-mimo-test.cc.
Referenced by DoSetup(), DoTeardown(), and RunOne().
|
private |
PHY of STA 2.
Definition at line 489 of file wifi-phy-mu-mimo-test.cc.
Referenced by DoSetup(), DoTeardown(), and RunOne().
|
private |
PHY of STA 3.
Definition at line 490 of file wifi-phy-mu-mimo-test.cc.
Referenced by DoSetup(), DoTeardown(), and RunOne().