A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
TestPrimary20CoveredByPpdu Class Reference

Primary 20 MHz Covered By Ppdu Test This test checks whether the functions WifiPpdu::DoesOverlapChannel and WifiPpdu::DoesCoverChannel are returning the expected results. More...

+ Inheritance diagram for TestPrimary20CoveredByPpdu:
+ Collaboration diagram for TestPrimary20CoveredByPpdu:

Public Member Functions

 TestPrimary20CoveredByPpdu ()
 
- 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

Ptr< HePpduCreatePpdu (uint16_t ppduCenterFreqMhz)
 Function to create a PPDU.
 
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 RunOne (WifiPhyBand band, uint16_t phyCenterFreqMhz, uint8_t p20Index, uint16_t ppduCenterFreqMhz, bool expectedP20Overlap, bool expectedP20Covered)
 Run one function.
 

Private Attributes

Ptr< SpectrumWifiPhym_rxPhy
 RX PHY.
 
Ptr< SpectrumWifiPhym_txPhy
 TX PHY.
 

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...
 
using instead = Duration
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto QUICK = Duration::QUICK
 
static constexpr auto 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.
 
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

Primary 20 MHz Covered By Ppdu Test This test checks whether the functions WifiPpdu::DoesOverlapChannel and WifiPpdu::DoesCoverChannel are returning the expected results.

Definition at line 4496 of file wifi-phy-reception-test.cc.

Constructor & Destructor Documentation

◆ TestPrimary20CoveredByPpdu()

TestPrimary20CoveredByPpdu::TestPrimary20CoveredByPpdu ( )

Definition at line 4537 of file wifi-phy-reception-test.cc.

Member Function Documentation

◆ CreatePpdu()

Ptr< HePpdu > TestPrimary20CoveredByPpdu::CreatePpdu ( uint16_t  ppduCenterFreqMhz)
private

Function to create a PPDU.

Parameters
ppduCenterFreqMhzthe center frequency used for the transmission of the PPDU (in MHz)
Returns
the created PPDU

Definition at line 4544 of file wifi-phy-reception-test.cc.

References ns3::WifiPhy::CalculateTxDuration(), ns3::WifiPhyOperatingChannel::FindFirst(), ns3::HePhy::GetHeMcs7(), ns3::WifiPhy::GetOperatingChannel(), ns3::WifiPhy::GetPhyBand(), m_rxPhy, m_txPhy, ns3::WifiPhy::SetOperatingChannel(), ns3::WIFI_MAC_QOSDATA, ns3::WIFI_PREAMBLE_HE_SU, and ns3::WIFI_STANDARD_80211ax.

Referenced by RunOne().

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

◆ DoRun()

void TestPrimary20CoveredByPpdu::DoRun ( )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 4628 of file wifi-phy-reception-test.cc.

References ns3::Simulator::Destroy(), RunOne(), ns3::WIFI_PHY_BAND_2_4GHZ, and ns3::WIFI_PHY_BAND_5GHZ.

+ Here is the call graph for this function:

◆ DoSetup()

void TestPrimary20CoveredByPpdu::DoSetup ( )
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 4566 of file wifi-phy-reception-test.cc.

References ns3::SpectrumWifiPhy::AddChannel(), ns3::WifiPhy::ConfigureStandard(), m_rxPhy, m_txPhy, ns3::WifiPhy::SetErrorRateModel(), ns3::WifiPhy::SetInterferenceHelper(), and ns3::WIFI_STANDARD_80211ax.

+ Here is the call graph for this function:

◆ DoTeardown()

void TestPrimary20CoveredByPpdu::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 4586 of file wifi-phy-reception-test.cc.

References ns3::Object::Dispose(), m_rxPhy, and m_txPhy.

+ Here is the call graph for this function:

◆ RunOne()

void TestPrimary20CoveredByPpdu::RunOne ( WifiPhyBand  band,
uint16_t  phyCenterFreqMhz,
uint8_t  p20Index,
uint16_t  ppduCenterFreqMhz,
bool  expectedP20Overlap,
bool  expectedP20Covered 
)
private

Run one function.

Parameters
bandthe PHY band to use
phyCenterFreqMhzthe operating center frequency of the PHY (in MHz)
p20Indexthe primary20 index
ppduCenterFreqMhzthe center frequency used for the transmission of the PPDU (in MHz)
expectedP20Overlapflag whether the primary 20 MHz channel is expected to be fully covered by the bandwidth of the incoming PPDU
expectedP20Coveredflag whether the primary 20 MHz channel is expected to overlap with the bandwidth of the incoming PPDU

Definition at line 4595 of file wifi-phy-reception-test.cc.

References CreatePpdu(), ns3::WifiPhyOperatingChannel::FindFirst(), ns3::WifiPhy::GetOperatingChannel(), ns3::WifiPhy::GetPhyEntity(), ns3::WifiPhyOperatingChannel::GetPrimaryChannelCenterFrequency(), m_rxPhy, NS_TEST_ASSERT_MSG_EQ, ns3::WifiPhy::SetOperatingChannel(), and ns3::WIFI_STANDARD_80211ax.

Referenced by DoRun().

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

Member Data Documentation

◆ m_rxPhy

Ptr<SpectrumWifiPhy> TestPrimary20CoveredByPpdu::m_rxPhy
private

RX PHY.

Definition at line 4533 of file wifi-phy-reception-test.cc.

Referenced by CreatePpdu(), DoSetup(), DoTeardown(), and RunOne().

◆ m_txPhy

Ptr<SpectrumWifiPhy> TestPrimary20CoveredByPpdu::m_txPhy
private

TX PHY.

Definition at line 4534 of file wifi-phy-reception-test.cc.

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


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