A Discrete-Event Network Simulator
API
MultiLinkSetupTest Class Reference

Multi-Link Discovery & Setup test. More...

+ Inheritance diagram for MultiLinkSetupTest:
+ Collaboration diagram for MultiLinkSetupTest:

Public Member Functions

 MultiLinkSetupTest (std::vector< std::string > staChannels, std::vector< std::string > apChannels, std::vector< std::pair< uint8_t, uint8_t >> setupLinks, std::vector< uint8_t > fixedPhyBands={})
 Constructor. More...
 
 ~MultiLinkSetupTest () override=default
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName () const
 
TestCaseoperator= (const TestCase &)=delete
 

Protected Member Functions

void DoRun () override
 Implementation to actually run this TestCase. 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 TestCase. More...
 
bool IsStatusFailure () const
 Check if any tests failed. More...
 
bool IsStatusSuccess () 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 () const
 Check if this run should assert on failure. More...
 
bool MustContinueOnFailure () 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...
 

Private Member Functions

void CheckAssocRequest (Ptr< WifiMpdu > mpdu, uint8_t linkId)
 Check correctness of the given Association Request frame. More...
 
void CheckAssocResponse (Ptr< WifiMpdu > mpdu, uint8_t linkId)
 Check correctness of the given Association Response frame. More...
 
void CheckBeacon (Ptr< WifiMpdu > mpdu, uint8_t linkId)
 Check correctness of the given Beacon frame. More...
 
void CheckDisabledLinks ()
 Check that links that are not setup on the non-AP MLD are disabled. More...
 
void CheckMlSetup ()
 Check correctness of Multi-Link Setup procedure. More...
 

Private Attributes

const std::vector< std::pair< uint8_t, uint8_t > > m_setupLinks
 expected links to setup (STA link ID, AP link ID) 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...
 
 Uplink or Downlink direction. More...

Detailed Description

Multi-Link Discovery & Setup test.

This test sets up an AP MLD and a non-AP MLD having a variable number of links. The RF channels to set each link to are provided as input parameters through the test case constructor, along with the identifiers (starting at 0) of the links that cannot switch PHY band (if any). The links that are expected to be setup are also provided as input parameters. This test verifies that the management frames exchanged during ML discovery and ML setup contain the expected values and that the two MLDs setup the expected links.

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

Constructor & Destructor Documentation

◆ MultiLinkSetupTest()

MultiLinkSetupTest::MultiLinkSetupTest ( std::vector< std::string >  staChannels,
std::vector< std::string >  apChannels,
std::vector< std::pair< uint8_t, uint8_t >>  setupLinks,
std::vector< uint8_t >  fixedPhyBands = {} 
)

Constructor.

Parameters
staChannelsthe strings specifying the operating channels for the STA
apChannelsthe strings specifying the operating channels for the AP
setupLinksa list of links (STA link ID, AP link ID) that are expected to be setup
fixedPhyBandslist of IDs of STA links that cannot switch PHY band

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

◆ ~MultiLinkSetupTest()

MultiLinkSetupTest::~MultiLinkSetupTest ( )
overridedefault

Member Function Documentation

◆ CheckAssocRequest()

void MultiLinkSetupTest::CheckAssocRequest ( Ptr< WifiMpdu mpdu,
uint8_t  linkId 
)
private

Check correctness of the given Association Request frame.

Parameters
mpduthe given Association Request frame
linkIdthe ID of the link on which the Association Request frame was transmitted

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

References MultiLinkOperationsTestBase::CheckAddresses(), ns3::MgtAssocRequestHeader::GetMultiLinkElement(), ns3::WifiMac::GetNLinks(), MultiLinkOperationsTestBase::m_apMac, m_setupLinks, MultiLinkOperationsTestBase::m_staMacs, NS_ABORT_IF, NS_TEST_EXPECT_MSG_EQ, NS_TEST_EXPECT_MSG_NE, MultiLinkOperationsTestBase::UL, and ns3::WIFI_MAC_MGT_ASSOCIATION_REQUEST.

Referenced by DoRun().

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

◆ CheckAssocResponse()

void MultiLinkSetupTest::CheckAssocResponse ( Ptr< WifiMpdu mpdu,
uint8_t  linkId 
)
private

Check correctness of the given Association Response frame.

Parameters
mpduthe given Association Response frame
linkIdthe ID of the link on which the Association Response frame was transmitted

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

References MultiLinkOperationsTestBase::CheckAddresses(), MultiLinkOperationsTestBase::DL, ns3::WifiMac::GetAddress(), ns3::WifiMac::GetFrameExchangeManager(), ns3::WifiMac::GetLinkIdByAddress(), ns3::MgtAssocResponseHeader::GetMultiLinkElement(), ns3::WifiMac::GetNLinks(), MultiLinkOperationsTestBase::m_apMac, m_setupLinks, MultiLinkOperationsTestBase::m_staMacs, NS_ABORT_IF, NS_TEST_EXPECT_MSG_EQ, NS_TEST_EXPECT_MSG_NE, and ns3::WIFI_MAC_MGT_ASSOCIATION_RESPONSE.

Referenced by DoRun().

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

◆ CheckBeacon()

void MultiLinkSetupTest::CheckBeacon ( Ptr< WifiMpdu mpdu,
uint8_t  linkId 
)
private

Check correctness of the given Beacon frame.

Parameters
mpduthe given Beacon frame
linkIdthe ID of the link on which the Beacon frame was transmitted

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

References MultiLinkOperationsTestBase::CheckAddresses(), MultiLinkOperationsTestBase::DL, ns3::WifiMac::GetAddress(), ns3::WifiMac::GetFrameExchangeManager(), ns3::MgtProbeResponseHeader::GetMultiLinkElement(), ns3::WifiMac::GetNLinks(), ns3::MgtProbeResponseHeader::GetReducedNeighborReport(), MultiLinkOperationsTestBase::m_apMac, NS_ABORT_IF, NS_TEST_EXPECT_MSG_EQ, and ns3::WIFI_MAC_MGT_BEACON.

Referenced by DoRun().

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

◆ CheckDisabledLinks()

void MultiLinkSetupTest::CheckDisabledLinks ( )
private

Check that links that are not setup on the non-AP MLD are disabled.

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

References m_setupLinks, MultiLinkOperationsTestBase::m_staChannels, MultiLinkOperationsTestBase::m_staMacs, and NS_TEST_EXPECT_MSG_EQ.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ CheckMlSetup()

◆ DoRun()

void MultiLinkSetupTest::DoRun ( )
overrideprotectedvirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Check content of management frames

Implements ns3::TestCase.

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

References CheckAssocRequest(), CheckAssocResponse(), CheckBeacon(), CheckDisabledLinks(), CheckMlSetup(), MultiLinkOperationsTestBase::m_txPsdus, ns3::MilliSeconds(), ns3::Seconds(), ns3::WIFI_MAC_MGT_ASSOCIATION_REQUEST, ns3::WIFI_MAC_MGT_ASSOCIATION_RESPONSE, and ns3::WIFI_MAC_MGT_BEACON.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_setupLinks

const std::vector<std::pair<uint8_t, uint8_t> > MultiLinkSetupTest::m_setupLinks
private

expected links to setup (STA link ID, AP link ID)

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

Referenced by CheckAssocRequest(), CheckAssocResponse(), CheckDisabledLinks(), and CheckMlSetup().


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