test PHY reception of multiple CTS frames as a response to a MU-RTS frame. More...
Classes | |
struct | CtsTxInfos |
Information about CTS responses to expect in the test. More... | |
Public Member Functions | |
TestMultipleCtsResponsesFromMuRts (const std::vector< CtsTxInfos > &ctsTxInfosPerSta) | |
Constructor. More... | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
void | CheckResults () |
Check the results. More... | |
void | DoRun () override |
Implementation to actually run this TestCase. More... | |
void | DoSetup () override |
Implementation to do any local setup required for this TestCase. More... | |
void | DoTeardown () override |
Implementation to do any local setup required for this TestCase. More... | |
void | FakePreviousMuRts () |
Function called to fake the transmission of a MU-RTS. More... | |
void | RxCtsFailure (std::size_t phyIndex, Ptr< const WifiPsdu > psdu) |
CTS RX failure function. More... | |
void | RxCtsSuccess (std::size_t phyIndex, Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector, std::vector< bool > statusPerMpdu) |
CTS RX success function. More... | |
void | TxNonHtDuplicateCts (std::size_t phyIndex) |
Function called to trigger a CTS frame sent by a STA using non-HT duplicate. More... | |
Private Attributes | |
std::size_t | m_countApRxCtsFailure |
count the number of unsuccessfully received CTS frames by the AP More... | |
std::size_t | m_countApRxCtsSuccess |
count the number of successfully received CTS frames by the AP More... | |
std::size_t | m_countStaRxCtsFailure |
count the number of unsuccessfully received CTS frames by the non-participating STA More... | |
std::size_t | m_countStaRxCtsSuccess |
count the number of successfully received CTS frames by the non-participating STA More... | |
std::vector< CtsTxInfos > | m_ctsTxInfosPerSta |
information about CTS responses More... | |
Ptr< MuRtsCtsSpectrumWifiPhy > | m_phyAp |
AP PHY. More... | |
std::vector< Ptr< MuRtsCtsSpectrumWifiPhy > > | m_phyStas |
STAs PHYs. More... | |
double | m_stasTxPowerDbm |
TX power in dBm configured for the STAs. More... | |
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. More... | |
void | AddTestCase (TestCase *testCase, TestDuration duration=QUICK) |
Add an individual child TestCase to this test suite. More... | |
TestCase * | GetParent () const |
Get the parent of this TestCase. More... | |
bool | IsStatusFailure () const |
Check if any tests failed. More... | |
bool | IsStatusSuccess () const |
Check if all tests passed. More... | |
void | SetDataDir (std::string directory) |
Set the data directory where reference trace files can be found. More... | |
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. More... | |
bool | MustAssertOnFailure () const |
Check if this run should assert on failure. More... | |
bool | MustContinueOnFailure () const |
Check if this run should continue on failure. More... | |
std::string | CreateDataDirFilename (std::string filename) |
Construct the full path to a file in the data directory. More... | |
std::string | CreateTempDirFilename (std::string filename) |
Construct the full path to a file in a temporary directory. More... | |
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. The test also checks the correct channel width is passed to the MAC layer through the TXVECTOR. The test also consider the case some STAs do not respond to verify the largest channel width of the successfully CTS responses is reported to the MAC.
Definition at line 629 of file wifi-non-ht-dup-test.cc.
TestMultipleCtsResponsesFromMuRts::TestMultipleCtsResponsesFromMuRts | ( | const std::vector< CtsTxInfos > & | ctsTxInfosPerSta | ) |
Constructor.
ctsTxInfosPerSta | the information about CTS responses to generate |
Definition at line 705 of file wifi-non-ht-dup-test.cc.
|
private |
Check the results.
Definition at line 839 of file wifi-non-ht-dup-test.cc.
References m_countApRxCtsFailure, m_countApRxCtsSuccess, m_countStaRxCtsFailure, m_countStaRxCtsSuccess, m_ctsTxInfosPerSta, 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 1012 of file wifi-non-ht-dup-test.cc.
References CheckResults(), FakePreviousMuRts(), m_phyStas, ns3::NanoSeconds(), 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 858 of file wifi-non-ht-dup-test.cc.
References ns3::SpectrumWifiPhy::AddChannel(), ns3::WifiPhy::AssignStreams(), ns3::WifiPhy::ConfigureStandard(), DEFAULT_FREQUENCY, m_ctsTxInfosPerSta, 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::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 999 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.
Definition at line 718 of file wifi-non-ht-dup-test.cc.
References m_ctsTxInfosPerSta, m_phyAp, m_phyStas, NS_LOG_FUNCTION, ns3::WifiTxVector::SetChannelWidth(), MuRtsCtsSpectrumWifiPhy::SetMuRtsTxVector(), and MuRtsCtsSpectrumWifiPhy::SetPpduUid().
Referenced by DoRun().
|
private |
CTS RX failure function.
phyIndex | the index of the PHY (0 for AP) |
psdu | the PSDU |
Definition at line 824 of file wifi-non-ht-dup-test.cc.
References m_countApRxCtsFailure, m_countStaRxCtsFailure, and NS_LOG_FUNCTION.
Referenced by DoSetup().
|
private |
CTS RX success function.
phyIndex | the index of the PHY (0 for AP) |
psdu | the PSDU |
rxSignalInfo | the info on the received signal ( |
txVector | the transmit vector |
statusPerMpdu | reception status per MPDU |
Definition at line 781 of file wifi-non-ht-dup-test.cc.
References ns3::DbmToW(), ns3::WifiTxVector::GetChannelWidth(), m_countApRxCtsSuccess, m_countStaRxCtsSuccess, m_ctsTxInfosPerSta, m_stasTxPowerDbm, min, NS_LOG_FUNCTION, NS_TEST_ASSERT_MSG_EQ, 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.
phyIndex | the index of the TX PHY |
Definition at line 742 of file wifi-non-ht-dup-test.cc.
References m_ctsTxInfosPerSta, m_phyStas, 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 |
count the number of unsuccessfully received CTS frames by the AP
Definition at line 696 of file wifi-non-ht-dup-test.cc.
Referenced by CheckResults(), and RxCtsFailure().
|
private |
count the number of successfully received CTS frames by the AP
Definition at line 694 of file wifi-non-ht-dup-test.cc.
Referenced by CheckResults(), and RxCtsSuccess().
|
private |
count the number of unsuccessfully received CTS frames by the non-participating STA
Definition at line 699 of file wifi-non-ht-dup-test.cc.
Referenced by CheckResults(), and RxCtsFailure().
|
private |
count the number of successfully received CTS frames by the non-participating STA
Definition at line 697 of file wifi-non-ht-dup-test.cc.
Referenced by CheckResults(), and RxCtsSuccess().
|
private |
information about CTS responses
Definition at line 691 of file wifi-non-ht-dup-test.cc.
Referenced by CheckResults(), DoSetup(), FakePreviousMuRts(), RxCtsSuccess(), and TxNonHtDuplicateCts().
|
private |
AP PHY.
Definition at line 688 of file wifi-non-ht-dup-test.cc.
Referenced by DoSetup(), DoTeardown(), and FakePreviousMuRts().
|
private |
STAs PHYs.
Definition at line 689 of file wifi-non-ht-dup-test.cc.
Referenced by DoRun(), DoSetup(), DoTeardown(), FakePreviousMuRts(), and TxNonHtDuplicateCts().
|
private |
TX power in dBm configured for the STAs.
Definition at line 702 of file wifi-non-ht-dup-test.cc.
Referenced by DoSetup(), and RxCtsSuccess().