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

Test the transmission of UL frames from EMLSR clients. More...

#include "wifi-emlsr-test.h"

+ Inheritance diagram for EmlsrUlTxopTest:
+ Collaboration diagram for EmlsrUlTxopTest:

Classes

struct  Params
 Parameters for the EMLSR UL TXOP test. More...
 

Public Member Functions

 EmlsrUlTxopTest (const Params &params)
 Constructor.
 
 ~EmlsrUlTxopTest () override=default
 
- 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
 
TestCaseoperator= (const TestCase &)=delete
 

Protected Member Functions

void CheckBlockAck (const WifiConstPsduMap &psduMap, const WifiTxVector &txVector, uint8_t linkId)
 Check that appropriate actions are taken when an MLD transmits a PPDU containing BlockAck frames on the given link.
 
void CheckCtsFrames (Ptr< const WifiMpdu > mpdu, const WifiTxVector &txVector, uint8_t linkId)
 Check that appropriate actions are taken by the EMLSR client when receiving a CTS frame on the given link.
 
void CheckInitialControlFrame (Ptr< const WifiMpdu > mpdu, const WifiTxVector &txVector, uint8_t linkId)
 Check that appropriate actions are taken by the AP MLD transmitting an initial Control frame to an EMLSR client on the given link.
 
void CheckQosFrames (const WifiConstPsduMap &psduMap, const WifiTxVector &txVector, uint8_t linkId)
 Check that appropriate actions are taken when an MLD transmits a PPDU containing QoS data frames on the given link.
 
void CheckResults ()
 Check that the simulation produced the expected results.
 
void CheckRtsFrames (Ptr< const WifiMpdu > mpdu, const WifiTxVector &txVector, uint8_t linkId)
 Check that appropriate actions are taken by the EMLSR client when transmitting an RTS frame on the given link.
 
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 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.
 
Ptr< PacketSocketClientGetApplication (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.
 
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 BackoffGenerated (uint32_t backoff, uint8_t linkId)
 Callback invoked when a new backoff value is generated by the EMLSR client.
 
void StartTraffic () override
 Start the generation of traffic (needs to be overridden)
 

Private Attributes

Time m_5thQosFrameTxTime
 start transmission time of the 5th QoS data frame
 
MHz_u m_auxPhyChannelWidth
 max width supported by aux PHYs
 
std::optional< Timem_backoffEndTime
 expected backoff end time on main PHY link
 
MHz_u m_channelWidth
 width of the channels used by MLDs
 
bool m_checkBackoffStarted
 whether we are checking the generated backoff values
 
std::optional< bool > m_corruptCts
 whether the transmitted CTS must be corrupted
 
std::size_t m_countBlockAck
 counter for BlockAck frames
 
std::size_t m_countQoSframes
 counter for QoS frames
 
std::size_t m_countRtsframes
 counter for RTS frames
 
Time m_emlsrEnabledTime
 when EMLSR mode has been enabled on all EMLSR clients
 
std::set< uint8_t > m_emlsrLinks
 IDs of the links on which EMLSR mode has to be enabled.
 
Ptr< ListErrorModelm_errorModel
 error rate model to corrupt packets
 
Time m_firstUlPktsGenTime
 generation time of the first two UL packets
 
bool m_genBackoffIfTxopWithoutTx
 whether the backoff should be invoked when the AC gains the right to start a TXOP but it does not transmit any frame
 
Time m_lastMsdExpiryTime
 expiry time of the last MediumSyncDelay timer
 
Time m_mediumSyncDuration
 duration of the MediumSyncDelay timer
 
uint8_t m_msdMaxNTxops
 Max number of TXOPs that an EMLSR client is allowed to attempt to initiate while the MediumSyncDelay timer is running (zero indicates no limit)
 
std::optional< uint8_t > m_nonEmlsrLink
 ID of the non-EMLSR link (if any)
 
const Time m_unblockMainPhyLinkDelay
 delay between the time the first two UL packets are generated and the time transmissions are unblocked on the link where the main PHY is operating on
 
bool m_useAuxPhyCca
 whether CCA info from aux PHY is used when aux PHY is not TX capable
 

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< ApWifiMacm_apMac
 AP wifi MAC.
 
std::vector< PacketSocketAddressm_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< Timem_paddingDelay
 Padding Delay advertised by the non-AP MLD.
 
std::vector< Ptr< StaWifiMac > > m_staMacs
 MACs of the non-AP MLDs.
 
std::vector< Timem_transitionDelay
 Transition Delay advertised by the non-AP MLD.
 
Time m_transitionTimeout {MicroSeconds(128)}
 Transition Timeout advertised by the AP MLD.
 
std::vector< FrameInfom_txPsdus
 transmitted PSDUs
 
std::vector< PacketSocketAddressm_ulSockets
 packet socket address for UL traffic
 

Detailed Description

Test the transmission of UL frames from EMLSR clients.

This test considers an AP MLD and a non-AP MLD that support EMLSR. The non-AP MLD setups three links, while the set of EMLSR links is configurable. Block ack agreements (for TID 0) for both DL and UL directions are established after that the EML Operating Mode Notification frames are exchanged to enable the EMLSR mode on the EMLSR links. Aux PHYs on the EMLSR client do not switch link, hence the main PHY will switch link (if needed) when terminating a TXOP.

It is checked that:

  • Initially, aux PHYs are configured so that they are unable to transmit frames. Before generating the packets for the first UL data frame, transmissions on the link where the main PHY is operating and on the non-EMLSR link (if any) are blocked. Thus, the first UL data frame is held until transmissions on the link where the main PHY is operating are unblocked. The first UL data frame is sent by the main PHY without RTS protection. When the data frame exchange terminates, the MediumSyncDelay timer is started on the other EMLSR links and the CCA ED threshold is set as expected
  • If there is a non-EMLSR link, another data frame can be sent concurrently (without protection) on the non-EMLSR link
  • When the first UL data frame is transmitted, we make the aux PHYs on the EMLSR client capable of transmitting, we block transmissions on the link where the main PHY is operating and generate new UL packets, which will then be transmitted on a link where an aux PHY is operating. Thus, the aux PHY transmits an RTS frame and the main PHY will take over and transmit the second UL data frame. We check that, while the link on which the main PHY was operating is blocked because another EMLSR link is being used, new backoff values for that link are generated if and only if the QosTxop::GenerateBackoffIfTxopWithoutTx attribute is true; otherwise, a new backoff value is generated when the link is unblocked.
  • When the exchange of the second UL data frame terminates, we make the aux PHY unable to transmit, block transmissions on the non-EMLSR link (if any) and generate some more UL packets, which will then be transmitted by the main PHY. However, a MediumSyncDelay timer is now running on the link where the main PHY is operating, hence transmissions are protected by an RTS frame. We install a post reception error model on the AP MLD so that all RTS frames sent by the EMLSR client are not received by the AP MLD. We check that the EMLSR client makes at most the configured max number of transmission attempts and that another UL data frame is sent once the MediumSyncDelay timer is expired. We also check that the TX width of the RTS frames and the UL data frame equal the channel width used by the main PHY.
  • We check that no issue arises in case an aux PHY sends an RTS frame but the CTS response is not transmitted successfully. Specifically, we check that the main PHY is completing the channel switch when the (unsuccessful) reception of the CTS ends and that a new RTS/CTS exchange is carried out to protect the transmission of the last data frame.
  • While the main PHY is operating on the same link as an aux PHY (which does not switch channel), the aux PHY is put in sleep mode as soon as the main PHY starts operating on the link, stays in sleep mode until the TXOP ends and is resumed from sleep mode right after the end of the DL/UL TXOP.
  • When an aux PHY that is not TX capable gains a TXOP, it checks whether the main PHY can switch to the non-primary link a start an UL TXOP. If the main PHY is switching, the aux PHY waits until the channel switch is completed and checks again; if the remaining backoff time on the primary link is greater than the channel switch delay, the main PHY is requested to switch to the non-primary link of the aux PHY. When the channel switch is completed, if the medium is idle on the non-primary link and the backoff is zero, the main PHY starts an UL TXOP after a PIFS period; otherwise, the main PHY starts an UL TXOP when the backoff timer counts down to zero. The QoS data frame sent by the main PHY is not protected by RTS and the bandwidth it occupies is not affected by possible limitations on the aux PHY TX bandwidth capabilities.

Definition at line 523 of file wifi-emlsr-test.h.

Constructor & Destructor Documentation

◆ EmlsrUlTxopTest()

EmlsrUlTxopTest::EmlsrUlTxopTest ( const Params & params)

Constructor.

Parameters
paramsparameters for the EMLSR UL TXOP test

Definition at line 2376 of file wifi-emlsr-test.cc.

References EmlsrOperationsTestBase::m_duration, m_emlsrLinks, EmlsrOperationsTestBase::m_establishBaDl, EmlsrOperationsTestBase::m_establishBaUl, EmlsrOperationsTestBase::m_linksToEnableEmlsrOn, EmlsrOperationsTestBase::m_mainPhyId, EmlsrOperationsTestBase::m_nEmlsrStations, EmlsrOperationsTestBase::m_nNonEmlsrStations, m_nonEmlsrLink, EmlsrOperationsTestBase::m_transitionDelay, ns3::MicroSeconds(), NS_ABORT_MSG_IF, and ns3::Seconds().

+ Here is the call graph for this function:

◆ ~EmlsrUlTxopTest()

EmlsrUlTxopTest::~EmlsrUlTxopTest ( )
overridedefault

Member Function Documentation

◆ BackoffGenerated()

void EmlsrUlTxopTest::BackoffGenerated ( uint32_t backoff,
uint8_t linkId )
private

Callback invoked when a new backoff value is generated by the EMLSR client.

Parameters
backoffthe generated backoff value
linkIdthe ID of the link for which the backoff value has been generated

Definition at line 2469 of file wifi-emlsr-test.cc.

References ns3::AC_BE, m_backoffEndTime, m_checkBackoffStarted, m_genBackoffIfTxopWithoutTx, EmlsrOperationsTestBase::m_mainPhyId, EmlsrOperationsTestBase::m_staMacs, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_INFO, NS_TEST_EXPECT_MSG_EQ, and ns3::Time::US.

Referenced by DoSetup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckBlockAck()

void EmlsrUlTxopTest::CheckBlockAck ( const WifiConstPsduMap & psduMap,
const WifiTxVector & txVector,
uint8_t linkId )
protected

Check that appropriate actions are taken when an MLD transmits a PPDU containing BlockAck frames on the given link.

Parameters
psduMapthe PSDU carrying BlockAck frames
txVectorthe TXVECTOR used to send the PPDU
linkIdthe ID of the given link

Definition at line 2749 of file wifi-emlsr-test.cc.

References ns3::AC_BE, ns3::Time::As(), ns3::WifiPhy::CalculateTxDuration(), EmlsrOperationsTestBase::GetApplication(), EmlsrOperationsTestBase::m_apMac, m_backoffEndTime, m_checkBackoffStarted, m_countBlockAck, m_lastMsdExpiryTime, EmlsrOperationsTestBase::m_mainPhyId, m_nonEmlsrLink, EmlsrOperationsTestBase::m_staMacs, Max, ns3::Time::MS, ns3::NanoSeconds(), ns3::Simulator::Now(), ns3::Time::NS, NS_LOG_INFO, NS_TEST_ASSERT_MSG_EQ, NS_TEST_EXPECT_MSG_EQ, ns3::Simulator::Schedule(), ns3::Seconds(), EmlsrOperationsTestBase::UPLINK, and ns3::WIFI_QOSDATA_QUEUE.

Referenced by Transmit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckCtsFrames()

void EmlsrUlTxopTest::CheckCtsFrames ( Ptr< const WifiMpdu > mpdu,
const WifiTxVector & txVector,
uint8_t linkId )
protected

Check that appropriate actions are taken by the EMLSR client when receiving a CTS frame on the given link.

Parameters
mpduthe MPDU carrying the CTS frame
txVectorthe TXVECTOR used to send the PPDU
linkIdthe ID of the given link

Definition at line 3086 of file wifi-emlsr-test.cc.

References ns3::WifiPhy::CalculateTxDuration(), ns3::Time::IsZero(), EmlsrOperationsTestBase::m_apMac, m_corruptCts, m_errorModel, m_firstUlPktsGenTime, EmlsrOperationsTestBase::m_mainPhyId, m_nonEmlsrLink, EmlsrOperationsTestBase::m_staMacs, ns3::MAX_PROPAGATION_DELAY_USEC, ns3::MicroSeconds(), ns3::NanoSeconds(), NS_LOG_INFO, NS_TEST_EXPECT_MSG_EQ, ns3::Simulator::Schedule(), and ns3::ListErrorModel::SetList().

Referenced by Transmit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckInitialControlFrame()

void EmlsrUlTxopTest::CheckInitialControlFrame ( Ptr< const WifiMpdu > mpdu,
const WifiTxVector & txVector,
uint8_t linkId )
protected

Check that appropriate actions are taken by the AP MLD transmitting an initial Control frame to an EMLSR client on the given link.

Parameters
mpduthe MPDU carrying the MU-RTS TF
txVectorthe TXVECTOR used to send the PPDU
linkIdthe ID of the given link

Definition at line 3021 of file wifi-emlsr-test.cc.

References ns3::WifiPhy::CalculateTxDuration(), ns3::CtrlTriggerHeader::IsMuRts(), EmlsrOperationsTestBase::m_mainPhyId, m_nonEmlsrLink, EmlsrOperationsTestBase::m_staMacs, ns3::NanoSeconds(), NS_TEST_EXPECT_MSG_EQ, and ns3::Simulator::Schedule().

Referenced by Transmit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckQosFrames()

void EmlsrUlTxopTest::CheckQosFrames ( const WifiConstPsduMap & psduMap,
const WifiTxVector & txVector,
uint8_t linkId )
protected

Check that appropriate actions are taken when an MLD transmits a PPDU containing QoS data frames on the given link.

Parameters
psduMapthe PSDU(s) carrying QoS data frames
txVectorthe TXVECTOR used to send the PPDU
linkIdthe ID of the given link

Definition at line 2614 of file wifi-emlsr-test.cc.

References ns3::AC_BE, ns3::WifiPhy::CalculateTxDuration(), EmlsrOperationsTestBase::CheckBlockedLink(), EmlsrOperationsTestBase::GetApplication(), EmlsrOperationsTestBase::m_apMac, m_countQoSframes, EmlsrOperationsTestBase::m_mainPhyId, m_nonEmlsrLink, EmlsrOperationsTestBase::m_staMacs, ns3::MAX_PROPAGATION_DELAY_USEC, ns3::MicroSeconds(), NS_LOG_INFO, ns3::Simulator::Schedule(), ns3::Simulator::ScheduleNow(), EmlsrOperationsTestBase::UPLINK, and ns3::WIFI_QOSDATA_QUEUE.

Referenced by Transmit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckResults()

void EmlsrUlTxopTest::CheckResults ( )
protected

Check that the simulation produced the expected results.

EMLSR client with EMLSR mode enabled on all links (main PHY ID = 1).

main PHY│ blocked,│ aux PHYs││main PHY blocked│ cannot │ transmit│ │ ┌───┐ ┌──┐ [link 0] │CTS│ │BA│ ────────────────────────┬───┬┴───┴┬───┬───┬┴──┴───────────────────────────────────────── │RTS│ │QoS│QoS│ └───┘ │ 6 │ 7 │ └───┴───┘ gen backoff gen backoff if MediumSyncDelay ┌──┐ (also many times) not running timer expired ┌──┐ [link 1] │BA│ │ if allowed │ │ │BA│ ─────────┬───┬───┬┴──┴───────────────────────────┬───┬─────┬───┬────┬───┬───┬┴──┴─────── │QoS│QoS│ │RTS│ ... │RTS│ │QoS│QoS│ │ 4 │ 5 │ └───┘ └───┘ │ 8 │ 9 │ └───┴───┘ └───┴───┘

[link 2] ───────────────────────────────────────────────────────────────────────────

EMLSR client with EMLSR mode enabled on links 0 and 1 (main PHY ID = 1).

main PHY │ and │ non-EMLSR│ link │ blocked,│ aux PHYs││main PHY blocked│ cannot │ transmit│ │ ┌───┐ ┌──┐ [link 0] │CTS│ │BA│ ────────────────────────┬───┬┴───┴┬───┬───┬┴──┴───────────────────────────────────────── │RTS│ │QoS│QoS│ └───┘ │ 8 │ 9 │ └───┴───┘ gen backoff gen backoff if MediumSyncDelay ┌──┐ (also many times) not running timer expired ┌──┐ [link 1] │BA│ │ if allowed │ │ │BA│ ─────────┬───┬───┬┴──┴───────────────────────────┬───┬─────┬───┬────┬───┬───┬┴──┴─────── │QoS│QoS│ │RTS│ ... │RTS│ │QoS│QoS│ │ 4 │ 5 │ └───┘ └───┘ │ 10│ 11│ └───┴───┘ └───┴───┘ ┌──┐ [link 2] │BA│ ──────────┬───┬───┬┴──┴──────────────────────────────────────────────────────────── │QoS│QoS│ │ 6 │ 7 │ └───┴───┘

For both scenarios, after the last frame exchange on the main PHY link, we have the following frame exchanges on an EMLSR link where an aux PHY is operating on. After the first frame exchange, aux PHYs are configured as non-TX capable. Note that the two frame exchanges may occur on distinct non-primary EMLSR links.

                                        | main PHY || main PHY  |

[ link ] ┌───┐ ┌───┐ ┌──┐| switches ||switches to| ┌──┐ [0 or 2] │CTS│ │CTS│ │BA│|to primary||non-primary|PIFS| │BA│ ──────┬───┬┴───X────┬───┬┴───┴┬───┬───┬┴──┴─────────────────────────────┬───┬───┬┴──┴──── │RTS│ │RTS│ │QoS│QoS│ │QoS│QoS│ └───┘ └───┘ │ X │ Y │ │ Z │ W │ └───┴───┘ └───┴───┘ For all EMLSR links scenario, X=10, Y=11, Z=12, W=13 For the scenario with a non-EMLSR link, X=12, Y=13, Z=14, W=15

Definition at line 3155 of file wifi-emlsr-test.cc.

References ns3::WifiPhy::CalculateTxDuration(), ns3::CtrlTriggerHeader::IsMuRts(), m_5thQosFrameTxTime, m_auxPhyChannelWidth, m_channelWidth, m_countRtsframes, m_firstUlPktsGenTime, m_genBackoffIfTxopWithoutTx, m_lastMsdExpiryTime, EmlsrOperationsTestBase::m_mainPhyId, m_msdMaxNTxops, m_nonEmlsrLink, EmlsrOperationsTestBase::m_staMacs, EmlsrOperationsTestBase::m_txPsdus, m_unblockMainPhyLinkDelay, m_useAuxPhyCca, NS_TEST_ASSERT_MSG_EQ, NS_TEST_EXPECT_MSG_EQ, NS_TEST_EXPECT_MSG_GT_OR_EQ, NS_TEST_EXPECT_MSG_LT, NS_TEST_EXPECT_MSG_LT_OR_EQ, and NS_TEST_EXPECT_MSG_NE.

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckRtsFrames()

void EmlsrUlTxopTest::CheckRtsFrames ( Ptr< const WifiMpdu > mpdu,
const WifiTxVector & txVector,
uint8_t linkId )
protected

Check that appropriate actions are taken by the EMLSR client when transmitting an RTS frame on the given link.

Parameters
mpduthe MPDU carrying the RTS frame
txVectorthe TXVECTOR used to send the PPDU
linkIdthe ID of the given link

Definition at line 3048 of file wifi-emlsr-test.cc.

References ns3::CreateObject(), ns3::WifiTxVector::GetChannelWidth(), ns3::Time::IsZero(), m_corruptCts, m_countRtsframes, m_errorModel, m_firstUlPktsGenTime, EmlsrOperationsTestBase::m_mainPhyId, EmlsrOperationsTestBase::m_staMacs, NS_LOG_INFO, NS_TEST_EXPECT_MSG_EQ, and ns3::ListErrorModel::SetList().

Referenced by Transmit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoRun()

void EmlsrUlTxopTest::DoRun ( )
overrideprotectedvirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 3144 of file wifi-emlsr-test.cc.

References CheckResults(), ns3::Simulator::Destroy(), EmlsrOperationsTestBase::m_duration, ns3::Simulator::Run(), and ns3::Simulator::Stop().

+ Here is the call graph for this function:

◆ DoSetup()

void EmlsrUlTxopTest::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 EmlsrOperationsTestBase.

Definition at line 2419 of file wifi-emlsr-test.cc.

References ns3::AC_BE, BackoffGenerated(), ns3::CreateObject(), EmlsrOperationsTestBase::DoSetup(), EmlsrOperationsTestBase::m_apMac, m_auxPhyChannelWidth, m_channelWidth, m_errorModel, m_genBackoffIfTxopWithoutTx, EmlsrOperationsTestBase::m_mainPhyId, m_mediumSyncDuration, m_msdMaxNTxops, EmlsrOperationsTestBase::m_staMacs, m_useAuxPhyCca, ns3::MakeCallback(), ns3::MicroSeconds(), ns3::Config::SetDefault(), ns3::WIFI_PHY_BAND_2_4GHZ, ns3::WIFI_PHY_BAND_5GHZ, and ns3::WIFI_PHY_BAND_6GHZ.

+ Here is the call graph for this function:

◆ StartTraffic()

void EmlsrUlTxopTest::StartTraffic ( )
overrideprivatevirtual

Start the generation of traffic (needs to be overridden)

Reimplemented from EmlsrOperationsTestBase.

Definition at line 2570 of file wifi-emlsr-test.cc.

References EmlsrOperationsTestBase::GetApplication(), EmlsrOperationsTestBase::m_apMac, m_firstUlPktsGenTime, EmlsrOperationsTestBase::m_mainPhyId, m_nonEmlsrLink, EmlsrOperationsTestBase::m_staMacs, m_unblockMainPhyLinkDelay, ns3::MilliSeconds(), ns3::Simulator::Now(), NS_LOG_INFO, ns3::Simulator::Schedule(), and EmlsrOperationsTestBase::UPLINK.

+ Here is the call graph for this function:

◆ Transmit()

void EmlsrUlTxopTest::Transmit ( Ptr< WifiMac > mac,
uint8_t phyId,
WifiConstPsduMap psduMap,
WifiTxVector txVector,
double txPowerW )
overrideprotectedvirtual

Callback invoked when a FEM passes PSDUs to the PHY.

Parameters
macthe MAC transmitting the PSDUs
phyIdthe ID of the PHY transmitting the PSDUs
psduMapthe PSDU map
txVectorthe TX vector
txPowerWthe tx power in Watts

Reimplemented from EmlsrOperationsTestBase.

Definition at line 2526 of file wifi-emlsr-test.cc.

References CheckBlockAck(), CheckCtsFrames(), CheckInitialControlFrame(), CheckQosFrames(), CheckRtsFrames(), EmlsrOperationsTestBase::m_mainPhyId, EmlsrOperationsTestBase::m_txPsdus, NS_ASSERT_MSG, NS_TEST_EXPECT_MSG_EQ, EmlsrOperationsTestBase::Transmit(), ns3::WIFI_MAC_CTL_BACKRESP, ns3::WIFI_MAC_CTL_CTS, ns3::WIFI_MAC_CTL_RTS, ns3::WIFI_MAC_CTL_TRIGGER, ns3::WIFI_MAC_MGT_ASSOCIATION_REQUEST, and ns3::WIFI_MAC_QOSDATA.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_5thQosFrameTxTime

Time EmlsrUlTxopTest::m_5thQosFrameTxTime
private

start transmission time of the 5th QoS data frame

Definition at line 663 of file wifi-emlsr-test.h.

Referenced by CheckResults().

◆ m_auxPhyChannelWidth

MHz_u EmlsrUlTxopTest::m_auxPhyChannelWidth
private

max width supported by aux PHYs

Definition at line 639 of file wifi-emlsr-test.h.

Referenced by CheckResults(), and DoSetup().

◆ m_backoffEndTime

std::optional<Time> EmlsrUlTxopTest::m_backoffEndTime
private

expected backoff end time on main PHY link

Definition at line 652 of file wifi-emlsr-test.h.

Referenced by BackoffGenerated(), and CheckBlockAck().

◆ m_channelWidth

MHz_u EmlsrUlTxopTest::m_channelWidth
private

width of the channels used by MLDs

Definition at line 638 of file wifi-emlsr-test.h.

Referenced by CheckResults(), and DoSetup().

◆ m_checkBackoffStarted

bool EmlsrUlTxopTest::m_checkBackoffStarted
private

whether we are checking the generated backoff values

Definition at line 651 of file wifi-emlsr-test.h.

Referenced by BackoffGenerated(), and CheckBlockAck().

◆ m_corruptCts

std::optional<bool> EmlsrUlTxopTest::m_corruptCts
private

whether the transmitted CTS must be corrupted

Definition at line 662 of file wifi-emlsr-test.h.

Referenced by CheckCtsFrames(), and CheckRtsFrames().

◆ m_countBlockAck

std::size_t EmlsrUlTxopTest::m_countBlockAck
private

counter for BlockAck frames

Definition at line 655 of file wifi-emlsr-test.h.

Referenced by CheckBlockAck().

◆ m_countQoSframes

std::size_t EmlsrUlTxopTest::m_countQoSframes
private

counter for QoS frames

Definition at line 654 of file wifi-emlsr-test.h.

Referenced by CheckQosFrames().

◆ m_countRtsframes

std::size_t EmlsrUlTxopTest::m_countRtsframes
private

counter for RTS frames

Definition at line 656 of file wifi-emlsr-test.h.

Referenced by CheckResults(), and CheckRtsFrames().

◆ m_emlsrEnabledTime

Time EmlsrUlTxopTest::m_emlsrEnabledTime
private

when EMLSR mode has been enabled on all EMLSR clients

Definition at line 645 of file wifi-emlsr-test.h.

◆ m_emlsrLinks

std::set<uint8_t> EmlsrUlTxopTest::m_emlsrLinks
private

IDs of the links on which EMLSR mode has to be enabled.

Definition at line 637 of file wifi-emlsr-test.h.

Referenced by EmlsrUlTxopTest().

◆ m_errorModel

Ptr<ListErrorModel> EmlsrUlTxopTest::m_errorModel
private

error rate model to corrupt packets

Definition at line 653 of file wifi-emlsr-test.h.

Referenced by CheckCtsFrames(), CheckRtsFrames(), and DoSetup().

◆ m_firstUlPktsGenTime

Time EmlsrUlTxopTest::m_firstUlPktsGenTime
private

generation time of the first two UL packets

Definition at line 646 of file wifi-emlsr-test.h.

Referenced by CheckCtsFrames(), CheckResults(), CheckRtsFrames(), and StartTraffic().

◆ m_genBackoffIfTxopWithoutTx

bool EmlsrUlTxopTest::m_genBackoffIfTxopWithoutTx
private

whether the backoff should be invoked when the AC gains the right to start a TXOP but it does not transmit any frame

Definition at line 657 of file wifi-emlsr-test.h.

Referenced by BackoffGenerated(), CheckResults(), and DoSetup().

◆ m_lastMsdExpiryTime

Time EmlsrUlTxopTest::m_lastMsdExpiryTime
private

expiry time of the last MediumSyncDelay timer

Definition at line 650 of file wifi-emlsr-test.h.

Referenced by CheckBlockAck(), and CheckResults().

◆ m_mediumSyncDuration

Time EmlsrUlTxopTest::m_mediumSyncDuration
private

duration of the MediumSyncDelay timer

Definition at line 640 of file wifi-emlsr-test.h.

Referenced by DoSetup().

◆ m_msdMaxNTxops

uint8_t EmlsrUlTxopTest::m_msdMaxNTxops
private

Max number of TXOPs that an EMLSR client is allowed to attempt to initiate while the MediumSyncDelay timer is running (zero indicates no limit)

Definition at line 641 of file wifi-emlsr-test.h.

Referenced by CheckResults(), and DoSetup().

◆ m_nonEmlsrLink

std::optional<uint8_t> EmlsrUlTxopTest::m_nonEmlsrLink
private

ID of the non-EMLSR link (if any)

Definition at line 644 of file wifi-emlsr-test.h.

Referenced by EmlsrUlTxopTest(), CheckBlockAck(), CheckCtsFrames(), CheckInitialControlFrame(), CheckQosFrames(), CheckResults(), and StartTraffic().

◆ m_unblockMainPhyLinkDelay

const Time EmlsrUlTxopTest::m_unblockMainPhyLinkDelay
private

delay between the time the first two UL packets are generated and the time transmissions are unblocked on the link where the main PHY is operating on

Definition at line 647 of file wifi-emlsr-test.h.

Referenced by CheckResults(), and StartTraffic().

◆ m_useAuxPhyCca

bool EmlsrUlTxopTest::m_useAuxPhyCca
private

whether CCA info from aux PHY is used when aux PHY is not TX capable

Definition at line 660 of file wifi-emlsr-test.h.

Referenced by CheckResults(), and DoSetup().


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