test PHY reception of multiple CTS frames as a response to a MU-RTS frame. More...
Public Member Functions | |
TestMultipleCtsResponsesFromMuRts (const std::vector< uint16_t > &bwPerSta) | |
Constructor. | |
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 | CheckResults (std::size_t expectedRxCtsSuccess, std::size_t expectedRxCtsFailure) |
Check the results. | |
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 | FakePreviousMuRts (uint16_t bw) |
Function called to fake the transmission of a MU-RTS. | |
void | RxCtsFailure (Ptr< const WifiPsdu > psdu) |
CTS RX failure function. | |
void | RxCtsSuccess (Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector, std::vector< bool > statusPerMpdu) |
CTS RX success function. | |
void | TxNonHtDuplicateCts (Ptr< SpectrumWifiPhy > phy, uint16_t bw) |
Function called to trigger a CTS frame sent by a STA using non-HT duplicate. | |
Private Attributes | |
std::vector< uint16_t > | m_bwPerSta |
Bandwidth per STA in MHz. | |
std::size_t | m_countRxCtsFailure |
count the number of unsuccessfully received CTS frames | |
std::size_t | m_countRxCtsSuccess |
count the number of successfully received CTS frames | |
Ptr< SpectrumWifiPhy > | m_nonHePhySta |
non-HE STA PHY | |
Ptr< MuRtsCtsSpectrumWifiPhy > | m_phyAp |
AP PHY. | |
std::vector< Ptr< MuRtsCtsSpectrumWifiPhy > > | m_phyStas |
STAs PHYs. | |
double | m_stasTxPowerDbm |
TX power in dBm configured for the STAs. | |
Additional Inherited Members | |
Public Types inherited from ns3::TestCase | |
enum | TestDuration { 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, TestDuration 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. | |
test PHY reception of multiple CTS frames as a response to a MU-RTS frame.
The test is checking whether the reception of multiple identical CTS frames as a response to a MU-RTS frame is successfully received by the AP PHY and that only a single CTS frame is forwarded up to the MAC. Since the test is focusing on the PHY reception of multiple CTS response, the transmission of the MU-RTS frame is faked.
Definition at line 621 of file wifi-non-ht-dup-test.cc.
TestMultipleCtsResponsesFromMuRts::TestMultipleCtsResponsesFromMuRts | ( | const std::vector< uint16_t > & | bwPerSta | ) |
Constructor.
bwPerSta | the bandwidth to use for each STA (in MHz) |
Definition at line 687 of file wifi-non-ht-dup-test.cc.
|
private |
Check the results.
expectedRxCtsSuccess | the expected number of CTS RX success |
expectedRxCtsFailure | the expected number of CTS RX failures |
Definition at line 770 of file wifi-non-ht-dup-test.cc.
References m_countRxCtsFailure, m_countRxCtsSuccess, and NS_TEST_ASSERT_MSG_EQ.
Referenced by DoRun().
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 902 of file wifi-non-ht-dup-test.cc.
References CheckResults(), ns3::Simulator::Destroy(), FakePreviousMuRts(), m_bwPerSta, m_phyStas, ns3::NanoSeconds(), ns3::Simulator::Run(), ns3::Simulator::Schedule(), ns3::Seconds(), and TxNonHtDuplicateCts().
|
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 782 of file wifi-non-ht-dup-test.cc.
References ns3::SpectrumWifiPhy::AddChannel(), ns3::WifiPhy::AssignStreams(), ns3::WifiPhy::ConfigureStandard(), DEFAULT_FREQUENCY, ns3::WifiPhyOperatingChannel::FindFirst(), m_bwPerSta, m_nonHePhySta, m_phyAp, m_phyStas, m_stasTxPowerDbm, ns3::MakeCallback(), RxCtsFailure(), RxCtsSuccess(), ns3::SpectrumWifiPhy::SetDevice(), ns3::WifiPhy::SetErrorRateModel(), ns3::WifiPhy::SetInterferenceHelper(), ns3::WifiPhy::SetMobility(), ns3::WifiPhy::SetOperatingChannel(), ns3::WifiPhy::SetReceiveErrorCallback(), ns3::WifiPhy::SetReceiveOkCallback(), ns3::RngSeedManager::SetRun(), ns3::RngSeedManager::SetSeed(), ns3::WIFI_PHY_BAND_5GHZ, ns3::WIFI_STANDARD_80211ac, 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 889 of file wifi-non-ht-dup-test.cc.
References ns3::Object::Dispose(), m_phyAp, and m_phyStas.
|
private |
Function called to fake the transmission of a MU-RTS.
bw | the bandwidth to use for the transmission in MHz |
Definition at line 698 of file wifi-non-ht-dup-test.cc.
References m_phyAp, m_phyStas, NS_LOG_FUNCTION, ns3::WifiTxVector::SetChannelWidth(), MuRtsCtsSpectrumWifiPhy::SetMuRtsTxVector(), and MuRtsCtsSpectrumWifiPhy::SetPpduUid().
Referenced by DoRun().
CTS RX failure function.
psdu | the PSDU |
Definition at line 763 of file wifi-non-ht-dup-test.cc.
References m_countRxCtsFailure, and NS_LOG_FUNCTION.
Referenced by DoSetup().
|
private |
CTS RX success function.
psdu | the PSDU |
rxSignalInfo | the info on the received signal ( |
txVector | the transmit vector |
statusPerMpdu | reception status per MPDU |
Definition at line 749 of file wifi-non-ht-dup-test.cc.
References ns3::DbmToW(), m_bwPerSta, m_countRxCtsSuccess, m_stasTxPowerDbm, NS_LOG_FUNCTION, NS_TEST_EXPECT_MSG_EQ_TOL, ns3::RxSignalInfo::rssi, and ns3::WToDbm().
Referenced by DoSetup().
|
private |
Function called to trigger a CTS frame sent by a STA using non-HT duplicate.
phy | the PHY of the STA |
bw | the bandwidth to use for the transmission in MHz |
Definition at line 717 of file wifi-non-ht-dup-test.cc.
References ns3::OfdmPhy::GetOfdmRate54Mbps(), NS_LOG_FUNCTION, ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiMacHeader::SetNoMoreFragments(), ns3::WifiMacHeader::SetNoRetry(), ns3::WifiTxVector::SetTriggerResponding(), ns3::WifiMacHeader::SetType(), ns3::WIFI_MAC_CTL_CTS, and ns3::WIFI_PREAMBLE_LONG.
Referenced by DoRun().
|
private |
Bandwidth per STA in MHz.
Definition at line 679 of file wifi-non-ht-dup-test.cc.
Referenced by DoRun(), DoSetup(), and RxCtsSuccess().
|
private |
count the number of unsuccessfully received CTS frames
Definition at line 682 of file wifi-non-ht-dup-test.cc.
Referenced by CheckResults(), and RxCtsFailure().
|
private |
count the number of successfully received CTS frames
Definition at line 681 of file wifi-non-ht-dup-test.cc.
Referenced by CheckResults(), and RxCtsSuccess().
|
private |
|
private |
AP PHY.
Definition at line 675 of file wifi-non-ht-dup-test.cc.
Referenced by DoSetup(), DoTeardown(), and FakePreviousMuRts().
|
private |
STAs PHYs.
Definition at line 676 of file wifi-non-ht-dup-test.cc.
Referenced by DoRun(), DoSetup(), DoTeardown(), and FakePreviousMuRts().
|
private |
TX power in dBm configured for the STAs.
Definition at line 684 of file wifi-non-ht-dup-test.cc.
Referenced by DoSetup(), and RxCtsSuccess().