16#include "ns3/eht-configuration.h"
17#include "ns3/wifi-export.h"
150 friend class ::AmpduAggregationTest;
151 friend class ::MultiLinkOperationsTestBase;
152 friend class ::ProbeExchTest;
177 std::list<SetupLinksInfo>
252 const std::vector<uint8_t>& apLinkIds,
253 std::optional<uint8_t> apMldId)
const;
433 StaLinkEntity& GetLink(uint8_t linkId)
const;
441 StaLinkEntity& GetStaLink(
const std::unique_ptr<WifiMac::LinkEntity>& link)
const;
457 void DoCompleteConfig()
override;
464 void SetActiveProbing(
bool enable);
470 bool GetActiveProbing()
const;
481 bool CheckSupportedRates(std::variant<MgtBeaconHeader, MgtProbeResponseHeader> frame,
485 std::unique_ptr<LinkEntity> CreateLinkEntity()
const override;
521 void RecordOperations(
const MgtResponseFrameType& frame,
534 void ApplyOperationalSettings(
const MgtResponseFrameType& frame,
547 std::variant<MgtAssocRequestHeader, MgtReassocRequestHeader> GetAssociationRequest(
549 uint8_t linkId)
const;
559 void SendAssociationRequest(
bool isReassoc);
564 void TryToEnsureAssociated();
571 void AssocRequestTimeout(
bool isReassoc);
576 void StartScanning();
582 bool IsWaitAssocResp()
const;
587 void MissedBeacons();
593 void RestartBeaconWatchdog(
Time delay);
597 void Disassociated();
606 void UpdateQueuedFramesAddresses(
Mac48Address apAddr,
bool isMldAddr);
624 MultiLinkElement GetBasicMultiLinkElement(
bool isReassoc, uint8_t linkId)
const;
633 MultiLinkElement GetProbeReqMultiLinkElement(
const std::vector<uint8_t>& apLinkIds,
634 std::optional<uint8_t> apMldId)
const;
640 std::vector<TidToLinkMapping> GetTidToLinkMappingElements(
648 void SetState(MacState value);
Base class for Multi-Link Operations tests.
Probe Request-Probe Response exchange.
EmlsrManager is an abstract base class defining the API that EHT non-AP MLDs with EMLSR activated can...
An identifier for simulation events.
static Mac48Address GetBroadcast()
PowerSaveManager is an abstract base class.
Smart pointer class similar to boost::intrusive_ptr.
The basic uniform Random Number Generator (RNG).
The IEEE 802.11 SSID Information Element.
std::set< uint8_t > GetSetupLinkIds() const
Get the IDs of the setup links (if any).
void ScanningTimeout(const std::optional< ApInfo > &bestAp)
This method is called after wait beacon timeout or wait probe request timeout has occurred.
Time m_waitBeaconTimeout
wait beacon timeout
int64_t AssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
void SetPowerSaveMode(const std::pair< bool, uint8_t > &enableLinkIdPair)
Enable or disable Power Save mode on the given link.
Ptr< WifiAssocManager > m_assocManager
Association Manager.
bool m_activeProbing
active probing
void DoInitialize() override
Initialize() implementation.
void SetAssocManager(Ptr< WifiAssocManager > assocManager)
Set the Association Manager.
void NotifyEmlsrModeChanged(uint8_t txLinkId, const std::set< uint8_t > &linkIds)
Notify the MAC that EMLSR mode has changed on the given set of links.
bool CanForwardPacketsTo(Mac48Address to) const override
Return true if packets can be forwarded to the given destination, false otherwise.
Time m_beaconWatchdogEnd
beacon watchdog end
bool m_enableScanning
enable channel scanning
void SetEdcaParameters(const EdcaParams ¶ms, uint8_t linkId)
Set the EDCA parameters for the given link.
void SetPowerSaveManager(Ptr< PowerSaveManager > powerSaveManager)
Set the Power Save Manager.
TracedCallback< Mac48Address > m_deAssocLogger
disassociation logger
MacState
The current MAC state of the STA.
void NotifyChannelSwitching(uint8_t linkId) override
Notify that channel on the given link has been switched.
EventId m_beaconWatchdog
beacon watchdog
void PhyCapabilitiesChanged()
Indicate that PHY capabilities have changed.
WifiAssocType m_assocType
type of association
void SetPmModeAfterAssociation(uint8_t linkId)
Set the Power Management mode of the setup links after association.
WifiScanParams::Channel GetCurrentChannel(uint8_t linkId) const
Get the current primary20 channel used on the given link as a (channel number, PHY band) pair.
uint16_t GetAssociationId() const
Return the association ID.
void ForceDisassociation(bool notifyAp)
Force the STA to disassociate from the current AP.
void NotifySwitchingEmlsrLink(Ptr< WifiPhy > phy, uint8_t linkId, Time delay)
Notify that the given PHY switched channel to operate on another EMLSR link.
std::optional< Mac48Address > m_prevApAddr
the address (MLD address for ML setup, link address for legacy association) of the AP this STA was pr...
static TypeId GetTypeId()
Get the type ID.
void CancelEmlsrPhyConnectEvent(uint8_t phyId)
Cancel any scheduled event for connecting the given PHY to an EMLSR link.
void(*)(uint8_t, Mac48Address) LinkSetupCallback
TracedCallback signature for link setup completed/canceled events.
void DoDispose() override
Destructor implementation.
void BlockTxOnLink(uint8_t linkId, WifiQueueBlockedReason reason)
Block transmissions on the given link for the given reason.
std::map< uint8_t, EventId > m_emlsrLinkSwitch
maps PHY ID to the event scheduled to switch the corresponding PHY to a new EMLSR link
Time m_disassocTimeout
disassociation timeout
uint32_t m_maxMissedBeacons
maximum missed beacons
TracedCallback< uint8_t, Mac48Address > m_setupCompleted
link setup completed logger
TracedCallback< Mac48Address > m_assocLogger
association logger
void NotifyChannelReleased(Ptr< Txop > txop, uint8_t linkId) override
Notify that the given TXOP has released the channel on the given link.
void SetWifiPhys(const std::vector< Ptr< WifiPhy > > &phys) override
void SetMuEdcaParameters(const MuEdcaParams ¶ms, uint8_t linkId)
Set the MU EDCA parameters for the given link.
friend class WifiStaticSetupHelper
void SetEmlsrManager(Ptr< EmlsrManager > emlsrManager)
Set the EMLSR Manager.
Ptr< PowerSaveManager > GetPowerSaveManager() const
Time m_pmModeSwitchTimeout
PM mode switch timeout.
Ptr< EmlsrManager > GetEmlsrManager() const
EventId m_disassocEvent
disassociation event
void TxOk(Ptr< const WifiMpdu > mpdu)
Notify that the MPDU we sent was successfully received by the receiver (i.e.
MgtProbeRequestHeader GetProbeRequest(uint8_t linkId) const
Get the frame body of the Probe Request to transmit on the given link.
void EnqueuePsPoll(uint8_t linkId)
Enqueue a PS-Poll frame to be sent on the given link.
MgtProbeRequestHeader GetMultiLinkProbeRequest(uint8_t linkId, const std::vector< uint8_t > &apLinkIds, std::optional< uint8_t > apMldId) const
Get the frame body of the Multi-Link Probe Request to transmit on the given link.
void NotifyReceivedFrameAfterPsPoll(Ptr< const WifiMpdu > mpdu, uint8_t linkId)
Notify the reception of a frame in response to a PS-Poll frame on the given link.
WifiTidLinkMapping m_ulTidLinkMappingInAssocReq
store the UL TID-to-Link Mapping included in the Association Request frame
Ptr< WifiAssocManager > GetAssocManager() const
WifiPowerManagementMode GetPmMode(uint8_t linkId) const
Ptr< RandomVariableStream > m_probeDelay
RandomVariable used to randomize the time of the first Probe Response on each channel.
TracedCallback< ApInfo > m_beaconInfo
beacon info logger
uint16_t m_aid
Association AID.
void(*)(uint8_t, Ptr< WifiPhy >) EmlsrLinkSwitchCallback
TracedCallback signature for EMLSR link switch events.
MacState m_state
MAC state.
bool IsEmlsrLink(uint8_t linkId) const
WifiAssocType GetAssocType() const
void NotifyRequestAccess(Ptr< Txop > txop, uint8_t linkId) override
Notify that the given TXOP is requesting channel access on the given link.
TracedCallback< Time > m_beaconArrival
beacon arrival logger
void UnblockTxOnLink(std::set< uint8_t > linkIds, WifiQueueBlockedReason reason)
Unblock transmissions on the given links for the given reason.
Ptr< EmlsrManager > m_emlsrManager
EMLSR Manager.
Time m_assocRequestTimeout
association request timeout
Time m_probeRequestTimeout
probe request timeout
CapabilityInformation GetCapabilities(uint8_t linkId) const
Return the Capability information for the given link.
bool IsAssociated() const
Return whether we are associated with an AP.
Ptr< PowerSaveManager > m_powerSaveManager
Power Save Manager.
EventId m_assocRequestEvent
association request event
void EnqueueProbeRequest(const MgtProbeRequestHeader &probeReq, uint8_t linkId, const Mac48Address &addr1=Mac48Address::GetBroadcast(), const Mac48Address &addr3=Mac48Address::GetBroadcast())
Enqueue the given probe request packet for transmission on the given link.
TracedCallback< uint8_t, Ptr< WifiPhy >, bool > m_emlsrLinkSwitchLogger
EMLSR link switch logger.
WifiTidLinkMapping m_dlTidLinkMappingInAssocReq
store the DL TID-to-Link Mapping included in the Association Request frame
The Supported Rates Information Element.
Simulation virtual time values and global simulation resolution.
Forward calls to a chain of Callback.
a unique identifier for an interface.
Abstract base class for the Association Manager, which manages scanning and association for single li...
std::variant< MgtBeaconHeader, MgtProbeResponseHeader, MgtAssocResponseHeader > MgtResponseFrameType
type of the management response frames
WifiScanType
Scan type (active or passive).
WifiPowerManagementMode
Enumeration for power management modes.
WifiPhyBand
Identifies the PHY band.
WifiQueueBlockedReason
Enumeration of the reasons to block container queues.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
WifiAssocType
Type of association performed by this device (provided that it is supported by the standard configure...
@ WIFI_PM_SWITCHING_TO_ACTIVE
@ WIFI_PM_SWITCHING_TO_PS
@ WIFI_PHY_BAND_UNSPECIFIED
Unspecified.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
WifiTidToLinkMappingNegSupport
TID-to-Link Mapping Negotiation Support.
std::ostream & operator<<(std::ostream &os, const Angles &a)
std::map< tid_t, std::set< linkId_t > > WifiTidLinkMapping
TID-indexed map of the link set to which the TID is mapped.
uint8_t linkId_t
IEEE 802.11be D7.0 Figure 9-207e—Link ID Info field format.
Struct containing all supported rates.
Information about links to setup.
uint8_t apLinkId
AP link ID.
uint8_t localLinkId
local link ID
Struct to hold information regarding observed AP through active/passive scanning.
WifiScanParams::Channel m_channel
The channel the management frame was received on.
std::list< SetupLinksInfo > m_setupLinks
information about the links to setup between MLDs
MgtResponseFrameType m_frame
The body of the management frame used to update AP info.
Mac48Address m_apAddr
AP MAC address.
uint8_t m_linkId
ID of the link used to communicate with the AP.
Mac48Address m_bssid
BSSID.
double m_snr
SNR in linear scale.
uint32_t cwMax
the maximum contention window size
AcIndex ac
the access category
uint32_t cwMin
the minimum contention window size
uint8_t aifsn
the number of slots that make up an AIFS
Time txopLimit
the TXOP limit
Time muEdcaTimer
the MU EDCA timer
uint8_t aifsn
the number of slots that make up an AIFS
uint32_t cwMin
the minimum contention window size
AcIndex ac
the access category
uint32_t cwMax
the maximum contention window size
Structure holding information specific to a single link.
bool sendAssocReq
whether this link is used to send the Association Request frame
std::optional< Mac48Address > bssid
BSSID of the AP to associate with over this link.
bool emlsrEnabled
whether EMLSR mode is enabled on this link
WifiPowerManagementMode pmMode
the current PM mode, if the STA is associated, or the PM mode to switch to upon association,...
Structure holding information specific to a single link.
Struct identifying a channel to scan.
WifiPhyBand band
PHY band.
uint16_t number
channel number
Structure holding scan parameters.
std::list< Channel > ChannelList
typedef for a list of channels
Time probeDelay
delay prior to transmitting a Probe Request
WifiScanType type
indicates either active or passive scanning
Time maxChannelTime
maximum time to spend on each channel
Ssid ssid
desired SSID or wildcard SSID
std::map< uint8_t, ChannelList > channelList
list of channels to scan, for each PHY ID
Time minChannelTime
minimum time to spend on each channel