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

Test that the AIDs that an AP MLD assigns to SLDs and MLDs are all unique. More...

#include "wifi-mlo-test.h"

+ Inheritance diagram for AidAssignmentTest:
+ Collaboration diagram for AidAssignmentTest:

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
 
TestCaseoperator= (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.
 
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

Test that the AIDs that an AP MLD assigns to SLDs and MLDs are all unique.

Definition at line 131 of file wifi-mlo-test.h.

Constructor & Destructor Documentation

◆ AidAssignmentTest()

AidAssignmentTest::AidAssignmentTest ( const std::vector< std::set< uint8_t > > & linkIds)

Constructor.

Parameters
linkIdsA vector specifying the set of link IDs each STA will setup

Definition at line 258 of file wifi-mlo-test.cc.

Member Function Documentation

◆ DoRun()

void AidAssignmentTest::DoRun ( )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 392 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().

+ Here is the call graph for this function:

◆ DoSetup()

void AidAssignmentTest::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 267 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.

+ Here is the call graph for this function:

◆ SetSsid()

void AidAssignmentTest::SetSsid ( Ptr< StaWifiMac > staMac,
Mac48Address  )
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.

Parameters
staMacthe MAC of the STA that completed association

Definition at line 356 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().

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

Member Data Documentation

◆ m_expectedAid

uint16_t AidAssignmentTest::m_expectedAid
private

expected AID for current non-AP STA/MLD

Definition at line 156 of file wifi-mlo-test.h.

Referenced by DoRun(), and SetSsid().

◆ m_linkChannels

const std::vector<std::string> AidAssignmentTest::m_linkChannels
private

channels for all AP links

Definition at line 153 of file wifi-mlo-test.h.

Referenced by DoSetup().

◆ m_linkIds

const std::vector<std::set<uint8_t> > AidAssignmentTest::m_linkIds
private

link IDs for all non-AP STAs/MLDs

Definition at line 154 of file wifi-mlo-test.h.

Referenced by DoSetup(), and SetSsid().

◆ m_staDevices

NetDeviceContainer AidAssignmentTest::m_staDevices
private

non-AP STAs/MLDs devices

Definition at line 155 of file wifi-mlo-test.h.

Referenced by DoRun(), DoSetup(), and SetSsid().


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