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

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

#include "wifi-mlo-test.h"

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

Public Member Functions

 MultiLinkSetupTest (const BaseParams &baseParams, WifiScanType scanType, const std::vector< uint8_t > &setupLinks, WifiTidToLinkMappingNegSupport apNegSupport, const std::string &dlTidToLinkMapping, const std::string &ulTidToLinkMapping, bool support160MHzOp=true)
 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, 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.
 

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.
 
void CheckQosData (Ptr< WifiMpdu > mpdu, const WifiTxVector &txvector, uint8_t linkId, std::size_t index)
 Check that QoS data frames are sent on links their TID is mapped to and with the correct TX width.
 
void StartTraffic () override
 Start the generation of traffic (needs to be overridden)
 

Private Attributes

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

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
 
 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 353 of file wifi-mlo-test.h.

Constructor & Destructor Documentation

◆ MultiLinkSetupTest()

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

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
support160MHzOpwhether non-AP MLDs support 160 MHz operations

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

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

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

References MultiLinkOperationsTestBase::CheckAddresses(), ns3::Create(), MultiLinkOperationsTestBase::DL, 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.

Also, on the AP side, check that the queue storing QoS data frames destined to the non-AP MLD has a mask for a link if and only if the link has been setup by the non-AO MLD.

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

References ns3::AC_BE, MultiLinkOperationsTestBase::m_apMac, m_setupLinks, MultiLinkOperationsTestBase::m_staMacs, NS_TEST_EXPECT_MSG_EQ, ns3::WIFI_QOSDATA_QUEUE, and ns3::WIFI_UNICAST.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ CheckMlSetup()

void MultiLinkSetupTest::CheckMlSetup ( )
private

Check correctness of Multi-Link Setup procedure.

Check outcome of Multi-Link Setup

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

References ns3::AP, dir, MultiLinkOperationsTestBase::m_apMac, m_apNegSupport, m_dlTidLinkMapping, m_setupLinks, MultiLinkOperationsTestBase::m_staMacs, m_support160MHzOp, m_ulTidLinkMapping, NS_TEST_ASSERT_MSG_EQ, NS_TEST_EXPECT_MSG_EQ, ns3::SINGLE_LINK_OP_ID, and ns3::WIFI_STANDARD_80211be.

Referenced by DoRun().

+ Here is the caller graph for this function:

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

References MultiLinkOperationsTestBase::CheckAddresses(), ns3::Create(), MultiLinkOperationsTestBase::DL, 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,
const WifiTxVector & txvector,
uint8_t linkId,
std::size_t index )
private

Check that QoS data frames are sent on links their TID is mapped to and with the correct TX width.

Parameters
mpduthe given QoS data frame
txvectorthe TXVECTOR used to send the 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 1564 of file wifi-mlo-test.cc.

References ns3::WifiPhy::CalculateTxDuration(), dir, ns3::WifiTxVector::GetChannelWidth(), MultiLinkOperationsTestBase::m_apMac, m_dlTid1, m_dlTid2, m_qosFrames1, m_qosFrames2, m_setupLinks, MultiLinkOperationsTestBase::m_staMacs, m_support160MHzOp, MultiLinkOperationsTestBase::m_txPsdus, m_ulTid1, m_ulTid2, 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

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

References ns3::AC_BE, ns3::AC_BK, ns3::AC_VI, ns3::AC_VO, MultiLinkOperationsTestBase::DoSetup(), MultiLinkOperationsTestBase::m_apMac, m_apNegSupport, m_dlTid1, m_dlTid2, m_dlTidLinkMapping, m_dlTidLinkMappingStr, m_scanType, m_setupLinks, MultiLinkOperationsTestBase::m_staChannels, MultiLinkOperationsTestBase::m_staMacs, m_support160MHzOp, m_ulTid1, m_ulTid2, m_ulTidLinkMapping, m_ulTidLinkMappingStr, NS_FATAL_ERROR, ns3::QosUtilsMapTidToAc(), and ns3::TidToLinkMappingValidForNegType1().

+ Here is the call graph for this function:

◆ StartTraffic()

void MultiLinkSetupTest::StartTraffic ( )
overrideprivatevirtual

Start the generation of traffic (needs to be overridden)

Reimplemented from MultiLinkOperationsTestBase.

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

References MultiLinkOperationsTestBase::GetApplication(), MultiLinkOperationsTestBase::m_apMac, m_dlTid1, m_dlTid2, m_setupLinks, MultiLinkOperationsTestBase::m_staMacs, m_ulTid1, m_ulTid2, ns3::MilliSeconds(), ns3::Seconds(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::PacketSocketAddress::SetProtocol(), and ns3::PacketSocketAddress::SetSingleDevice().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_apNegSupport

WifiTidToLinkMappingNegSupport MultiLinkSetupTest::m_apNegSupport
private

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

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

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 453 of file wifi-mlo-test.h.

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 455 of file wifi-mlo-test.h.

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 449 of file wifi-mlo-test.h.

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 447 of file wifi-mlo-test.h.

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 444 of file wifi-mlo-test.h.

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 458 of file wifi-mlo-test.h.

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 460 of file wifi-mlo-test.h.

Referenced by CheckQosData().

◆ m_scanType

WifiScanType MultiLinkSetupTest::m_scanType
private

the scan type (active or passive)

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

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 442 of file wifi-mlo-test.h.

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

◆ m_support160MHzOp

bool MultiLinkSetupTest::m_support160MHzOp
private

whether non-AP MLDs support 160 MHz operations

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

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

◆ m_ulTid1

uint8_t MultiLinkSetupTest::m_ulTid1
private

the TID of the first set of UL QoS data frames

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

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 456 of file wifi-mlo-test.h.

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 451 of file wifi-mlo-test.h.

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 448 of file wifi-mlo-test.h.

Referenced by DoSetup().


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