A Discrete-Event Network Simulator
API
TestMultipleCtsResponsesFromMuRts Class Reference

test PHY reception of multiple CTS frames as a response to a MU-RTS frame. More...

+ Inheritance diagram for TestMultipleCtsResponsesFromMuRts:
+ Collaboration diagram for TestMultipleCtsResponsesFromMuRts:

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
 
TestCaseoperator= (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< CtsTxInfosm_ctsTxInfosPerSta
 information about CTS responses More...
 
Ptr< MuRtsCtsSpectrumWifiPhym_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...
 
TestCaseGetParent () 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ TestMultipleCtsResponsesFromMuRts()

TestMultipleCtsResponsesFromMuRts::TestMultipleCtsResponsesFromMuRts ( const std::vector< CtsTxInfos > &  ctsTxInfosPerSta)

Constructor.

Parameters
ctsTxInfosPerStathe information about CTS responses to generate

Definition at line 705 of file wifi-non-ht-dup-test.cc.

Member Function Documentation

◆ CheckResults()

void TestMultipleCtsResponsesFromMuRts::CheckResults ( )
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().

+ Here is the caller graph for this function:

◆ DoRun()

void TestMultipleCtsResponsesFromMuRts::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().

+ Here is the call graph for this function:

◆ DoSetup()

void TestMultipleCtsResponsesFromMuRts::DoSetup ( )
overrideprivatevirtual

◆ DoTeardown()

void TestMultipleCtsResponsesFromMuRts::DoTeardown ( )
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.

+ Here is the call graph for this function:

◆ FakePreviousMuRts()

void TestMultipleCtsResponsesFromMuRts::FakePreviousMuRts ( )
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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RxCtsFailure()

void TestMultipleCtsResponsesFromMuRts::RxCtsFailure ( std::size_t  phyIndex,
Ptr< const WifiPsdu psdu 
)
private

CTS RX failure function.

Parameters
phyIndexthe index of the PHY (0 for AP)
psduthe 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().

+ Here is the caller graph for this function:

◆ RxCtsSuccess()

void TestMultipleCtsResponsesFromMuRts::RxCtsSuccess ( std::size_t  phyIndex,
Ptr< const WifiPsdu psdu,
RxSignalInfo  rxSignalInfo,
WifiTxVector  txVector,
std::vector< bool >  statusPerMpdu 
)
private

CTS RX success function.

Parameters
phyIndexthe index of the PHY (0 for AP)
psduthe PSDU
rxSignalInfothe info on the received signal (
See also
RxSignalInfo)
Parameters
txVectorthe transmit vector
statusPerMpdureception 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TxNonHtDuplicateCts()

void TestMultipleCtsResponsesFromMuRts::TxNonHtDuplicateCts ( std::size_t  phyIndex)
private

Function called to trigger a CTS frame sent by a STA using non-HT duplicate.

Parameters
phyIndexthe 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_countApRxCtsFailure

std::size_t TestMultipleCtsResponsesFromMuRts::m_countApRxCtsFailure
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().

◆ m_countApRxCtsSuccess

std::size_t TestMultipleCtsResponsesFromMuRts::m_countApRxCtsSuccess
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().

◆ m_countStaRxCtsFailure

std::size_t TestMultipleCtsResponsesFromMuRts::m_countStaRxCtsFailure
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().

◆ m_countStaRxCtsSuccess

std::size_t TestMultipleCtsResponsesFromMuRts::m_countStaRxCtsSuccess
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().

◆ m_ctsTxInfosPerSta

std::vector<CtsTxInfos> TestMultipleCtsResponsesFromMuRts::m_ctsTxInfosPerSta
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().

◆ m_phyAp

Ptr<MuRtsCtsSpectrumWifiPhy> TestMultipleCtsResponsesFromMuRts::m_phyAp
private

AP PHY.

Definition at line 688 of file wifi-non-ht-dup-test.cc.

Referenced by DoSetup(), DoTeardown(), and FakePreviousMuRts().

◆ m_phyStas

std::vector<Ptr<MuRtsCtsSpectrumWifiPhy> > TestMultipleCtsResponsesFromMuRts::m_phyStas
private

STAs PHYs.

Definition at line 689 of file wifi-non-ht-dup-test.cc.

Referenced by DoRun(), DoSetup(), DoTeardown(), FakePreviousMuRts(), and TxNonHtDuplicateCts().

◆ m_stasTxPowerDbm

double TestMultipleCtsResponsesFromMuRts::m_stasTxPowerDbm
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().


The documentation for this class was generated from the following file: