16#include "ns3/ap-wifi-mac.h"
18#include "ns3/mgt-action-headers.h"
19#include "ns3/spectrum-signal-parameters.h"
20#include "ns3/sta-wifi-mac.h"
21#include "ns3/wifi-mac-queue.h"
22#include "ns3/wifi-net-device.h"
23#include "ns3/wifi-spectrum-phy-interface.h"
27#undef NS_LOG_APPEND_CONTEXT
28#define NS_LOG_APPEND_CONTEXT WIFI_FEM_NS_LOG_APPEND_CONTEXT
58 static TypeId tid =
TypeId(
"ns3::EhtFrameExchangeManager")
60 .AddConstructor<EhtFrameExchangeManager>()
61 .SetGroupName(
"Wifi");
97 protectionManager->SetLinkId(linkId);
101 ackManager->SetLinkId(linkId);
114 if (!mpdu->GetHeader().IsQosData() ||
m_mac->GetNLinks() == 1 ||
115 mpdu->GetHeader().GetAddr1().IsGroup() ||
122 auto& hdr = mpdu->GetHeader();
126 hdr.SetAddr1(*address);
134 if (hdr.IsQosAmsdu())
136 if (hdr.IsToDs() && !hdr.IsFromDs())
139 hdr.SetAddr3(hdr.GetAddr1());
141 else if (!hdr.IsToDs() && hdr.IsFromDs())
144 hdr.SetAddr3(hdr.GetAddr2());
176 for (uint8_t linkId = 0; linkId <
m_apMac->GetNLinks(); linkId++)
184 std::set<Mac48Address> emlsrClients;
189 ehtFem->m_ongoingTxopEnd.IsPending() && ehtFem->m_txopHolder &&
190 m_mac->GetWifiRemoteStationManager(linkId)->GetEmlsrEnabled(
191 ehtFem->m_txopHolder.value()))
193 emlsrClients.insert(ehtFem->m_txopHolder.value());
199 if (
m_mac->GetWifiRemoteStationManager(linkId)->GetEmlsrEnabled(address))
201 emlsrClients.insert(address);
205 for (
const auto& address : emlsrClients)
208 m_mac->GetWifiRemoteStationManager(linkId)->GetMldAddress(address);
209 NS_ASSERT_MSG(mldAddress,
"MLD address not found for " << address);
222 "No mask for client " << *mldAddress <<
" on link " << +
m_linkId);
227 "Transmissions to " << *mldAddress <<
" on link " << +
m_linkId
228 <<
" are not blocked");
239 std::optional<Time> timeToCtsEnd;
246 NS_LOG_DEBUG(
"StartTransmission called while another EMLSR link is being used");
251 auto emlsrManager =
m_staMac->GetEmlsrManager();
253 if (
auto elapsed = emlsrManager->GetElapsedMediumSyncDelayTimer(
m_linkId);
254 elapsed && emlsrManager->MediumSyncDelayNTxopsExceeded(
m_linkId))
256 NS_LOG_DEBUG(
"No new TXOP attempts allowed while MediumSyncDelay is running");
260 emlsrManager->GetMediumSyncDuration() - *elapsed,
279 if (
const auto [startTxop, delay] = emlsrManager->GetDelayUntilAccessRequest(
285 if (delay.IsStrictlyPositive())
328 auto sigBMode = phy->GetSigBMode(txVector);
339 auto delay =
m_apMac->GetApEmlsrManager()->GetDelayOnTxPsduNotForEmlsr(psdu,
362 m_staMac->GetEmlsrManager()->GetInDeviceInterference())
364 for (
const auto linkId :
m_staMac->GetLinkIds())
366 if (
auto phy =
m_mac->GetWifiPhy(linkId);
369 auto txPowerDbm = phy->GetPower(txVector.
GetTxPowerLevel()) + phy->GetTxGain();
396 if (
auto psduMapIt = psduMap.find(aid);
398 (psduMapIt == psduMap.cend() ||
412 m_staMac->GetEmlsrManager()->GetInDeviceInterference())
414 for (
const auto linkId :
m_staMac->GetLinkIds())
416 if (
auto phy =
m_mac->GetWifiPhy(linkId);
419 auto txPowerDbm = phy->GetPower(txVector.
GetTxPowerLevel()) + phy->GetTxGain();
437 NS_LOG_DEBUG(
"No spectrum PHY operating on link " << +linkId);
448 spectrumSignalParams->duration = duration;
449 spectrumSignalParams->txPhy = txPhy->GetCurrentInterface();
450 spectrumSignalParams->txAntenna = txPhy->GetAntenna();
451 spectrumSignalParams->psd = psd;
453 rxPhy->StartRx(spectrumSignalParams, rxPhy->GetCurrentInterface());
486 NS_ASSERT_MSG(mldAddress,
"MLD address not found for " << address);
489 for (uint8_t linkId = 0; linkId <
m_apMac->GetNLinks(); ++linkId)
493 ehtFem->m_ongoingTxopEnd.IsPending() && ehtFem->m_txopHolder &&
494 m_mac->GetWifiRemoteStationManager(linkId)->GetMldAddress(*ehtFem->m_txopHolder) ==
507 std::set<uint8_t> linkIds;
508 for (uint8_t linkId = 0; linkId <
m_mac->GetNLinks(); linkId++)
510 if (
m_mac->GetWifiRemoteStationManager(linkId)->GetEmlsrEnabled(*mldAddress))
512 linkIds.insert(linkId);
516 auto blockLinks = [=,
this]() {
531 auto unblockLinks = [=,
this]() {
538 emlCapabilities->get().emlsrTransitionDelay);
540 endDelay.IsZero() ? unblockLinks()
565 m_staMac->NotifySwitchingEmlsrLink(phy, linkId, delay);
582 const auto sequence =
m_txMiddle->GetNextSequenceNumberFor(&hdr);
591 packet->AddHeader(frame);
592 packet->AddHeader(actionHdr);
616 for (uint8_t linkId = 0; linkId <
m_mac->GetNLinks(); linkId++)
618 std::optional<Mac48Address> linkAddress;
620 (linkAddress =
m_mac->GetWifiRemoteStationManager(linkId)->GetAffiliatedStaAddress(
622 (optRssi =
m_mac->GetWifiRemoteStationManager(linkId)->GetMostRecentRssi(*linkAddress)))
636 uint8_t maxPaddingDelay = 0;
648 maxPaddingDelay = std::max(maxPaddingDelay, emlCapabilities->get().emlsrPaddingDelay);
653 for (uint8_t linkId = 0; linkId <
m_apMac->GetNLinks(); linkId++)
656 m_mac->GetWifiRemoteStationManager(linkId)->GetEmlsrEnabled(*mldAddress))
666 if (maxPaddingDelay > 0)
674 auto rate = protection->muRtsTxVector.GetMode().GetDataRate(protection->muRtsTxVector);
675 std::size_t nDbps = rate / 1e6 * 4;
676 protection->muRts.SetPaddingSize((1 << (maxPaddingDelay + 2)) * nDbps / 8);
690 if (
auto emlsrManager =
m_staMac->GetEmlsrManager())
692 auto mainPhy =
m_staMac->GetDevice()->GetPhy(emlsrManager->GetMainPhyId());
698 if (mainPhy->IsStateSwitching() ||
m_mac->GetLinkForPhy(mainPhy) !=
m_linkId)
700 NS_LOG_DEBUG(
"Main PHY is switching or operating on another link, abort sending CTS");
714 auto crossLinkCollision =
true;
723 crossLinkCollision =
false;
730 std::set<uint8_t> linkIds;
731 for (uint8_t linkId = 0; linkId <
m_apMac->GetNLinks(); linkId++)
733 if (
m_mac->GetWifiRemoteStationManager(linkId)->GetEmlsrEnabled(*mldAddress))
735 linkIds.insert(linkId);
739 if (std::any_of(linkIds.cbegin(),
742 [=,
this](uint8_t
id) {
743 auto ehtFem = StaticCast<EhtFrameExchangeManager>(
744 m_mac->GetFrameExchangeManager(id));
745 return ehtFem->m_ongoingTxopEnd.IsPending() && ehtFem->m_txopHolder &&
746 m_mac->GetMldAddress(ehtFem->m_txopHolder.value()) == mldAddress;
756 if (std::none_of(linkIds.cbegin(),
760 [=,
this](uint8_t
id) {
761 auto macHdr = m_mac->GetFrameExchangeManager(id)->GetReceivedMacHdr();
762 return macHdr.has_value() &&
763 m_mac->GetMldAddress(macHdr->get().GetAddr2()) == mldAddress;
766 crossLinkCollision =
false;
775 auto updateFailedCw =
776 crossLinkCollision ?
m_apMac->GetApEmlsrManager()->UpdateCwAfterFailedIcf() :
true;
795 for (uint8_t linkId = 0; linkId <
m_apMac->GetNLinks(); ++linkId)
798 m_mac->GetWifiRemoteStationManager(linkId)->GetEmlsrEnabled(*mldAddress))
803 m_apMac->GetMacQueueScheduler()->GetQueueLinkMask(
AC_BE, queueId, linkId);
804 NS_ASSERT_MSG(mask,
"No mask for client " << *mldAddress <<
" on link " << +linkId);
809 "Transmissions to " << *mldAddress <<
" on link " << +linkId
810 <<
" are not blocked");
837 if (psdu->GetAddr1() == address)
846 if (mpdu->GetHeader().IsTrigger())
849 mpdu->GetPacket()->PeekHeader(trigger);
859 if (psdu->GetHeader(0).IsCts())
873 if (psdu->GetHeader(0).IsBlockAck())
876 psdu->GetPayload(0)->PeekHeader(blockAck);
898 NS_LOG_DEBUG(
"Reset the counter of TXOP attempts allowed while "
899 "MediumSyncDelay is running");
914 NS_LOG_DEBUG(
"Decrement the remaining number of TXOP attempts allowed while "
915 "MediumSyncDelay is running");
944 auto txopStart = edca->GetTxopStartTime(
m_linkId);
1059 if (
auto holder =
FindTxopHolder(hdr, txVector); holder != sender)
1061 NS_LOG_DEBUG(
"Sender (" << sender <<
") differs from the TXOP holder ("
1068 NS_LOG_DEBUG(
"Sender (" << sender <<
") is not an EMLSR client");
1072 NS_LOG_DEBUG(
"EMLSR client " << sender <<
" is starting a TXOP");
1078 for (uint8_t linkId = 0; linkId <
m_apMac->GetNLinks(); ++linkId)
1081 m_mac->GetWifiRemoteStationManager(linkId)->GetEmlsrEnabled(*mldAddress))
1100 it->second.PeekEventImpl()->Invoke();
1101 it->second.Cancel();
1131 NS_ASSERT(mpdu->GetHeader().GetAddr1().IsGroup() || mpdu->GetHeader().GetAddr1() ==
m_self);
1133 const auto& hdr = mpdu->GetHeader();
1142 bool icfReceived =
false;
1144 if (hdr.IsTrigger())
1152 mpdu->GetPacket()->PeekHeader(trigger);
1154 if (hdr.GetAddr1() !=
m_self &&
1155 (!hdr.GetAddr1().IsBroadcast() || !
m_staMac->IsAssociated() ||
1170 auto emlsrManager =
m_staMac->GetEmlsrManager();
1196 !icfReceived && !mpdu->GetHeader().IsCts() && !mpdu->GetHeader().IsMgt())
1215 auto emlsrManager =
m_staMac->GetEmlsrManager();
1225 if (
auto it = std::find_if(
1229 [=,
this](uint8_t linkId) {
1231 StaticCast<EhtFrameExchangeManager>(m_mac->GetFrameExchangeManager(linkId));
1232 return linkId != m_linkId && m_staMac->IsEmlsrLink(linkId) &&
1233 ehtFem->m_ongoingTxopEnd.IsPending() && ehtFem->m_txopHolder &&
1234 m_mac->GetWifiRemoteStationManager(linkId)->GetMldAddress(
1235 *ehtFem->m_txopHolder) == apMldAddress;
1237 it !=
m_staMac->GetLinkIds().cend())
1244 ->m_ongoingTxopEnd.Cancel();
1255 NS_LOG_DEBUG(
"Drop ICF because another EMLSR link is being used");
1280 else if (
auto mainPhy =
m_staMac->GetDevice()->GetPhy(emlsrManager->GetMainPhyId());
1283 const auto delay = mainPhy->GetChannelSwitchDelay();
1288 lastSwitch > lastTime)
1290 lastTime = lastSwitch;
1294 lastSleep > lastTime)
1296 lastTime = lastSleep;
1304 "Drop ICF due to not enough time for the main PHY to switch link; reason = "
1324 NS_LOG_DEBUG(
"PHY is decoding the PHY header of PPDU, postpone TXOP end");
1364 else if (durationId <= m_phy->GetSifs())
1368 NS_LOG_DEBUG(
"Assume TXOP will end based on Duration/ID value");
1421 if (durationId <= m_phy->GetSifs())
1423 NS_LOG_DEBUG(
"Assume TXOP ended based on Duration/ID value");
a polymophic address class
EhtFrameExchangeManager handles the frame exchange sequences for EHT stations.
void PostProcessFrame(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector) override
Perform actions that are possibly needed after receiving any frame, independently of whether the fram...
void ForwardPsduMapDown(WifiConstPsduMap psduMap, WifiTxVector &txVector) override
Forward a map of PSDUs down to the PHY layer.
TracedCallback< WifiIcfDrop, uint8_t > m_icfDropCallback
ICF drop reason traced callback (WifiMac exposes this trace source)
bool UsingOtherEmlsrLink() const
void PreProcessFrame(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector) override
Perform actions that are possibly needed when receiving any frame, independently of whether the frame...
void NavResetTimeout() override
Reset the NAV upon expiration of the NAV reset timer.
void ForwardPsduDown(Ptr< const WifiPsdu > psdu, WifiTxVector &txVector) override
Forward a PSDU down to the PHY layer.
void PsduRxError(Ptr< const WifiPsdu > psdu) override
This method is called when the reception of a PSDU fails.
void SendEmlOmn(const Mac48Address &dest, const MgtEmlOmn &frame)
Send an EML Operating Mode Notification frame to the given station.
EventId & GetOngoingTxopEndEvent()
Ptr< WifiMpdu > CreateAliasIfNeeded(Ptr< WifiMpdu > mpdu) const override
Create an alias of the given MPDU for transmission by this Frame Exchange Manager.
void TransmissionFailed() override
Take necessary actions upon a transmission failure.
void IntraBssNavResetTimeout() override
Reset the intra-BSS NAV upon expiration of the intra-BSS NAV reset timer.
void SendMuRts(const WifiTxParameters &txParams) override
Send an MU-RTS to begin an MU-RTS/CTS frame exchange protecting an MU PPDU.
void SendCtsAfterMuRts(const WifiMacHeader &muRtsHdr, const CtrlTriggerHeader &trigger, double muRtsSnr) override
Send CTS after receiving an MU-RTS.
EhtFrameExchangeManager()
std::optional< dBm_u > GetMostRecentRssi(const Mac48Address &address) const override
Get the RSSI of the most recent packet received from the station having the given address.
void UpdateTxopEndOnRxEnd(Time durationId)
Update the TXOP end timer when a frame reception ends.
bool CheckEmlsrClientStartingTxop(const WifiMacHeader &hdr, const WifiTxVector &txVector)
Check if the frame received (or being received) is sent by an EMLSR client to start an UL TXOP.
void TransmissionSucceeded() override
Take necessary actions upon a transmission success.
bool GetEmlsrSwitchToListening(Ptr< const WifiPsdu > psdu, uint16_t aid, const Mac48Address &address) const
static TypeId GetTypeId()
Get the type ID.
void DoDispose() override
Destructor implementation.
std::unordered_map< Mac48Address, EventId, WifiAddressHash > m_transDelayTimer
MLD address-indexed map of transition delay timers.
void NotifyChannelReleased(Ptr< Txop > txop) override
Notify the given Txop that channel has been released.
EventId m_ongoingTxopEnd
event indicating the possible end of the current TXOP (of which we are not the holder)
void RxStartIndication(WifiTxVector txVector, Time psduDuration) override
void ReceiveMpdu(Ptr< const WifiMpdu > mpdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, bool inAmpdu) override
This method handles the reception of an MPDU (possibly included in an A-MPDU)
void UpdateTxopEndOnTxStart(Time txDuration, Time durationId)
Update the TXOP end timer when starting a frame transmission.
void GenerateInDeviceInterference(uint8_t linkId, Time duration, Watt_u txPower)
Generate an in-device interference of the given power on the given link for the given duration.
void SendCtsAfterRts(const WifiMacHeader &rtsHdr, WifiMode rtsTxMode, double rtsSnr) override
Send CTS after receiving RTS.
void UpdateTxopEndOnRxStartIndication(Time psduDuration)
Update the TXOP end timer when receiving a PHY-RXSTART.indication.
~EhtFrameExchangeManager() override
void EmlsrSwitchToListening(const Mac48Address &address, const Time &delay)
This method is intended to be called when an AP MLD detects that an EMLSR client previously involved ...
void TxopEnd(const std::optional< Mac48Address > &txopHolder)
Take actions when a TXOP (of which we are not the holder) ends.
void CtsAfterMuRtsTimeout(Ptr< WifiMpdu > muRts, const WifiTxVector &txVector) override
Called when no CTS frame is received after an MU-RTS.
void NotifySwitchingEmlsrLink(Ptr< WifiPhy > phy, uint8_t linkId, Time delay)
Notify that the given PHY will switch channel to operate on another EMLSR link after the given delay.
bool StartTransmission(Ptr< Txop > edca, MHz_u allowedWidth) override
Request the FrameExchangeManager to start a frame exchange sequence.
void SetLinkId(uint8_t linkId) override
Set the ID of the link this Frame Exchange Manager is associated with.
An identifier for simulation events.
void Cancel()
This method is syntactic sugar for the ns3::Simulator::Cancel method.
bool IsPending() const
This method is syntactic sugar for !IsExpired().
std::set< Mac48Address > m_sentRtsTo
the STA(s) which we sent an RTS to (waiting for CTS)
uint8_t m_linkId
the ID of the link this object is associated with
Ptr< WifiMac > m_mac
the MAC layer on this station
virtual void ResetPhy()
Remove WifiPhy associated with this FrameExchangeManager.
Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager() const
Ptr< MacTxMiddle > m_txMiddle
the MAC TX Middle on this station
Mac48Address m_self
the MAC address of this device
virtual void TransmissionFailed()
Take necessary actions upon a transmission failure.
WifiTxTimer m_txTimer
the timer set upon frame transmission
virtual void SendCtsAfterRts(const WifiMacHeader &rtsHdr, WifiMode rtsTxMode, double rtsSnr)
Send CTS after receiving RTS.
std::set< Mac48Address > m_protectedStas
STAs that have replied to an RTS in this TXOP.
Mac48Address GetAddress() const
Get the MAC address.
virtual void SetLinkId(uint8_t linkId)
Set the ID of the link this Frame Exchange Manager is associated with.
virtual void NotifyChannelReleased(Ptr< Txop > txop)
Notify the given Txop that channel has been released.
Ptr< WifiAckManager > GetAckManager() const
Get the Acknowledgment Manager used by this node.
Ptr< WifiProtectionManager > GetProtectionManager() const
Get the Protection Manager used by this node.
Ptr< WifiPhy > m_phy
the PHY layer on this station
virtual void PreProcessFrame(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
Perform actions that are possibly needed when receiving any frame, independently of whether the frame...
Mac48Address m_bssid
BSSID address (Mac48Address)
virtual bool StartTransmission(Ptr< Txop > dcf, MHz_u allowedWidth)
Request the FrameExchangeManager to start a frame exchange sequence.
MHz_u m_allowedWidth
the allowed width for the current transmission
HeFrameExchangeManager handles the frame exchange sequences for HE stations.
Ptr< ApWifiMac > m_apMac
MAC pointer (null if not an AP)
void DoDispose() override
Destructor implementation.
virtual void IntraBssNavResetTimeout()
Reset the intra-BSS NAV upon expiration of the intra-BSS NAV reset timer.
virtual void SendMuRts(const WifiTxParameters &txParams)
Send an MU-RTS to begin an MU-RTS/CTS frame exchange protecting an MU PPDU.
void RxStartIndication(WifiTxVector txVector, Time psduDuration) override
void DoCtsAfterMuRtsTimeout(Ptr< WifiMpdu > muRts, const WifiTxVector &txVector, bool updateFailedCw)
Called when no CTS frame is received after an MU-RTS.
std::optional< Mac48Address > FindTxopHolder(const WifiMacHeader &hdr, const WifiTxVector &txVector) override
Determine the holder of the TXOP, if possible, based on the received frame.
void NavResetTimeout() override
Reset the NAV upon expiration of the NAV reset timer.
virtual void SendCtsAfterMuRts(const WifiMacHeader &muRtsHdr, const CtrlTriggerHeader &trigger, double muRtsSnr)
Send CTS after receiving an MU-RTS.
Ptr< StaWifiMac > m_staMac
MAC pointer (null if not a STA)
void ReceiveMpdu(Ptr< const WifiMpdu > mpdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, bool inAmpdu) override
This method handles the reception of an MPDU (possibly included in an A-MPDU)
virtual void ForwardPsduMapDown(WifiConstPsduMap psduMap, WifiTxVector &txVector)
Forward a map of PSDUs down to the PHY layer.
void PostProcessFrame(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector) override
Perform actions that are possibly needed after receiving any frame, independently of whether the fram...
virtual std::optional< dBm_u > GetMostRecentRssi(const Mac48Address &address) const
Get the RSSI of the most recent packet received from the station having the given address.
void TransmissionSucceeded() override
Take necessary actions upon a transmission success.
Ptr< MpduAggregator > m_mpduAggregator
A-MPDU aggregator.
virtual void ForwardPsduDown(Ptr< const WifiPsdu > psdu, WifiTxVector &txVector)
Forward a PSDU down to the PHY layer.
Ptr< MsduAggregator > m_msduAggregator
A-MSDU aggregator.
Implement the header for Action frames of type EML Operating Mode Notification.
Smart pointer class similar to boost::intrusive_ptr.
std::optional< Mac48Address > m_txopHolder
MAC address of the TXOP holder.
virtual Ptr< WifiMpdu > CreateAliasIfNeeded(Ptr< WifiMpdu > mpdu) const
Create an alias of the given MPDU for transmission by this Frame Exchange Manager.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static Time Now()
Return the current simulation virtual time.
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
Simulation virtual time values and global simulation resolution.
TimeWithUnit As(const Unit unit=Time::AUTO) const
Attach a unit to a Time, to facilitate output in a specific unit.
bool IsStrictlyPositive() const
Exactly equivalent to t > 0.
bool IsZero() const
Exactly equivalent to t == 0.
void StartAccessAfterEvent(uint8_t linkId, bool hadFramesToTransmit, bool checkMediumBusy)
Request channel access on the given link after the occurrence of an event that possibly requires to g...
static constexpr bool DIDNT_HAVE_FRAMES_TO_TRANSMIT
no packet available for transmission was in the queue
static constexpr bool CHECK_MEDIUM_BUSY
generation of backoff (also) depends on the busy/idle state of the medium
static constexpr bool DONT_CHECK_MEDIUM_BUSY
generation of backoff is independent of the busy/idle state of the medium
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
represent a single transmission mode
Time GetSlot() const
Return the slot duration for this PHY.
Time GetSifs() const
Return the Short Interframe Space (SIFS) for this PHY.
static Time CalculateTxDuration(uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, uint16_t staId=SU_STA_ID)
WifiPhyBand GetPhyBand() const
Get the configured Wi-Fi band.
bool IsReceivingPhyHeader() const
Ptr< PhyEntity > GetPhyEntity(WifiModulationClass modulation) const
Get the supported PHY entity corresponding to the modulation class.
This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism,...
std::unique_ptr< WifiProtection > m_protection
protection method
bool IsRunning() const
Return true if the timer is running.
const std::set< Mac48Address > & GetStasExpectedToRespond() const
Time GetDelayLeft() const
Get the remaining time until the timer will expire.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
WifiPreamble GetPreambleType() const
void SetSigBMode(const WifiMode &mode)
Set the MCS used for SIG-B.
uint8_t GetTxPowerLevel() const
Declaration of ns3::EhtPhy class.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
Time Seconds(double value)
Construct a Time in the indicated unit.
@ WIFI_MOD_CLASS_EHT
EHT (Clause 36)
@ WAITING_EMLSR_TRANSITION_DELAY
Every class exported by the ns3 library is enclosed in the ns3 namespace.
U * PeekPointer(const Ptr< U > &p)
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
std:: tuple< WifiContainerQueueType, WifiReceiverAddressType, Mac48Address, std::optional< uint8_t > > WifiContainerQueueId
Tuple (queue type, receiver address type, Address, TID) identifying a container queue.
static constexpr uint8_t WAIT_FOR_RXSTART_DELAY_USEC
Additional time (exceeding 20 us) to wait for a PHY-RXSTART.indication when the PHY is decoding a PHY...
@ SWITCHING
The PHY layer is switching to other channel.
@ TX
The PHY layer is sending a packet.
@ SLEEP
The PHY layer is sleeping.
Ptr< T1 > DynamicCast(const Ptr< T2 > &p)
Cast a Ptr.
Watt_u DbmToW(dBm_u val)
Convert from dBm to Watts.
Ptr< T1 > StaticCast(const Ptr< T2 > &p)
Cast a Ptr.
const Time EMLSR_RX_PHY_START_DELAY
aRxPHYStartDelay value to use when waiting for a new frame in the context of EMLSR operations (Sec.
static Time DecodeEmlsrTransitionDelay(uint8_t value)
RxSignalInfo structure containing info on the received signal.
WifiMuRtsCtsProtection specifies that MU-RTS/CTS protection method is used.