Test that the AIDs that an AP MLD assigns to SLDs and MLDs are all unique. More...
#include "wifi-mlo-test.h"
Public Member Functions | |
AidAssignmentTest (const std::vector< std::set< uint8_t > > &linkIds) | |
Constructor. | |
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 | DoRun () override |
Implementation to actually run this TestCase. | |
void | DoSetup () override |
Implementation to do any local setup required for this TestCase. | |
void | SetSsid (Ptr< StaWifiMac > staMac, Mac48Address) |
Set the SSID on the next station that needs to start the association procedure. | |
Private Attributes | |
uint16_t | m_expectedAid |
expected AID for current non-AP STA/MLD | |
const std::vector< std::string > | m_linkChannels |
channels for all AP links | |
const std::vector< std::set< uint8_t > > | m_linkIds |
link IDs for all non-AP STAs/MLDs | |
NetDeviceContainer | m_staDevices |
non-AP STAs/MLDs devices | |
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. | |
Test that the AIDs that an AP MLD assigns to SLDs and MLDs are all unique.
Definition at line 145 of file wifi-mlo-test.h.
AidAssignmentTest::AidAssignmentTest | ( | const std::vector< std::set< uint8_t > > & | linkIds | ) |
Constructor.
linkIds | A vector specifying the set of link IDs each STA will setup |
Definition at line 267 of file wifi-mlo-test.cc.
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 401 of file wifi-mlo-test.cc.
References ns3::Simulator::Destroy(), ns3::DynamicCast(), ns3::NetDeviceContainer::Get(), ns3::NetDeviceContainer::GetN(), m_expectedAid, m_staDevices, ns3::MakeCallback(), NS_TEST_EXPECT_MSG_EQ, ns3::Simulator::Run(), ns3::Seconds(), SetSsid(), ns3::StaticCast(), and ns3::Simulator::Stop().
|
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 276 of file wifi-mlo-test.cc.
References ns3::NetDeviceContainer::Add(), ns3::WifiHelper::AssignStreams(), ns3::CreateObject(), ns3::WifiPhyHelper::DLT_IEEE802_11_RADIO, ns3::DynamicCast(), ns3::NetDeviceContainer::Get(), ns3::NetDeviceContainer::GetN(), m_linkChannels, m_linkIds, m_staDevices, ns3::MakeCallback(), ns3::WifiPhyHelper::Set(), ns3::SpectrumWifiPhyHelper::SetChannel(), ns3::WifiPhyHelper::SetPcapCaptureType(), ns3::WifiPhyHelper::SetPcapDataLinkType(), ns3::RngSeedManager::SetRun(), ns3::RngSeedManager::SetSeed(), SetSsid(), ns3::StaticCast(), and ns3::WIFI_STANDARD_80211be.
|
private |
Set the SSID on the next station that needs to start the association procedure.
This method is triggered every time a STA completes its association.
staMac | the MAC of the STA that completed association |
Definition at line 365 of file wifi-mlo-test.cc.
References ns3::NetDeviceContainer::Get(), ns3::NetDeviceContainer::GetN(), m_expectedAid, m_linkIds, m_staDevices, ns3::MilliSeconds(), NS_LOG_INFO, NS_TEST_EXPECT_MSG_EQ, ns3::StaticCast(), and ns3::Simulator::Stop().
Referenced by DoRun(), and DoSetup().
|
private |
expected AID for current non-AP STA/MLD
Definition at line 170 of file wifi-mlo-test.h.
|
private |
|
private |
link IDs for all non-AP STAs/MLDs
Definition at line 168 of file wifi-mlo-test.h.
|
private |
non-AP STAs/MLDs devices
Definition at line 169 of file wifi-mlo-test.h.