Test BlockAckReq frame sent by a Block Ack originator after dropping QoS data frames. More...
#include "wifi-mlo-test.h"
Classes | |
struct | Events |
Actions and checks to perform upon the transmission of each frame. More... | |
Public Member Functions | |
BarAfterDroppedMpduTest (WifiAssocType assocType) | |
Constructor. | |
![]() | |
MultiLinkOperationsTestBase (const std::string &name, uint8_t nStations, const BaseParams &baseParams) | |
Constructor. | |
~MultiLinkOperationsTestBase () override=default | |
![]() | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. | |
std::string | GetName () const |
TestCase & | operator= (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. | |
void | InsertEvents () |
Insert elements in the list of expected events (transmitted frames) | |
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. | |
![]() | |
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. | |
void | CheckCapabilities (Ptr< WifiMpdu > mpdu, Ptr< WifiMac > mac, uint8_t phyId) |
Check that the expected Capabilities information elements are present in the given management frame based on the band in which the given link is operating. | |
void | DoSetup () override |
Implementation to do any local setup required for this TestCase. | |
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. | |
void | SetChannels (SpectrumWifiPhyHelper &helper, const std::vector< std::string > &channels, const ChannelMap &channelMap) |
Reset the given PHY helper, use the given strings to set the ChannelSettings attribute of the PHY objects to create, and attach them to the given spectrum channels appropriately. | |
void | SetSsid (uint16_t aid, Mac48Address) |
Set the SSID on the next station that needs to start the association procedure. | |
![]() | |
TestCase (std::string name) | |
Constructor. | |
void | AddTestCase (TestCase *testCase, Duration duration=Duration::QUICK) |
Add an individual child TestCase to this test suite. | |
TestCase * | GetParent () 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 | StartTraffic () override |
Start the generation of traffic (needs to be overridden) | |
Private Attributes | |
Ptr< ListErrorModel > | m_apErrorModel |
error rate model to corrupt frames at the AP MLD | |
std::list< Events > | m_events |
list of events for a test run | |
std::size_t | m_processedEvents {0} |
number of processed events | |
bool | m_setupDone {false} |
whether association has been completed | |
Ptr< ListErrorModel > | m_staErrorModel |
error rate model to corrupt frames at the non-AP STA | |
Additional Inherited Members | |
![]() | |
enum class | Duration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
![]() | |
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 |
![]() | |
using | ChannelMap = std::map<FrequencyRange, Ptr<MultiModelSpectrumChannel>> |
PHY band-indexed map of spectrum channels. | |
enum | Direction { DL = 0 , UL } |
Uplink or Downlink direction. More... | |
![]() | |
const std::vector< std::string > | m_apChannels |
strings specifying channels for AP | |
Ptr< ApWifiMac > | m_apMac |
AP wifi MAC. | |
WifiAssocType | m_assocType |
type of the association procedure used by non-AP devices | |
Time | m_duration {Seconds(1)} |
simulation duration | |
const std::vector< uint8_t > | m_fixedPhyBands |
links on non-AP MLD with fixed PHY band | |
uint16_t | m_lastAid |
AID of last associated station. | |
uint8_t | m_nStations |
number of stations to create | |
std::vector< std::size_t > | m_rxPkts |
number of packets received at application layer by each node (index is node ID) | |
const std::vector< std::string > | m_staChannels |
strings specifying channels for STA | |
std::vector< Ptr< StaWifiMac > > | m_staMacs |
STA wifi MACs. | |
uint16_t | m_startAid |
first AID to allocate to stations | |
std::vector< FrameInfo > | m_txPsdus |
transmitted PSDUs | |
Test BlockAckReq frame sent by a Block Ack originator after dropping QoS data frames.
In this test, a non-AP STA associates with an AP MLD with 2 links using either legacy association or ML setup. A Block Ack agreement is established first in the downlink direction; the AP MLD sends 2 data frames, which are both corrupted. When a timeout occurs at the AP MLD, the 2 data frames are dropped, thus the AP MLD sends a BlockAckReq to advance the recipient window. It is checked that the BlockAckReq has the correct link addresses and that the non-AP STA replies with a BlockAck having correct link addresses. Then, a Block Ack agreement is established in the uplink direction and the same pattern of actions are repeated (in the inverse direction).
Definition at line 805 of file wifi-mlo-test.h.
BarAfterDroppedMpduTest::BarAfterDroppedMpduTest | ( | WifiAssocType | assocType | ) |
Constructor.
assocType | the association type |
Definition at line 3020 of file wifi-mlo-test.cc.
|
overrideprotectedvirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 3217 of file wifi-mlo-test.cc.
References ns3::Simulator::Destroy(), MultiLinkOperationsTestBase::m_duration, m_events, NS_TEST_EXPECT_MSG_EQ, ns3::Simulator::Run(), and ns3::Simulator::Stop().
|
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 ns3::TestCase.
Definition at line 3033 of file wifi-mlo-test.cc.
References MultiLinkOperationsTestBase::DoSetup(), m_apErrorModel, MultiLinkOperationsTestBase::m_apMac, m_staErrorModel, MultiLinkOperationsTestBase::m_staMacs, and ns3::Config::SetDefault().
|
protected |
Insert elements in the list of expected events (transmitted frames)
Definition at line 3109 of file wifi-mlo-test.cc.
References MultiLinkOperationsTestBase::GetApplication(), m_apErrorModel, MultiLinkOperationsTestBase::m_apMac, m_events, m_staErrorModel, MultiLinkOperationsTestBase::m_staMacs, ns3::MilliSeconds(), NS_TEST_EXPECT_MSG_EQ, ns3::PeekPointer(), ns3::Simulator::Schedule(), ns3::ListErrorModel::SetList(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::PacketSocketAddress::SetProtocol(), ns3::PacketSocketAddress::SetSingleDevice(), ns3::WIFI_MAC_CTL_ACK, ns3::WIFI_MAC_CTL_BACKREQ, ns3::WIFI_MAC_CTL_BACKRESP, ns3::WIFI_MAC_MGT_ACTION, and ns3::WIFI_MAC_QOSDATA.
Referenced by StartTraffic().
|
overrideprivatevirtual |
Start the generation of traffic (needs to be overridden)
Reimplemented from MultiLinkOperationsTestBase.
Definition at line 3094 of file wifi-mlo-test.cc.
References MultiLinkOperationsTestBase::GetApplication(), InsertEvents(), MultiLinkOperationsTestBase::m_apMac, m_setupDone, MultiLinkOperationsTestBase::m_staMacs, ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::PacketSocketAddress::SetProtocol(), and ns3::PacketSocketAddress::SetSingleDevice().
|
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 3055 of file wifi-mlo-test.cc.
References ns3::WifiMacHeader::GetTypeString(), m_events, m_processedEvents, m_setupDone, NS_TEST_ASSERT_MSG_EQ, NS_TEST_EXPECT_MSG_EQ, and MultiLinkOperationsTestBase::Transmit().
|
private |
error rate model to corrupt frames at the AP MLD
Definition at line 855 of file wifi-mlo-test.h.
Referenced by DoSetup(), and InsertEvents().
|
private |
list of events for a test run
Definition at line 852 of file wifi-mlo-test.h.
Referenced by DoRun(), InsertEvents(), and Transmit().
|
private |
number of processed events
Definition at line 853 of file wifi-mlo-test.h.
Referenced by Transmit().
|
private |
whether association has been completed
Definition at line 851 of file wifi-mlo-test.h.
Referenced by StartTraffic(), and Transmit().
|
private |
error rate model to corrupt frames at the non-AP STA
Definition at line 854 of file wifi-mlo-test.h.
Referenced by DoSetup(), and InsertEvents().