A Discrete-Event Network Simulator
API
SpectrumWifiPhyFilterTest Class Reference

Spectrum Wifi Phy Filter Test. More...

+ Inheritance diagram for SpectrumWifiPhyFilterTest:
+ Collaboration diagram for SpectrumWifiPhyFilterTest:

Public Member Functions

 SpectrumWifiPhyFilterTest ()
 
 SpectrumWifiPhyFilterTest (std::string name)
 Constructor. More...
 
virtual ~SpectrumWifiPhyFilterTest ()
 
- Public Member Functions inherited from ns3::TestCase
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName (void) const
 

Private Member Functions

virtual void DoRun (void)
 Implementation to actually run this TestCase. More...
 
virtual void DoSetup (void)
 Implementation to do any local setup required for this TestCase. More...
 
void RunOne ()
 Run one function. More...
 
void RxCallback (Ptr< const Packet > p, RxPowerWattPerChannelBand rxPowersW)
 Callback triggered when a packet is received by the PHYs. More...
 
void SendPpdu (void)
 Send PPDU function. More...
 

Private Attributes

uint16_t m_rxChannelWidth
 RX channel width (MHz) More...
 
Ptr< ExtSpectrumWifiPhym_rxPhy
 RX PHY. More...
 
uint16_t m_txChannelWidth
 TX channel width (MHz) More...
 
Ptr< ExtSpectrumWifiPhym_txPhy
 TX PHY. 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 TestCsse. More...
 
bool IsStatusFailure (void) const
 Check if any tests failed. More...
 
bool IsStatusSuccess (void) 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 (void) const
 Check if this run should assert on failure. More...
 
bool MustContinueOnFailure (void) 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

Spectrum Wifi Phy Filter Test.

Definition at line 324 of file spectrum-wifi-phy-test.cc.

Constructor & Destructor Documentation

◆ SpectrumWifiPhyFilterTest() [1/2]

SpectrumWifiPhyFilterTest::SpectrumWifiPhyFilterTest ( )

Definition at line 365 of file spectrum-wifi-phy-test.cc.

◆ SpectrumWifiPhyFilterTest() [2/2]

SpectrumWifiPhyFilterTest::SpectrumWifiPhyFilterTest ( std::string  name)

Constructor.

Parameters
namereference name

Definition at line 372 of file spectrum-wifi-phy-test.cc.

◆ ~SpectrumWifiPhyFilterTest()

SpectrumWifiPhyFilterTest::~SpectrumWifiPhyFilterTest ( )
virtual

Definition at line 391 of file spectrum-wifi-phy-test.cc.

References m_rxPhy, and m_txPhy.

Member Function Documentation

◆ DoRun()

void SpectrumWifiPhyFilterTest::DoRun ( void  )
privatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 561 of file spectrum-wifi-phy-test.cc.

References m_rxChannelWidth, m_txChannelWidth, and RunOne().

+ Here is the call graph for this function:

◆ DoSetup()

void SpectrumWifiPhyFilterTest::DoSetup ( void  )
privatevirtual

◆ RunOne()

void SpectrumWifiPhyFilterTest::RunOne ( void  )
private

Run one function.

Definition at line 513 of file spectrum-wifi-phy-test.cc.

References m_rxChannelWidth, m_rxPhy, m_txChannelWidth, m_txPhy, ns3::Seconds(), SendPpdu(), ns3::SpectrumWifiPhy::SetChannelWidth(), and ns3::SpectrumWifiPhy::SetFrequency().

Referenced by DoRun().

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

◆ RxCallback()

void SpectrumWifiPhyFilterTest::RxCallback ( Ptr< const Packet p,
RxPowerWattPerChannelBand  rxPowersW 
)
private

Callback triggered when a packet is received by the PHYs.

Parameters
contextthe context
pthe received packet
rxPowersWthe received power per channel band in watts

Definition at line 398 of file spectrum-wifi-phy-test.cc.

References ns3::SpectrumWifiPhy::GetBand(), m_rxChannelWidth, m_rxPhy, m_txChannelWidth, max, min, NS_LOG_INFO, NS_TEST_ASSERT_MSG_EQ, ns3::RatioToDb(), and ns3::WToDbm().

Referenced by DoSetup().

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

◆ SendPpdu()

void SpectrumWifiPhyFilterTest::SendPpdu ( void  )
private

Send PPDU function.

Definition at line 378 of file spectrum-wifi-phy-test.cc.

References m_txChannelWidth, m_txPhy, ns3::WifiPhy::Send(), ns3::WifiMacHeader::SetType(), SU_STA_ID, ns3::WIFI_MAC_QOSDATA, and ns3::WIFI_PREAMBLE_HE_SU.

Referenced by RunOne().

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

Member Data Documentation

◆ m_rxChannelWidth

uint16_t SpectrumWifiPhyFilterTest::m_rxChannelWidth
private

RX channel width (MHz)

Definition at line 362 of file spectrum-wifi-phy-test.cc.

Referenced by DoRun(), RunOne(), and RxCallback().

◆ m_rxPhy

Ptr<ExtSpectrumWifiPhy> SpectrumWifiPhyFilterTest::m_rxPhy
private

RX PHY.

Definition at line 359 of file spectrum-wifi-phy-test.cc.

Referenced by DoSetup(), RunOne(), RxCallback(), and ~SpectrumWifiPhyFilterTest().

◆ m_txChannelWidth

uint16_t SpectrumWifiPhyFilterTest::m_txChannelWidth
private

TX channel width (MHz)

Definition at line 361 of file spectrum-wifi-phy-test.cc.

Referenced by DoRun(), RunOne(), RxCallback(), and SendPpdu().

◆ m_txPhy

Ptr<ExtSpectrumWifiPhy> SpectrumWifiPhyFilterTest::m_txPhy
private

TX PHY.

Definition at line 358 of file spectrum-wifi-phy-test.cc.

Referenced by DoSetup(), RunOne(), SendPpdu(), and ~SpectrumWifiPhyFilterTest().


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