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. | |
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 () |
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 () |
Function called to fake the transmission of a MU-RTS. | |
void | RxCtsFailure (std::size_t phyIndex, Ptr< const WifiPsdu > psdu) |
CTS RX failure function. | |
void | RxCtsSuccess (std::size_t phyIndex, Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector, std::vector< bool > statusPerMpdu) |
CTS RX success function. | |
void | TxNonHtDuplicateCts (std::size_t phyIndex) |
Function called to trigger a CTS frame sent by a STA using non-HT duplicate. | |
Private Attributes | |
std::size_t | m_countApRxCtsFailure |
count the number of unsuccessfully received CTS frames by the AP | |
std::size_t | m_countApRxCtsSuccess |
count the number of successfully received CTS frames by the AP | |
std::size_t | m_countStaRxCtsFailure |
count the number of unsuccessfully received CTS frames by the non-participating STA | |
std::size_t | m_countStaRxCtsSuccess |
count the number of successfully received CTS frames by the non-participating STA | |
std::vector< CtsTxInfos > | m_ctsTxInfosPerSta |
information about CTS responses | |
Ptr< MuRtsCtsSpectrumWifiPhy > | m_phyAp |
AP PHY. | |
std::vector< Ptr< MuRtsCtsSpectrumWifiPhy > > | m_phyStas |
STAs PHYs. | |
dBm_u | m_stasTxPower |
TX power configured for the STAs. | |
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. | |
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 623 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 699 of file wifi-non-ht-dup-test.cc.
|
private |
Check the results.
Definition at line 833 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 1009 of file wifi-non-ht-dup-test.cc.
References CheckResults(), ns3::Simulator::Destroy(), FakePreviousMuRts(), 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 852 of file wifi-non-ht-dup-test.cc.
References ns3::SpectrumWifiPhy::AddChannel(), ns3::WifiPhy::AssignStreams(), ns3::WifiPhy::ConfigureStandard(), ns3::CreateObject(), ns3::CreateObjectWithAttributes(), DEFAULT_FREQUENCY, ns3::WifiPhyOperatingChannel::FindFirst(), m_ctsTxInfosPerSta, m_phyAp, m_phyStas, m_stasTxPower, 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 996 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 712 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 818 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 775 of file wifi-non-ht-dup-test.cc.
References ns3::DbmToW(), ns3::WifiTxVector::GetChannelWidth(), m_countApRxCtsSuccess, m_countStaRxCtsSuccess, m_ctsTxInfosPerSta, m_stasTxPower, 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 736 of file wifi-non-ht-dup-test.cc.
References ns3::Create(), ns3::OfdmPhy::GetOfdmRate54Mbps(), m_ctsTxInfosPerSta, m_phyStas, ns3::NanoSeconds(), 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 690 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 688 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 693 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 691 of file wifi-non-ht-dup-test.cc.
Referenced by CheckResults(), and RxCtsSuccess().
|
private |
information about CTS responses
Definition at line 685 of file wifi-non-ht-dup-test.cc.
Referenced by CheckResults(), DoSetup(), FakePreviousMuRts(), RxCtsSuccess(), and TxNonHtDuplicateCts().
|
private |
AP PHY.
Definition at line 682 of file wifi-non-ht-dup-test.cc.
Referenced by DoSetup(), DoTeardown(), and FakePreviousMuRts().
|
private |
STAs PHYs.
Definition at line 683 of file wifi-non-ht-dup-test.cc.
Referenced by DoRun(), DoSetup(), DoTeardown(), FakePreviousMuRts(), and TxNonHtDuplicateCts().
|
private |
TX power configured for the STAs.
Definition at line 696 of file wifi-non-ht-dup-test.cc.
Referenced by DoSetup(), and RxCtsSuccess().