Check UL OFDMA operations with EMLSR clients. More...
#include "wifi-emlsr-test.h"
Public Member Functions | |
EmlsrUlOfdmaTest (bool enableBsrp) | |
Constructor. | |
Public Member Functions inherited from EmlsrOperationsTestBase | |
EmlsrOperationsTestBase (const std::string &name) | |
Constructor. | |
~EmlsrOperationsTestBase () override=default | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Protected Member Functions | |
void | CheckResults () |
Check that the simulation produced the expected results. | |
void | DoRun () override |
Implementation to actually run this TestCase. | |
void | DoSetup () override |
Implementation to do any local setup required for this TestCase. | |
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. | |
Protected Member Functions inherited from EmlsrOperationsTestBase | |
void | CheckAuxPhysSleepMode (Ptr< StaWifiMac > staMac, bool sleep) |
Check whether aux PHYs of the given device are in sleep mode/awake. | |
void | CheckBlockedLink (Ptr< WifiMac > mac, Mac48Address dest, uint8_t linkId, WifiQueueBlockedReason reason, bool blocked, std::string description, bool testUnblockedForOtherReasons=true) |
Check whether QoS data unicast transmissions addressed to the given destination on the given link are blocked or unblocked for the given reason on the given device. | |
void | CheckMsdTimerRunning (Ptr< StaWifiMac > staMac, uint8_t linkId, bool isRunning, const std::string &msg) |
Check whether the MediumSyncDelay timer is running on the given link of the given device. | |
Ptr< PacketSocketClient > | GetApplication (TrafficDirection dir, std::size_t staId, std::size_t count, std::size_t pktSize) const |
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. | |
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 | |
bool | m_enableBsrp |
whether MU scheduler sends BSRP TFs | |
Time | m_startAccessReq |
start time of the first AP MLD access request via MU scheduler | |
std::size_t | m_txPsdusPos |
position in the vector of TX PSDUs of the first ICF | |
Additional Inherited Members | |
Public Types inherited from EmlsrOperationsTestBase | |
enum | TrafficDirection : uint8_t { DOWNLINK = 0 , UPLINK } |
Enumeration for traffic directions. More... | |
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 |
Protected Attributes inherited from EmlsrOperationsTestBase | |
Ptr< ApWifiMac > | m_apMac |
AP wifi MAC. | |
std::vector< PacketSocketAddress > | m_dlSockets |
packet socket address for DL traffic | |
Time | m_duration {0} |
simulation duration | |
bool | m_establishBaDl {false} |
whether BA needs to be established (for TID 0) with the AP as originator | |
bool | m_establishBaUl {false} |
whether BA needs to be established (for TID 0) with the AP as recipient | |
uint16_t | m_lastAid {0} |
AID of last associated station. | |
std::set< uint8_t > | m_linksToEnableEmlsrOn |
IDs of the links on which EMLSR mode has to be enabled. | |
uint8_t | m_mainPhyId {0} |
ID of the main PHY. | |
std::size_t | m_nEmlsrStations {1} |
number of stations to create that activate EMLSR | |
std::size_t | m_nNonEmlsrStations {0} |
number of stations to create that do not activate EMLSR | |
std::vector< Time > | m_paddingDelay |
Padding Delay advertised by the non-AP MLD. | |
bool | m_putAuxPhyToSleep {false} |
whether aux PHYs are put to sleep during DL/UL TXOPs | |
std::vector< Ptr< StaWifiMac > > | m_staMacs |
MACs of the non-AP MLDs. | |
std::vector< Time > | m_transitionDelay |
Transition Delay advertised by the non-AP MLD. | |
Time | m_transitionTimeout {MicroSeconds(128)} |
Transition Timeout advertised by the AP MLD. | |
std::vector< FrameInfo > | m_txPsdus |
transmitted PSDUs | |
std::vector< PacketSocketAddress > | m_ulSockets |
packet socket address for UL traffic | |
Check UL OFDMA operations with EMLSR clients.
This test considers an AP MLD and an EMLSR client and a non-AP MLD that setup three links with the AP MLD. Once block ack agreements (for TID 0) are established for the UL direction, the AP MLD starts requesting channel access (on all the links) through the Multi-User scheduler. Given that links are idle, AP MLD accesses the channel on all the links and concurrently sends Trigger Frames. When the transmission of the first Trigger Frame is over, a client application on the EMLSR client generates two packets addressed to the AP MLD.
It is checked that:
Definition at line 709 of file wifi-emlsr-test.h.
EmlsrUlOfdmaTest::EmlsrUlOfdmaTest | ( | bool | enableBsrp | ) |
Constructor.
enableBsrp | whether MU scheduler sends BSRP TFs |
Definition at line 3644 of file wifi-emlsr-test.cc.
References EmlsrOperationsTestBase::m_duration, EmlsrOperationsTestBase::m_establishBaDl, EmlsrOperationsTestBase::m_establishBaUl, EmlsrOperationsTestBase::m_linksToEnableEmlsrOn, EmlsrOperationsTestBase::m_mainPhyId, EmlsrOperationsTestBase::m_nEmlsrStations, EmlsrOperationsTestBase::m_nNonEmlsrStations, and ns3::Seconds().
|
protected |
Check that the simulation produced the expected results.
Sending BSRP TF disabled.
The figure assumes that link 0 is used to send the first Trigger Frame after that the AP MLD requests channel access through the Multi-user scheduler. The first Trigger Frame is MU-RTS because EMLSR client needs an ICF; the other Trigger Frames are Basic TFs and do not solicit the EMLSR client. ┌─────┐ ┌─────┐ ┌──────┐ │ MU │ │Basic│ │Multi-│ [link 0] │ RTS │ │ TF │ │STA BA│ ───────────┴─────┴┬───┬┴─────┴┬────────┬─┴──────┴─────────────── │CTS│ │QoS Null│ ├───┤ ├────────┤ │CTS│ │QoS Data│ └───┘ └────────┘
┌─────┐ │Basic│ [link 1] │ TF │ ─────────────┴─────┴┬────┬────────────────────────────────────── │QoS │ │Null│ └────┘
┌─────┐ │Basic│ [link 2] │ TF │ ─────────────┴─────┴┬────┬────────────────────────────────────── │QoS │ │Null│ └────┘
Sending BSRP TF enabled.
The figure assumes that link 0 is used to send the first Trigger Frame after that the AP MLD requests channel access through the Multi-user scheduler. The first Trigger Frames are all BSRP Trigger Frames, but only the first one solicits the EMLSR client, too. ┌─────┐ ┌─────┐ ┌──────┐ │BSRP │ │Basic│ │Multi-│ [link 0] │ TF │ │ TF │ │STA BA│ ───────────┴─────┴┬────────┬┴─────┴┬────────┬─┴──────┴────────── │QoS Null│ │QoS Data│ ├────────┤ └────────┘ │QoS Null│ └────────┘
┌─────┐ │BSRP │ [link 1] │ TF │ ─────────────┴─────┴┬────┬────────────────────────────────────── │QoS │ │Null│ └────┘
┌─────┐ │BSRP │ [link 2] │ TF │ ─────────────┴─────┴┬────┬────────────────────────────────────── │QoS │ │Null│ └────┘
Definition at line 3776 of file wifi-emlsr-test.cc.
References ns3::CtrlTriggerHeader::GetNUserInfoFields(), ns3::CtrlTriggerHeader::GetType(), ns3::CtrlBAckResponseHeader::IsMultiSta(), m_enableBsrp, EmlsrOperationsTestBase::m_staMacs, EmlsrOperationsTestBase::m_txPsdus, m_txPsdusPos, NS_TEST_ASSERT_MSG_EQ, NS_TEST_ASSERT_MSG_GT, NS_TEST_EXPECT_MSG_EQ, and NS_TEST_EXPECT_MSG_GT.
Referenced by DoRun().
|
overrideprotectedvirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 3752 of file wifi-emlsr-test.cc.
References CheckResults(), ns3::Simulator::Destroy(), EmlsrOperationsTestBase::m_duration, 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 EmlsrOperationsTestBase.
Definition at line 3660 of file wifi-emlsr-test.cc.
References ns3::AC_BE, ns3::CreateObjectWithAttributes(), EmlsrOperationsTestBase::DoSetup(), EmlsrOperationsTestBase::m_apMac, m_enableBsrp, EmlsrOperationsTestBase::m_transitionDelay, ns3::MicroSeconds(), and ns3::Config::SetDefault().
|
overrideprivatevirtual |
Start the generation of traffic (needs to be overridden)
Reimplemented from EmlsrOperationsTestBase.
Definition at line 3763 of file wifi-emlsr-test.cc.
References EmlsrOperationsTestBase::m_apMac, m_startAccessReq, ns3::MilliSeconds(), ns3::Simulator::Now(), NS_LOG_INFO, and NS_TEST_ASSERT_MSG_NE.
|
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 EmlsrOperationsTestBase.
Definition at line 3677 of file wifi-emlsr-test.cc.
References ns3::Time::As(), ns3::WifiPhy::CalculateTxDuration(), EmlsrOperationsTestBase::GetApplication(), ns3::CtrlBAckResponseHeader::IsMultiSta(), ns3::Time::IsZero(), EmlsrOperationsTestBase::m_staMacs, m_startAccessReq, EmlsrOperationsTestBase::m_txPsdus, m_txPsdusPos, ns3::MicroSeconds(), ns3::Simulator::Now(), ns3::Time::NS, NS_LOG_INFO, NS_TEST_EXPECT_MSG_EQ, ns3::Simulator::Schedule(), ns3::StaticCast(), ns3::Simulator::Stop(), EmlsrOperationsTestBase::Transmit(), EmlsrOperationsTestBase::UPLINK, ns3::WIFI_MAC_CTL_BACKRESP, and ns3::WIFI_MAC_CTL_TRIGGER.
|
private |
whether MU scheduler sends BSRP TFs
Definition at line 736 of file wifi-emlsr-test.h.
Referenced by CheckResults(), and DoSetup().
|
private |
start time of the first AP MLD access request via MU scheduler
Definition at line 738 of file wifi-emlsr-test.h.
Referenced by StartTraffic(), and Transmit().
|
private |
position in the vector of TX PSDUs of the first ICF
Definition at line 737 of file wifi-emlsr-test.h.
Referenced by CheckResults(), and Transmit().