A Discrete-Event Network Simulator
API
TestUlOfdmaPpduUid Class Reference

UL-OFDMA PPDU UID attribution test. More...

+ Inheritance diagram for TestUlOfdmaPpduUid:
+ Collaboration diagram for TestUlOfdmaPpduUid:

Public Member Functions

 TestUlOfdmaPpduUid ()
 
virtual ~TestUlOfdmaPpduUid ()
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName (void) const
 
TestCaseoperator= (const TestCase &)=delete
 

Private Member Functions

void CheckUid (uint16_t staId, uint64_t expectedUid)
 Check the UID of the transmitted PPDU. More...
 
void DoRun (void) override
 Implementation to actually run this TestCase. More...
 
void DoSetup (void) override
 Implementation to do any local setup required for this TestCase. More...
 
void DoTeardown (void) override
 Implementation to do any local setup required for this TestCase. More...
 
void ResetPpduUid (void)
 Reset the global PPDU UID counter in WifiPhy. More...
 
void SendMuPpdu (void)
 Send MU-PPDU toward both STAs. More...
 
void SendSuPpdu (uint16_t txStaId)
 Send SU-PPDU function. More...
 
void SendTbPpdu (void)
 Send TB-PPDU from both STAs. More...
 
void TxPpduAp (uint64_t uid)
 Transmitted PPDU information function for AP. More...
 
void TxPpduSta1 (uint64_t uid)
 Transmitted PPDU information function for STA 1. More...
 
void TxPpduSta2 (uint64_t uid)
 Transmitted PPDU information function for STA 2. More...
 

Private Attributes

Ptr< OfdmaSpectrumWifiPhym_phyAp
 PHY of AP. More...
 
Ptr< OfdmaSpectrumWifiPhym_phySta1
 PHY of STA 1. More...
 
Ptr< OfdmaSpectrumWifiPhym_phySta2
 PHY of STA 2. More...
 
uint64_t m_ppduUidAp
 UID of PPDU transmitted by AP. More...
 
uint64_t m_ppduUidSta1
 UID of PPDU transmitted by STA1. More...
 
uint64_t m_ppduUidSta2
 UID of PPDU transmitted by STA2. 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

UL-OFDMA PPDU UID attribution test.

Definition at line 971 of file wifi-phy-ofdma-test.cc.

Constructor & Destructor Documentation

◆ TestUlOfdmaPpduUid()

TestUlOfdmaPpduUid::TestUlOfdmaPpduUid ( )

Definition at line 1032 of file wifi-phy-ofdma-test.cc.

◆ ~TestUlOfdmaPpduUid()

TestUlOfdmaPpduUid::~TestUlOfdmaPpduUid ( )
virtual

Definition at line 1040 of file wifi-phy-ofdma-test.cc.

Member Function Documentation

◆ CheckUid()

void TestUlOfdmaPpduUid::CheckUid ( uint16_t  staId,
uint64_t  expectedUid 
)
private

Check the UID of the transmitted PPDU.

Parameters
staIdthe STA-ID of the PHY (0 for AP)
expectedUidthe expected UID

Definition at line 1131 of file wifi-phy-ofdma-test.cc.

References m_ppduUidAp, m_ppduUidSta1, m_ppduUidSta2, ns3::Now(), NS_ABORT_MSG, and NS_TEST_ASSERT_MSG_EQ.

Referenced by DoRun().

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

◆ DoRun()

void TestUlOfdmaPpduUid::DoRun ( void  )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 1306 of file wifi-phy-ofdma-test.cc.

References ns3::WifiPhy::AssignStreams(), CheckUid(), m_phyAp, m_phySta1, m_phySta2, ResetPpduUid(), ns3::Seconds(), SendMuPpdu(), SendSuPpdu(), and SendTbPpdu().

+ Here is the call graph for this function:

◆ DoSetup()

◆ DoTeardown()

void TestUlOfdmaPpduUid::DoTeardown ( void  )
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 1120 of file wifi-phy-ofdma-test.cc.

References ns3::Object::Dispose(), m_phyAp, m_phySta1, and m_phySta2.

+ Here is the call graph for this function:

◆ ResetPpduUid()

void TestUlOfdmaPpduUid::ResetPpduUid ( void  )
private

Reset the global PPDU UID counter in WifiPhy.

Definition at line 1177 of file wifi-phy-ofdma-test.cc.

References m_phyAp, NS_LOG_FUNCTION, and OfdmaSpectrumWifiPhy::SetPpduUid().

Referenced by DoRun().

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

◆ SendMuPpdu()

void TestUlOfdmaPpduUid::SendMuPpdu ( void  )
private

◆ SendSuPpdu()

void TestUlOfdmaPpduUid::SendSuPpdu ( uint16_t  txStaId)
private

Send SU-PPDU function.

Parameters
txStaIdthe ID of the sending STA

Definition at line 1275 of file wifi-phy-ofdma-test.cc.

References DEFAULT_CHANNEL_WIDTH, m_phyAp, m_phySta1, m_phySta2, NS_ABORT_MSG, ns3::WifiPhy::Send(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiMacHeader::SetSequenceNumber(), ns3::WifiMacHeader::SetType(), SU_STA_ID, ns3::WIFI_MAC_QOSDATA, and ns3::WIFI_PREAMBLE_HE_SU.

Referenced by DoRun().

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

◆ SendTbPpdu()

◆ TxPpduAp()

void TestUlOfdmaPpduUid::TxPpduAp ( uint64_t  uid)
private

Transmitted PPDU information function for AP.

Parameters
uidthe UID of the transmitted PPDU

Definition at line 1156 of file wifi-phy-ofdma-test.cc.

References m_ppduUidAp, and NS_LOG_FUNCTION.

Referenced by DoSetup().

+ Here is the caller graph for this function:

◆ TxPpduSta1()

void TestUlOfdmaPpduUid::TxPpduSta1 ( uint64_t  uid)
private

Transmitted PPDU information function for STA 1.

Parameters
uidthe UID of the transmitted PPDU

Definition at line 1163 of file wifi-phy-ofdma-test.cc.

References m_ppduUidSta1, and NS_LOG_FUNCTION.

Referenced by DoSetup().

+ Here is the caller graph for this function:

◆ TxPpduSta2()

void TestUlOfdmaPpduUid::TxPpduSta2 ( uint64_t  uid)
private

Transmitted PPDU information function for STA 2.

Parameters
uidthe UID of the transmitted PPDU

Definition at line 1170 of file wifi-phy-ofdma-test.cc.

References m_ppduUidSta2, and NS_LOG_FUNCTION.

Referenced by DoSetup().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_phyAp

Ptr<OfdmaSpectrumWifiPhy> TestUlOfdmaPpduUid::m_phyAp
private

PHY of AP.

Definition at line 1023 of file wifi-phy-ofdma-test.cc.

Referenced by DoRun(), DoSetup(), DoTeardown(), ResetPpduUid(), SendMuPpdu(), and SendSuPpdu().

◆ m_phySta1

Ptr<OfdmaSpectrumWifiPhy> TestUlOfdmaPpduUid::m_phySta1
private

PHY of STA 1.

Definition at line 1024 of file wifi-phy-ofdma-test.cc.

Referenced by DoRun(), DoSetup(), DoTeardown(), SendSuPpdu(), and SendTbPpdu().

◆ m_phySta2

Ptr<OfdmaSpectrumWifiPhy> TestUlOfdmaPpduUid::m_phySta2
private

PHY of STA 2.

Definition at line 1025 of file wifi-phy-ofdma-test.cc.

Referenced by DoRun(), DoSetup(), DoTeardown(), SendSuPpdu(), and SendTbPpdu().

◆ m_ppduUidAp

uint64_t TestUlOfdmaPpduUid::m_ppduUidAp
private

UID of PPDU transmitted by AP.

Definition at line 1027 of file wifi-phy-ofdma-test.cc.

Referenced by CheckUid(), and TxPpduAp().

◆ m_ppduUidSta1

uint64_t TestUlOfdmaPpduUid::m_ppduUidSta1
private

UID of PPDU transmitted by STA1.

Definition at line 1028 of file wifi-phy-ofdma-test.cc.

Referenced by CheckUid(), and TxPpduSta1().

◆ m_ppduUidSta2

uint64_t TestUlOfdmaPpduUid::m_ppduUidSta2
private

UID of PPDU transmitted by STA2.

Definition at line 1029 of file wifi-phy-ofdma-test.cc.

Referenced by CheckUid(), and TxPpduSta2().


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