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 (const BaseParams &baseParams, WifiScanType scanType, const std::vector< uint8_t > &setupLinks, uint8_t apNegSupport, const std::string &dlTidToLinkMapping, const std::string &ulTidToLinkMapping)
 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...
 
void DoSetup () override
 Implementation to do any local setup required for 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...
 
void CheckProbeResponse (Ptr< WifiMpdu > mpdu, uint8_t linkId)
 Check correctness of the given Probe Response frame. More...
 
void CheckQosData (Ptr< WifiMpdu > mpdu, uint8_t linkId, std::size_t index)
 Check that QoS data frames are sent on links their TID is mapped to. More...
 
void StartTraffic () override
 Start the generation of traffic (needs to be overridden) More...
 

Private Attributes

uint8_t m_apNegSupport
 TID-to-Link Mapping negotiation supported by the AP MLD. More...
 
uint8_t m_dlTid1
 the TID of the first set of DL QoS data frames More...
 
std::optional< uint8_t > m_dlTid2
 the TID of the optional set of DL QoS data frames More...
 
WifiTidLinkMapping m_dlTidLinkMapping
 expected DL TID-to-Link Mapping requested by non-AP MLD and accepted by AP MLD More...
 
std::string m_dlTidLinkMappingStr
 DL TID-to-Link Mapping for non-AP MLD EHT configuration. More...
 
std::size_t m_nProbeResp
 number of Probe Responses received by the non-AP MLD More...
 
std::vector< std::size_t > m_qosFrames1
 indices of QoS frames of the first set in the vector of TX PSDUs More...
 
std::vector< std::size_t > m_qosFrames2
 indices of QoS frames of the optional set in the vector of TX PSDUs More...
 
WifiScanType m_scanType
 the scan type (active or passive) More...
 
const std::vector< uint8_t > m_setupLinks
 IDs of the expected links to setup. More...
 
uint8_t m_ulTid1
 the TID of the first set of UL QoS data frames More...
 
std::optional< uint8_t > m_ulTid2
 the TID of the optional set of UL QoS data frames More...
 
WifiTidLinkMapping m_ulTidLinkMapping
 expected UL TID-to-Link Mapping requested by non-AP MLD and accepted by AP MLD More...
 
std::string m_ulTidLinkMappingStr
 UL TID-to-Link Mapping for non-AP MLD EHT configuration. 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.

The negotiated TID-to-link mapping is tested by verifying that generated QoS data frames of a given TID are transmitted on links which the TID is mapped to. Specifically, the following operations are performed separately for each direction (downlink and uplink). A first TID is searched such that it is not mapped on all the setup links. If no such TID is found, only QoS frames of TID 0 are generated. Otherwise, we also search for a second TID that is mapped to a link set that is disjoint with the link set to which the first TID is mapped. If such a TID is found, QoS frames of both the first TID and the second TID are generated; otherwise, only QoS frames of the first TID are generated. For each TID, a number of QoS frames equal to the number of setup links is generated. For each TID, we check that the first N QoS frames, where N is the size of the link set to which the TID is mapped, are transmitted concurrently, while the following QoS frames are sent after the first QoS frame sent on the same link. We also check that all the QoS frames are sent on a link belonging to the link set to which the TID is mapped. If QoS frames of two TIDs are generated, we also check that the first N QoS frames of a TID, where N is the size of the link set to which that TID is mapped, are sent concurrently with the first M QoS frames of the other TID, where M is the size of the link set to which the other TID is mapped.

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

Constructor & Destructor Documentation

◆ MultiLinkSetupTest()

MultiLinkSetupTest::MultiLinkSetupTest ( const BaseParams baseParams,
WifiScanType  scanType,
const std::vector< uint8_t > &  setupLinks,
uint8_t  apNegSupport,
const std::string &  dlTidToLinkMapping,
const std::string &  ulTidToLinkMapping 
)

Constructor.

Parameters
baseParamscommon configuration parameters
scanTypethe scan type (active or passive)
setupLinksa list of links that are expected to be setup. In case one of the two devices has a single link, the ID of the link on the MLD is indicated
apNegSupportTID-to-Link Mapping negotiation supported by the AP MLD (0, 1, or 3)
dlTidToLinkMappingDL TID-to-Link Mapping for EHT configuration of non-AP MLD
ulTidToLinkMappingUL TID-to-Link Mapping for EHT configuration of non-AP MLD

Definition at line 913 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 1279 of file wifi-mlo-test.cc.

References MultiLinkOperationsTestBase::CheckAddresses(), dir, ns3::WifiMac::GetNLinks(), MultiLinkOperationsTestBase::m_apMac, m_apNegSupport, m_dlTidLinkMapping, m_setupLinks, MultiLinkOperationsTestBase::m_staMacs, m_ulTidLinkMapping, NS_ABORT_IF, NS_TEST_ASSERT_MSG_EQ, 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 1409 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 1162 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 1583 of file wifi-mlo-test.cc.

References m_setupLinks, 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 1220 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:

◆ CheckQosData()

void MultiLinkSetupTest::CheckQosData ( Ptr< WifiMpdu mpdu,
uint8_t  linkId,
std::size_t  index 
)
private

Check that QoS data frames are sent on links their TID is mapped to.

Parameters
mpduthe given QoS data frame
linkIdthe ID of the link on which the QoS data frame was transmitted
indexindex of the QoS data frame in the vector of transmitted PSDUs

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

References dir, ns3::WifiMac::GetNLinks(), ns3::WifiPhy::GetPhyBand(), ns3::WifiMac::GetTidToLinkMapping(), ns3::WifiMac::GetWifiPhy(), MultiLinkOperationsTestBase::m_apMac, m_dlTid1, m_dlTid2, m_qosFrames1, m_qosFrames2, m_setupLinks, MultiLinkOperationsTestBase::m_staMacs, MultiLinkOperationsTestBase::m_txPsdus, m_ulTid1, m_ulTid2, min, NS_ABORT_MSG, NS_ASSERT_MSG, NS_TEST_ASSERT_MSG_EQ, NS_TEST_ASSERT_MSG_NE, NS_TEST_EXPECT_MSG_EQ, NS_TEST_EXPECT_MSG_GT, NS_TEST_EXPECT_MSG_LT, and prev.

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

◆ StartTraffic()

Member Data Documentation

◆ m_apNegSupport

uint8_t MultiLinkSetupTest::m_apNegSupport
private

TID-to-Link Mapping negotiation supported by the AP MLD.

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

Referenced by CheckAssocRequest(), CheckMlSetup(), and DoSetup().

◆ m_dlTid1

uint8_t MultiLinkSetupTest::m_dlTid1
private

the TID of the first set of DL QoS data frames

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

Referenced by CheckQosData(), DoSetup(), and StartTraffic().

◆ m_dlTid2

std::optional<uint8_t> MultiLinkSetupTest::m_dlTid2
private

the TID of the optional set of DL QoS data frames

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

Referenced by CheckQosData(), DoRun(), DoSetup(), and StartTraffic().

◆ m_dlTidLinkMapping

WifiTidLinkMapping MultiLinkSetupTest::m_dlTidLinkMapping
private

expected DL TID-to-Link Mapping requested by non-AP MLD and accepted by AP MLD

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

Referenced by CheckAssocRequest(), CheckMlSetup(), and DoSetup().

◆ m_dlTidLinkMappingStr

std::string MultiLinkSetupTest::m_dlTidLinkMappingStr
private

DL TID-to-Link Mapping for non-AP MLD EHT configuration.

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

Referenced by DoSetup().

◆ m_nProbeResp

std::size_t MultiLinkSetupTest::m_nProbeResp
private

number of Probe Responses received by the non-AP MLD

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

Referenced by DoRun().

◆ m_qosFrames1

std::vector<std::size_t> MultiLinkSetupTest::m_qosFrames1
private

indices of QoS frames of the first set in the vector of TX PSDUs

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

Referenced by CheckQosData().

◆ m_qosFrames2

std::vector<std::size_t> MultiLinkSetupTest::m_qosFrames2
private

indices of QoS frames of the optional set in the vector of TX PSDUs

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

Referenced by CheckQosData().

◆ m_scanType

WifiScanType MultiLinkSetupTest::m_scanType
private

the scan type (active or passive)

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

Referenced by DoRun(), and DoSetup().

◆ m_setupLinks

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

IDs of the expected links to setup.

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

Referenced by CheckAssocRequest(), CheckAssocResponse(), CheckDisabledLinks(), CheckMlSetup(), CheckQosData(), DoRun(), DoSetup(), and StartTraffic().

◆ m_ulTid1

uint8_t MultiLinkSetupTest::m_ulTid1
private

the TID of the first set of UL QoS data frames

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

Referenced by CheckQosData(), DoSetup(), and StartTraffic().

◆ m_ulTid2

std::optional<uint8_t> MultiLinkSetupTest::m_ulTid2
private

the TID of the optional set of UL QoS data frames

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

Referenced by CheckQosData(), DoRun(), DoSetup(), and StartTraffic().

◆ m_ulTidLinkMapping

WifiTidLinkMapping MultiLinkSetupTest::m_ulTidLinkMapping
private

expected UL TID-to-Link Mapping requested by non-AP MLD and accepted by AP MLD

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

Referenced by CheckAssocRequest(), CheckMlSetup(), and DoSetup().

◆ m_ulTidLinkMappingStr

std::string MultiLinkSetupTest::m_ulTidLinkMappingStr
private

UL TID-to-Link Mapping for non-AP MLD EHT configuration.

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

Referenced by DoSetup().


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