20 #ifndef WIFI_EMLSR_TEST_H
21 #define WIFI_EMLSR_TEST_H
23 #include "ns3/ap-wifi-mac.h"
24 #include "ns3/error-model.h"
25 #include "ns3/header-serialization-test.h"
26 #include "ns3/packet-socket-address.h"
27 #include "ns3/packet-socket-client.h"
28 #include "ns3/sta-wifi-mac.h"
30 #include "ns3/wifi-mac-queue-scheduler.h"
31 #include "ns3/wifi-mac.h"
32 #include "ns3/wifi-ppdu.h"
33 #include "ns3/wifi-psdu.h"
53 void DoRun()
override;
136 std::string description,
137 bool testUnblockedForOtherReasons =
true);
139 void DoSetup()
override;
151 uint8_t m_mainPhyId{0};
154 std::size_t m_nEmlsrStations{1};
155 std::size_t m_nNonEmlsrStations{0};
158 std::vector<Time> m_paddingDelay{
160 std::vector<Time> m_transitionDelay{
162 bool m_establishBaDl{
false};
164 bool m_establishBaUl{
false};
171 uint16_t m_lastAid{0};
227 void DoSetup()
override;
228 void DoRun()
override;
233 double txPowerW)
override;
284 void CheckEmlsrLinks();
378 void DoSetup()
override;
379 void DoRun()
override;
384 double txPowerW)
override;
448 void StartTraffic()
override;
453 void EnableEmlsrMode();
539 void DoSetup()
override;
540 void DoRun()
override;
545 double txPowerW)
override;
597 void StartTraffic()
override;
605 void BackoffGenerated(uint32_t backoff, uint8_t linkId);
675 void DoSetup()
override;
676 void DoRun()
override;
681 double txPowerW)
override;
Test the exchange of EML Operating Mode Notification frames.
std::list< uint64_t > m_uidList
list of UIDs of packets to corrupt
std::size_t m_checkEmlsrLinksCount
counter for the number of times CheckEmlsrLinks is called (should be two: when the transition timeout...
Ptr< ListErrorModel > m_errorModel
error rate model to corrupt packets at AP MLD
std::size_t m_emlNotificationDroppedCount
counter for the number of times the EML Notification frame sent by the non-AP MLD has been dropped du...
~EmlOmnExchangeTest() override=default
Test EML Operating Mode Notification frame serialization and deserialization.
~EmlOperatingModeNotificationTest() override=default
Test the transmission of DL frames to EMLSR clients.
const Time m_fe2to3delay
time interval between 2nd and 3rd frame exchange sequences after the enablement of EMLSR mode
Ptr< ListErrorModel > m_errorModel
error rate model to corrupt BlockAck at AP MLD
std::size_t m_countQoSframes
counter for QoS frames (transition delay test)
~EmlsrDlTxopTest() override=default
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.
std::size_t m_countBlockAck
counter for BlockAck frames (transition delay test)
Test the switching of PHYs on EMLSR clients.
bool m_resetCamState
whether to reset the state of the ChannelAccessManager associated with the link on which the main PHY...
uint16_t m_auxPhyMaxChWidth
max channel width (MHz) supported by aux PHYs
~EmlsrLinkSwitchTest() override=default
std::size_t m_countQoSframes
counter for QoS data frames
std::size_t m_txPsdusPos
a position in the vector of TX PSDUs
bool m_switchAuxPhy
whether AUX PHY should switch channel to operate on the link on which the Main PHY was operating befo...
Base class for EMLSR Operations tests.
std::vector< PacketSocketAddress > m_dlSockets
packet socket address for DL traffic
std::set< uint8_t > m_linksToEnableEmlsrOn
IDs of the links on which EMLSR mode has to be enabled.
Ptr< ApWifiMac > m_apMac
AP wifi MAC.
~EmlsrOperationsTestBase() override=default
TrafficDirection
Enumeration for traffic directions.
std::vector< FrameInfo > m_txPsdus
transmitted PSDUs
std::vector< PacketSocketAddress > m_ulSockets
packet socket address for UL traffic
std::vector< Ptr< StaWifiMac > > m_staMacs
MACs of the non-AP MLDs.
virtual void StartTraffic()
Start the generation of traffic (needs to be overridden)
Test the transmission of UL frames from EMLSR clients.
std::size_t m_countQoSframes
counter for QoS frames
Time m_emlsrEnabledTime
when EMLSR mode has been enabled on all EMLSR clients
const Time m_unblockMainPhyLinkDelay
delay between the time the first two UL packets are generated and the time transmissions are unblocke...
Ptr< ListErrorModel > m_errorModel
error rate model to corrupt packets
uint16_t m_channelWidth
width (MHz) of the channels used by MLDs
std::optional< uint8_t > m_nonEmlsrLink
ID of the non-EMLSR link (if any)
Time m_lastMsdExpiryTime
expiry time of the last MediumSyncDelay timer
std::size_t m_countRtsframes
counter for RTS frames
Time m_firstUlPktsGenTime
generation time of the first two UL packets
std::optional< bool > m_corruptCts
whether the transmitted CTS must be corrupted
~EmlsrUlTxopTest() override=default
std::optional< Time > m_backoffEndTime
expected backoff end time on main PHY link
std::set< uint8_t > m_emlsrLinks
IDs of the links on which EMLSR mode has to be enabled.
Time m_mediumSyncDuration
duration of the MediumSyncDelay timer
bool m_genBackoffIfTxopWithoutTx
whether the backoff should be invoked when the AC gains the right to start a TXOP but it does not tra...
bool m_checkBackoffStarted
whether we are checking the generated backoff values
std::size_t m_countBlockAck
counter for BlockAck frames
uint8_t m_msdMaxNTxops
Max number of TXOPs that an EMLSR client is allowed to attempt to initiate while the MediumSyncDelay ...
uint16_t m_auxPhyChannelWidth
max width (MHz) supported by aux PHYs
Simulation virtual time values and global simulation resolution.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
WifiMacDropReason
The reason why an MPDU was dropped.
WifiQueueBlockedReason
Enumeration of the reasons to block container queues.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
params
Fit Fluctuating Two Ray model to the 3GPP TR 38.901 using the Anderson-Darling goodness-of-fit ##.
Parameters for the EMLSR DL TXOP test.
std::vector< Time > paddingDelay
vector (whose size equals nEmlsrStations) of the padding delay values advertised by non-AP MLDs
std::size_t nNonEmlsrStations
number of non-AP MLDs that do not support EMLSR
std::set< uint8_t > linksToEnableEmlsrOn
IDs of links on which EMLSR mode should be enabled.
Time transitionTimeout
the Transition Timeout advertised by the AP MLD
std::vector< Time > transitionDelay
vector (whose size equals nEmlsrStations) of transition the delay values advertised by non-AP MLDs
std::size_t nEmlsrStations
number of non-AP MLDs that support EMLSR
Parameters for the EMLSR link switching test.
bool switchAuxPhy
whether AUX PHY should switch channel to operate on the link on which the Main PHY was operating befo...
uint16_t auxPhyMaxChWidth
max channel width (MHz) supported by aux PHYs
bool resetCamState
whether to reset the state of the ChannelAccessManager associated with the link on which the main PHY...
Information about transmitted frames.
WifiConstPsduMap psduMap
transmitted PSDU map
uint8_t phyId
ID of the transmitting PHY.
WifiTxVector txVector
TXVECTOR.
Time startTx
TX start time.
Parameters for the EMLSR UL TXOP test.
uint16_t auxPhyChannelWidth
max width (MHz) supported by aux PHYs
bool genBackoffIfTxopWithoutTx
whether the backoff should be invoked when the AC gains the right to start a TXOP but it does not tra...
uint8_t msdMaxNTxops
Max number of TXOPs that an EMLSR client is allowed to attempt to initiate while the MediumSyncDelay ...
uint16_t channelWidth
width (MHz) of the channels used by MLDs
Time mediumSyncDuration
duration of the MediumSyncDelay timer
std::set< uint8_t > linksToEnableEmlsrOn
IDs of links on which EMLSR mode should be enabled.
uint32_t pktSize
packet size used for the simulation (in bytes)