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

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

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

Public Member Functions

 TestUlOfdmaPpduUid ()
 
 ~TestUlOfdmaPpduUid () 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 CheckUid (uint16_t staId, uint64_t expectedUid)
 Check the UID of the transmitted 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 ResetPpduUid ()
 Reset the global PPDU UID counter in WifiPhy.
 
void SendMuPpdu ()
 Send MU-PPDU toward both STAs.
 
void SendSuPpdu (uint16_t txStaId)
 Send SU-PPDU function.
 
void SendTbPpdu ()
 Send TB-PPDU from both STAs.
 
void TxPpduAp (uint64_t uid)
 Transmitted PPDU information function for AP.
 
void TxPpduSta1 (uint64_t uid)
 Transmitted PPDU information function for STA 1.
 
void TxPpduSta2 (uint64_t uid)
 Transmitted PPDU information function for STA 2.
 

Private Attributes

Ptr< OfdmaSpectrumWifiPhym_phyAp
 PHY of AP.
 
Ptr< OfdmaSpectrumWifiPhym_phySta1
 PHY of STA 1.
 
Ptr< OfdmaSpectrumWifiPhym_phySta2
 PHY of STA 2.
 
uint64_t m_ppduUidAp
 UID of PPDU transmitted by AP.
 
uint64_t m_ppduUidSta1
 UID of PPDU transmitted by STA1.
 
uint64_t m_ppduUidSta2
 UID of PPDU transmitted by STA2.
 

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...
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto QUICK = Duration::QUICK
 Deprecated test duration simple enums.
 
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto TAKES_FOREVER = Duration::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

UL-OFDMA PPDU UID attribution test.

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

Constructor & Destructor Documentation

◆ TestUlOfdmaPpduUid()

TestUlOfdmaPpduUid::TestUlOfdmaPpduUid ( )

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

◆ ~TestUlOfdmaPpduUid()

TestUlOfdmaPpduUid::~TestUlOfdmaPpduUid ( )
override

Definition at line 1888 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 1984 of file wifi-phy-ofdma-test.cc.

References m_ppduUidAp, m_ppduUidSta1, m_ppduUidSta2, ns3::Simulator::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 ( )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

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

References ns3::WifiPhy::AssignStreams(), CheckUid(), ns3::Simulator::Destroy(), m_phyAp, m_phySta1, m_phySta2, ResetPpduUid(), ns3::Simulator::Run(), ns3::Simulator::Schedule(), ns3::Seconds(), SendMuPpdu(), SendSuPpdu(), SendTbPpdu(), ns3::RngSeedManager::SetRun(), and ns3::RngSeedManager::SetSeed().

+ Here is the call graph for this function:

◆ DoSetup()

void TestUlOfdmaPpduUid::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 1893 of file wifi-phy-ofdma-test.cc.

References ns3::SpectrumWifiPhy::AddChannel(), ns3::WifiPhy::ConfigureStandard(), ns3::CreateObject(), DEFAULT_CHANNEL_WIDTH, DEFAULT_FREQUENCY, ns3::WifiPhyOperatingChannel::FindFirst(), m_phyAp, m_phySta1, m_phySta2, ns3::MakeCallback(), ns3::SpectrumWifiPhy::SetDevice(), ns3::WifiPhy::SetErrorRateModel(), ns3::WifiPhy::SetInterferenceHelper(), ns3::WifiPhy::SetMobility(), ns3::WifiPhy::SetOperatingChannel(), ns3::ObjectBase::TraceConnectWithoutContext(), TxPpduAp(), TxPpduSta1(), TxPpduSta2(), ns3::WIFI_PHY_BAND_5GHZ, and ns3::WIFI_STANDARD_80211ax.

+ Here is the call graph for this function:

◆ DoTeardown()

void TestUlOfdmaPpduUid::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 1973 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 ( )
private

Reset the global PPDU UID counter in WifiPhy.

Definition at line 2033 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 ( )
private

Send MU-PPDU toward both STAs.

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

References ns3::Create(), DEFAULT_CHANNEL_WIDTH, ns3::HePhy::GetHeMcs7(), ns3::HePhy::GetHeMcs9(), ns3::VhtPhy::GetVhtMcs5(), m_phyAp, ns3::NanoSeconds(), ns3::HeRu::RU_106_TONE, ns3::WifiPhy::Send(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiMacHeader::SetSequenceNumber(), ns3::WifiMacHeader::SetType(), ns3::WIFI_MAC_QOSDATA, and ns3::WIFI_PREAMBLE_HE_MU.

Referenced by DoRun().

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

◆ SendSuPpdu()

void TestUlOfdmaPpduUid::SendSuPpdu ( uint16_t txStaId)
private

Send SU-PPDU function.

Parameters
txStaIdthe ID of the sending STA

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

References ns3::Create(), DEFAULT_CHANNEL_WIDTH, ns3::Mac48Address::GetBroadcast(), ns3::HePhy::GetHeMcs7(), m_phyAp, m_phySta1, m_phySta2, ns3::NanoSeconds(), NS_ABORT_MSG, 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 DoRun().

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

◆ SendTbPpdu()

void TestUlOfdmaPpduUid::SendTbPpdu ( )
private

Send TB-PPDU from both STAs.

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

References ns3::WifiPhy::CalculateTxDuration(), ns3::HePhy::ConvertHeTbPpduDurationToLSigLength(), ns3::Create(), DEFAULT_CHANNEL_WIDTH, ns3::DynamicCast(), ns3::HePhy::GetHeMcs7(), ns3::HePhy::GetHeMcs9(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetPhyEntity(), m_phyAp, m_phySta1, m_phySta2, ns3::NanoSeconds(), ns3::HeRu::RU_106_TONE, ns3::WifiPhy::Send(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiMacHeader::SetSequenceNumber(), ns3::WifiMacHeader::SetType(), ns3::WIFI_MAC_QOSDATA, ns3::WIFI_MOD_CLASS_HE, and ns3::WIFI_PREAMBLE_HE_TB.

Referenced by DoRun().

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

◆ TxPpduAp()

void TestUlOfdmaPpduUid::TxPpduAp ( uint64_t uid)
private

Transmitted PPDU information function for AP.

Parameters
uidthe UID of the transmitted PPDU

Definition at line 2012 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 2019 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 2026 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 1871 of file wifi-phy-ofdma-test.cc.

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

◆ m_phySta1

Ptr<OfdmaSpectrumWifiPhy> TestUlOfdmaPpduUid::m_phySta1
private

PHY of STA 1.

Definition at line 1872 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 1873 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 1875 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 1876 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 1877 of file wifi-phy-ofdma-test.cc.

Referenced by CheckUid(), and TxPpduSta2().


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