UL-OFDMA PPDU UID attribution test. More...
Public Member Functions | |
TestUlOfdmaPpduUid () | |
~TestUlOfdmaPpduUid () override | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. | |
std::string | GetName () const |
TestCase & | operator= (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< OfdmaSpectrumWifiPhy > | m_phyAp |
PHY of AP. | |
Ptr< OfdmaSpectrumWifiPhy > | m_phySta1 |
PHY of STA 1. | |
Ptr< OfdmaSpectrumWifiPhy > | m_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. | |
TestCase * | GetParent () 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. | |
UL-OFDMA PPDU UID attribution test.
Definition at line 1819 of file wifi-phy-ofdma-test.cc.
TestUlOfdmaPpduUid::TestUlOfdmaPpduUid | ( | ) |
Definition at line 1880 of file wifi-phy-ofdma-test.cc.
|
override |
Definition at line 1888 of file wifi-phy-ofdma-test.cc.
|
private |
Check the UID of the transmitted PPDU.
staId | the STA-ID of the PHY (0 for AP) |
expectedUid | the 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().
|
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().
|
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.
|
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.
|
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().
|
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().
|
private |
Send SU-PPDU function.
txStaId | the 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().
|
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().
|
private |
Transmitted PPDU information function for AP.
uid | the 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().
|
private |
Transmitted PPDU information function for STA 1.
uid | the 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().
|
private |
Transmitted PPDU information function for STA 2.
uid | the 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().
|
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().
|
private |
PHY of STA 1.
Definition at line 1872 of file wifi-phy-ofdma-test.cc.
Referenced by DoRun(), DoSetup(), DoTeardown(), SendSuPpdu(), and SendTbPpdu().
|
private |
PHY of STA 2.
Definition at line 1873 of file wifi-phy-ofdma-test.cc.
Referenced by DoRun(), DoSetup(), DoTeardown(), SendSuPpdu(), and SendTbPpdu().
|
private |
UID of PPDU transmitted by AP.
Definition at line 1875 of file wifi-phy-ofdma-test.cc.
Referenced by CheckUid(), and TxPpduAp().
|
private |
UID of PPDU transmitted by STA1.
Definition at line 1876 of file wifi-phy-ofdma-test.cc.
Referenced by CheckUid(), and TxPpduSta1().
|
private |
UID of PPDU transmitted by STA2.
Definition at line 1877 of file wifi-phy-ofdma-test.cc.
Referenced by CheckUid(), and TxPpduSta2().