A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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.
 
 ~SpectrumWifiPhyFilterTest () override
 
- 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 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 ()
 Run one function.
 
void RxCallback (Ptr< const Packet > p, RxPowerWattPerChannelBand rxPowersW)
 Callback triggered when a packet is received by the PHYs.
 
void SendPpdu ()
 Send PPDU function.
 

Private Attributes

std::set< WifiSpectrumBandIndicesm_ruBands
 spectrum bands associated to all the RUs
 
uint16_t m_rxChannelWidth
 RX channel width (MHz)
 
Ptr< ExtSpectrumWifiPhym_rxPhy
 RX PHY.
 
uint16_t m_txChannelWidth
 TX channel width (MHz)
 
Ptr< ExtSpectrumWifiPhym_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

Spectrum Wifi Phy Filter Test.

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

Constructor & Destructor Documentation

◆ SpectrumWifiPhyFilterTest() [1/2]

SpectrumWifiPhyFilterTest::SpectrumWifiPhyFilterTest ( )

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

◆ SpectrumWifiPhyFilterTest() [2/2]

SpectrumWifiPhyFilterTest::SpectrumWifiPhyFilterTest ( std::string  name)

Constructor.

Parameters
namereference name

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

◆ ~SpectrumWifiPhyFilterTest()

SpectrumWifiPhyFilterTest::~SpectrumWifiPhyFilterTest ( )
override

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

References m_rxPhy, and m_txPhy.

Member Function Documentation

◆ DoRun()

void SpectrumWifiPhyFilterTest::DoRun ( )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

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

References ns3::Simulator::Destroy(), m_rxChannelWidth, m_txChannelWidth, and RunOne().

+ Here is the call graph for this function:

◆ DoSetup()

void SpectrumWifiPhyFilterTest::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 555 of file spectrum-wifi-phy-test.cc.

References ns3::SpectrumWifiPhy::AddChannel(), ns3::WifiPhy::ConfigureStandard(), m_rxPhy, m_txPhy, ns3::MakeCallback(), RxCallback(), ns3::SpectrumWifiPhy::SetDevice(), ns3::WifiPhy::SetErrorRateModel(), ns3::WifiPhy::SetInterferenceHelper(), ns3::WifiPhy::SetMobility(), ns3::ObjectBase::TraceConnectWithoutContext(), and ns3::WIFI_STANDARD_80211ax.

+ Here is the call graph for this function:

◆ DoTeardown()

void SpectrumWifiPhyFilterTest::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 603 of file spectrum-wifi-phy-test.cc.

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

+ Here is the call graph for this function:

◆ RunOne()

void SpectrumWifiPhyFilterTest::RunOne ( )
private

Run one function.

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

References ns3::HePhy::ConvertHeRuSubcarriers(), ns3::WifiPhyOperatingChannel::FindFirst(), ns3::SpectrumWifiPhy::GetGuardBandwidth(), ns3::HeRu::GetNRus(), ns3::HeRu::GetSubcarrierGroup(), ns3::WifiPhy::GetSubcarrierSpacing(), m_ruBands, m_rxChannelWidth, m_rxPhy, m_txChannelWidth, m_txPhy, ns3::Simulator::Run(), ns3::Simulator::Schedule(), ns3::Seconds(), SendPpdu(), ns3::WifiPhy::SetOperatingChannel(), ns3::WIFI_PHY_BAND_5GHZ, and ns3::WIFI_STANDARD_80211ax.

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
pthe received packet
rxPowersWthe received power per channel band in watts

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

References ns3::SpectrumWifiPhy::GetBand(), m_ruBands, m_rxChannelWidth, m_rxPhy, m_txChannelWidth, 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 ( )
private

Send PPDU function.

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

References ns3::HePhy::GetHeMcs0(), m_txChannelWidth, m_txPhy, ns3::WifiPhy::Send(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiMacHeader::SetSequenceNumber(), ns3::WifiMacHeader::SetType(), ns3::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_ruBands

std::set<WifiSpectrumBandIndices> SpectrumWifiPhyFilterTest::m_ruBands
private

spectrum bands associated to all the RUs

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

Referenced by RunOne(), and RxCallback().

◆ m_rxChannelWidth

uint16_t SpectrumWifiPhyFilterTest::m_rxChannelWidth
private

RX channel width (MHz)

Definition at line 452 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 449 of file spectrum-wifi-phy-test.cc.

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

◆ m_txChannelWidth

uint16_t SpectrumWifiPhyFilterTest::m_txChannelWidth
private

TX channel width (MHz)

Definition at line 451 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 448 of file spectrum-wifi-phy-test.cc.

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


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