A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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:

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
 
TestCaseoperator= (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< SpectrumWifiPhym_nonHePhySta
 non-HE STA PHY
 
Ptr< MuRtsCtsSpectrumWifiPhym_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.
 
TestCaseGetParent () 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.
 

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.

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

Constructor & Destructor Documentation

◆ TestMultipleCtsResponsesFromMuRts()

TestMultipleCtsResponsesFromMuRts::TestMultipleCtsResponsesFromMuRts ( const std::vector< uint16_t > &  bwPerSta)

Constructor.

Parameters
bwPerStathe bandwidth to use for each STA (in MHz)

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

Member Function Documentation

◆ CheckResults()

void TestMultipleCtsResponsesFromMuRts::CheckResults ( std::size_t  expectedRxCtsSuccess,
std::size_t  expectedRxCtsFailure 
)
private

Check the results.

Parameters
expectedRxCtsSuccessthe expected number of CTS RX success
expectedRxCtsFailurethe 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().

+ 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 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().

+ Here is the call graph for this function:

◆ DoSetup()

◆ 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 889 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 ( uint16_t  bw)
private

Function called to fake the transmission of a MU-RTS.

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

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

◆ RxCtsFailure()

void TestMultipleCtsResponsesFromMuRts::RxCtsFailure ( Ptr< const WifiPsdu psdu)
private

CTS RX failure function.

Parameters
psduthe PSDU

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

References m_countRxCtsFailure, and NS_LOG_FUNCTION.

Referenced by DoSetup().

+ Here is the caller graph for this function:

◆ RxCtsSuccess()

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

CTS RX success function.

Parameters
psduthe PSDU
rxSignalInfothe info on the received signal (
See also
RxSignalInfo)
Parameters
txVectorthe transmit vector
statusPerMpdureception 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().

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

◆ TxNonHtDuplicateCts()

void TestMultipleCtsResponsesFromMuRts::TxNonHtDuplicateCts ( Ptr< SpectrumWifiPhy phy,
uint16_t  bw 
)
private

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

Parameters
phythe PHY of the STA
bwthe 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().

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

Member Data Documentation

◆ m_bwPerSta

std::vector<uint16_t> TestMultipleCtsResponsesFromMuRts::m_bwPerSta
private

Bandwidth per STA in MHz.

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

Referenced by DoRun(), DoSetup(), and RxCtsSuccess().

◆ m_countRxCtsFailure

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

◆ m_countRxCtsSuccess

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

◆ m_nonHePhySta

Ptr<SpectrumWifiPhy> TestMultipleCtsResponsesFromMuRts::m_nonHePhySta
private

non-HE STA PHY

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

Referenced by DoSetup().

◆ m_phyAp

Ptr<MuRtsCtsSpectrumWifiPhy> TestMultipleCtsResponsesFromMuRts::m_phyAp
private

AP PHY.

Definition at line 675 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 676 of file wifi-non-ht-dup-test.cc.

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

◆ m_stasTxPowerDbm

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


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