A Discrete-Event Network Simulator
API
WifiPhyReceptionTest Class Reference

Wifi Phy Reception Test base class. More...

+ Inheritance diagram for WifiPhyReceptionTest:
+ Collaboration diagram for WifiPhyReceptionTest:

Public Member Functions

 WifiPhyReceptionTest (std::string test_name)
 Constructor. More...
 
 ~WifiPhyReceptionTest () override=default
 Destructor. More...
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName () const
 
TestCaseoperator= (const TestCase &)=delete
 

Protected Member Functions

void CheckPhyState (WifiPhyState expectedState)
 Schedule now to check the PHY state. More...
 
void DoCheckPhyState (WifiPhyState expectedState)
 Check the PHY state now. 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 SendPacket (double rxPowerDbm, uint32_t packetSize, uint8_t mcs)
 Send packet function. 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...
 

Protected Attributes

Ptr< SpectrumWifiPhym_phy
 the PHY More...
 
uint64_t m_uid {0}
 the UID to use for the PPDU 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...
 

Detailed Description

Wifi Phy Reception Test base class.

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

Constructor & Destructor Documentation

◆ WifiPhyReceptionTest()

WifiPhyReceptionTest::WifiPhyReceptionTest ( std::string  test_name)

Constructor.

Parameters
test_namethe test name

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

◆ ~WifiPhyReceptionTest()

WifiPhyReceptionTest::~WifiPhyReceptionTest ( )
overridedefault

Destructor.

Member Function Documentation

◆ CheckPhyState()

void WifiPhyReceptionTest::CheckPhyState ( WifiPhyState  expectedState)
protected

Schedule now to check the PHY state.

Parameters
expectedStatethe expected PHY state

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

References DoCheckPhyState().

Referenced by TestThresholdPreambleDetectionWithoutFrameCapture::DoRun(), TestThresholdPreambleDetectionWithFrameCapture::DoRun(), and TestPhyHeadersReception::DoRun().

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

◆ DoCheckPhyState()

void WifiPhyReceptionTest::DoCheckPhyState ( WifiPhyState  expectedState)
protected

Check the PHY state now.

Parameters
expectedStatethe expected PHY state

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

References ns3::PointerValue::Get(), ns3::ObjectBase::GetAttribute(), m_phy, ns3::Now(), NS_LOG_FUNCTION, and NS_TEST_ASSERT_MSG_EQ.

Referenced by CheckPhyState().

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

◆ DoSetup()

void WifiPhyReceptionTest::DoSetup ( )
overrideprotectedvirtual

◆ DoTeardown()

void WifiPhyReceptionTest::DoTeardown ( )
overrideprotectedvirtual

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 195 of file wifi-phy-reception-test.cc.

References ns3::Object::Dispose(), and m_phy.

+ Here is the call graph for this function:

◆ SendPacket()

void WifiPhyReceptionTest::SendPacket ( double  rxPowerDbm,
uint32_t  packetSize,
uint8_t  mcs 
)
protected

Member Data Documentation

◆ m_phy

◆ m_uid

uint64_t WifiPhyReceptionTest::m_uid {0}
protected

the UID to use for the PPDU

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

Referenced by TestAmpduReception::SendAmpduWithThreeMpdus(), and SendPacket().


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