Test data transmission between MLDs using OFDMA MU transmissions. More...
Public Member Functions | |
MultiLinkMuTxTest (WifiMuTrafficPattern muTrafficPattern, WifiUseBarAfterMissedBa useBarAfterMissedBa, uint8_t nMaxInflight, const std::vector< std::string > &staChannels, const std::vector< std::string > &apChannels, const std::vector< uint8_t > &fixedPhyBands={}) | |
Constructor. More... | |
~MultiLinkMuTxTest () override=default | |
![]() | |
MultiLinkOperationsTestBase (const std::string &name, uint8_t nStations, std::vector< std::string > staChannels, std::vector< std::string > apChannels, std::vector< uint8_t > fixedPhyBands={}) | |
Constructor. More... | |
~MultiLinkOperationsTestBase () override=default | |
![]() | |
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 | L7Receive (uint8_t nodeId, Ptr< const Packet > p, const Address &addr) |
Function to trace packets received by the server application. More... | |
void | Transmit (uint8_t linkId, std::string context, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW) override |
Callback invoked when a FEM passes PSDUs to the PHY. More... | |
![]() | |
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... | |
![]() | |
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::array< std::size_t, 3 > | m_rxPkts {} |
number of packets received at application layer by each node (AP, STA 0, STA 1) 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::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 | |
![]() | |
enum | TestDuration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
![]() | |
enum | Direction { DL = 0 , UL } |
Uplink or Downlink direction. More... | |
![]() | |
const std::vector< std::string > | m_apChannels |
strings specifying channels for AP More... | |
Ptr< ApWifiMac > | m_apMac |
AP wifi MAC. 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... | |
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 1649 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 1706 of file wifi-mlo-test.cc.
|
private |
Receiver address-indexed map of list error models.
Definition at line 1702 of file wifi-mlo-test.cc.
MultiLinkMuTxTest::MultiLinkMuTxTest | ( | WifiMuTrafficPattern | muTrafficPattern, |
WifiUseBarAfterMissedBa | useBarAfterMissedBa, | ||
uint8_t | nMaxInflight, | ||
const std::vector< std::string > & | staChannels, | ||
const std::vector< std::string > & | apChannels, | ||
const std::vector< uint8_t > & | fixedPhyBands = {} |
||
) |
Constructor.
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) |
staChannels | the strings specifying the operating channels for the STA |
apChannels | the strings specifying the operating channels for the AP |
fixedPhyBands | list of IDs of STA links that cannot switch PHY band |
Definition at line 1727 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 1886 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 2237 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, 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 2058 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(), ns3::WifiPhy::SetPostReceptionErrorModel(), and UL_MU.
|
protected |
Function to trace packets received by the server application.
nodeId | the ID of the node that received the packet |
p | the packet |
addr | the address |
Definition at line 2051 of file wifi-mlo-test.cc.
References m_rxPkts, and NS_LOG_INFO.
Referenced by StartTraffic().
|
overrideprivatevirtual |
Start the generation of traffic (needs to be overridden)
Reimplemented from MultiLinkOperationsTestBase.
Definition at line 2123 of file wifi-mlo-test.cc.
References ns3::Node::AddApplication(), ns3::WifiNetDevice::GetAddress(), ns3::WifiMac::GetDevice(), ns3::WifiNetDevice::GetIfIndex(), ns3::WifiNetDevice::GetNode(), ns3::Object::GetObject(), ns3::PacketSocketHelper::Install(), L7Receive(), MultiLinkOperationsTestBase::m_apMac, m_muTrafficPattern, m_nPackets, MultiLinkOperationsTestBase::m_nStations, m_sockets, MultiLinkOperationsTestBase::m_staMacs, ns3::MakeCallback(), ns3::MicroSeconds(), 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.
linkId | the ID of the link transmitting the PSDUs |
context | the context |
psduMap | the PSDU map |
txVector | the TX vector |
txPowerW | the tx power in Watts |
Reimplemented from MultiLinkOperationsTestBase.
Definition at line 1753 of file wifi-mlo-test.cc.
References first::address, MultiLinkOperationsTestBase::CheckAddresses(), CheckBlockAck(), ns3::WifiTxVector::GetHeMuUserInfoMap(), ns3::WifiMac::GetMldAddress(), ns3::WifiPhy::GetPhyBand(), ns3::WifiMac::GetWifiPhy(), 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_uidList, m_waitFirstTf, max, ns3::MicroSeconds(), NS_LOG_INFO, NS_TEST_EXPECT_MSG_EQ, ns3::Seconds(), 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 1718 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 1710 of file wifi-mlo-test.cc.
Referenced by CheckBlockAck(), and Transmit().
|
private |
error rate models to corrupt packets
Definition at line 1708 of file wifi-mlo-test.cc.
Referenced by DoSetup(), and Transmit().
|
private |
max number of simultaneous transmissions of each data frame
Definition at line 1722 of file wifi-mlo-test.cc.
Referenced by DoRun(), and Transmit().
|
private |
the pattern of traffic to generate
Definition at line 1713 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 1715 of file wifi-mlo-test.cc.
Referenced by DoRun(), DoSetup(), and Transmit().
|
private |
number of application packets to generate
Definition at line 1717 of file wifi-mlo-test.cc.
Referenced by CheckBlockAck(), DoRun(), StartTraffic(), and Transmit().
|
private |
number of packets received at application layer by each node (AP, STA 0, STA 1)
Definition at line 1720 of file wifi-mlo-test.cc.
Referenced by DoRun(), and L7Receive().
|
private |
packet socket addresses for STAs
Definition at line 1716 of file wifi-mlo-test.cc.
Referenced by StartTraffic(), and Transmit().
MAC of the node sending application packets.
Definition at line 1724 of file wifi-mlo-test.cc.
|
private |
list of UIDs of packets to corrupt
Definition at line 1709 of file wifi-mlo-test.cc.
Referenced by Transmit().
|
private |
whether to send BAR after missed BlockAck
Definition at line 1714 of file wifi-mlo-test.cc.
Referenced by DoSetup().
|
private |
whether we are waiting for the first Basic Trigger Frame
Definition at line 1712 of file wifi-mlo-test.cc.
Referenced by Transmit().