A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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, WifiScanType scanType, std::vector< std::pair< uint8_t, uint8_t > > setupLinks, std::vector< uint8_t > fixedPhyBands={})
 Constructor.
 
 ~MultiLinkSetupTest () override=default
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor.
 
std::string GetName () const
 
TestCaseoperator= (const TestCase &)=delete
 

Protected Member Functions

void DoRun () override
 Implementation to actually run this TestCase.
 
void DoSetup () override
 Implementation to do any local setup required for this TestCase.
 
- Protected Member Functions inherited from ns3::TestCase
 TestCase (std::string name)
 Constructor.
 
void AddTestCase (TestCase *testCase, TestDuration 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.
 

Private Member Functions

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

Private Attributes

std::size_t m_nProbeResp
 number of Probe Responses received by the non-AP MLD
 
WifiScanType m_scanType
 the scan type (active or passive)
 
const std::vector< std::pair< uint8_t, uint8_t > > m_setupLinks
 expected links to setup (STA link ID, AP link ID)
 

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 587 of file wifi-mlo-test.cc.

Constructor & Destructor Documentation

◆ MultiLinkSetupTest()

MultiLinkSetupTest::MultiLinkSetupTest ( std::vector< std::string >  staChannels,
std::vector< std::string >  apChannels,
WifiScanType  scanType,
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
scanTypethe scan type (active or passive)
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 659 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 866 of file wifi-mlo-test.cc.

References MultiLinkOperationsTestBase::CheckAddresses(), 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 928 of file wifi-mlo-test.cc.

References MultiLinkOperationsTestBase::CheckAddresses(), MultiLinkOperationsTestBase::DL, ns3::WifiMac::GetAddress(), ns3::WifiMac::GetFrameExchangeManager(), ns3::WifiMac::GetLinkIdByAddress(), 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 749 of file wifi-mlo-test.cc.

References MultiLinkOperationsTestBase::CheckAddresses(), MultiLinkOperationsTestBase::DL, ns3::WifiMac::GetAddress(), ns3::WifiMac::GetFrameExchangeManager(), ns3::WifiMac::GetNLinks(), 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 1066 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()

◆ CheckProbeResponse()

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

Check correctness of the given Probe Response frame.

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

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

References MultiLinkOperationsTestBase::CheckAddresses(), MultiLinkOperationsTestBase::DL, ns3::WifiMac::GetAddress(), ns3::WifiMac::GetFrameExchangeManager(), ns3::WifiMac::GetNLinks(), MultiLinkOperationsTestBase::m_apMac, NS_ABORT_IF, NS_TEST_EXPECT_MSG_EQ, and ns3::WIFI_MAC_MGT_PROBE_RESPONSE.

Referenced by DoRun().

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

◆ DoRun()

◆ DoSetup()

void MultiLinkSetupTest::DoSetup ( )
overrideprotectedvirtual

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 MultiLinkOperationsTestBase.

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

References MultiLinkOperationsTestBase::DoSetup(), m_scanType, and MultiLinkOperationsTestBase::m_staMacs.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_nProbeResp

std::size_t MultiLinkSetupTest::m_nProbeResp
private

number of Probe Responses received by the non-AP MLD

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

Referenced by DoRun().

◆ m_scanType

WifiScanType MultiLinkSetupTest::m_scanType
private

the scan type (active or passive)

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

Referenced by DoRun(), and DoSetup().

◆ 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 654 of file wifi-mlo-test.cc.

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


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