Test data transmission between MLDs using OFDMA MU transmissions. More...
Public Member Functions | |
MultiLinkMuTxTest (const BaseParams &baseParams, WifiMuTrafficPattern muTrafficPattern, WifiUseBarAfterMissedBa useBarAfterMissedBa, uint8_t nMaxInflight) | |
Constructor. More... | |
~MultiLinkMuTxTest () override=default | |
Public Member Functions inherited from MultiLinkOperationsTestBase | |
MultiLinkOperationsTestBase (const std::string &name, uint8_t nStations, const BaseParams &baseParams) | |
Constructor. More... | |
~MultiLinkOperationsTestBase () override=default | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Protected Member Functions | |
void | CheckBlockAck (Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, uint8_t linkId) |
Check the content of a received BlockAck frame when the max number of links on which an MPDU can be inflight is one. More... | |
void | DoRun () override |
Implementation to actually run this TestCase. More... | |
void | DoSetup () override |
Implementation to do any local setup required for this TestCase. More... | |
void | Transmit (Ptr< WifiMac > mac, uint8_t phyId, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW) override |
Callback invoked when a FEM passes PSDUs to the PHY. More... | |
Protected Member Functions inherited from MultiLinkOperationsTestBase | |
void | CheckAddresses (Ptr< const WifiPsdu > psdu, std::optional< Direction > direction=std::nullopt) |
Check that the Address 1 and Address 2 fields of the given PSDU contain device MAC addresses. More... | |
Ptr< PacketSocketClient > | GetApplication (const PacketSocketAddress &sockAddr, std::size_t count, std::size_t pktSize, Time delay=Seconds(0), uint8_t priority=0) const |
virtual void | L7Receive (uint8_t nodeId, Ptr< const Packet > p, const Address &addr) |
Function to trace packets received by the server application. 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... | |
TestCase * | GetParent () 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 Types | |
using | AddrSeqNoPair = std::pair< Mac48Address, uint16_t > |
A pair of a MAC address (the address of the receiver for DL frames and the address of the sender for UL frames) and a sequence number identifying a transmitted QoS data frame. More... | |
using | RxErrorModelMap = std::unordered_map< Mac48Address, Ptr< ListErrorModel >, WifiAddressHash > |
Receiver address-indexed map of list error models. More... | |
Private Member Functions | |
void | StartTraffic () override |
Start the generation of traffic (needs to be overridden) More... | |
Private Attributes | |
std::size_t | m_blockAckCount {0} |
transmitted BlockAck counter More... | |
std::optional< Mac48Address > | m_dataCorruptedSta |
MAC address of the station that received MPDU with SeqNo=2 corrupted. More... | |
RxErrorModelMap | m_errorModels |
error rate models to corrupt packets More... | |
std::map< AddrSeqNoPair, std::size_t > | m_inflightCount |
max number of simultaneous transmissions of each data frame More... | |
WifiMuTrafficPattern | m_muTrafficPattern |
the pattern of traffic to generate More... | |
std::size_t | m_nMaxInflight |
max number of links on which an MPDU can be inflight More... | |
std::size_t | m_nPackets |
number of application packets to generate More... | |
std::vector< PacketSocketAddress > | m_sockets |
packet socket addresses for STAs More... | |
Ptr< WifiMac > | m_sourceMac |
MAC of the node sending application packets. More... | |
std::size_t | m_tfCount {0} |
transmitted Trigger Frame counter More... | |
std::list< uint64_t > | m_uidList |
list of UIDs of packets to corrupt More... | |
bool | m_useBarAfterMissedBa |
whether to send BAR after missed BlockAck More... | |
bool | m_waitFirstTf {true} |
whether we are waiting for the first Basic Trigger Frame 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... | |
Protected Types inherited from MultiLinkOperationsTestBase | |
using | ChannelMap = std::map< FrequencyRange, Ptr< MultiModelSpectrumChannel > > |
PHY band-indexed map of spectrum channels. More... | |
enum | Direction { DL = 0 , UL } |
Uplink or Downlink direction. More... | |
Protected Attributes inherited from MultiLinkOperationsTestBase | |
const std::vector< std::string > | m_apChannels |
strings specifying channels for AP More... | |
Ptr< ApWifiMac > | m_apMac |
AP wifi MAC. More... | |
Time | m_duration {Seconds(1)} |
simulation duration More... | |
const std::vector< uint8_t > | m_fixedPhyBands |
links on non-AP MLD with fixed PHY band More... | |
uint16_t | m_lastAid |
AID of last associated station. More... | |
uint8_t | m_nStations |
number of stations to create More... | |
std::vector< std::size_t > | m_rxPkts |
number of packets received at application layer by each node (index is node ID) More... | |
const std::vector< std::string > | m_staChannels |
strings specifying channels for STA More... | |
std::vector< Ptr< StaWifiMac > > | m_staMacs |
STA wifi MACs. More... | |
std::vector< FrameInfo > | m_txPsdus |
transmitted PSDUs More... | |
Test data transmission between MLDs using OFDMA MU transmissions.
This test sets up an AP MLD and two non-AP MLDs 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). This test aims at veryfing the successful transmission of both DL MU and UL MU frames. In the DL MU scenarios, the client applications installed on the AP generate 8 packets addressed to each of the stations (plus 3 packets to trigger the establishment of BlockAck agreements). In the UL MU scenario, client applications installed on the stations generate 4 packets each (plus 3 packets to trigger the establishment of BlockAck agreements).
The maximum A-MSDU size is set such that two packets can be aggregated in an A-MSDU. The MPDU with sequence number equal to 3 is corrupted (by using a post reception error model) once and for a single station, to test its successful re-transmission.
Also, we enable the concurrent transmission of data frames over two links and check that at least one MPDU is concurrently transmitted over two links.
Definition at line 2369 of file wifi-mlo-test.cc.
|
private |
A pair of a MAC address (the address of the receiver for DL frames and the address of the sender for UL frames) and a sequence number identifying a transmitted QoS data frame.
Definition at line 2414 of file wifi-mlo-test.cc.
|
private |
Receiver address-indexed map of list error models.
Definition at line 2410 of file wifi-mlo-test.cc.
MultiLinkMuTxTest::MultiLinkMuTxTest | ( | const BaseParams & | baseParams, |
WifiMuTrafficPattern | muTrafficPattern, | ||
WifiUseBarAfterMissedBa | useBarAfterMissedBa, | ||
uint8_t | nMaxInflight | ||
) |
Constructor.
baseParams | common configuration parameters |
muTrafficPattern | the pattern of traffic to generate |
useBarAfterMissedBa | whether a BAR or Data frames are sent after missed BlockAck |
nMaxInflight | the max number of links on which an MPDU can be simultaneously inflight (unused if Block Ack agreements are not established) |
Definition at line 2434 of file wifi-mlo-test.cc.
|
overridedefault |
|
protected |
Check the content of a received BlockAck frame when the max number of links on which an MPDU can be inflight is one.
psdu | the PSDU containing the BlockAck |
txVector | the TXVECTOR used to transmit the BlockAck |
linkId | the ID of the link on which the BlockAck was transmitted |
Definition at line 2590 of file wifi-mlo-test.cc.
References ns3::AC_BE, ns3::WifiPsdu::begin(), ns3::CtrlBAckResponseHeader::FindPerAidTidInfoWithAid(), ns3::WifiMac::GetAddress(), ns3::WifiMac::GetLinkIdByAddress(), ns3::WifiPhy::GetPhyBand(), ns3::ApWifiMac::GetTxopQueue(), ns3::WifiMac::GetWifiPhy(), ns3::CtrlBAckResponseHeader::IsMultiSta(), ns3::CtrlBAckResponseHeader::IsPacketReceived(), MultiLinkOperationsTestBase::m_apMac, m_blockAckCount, m_dataCorruptedSta, m_muTrafficPattern, m_nPackets, MultiLinkOperationsTestBase::m_nStations, MultiLinkOperationsTestBase::m_staMacs, ns3::MicroSeconds(), NS_ABORT_MSG, NS_TEST_ASSERT_MSG_EQ, NS_TEST_EXPECT_MSG_EQ, and UL_MU.
Referenced by Transmit().
|
overrideprotectedvirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 2884 of file wifi-mlo-test.cc.
References DL_MU_AGGR_MU_BAR, DL_MU_BAR_BA_SEQUENCE, DL_MU_MU_BAR, m_inflightCount, m_muTrafficPattern, m_nMaxInflight, m_nPackets, MultiLinkOperationsTestBase::m_rxPkts, MultiLinkOperationsTestBase::m_staMacs, max, min, NS_TEST_EXPECT_MSG_EQ, NS_TEST_EXPECT_MSG_LT_OR_EQ, and UL_MU.
|
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 2755 of file wifi-mlo-test.cc.
References ns3::AC_BE, ns3::AC_VI, ns3::Object::AggregateObject(), DL_MU_AGGR_MU_BAR, DL_MU_BAR_BA_SEQUENCE, DL_MU_MU_BAR, MultiLinkOperationsTestBase::DoSetup(), ns3::WifiMac::GetFrameExchangeManager(), ns3::WifiMac::GetNLinks(), ns3::WifiMac::GetWifiPhy(), MultiLinkOperationsTestBase::m_apMac, m_errorModels, m_muTrafficPattern, m_nMaxInflight, MultiLinkOperationsTestBase::m_staMacs, m_useBarAfterMissedBa, third::mac, ns3::Config::SetDefault(), and ns3::WifiPhy::SetPostReceptionErrorModel().
|
overrideprivatevirtual |
Start the generation of traffic (needs to be overridden)
Reimplemented from MultiLinkOperationsTestBase.
Definition at line 2818 of file wifi-mlo-test.cc.
References ns3::Node::AddApplication(), ns3::WifiNetDevice::GetAddress(), MultiLinkOperationsTestBase::GetApplication(), ns3::WifiMac::GetDevice(), ns3::WifiNetDevice::GetIfIndex(), ns3::WifiNetDevice::GetNode(), ns3::Object::GetObject(), MultiLinkOperationsTestBase::m_apMac, MultiLinkOperationsTestBase::m_duration, m_muTrafficPattern, m_nPackets, MultiLinkOperationsTestBase::m_nStations, m_sockets, MultiLinkOperationsTestBase::m_staMacs, ns3::MilliSeconds(), NS_TEST_ASSERT_MSG_NE, ns3::Seconds(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::PacketSocketAddress::SetProtocol(), ns3::PacketSocketAddress::SetSingleDevice(), and UL_MU.
|
overrideprotectedvirtual |
Callback invoked when a FEM passes PSDUs to the PHY.
mac | the MAC transmitting the PSDUs |
phyId | the ID of the PHY transmitting the PSDUs |
psduMap | the PSDU map |
txVector | the TX vector |
txPowerW | the tx power in Watts |
Reimplemented from MultiLinkOperationsTestBase.
Definition at line 2456 of file wifi-mlo-test.cc.
References first::address, MultiLinkOperationsTestBase::CheckAddresses(), CheckBlockAck(), MultiLinkOperationsTestBase::GetApplication(), ns3::WifiTxVector::GetHeMuUserInfoMap(), ns3::WifiMac::GetMldAddress(), ns3::Object::GetObject(), ns3::CtrlTriggerHeader::IsBasic(), ns3::WifiTxVector::IsUlMu(), MultiLinkOperationsTestBase::m_apMac, m_blockAckCount, m_dataCorruptedSta, m_errorModels, m_inflightCount, m_muTrafficPattern, m_nMaxInflight, m_nPackets, MultiLinkOperationsTestBase::m_nStations, m_sockets, MultiLinkOperationsTestBase::m_staMacs, m_tfCount, MultiLinkOperationsTestBase::m_txPsdus, m_uidList, m_waitFirstTf, third::mac, max, NS_LOG_INFO, NS_TEST_ASSERT_MSG_NE, NS_TEST_EXPECT_MSG_EQ, MultiLinkOperationsTestBase::Transmit(), UL_MU, ns3::WIFI_MAC_CTL_BACKRESP, ns3::WIFI_MAC_CTL_TRIGGER, and ns3::WIFI_MAC_QOSDATA.
|
private |
transmitted BlockAck counter
Definition at line 2426 of file wifi-mlo-test.cc.
Referenced by CheckBlockAck(), and Transmit().
|
private |
MAC address of the station that received MPDU with SeqNo=2 corrupted.
Definition at line 2418 of file wifi-mlo-test.cc.
Referenced by CheckBlockAck(), and Transmit().
|
private |
error rate models to corrupt packets
Definition at line 2416 of file wifi-mlo-test.cc.
Referenced by DoSetup(), and Transmit().
|
private |
max number of simultaneous transmissions of each data frame
Definition at line 2429 of file wifi-mlo-test.cc.
Referenced by DoRun(), and Transmit().
|
private |
the pattern of traffic to generate
Definition at line 2421 of file wifi-mlo-test.cc.
Referenced by CheckBlockAck(), DoRun(), DoSetup(), StartTraffic(), and Transmit().
|
private |
max number of links on which an MPDU can be inflight
Definition at line 2423 of file wifi-mlo-test.cc.
Referenced by DoRun(), DoSetup(), and Transmit().
|
private |
number of application packets to generate
Definition at line 2425 of file wifi-mlo-test.cc.
Referenced by CheckBlockAck(), DoRun(), StartTraffic(), and Transmit().
|
private |
packet socket addresses for STAs
Definition at line 2424 of file wifi-mlo-test.cc.
Referenced by StartTraffic(), and Transmit().
MAC of the node sending application packets.
Definition at line 2431 of file wifi-mlo-test.cc.
|
private |
transmitted Trigger Frame counter
Definition at line 2427 of file wifi-mlo-test.cc.
Referenced by Transmit().
|
private |
list of UIDs of packets to corrupt
Definition at line 2417 of file wifi-mlo-test.cc.
Referenced by Transmit().
|
private |
whether to send BAR after missed BlockAck
Definition at line 2422 of file wifi-mlo-test.cc.
Referenced by DoSetup().
|
private |
whether we are waiting for the first Basic Trigger Frame
Definition at line 2420 of file wifi-mlo-test.cc.
Referenced by Transmit().