24 #include "ns3/packet.h"
25 #include "ns3/simulator.h"
26 #include "ns3/pointer.h"
27 #include "ns3/string.h"
28 #include "ns3/random-variable-stream.h"
39 #include "ns3/ht-configuration.h"
40 #include "ns3/he-configuration.h"
54 .SetGroupName (
"Wifi")
56 .AddAttribute (
"BeaconInterval",
57 "Delay between two beacons",
62 .AddAttribute (
"BeaconJitter",
63 "A uniform random variable to cause the initial beacon starting time (after simulation time 0) "
64 "to be distributed between 0 and the BeaconInterval.",
67 MakePointerChecker<UniformRandomVariable> ())
68 .AddAttribute (
"EnableBeaconJitter",
69 "If beacons are enabled, whether to jitter the initial send event.",
73 .AddAttribute (
"BeaconGeneration",
74 "Whether or not beacons are generated.",
78 .AddAttribute (
"EnableNonErpProtection",
"Whether or not protection mechanism should be used when non-ERP STAs are present within the BSS."
79 "This parameter is only used when ERP is supported by the AP.",
83 .AddAttribute (
"BsrLifetime",
84 "Lifetime of Buffer Status Reports received from stations.",
88 .AddTraceSource (
"AssociatedSta",
89 "A station associated with this access point.",
91 "ns3::ApWifiMac::AssociationCallback")
92 .AddTraceSource (
"DeAssociatedSta",
93 "A station lost association with this access point.",
95 "ns3::ApWifiMac::AssociationCallback")
101 : m_enableBeaconGeneration (false),
102 m_numNonErpStations (0),
103 m_numNonHtStations (0),
104 m_shortSlotTimeEnabled (false),
105 m_shortPreambleEnabled (false)
197 NS_FATAL_ERROR (
"beacon interval should be multiple of 1024us (802.11 time unit), see IEEE Std. 802.11-2012");
201 NS_FATAL_ERROR (
"beacon interval should be smaller then or equal to 65535 * 1024us (802.11 time unit)");
379 for (
const auto & mode :
GetWifiPhy ()->GetModeList ())
381 uint64_t modeDataRate = mode.GetDataRate (
GetWifiPhy ()->GetChannelWidth ());
382 NS_LOG_DEBUG (
"Adding supported rate of " << modeDataRate);
389 NS_LOG_DEBUG (
"Adding basic mode " << mode.GetUniqueName ());
407 for (
const auto & selector :
GetWifiPhy ()->GetBssMembershipSelectorList ())
425 return dsssParameters;
506 return edcaParameters;
524 heConfiguration->GetAttribute (
"MuBeAifsn", uintegerValue);
526 heConfiguration->GetAttribute (
"MuBeCwMin", uintegerValue);
528 heConfiguration->GetAttribute (
"MuBeCwMax", uintegerValue);
530 heConfiguration->GetAttribute (
"BeMuEdcaTimer", timeValue);
533 heConfiguration->GetAttribute (
"MuBkAifsn", uintegerValue);
535 heConfiguration->GetAttribute (
"MuBkCwMin", uintegerValue);
537 heConfiguration->GetAttribute (
"MuBkCwMax", uintegerValue);
539 heConfiguration->GetAttribute (
"BkMuEdcaTimer", timeValue);
542 heConfiguration->GetAttribute (
"MuViAifsn", uintegerValue);
544 heConfiguration->GetAttribute (
"MuViCwMin", uintegerValue);
546 heConfiguration->GetAttribute (
"MuViCwMax", uintegerValue);
548 heConfiguration->GetAttribute (
"ViMuEdcaTimer", timeValue);
551 heConfiguration->GetAttribute (
"MuVoAifsn", uintegerValue);
553 heConfiguration->GetAttribute (
"MuVoCwMin", uintegerValue);
555 heConfiguration->GetAttribute (
"MuVoCwMax", uintegerValue);
557 heConfiguration->GetAttribute (
"VoMuEdcaTimer", timeValue);
560 return muEdcaParameters;
587 uint64_t maxSupportedRate = 0;
590 uint8_t nss = (mcs.GetMcsValue () / 8) + 1;
592 uint64_t dataRate = mcs.GetDataRate (
GetWifiPhy ()->GetChannelWidth (),
GetHtConfiguration ()->GetShortGuardIntervalSupported () ? 400 : 800, nss);
593 if (dataRate > maxSupportedRate)
595 maxSupportedRate = dataRate;
596 NS_LOG_DEBUG (
"Updating maxSupportedRate to " << maxSupportedRate);
601 uint8_t nMcs = mcsList.size ();
606 uint64_t maxSupportedRateByHtSta = 0;
607 auto itMcs = mcsList.begin ();
615 if (dataRate > maxSupportedRateByHtSta)
617 maxSupportedRateByHtSta = dataRate;
620 if (maxSupportedRateByHtSta < maxSupportedRate)
622 maxSupportedRate = maxSupportedRateByHtSta;
688 for (uint8_t nss = 1; nss <= maxSpatialStream; nss++)
716 for (uint8_t nss = 1; nss <= maxSpatialStream; nss++)
819 if (sta.second == to)
830 m_staList.insert (std::make_pair (aid, to));
1040 NS_LOG_DEBUG (
"forwarding frame from=" << from <<
", to=" << to);
1076 else if (hdr->
IsMgt ())
1096 NS_LOG_DEBUG (
"Probe request received from " << from <<
": send probe response");
1105 NS_LOG_DEBUG (
"Association request received from " << from);
1113 bool problem =
false;
1171 NS_LOG_DEBUG (
"One of the Basic Rate set mode is not supported by the station: send association response with an error status");
1176 NS_LOG_DEBUG (
"The Basic Rate set modes are supported by the station");
1178 for (
const auto & mode :
GetWifiPhy ()->GetModeList ())
1236 NS_LOG_DEBUG (
"Send association response with success status");
1243 NS_LOG_DEBUG (
"Reassociation request received from " << from);
1251 bool problem =
false;
1309 NS_LOG_DEBUG (
"One of the Basic Rate set mode is not supported by the station: send reassociation response with an error status");
1314 NS_LOG_DEBUG (
"The Basic Rate set modes are supported by the station");
1316 for (
const auto & mode :
GetWifiPhy ()->GetModeList ())
1374 NS_LOG_DEBUG (
"Send reassociation response with success status");
1381 NS_LOG_DEBUG (
"Disassociation received from " << from);
1385 if (it->second == from)
1419 if (i.second.GetDestinationAddr () ==
GetAddress ())
1421 ForwardUp (i.first, i.second.GetSourceAddr (),
1422 i.second.GetDestinationAddr ());
1428 NS_LOG_DEBUG (
"forwarding QoS frame from=" << from <<
", to=" << to);
1429 ForwardDown (i.first->Copy (), from, to, mpdu->GetHeader ().GetQosTid ());
1466 return useProtection;
1473 for (uint16_t nextAid = 1; nextAid <= 2007; nextAid++)
1484 const std::map<uint16_t, Mac48Address>&
1505 return it->second.value;
1525 uint8_t maxSize = 0;
1528 for (uint8_t tid = 0; tid < 8; tid++)
1533 maxSize =
std::max (maxSize, size);
void UpdateShortPreambleEnabled(void)
Update whether short preamble should be enabled or not in the BSS.
bool m_shortPreambleEnabled
Flag whether short preamble is enabled in the BSS.
Ptr< Txop > m_beaconTxop
Dedicated Txop for beacons.
void SetBeaconGeneration(bool enable)
Enable or disable beacon generation of the AP.
void SendProbeResp(Mac48Address to)
Forward a probe response packet to the DCF.
SupportedRates GetSupportedRates(void) const
Return an instance of SupportedRates that contains all rates that we support including HT rates.
void SetBeaconInterval(Time interval)
HeOperation GetHeOperation(void) const
Return the HE operation of the current AP.
uint16_t GetAssociationId(Mac48Address addr) const
void SetAddress(Mac48Address address) override
uint16_t m_numNonHtStations
Number of non-HT stations currently associated to the AP.
Ptr< UniformRandomVariable > m_beaconJitter
UniformRandomVariable used to randomize the time of the first beacon.
void TxOk(Ptr< const WifiMacQueueItem > mpdu)
The packet we sent was successfully received by the receiver (i.e.
bool CanForwardPacketsTo(Mac48Address to) const override
Return true if packets can be forwarded to the given destination, false otherwise.
bool m_enableNonErpProtection
Flag whether protection mechanism is used or not when non-ERP STAs are present within the BSS.
bool m_shortSlotTimeEnabled
Flag whether short slot time is enabled within the BSS.
void Receive(Ptr< WifiMacQueueItem > mpdu) override
This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has bee...
ErpInformation GetErpInformation(void) const
Return the ERP information of the current AP.
HtOperation GetHtOperation(void) const
Return the HT operation of the current AP.
bool SupportsSendFrom(void) const override
std::map< uint16_t, Mac48Address > m_staList
Map of all stations currently associated to the AP with their association ID.
DsssParameterSet GetDsssParameterSet(void) const
Return the DSSS Parameter Set that we support.
void UpdateShortSlotTimeEnabled(void)
Update whether short slot time should be enabled or not in the BSS.
CapabilityInformation GetCapabilities(void) const
Return the Capability information of the current AP.
void SendOneBeacon(void)
Forward a beacon packet to the beacon special DCF.
TracedCallback< uint16_t, Mac48Address > m_deAssocLogger
deassociation logger
bool m_enableBeaconGeneration
Flag whether beacons are being generated.
Time m_beaconInterval
Beacon interval.
void TxFailed(WifiMacDropReason timeoutReason, Ptr< const WifiMacQueueItem > mpdu)
The packet we sent was successfully received by the receiver (i.e.
void DeaggregateAmsduAndForward(Ptr< WifiMacQueueItem > mpdu) override
This method is called to de-aggregate an A-MSDU and forward the constituent packets up the stack.
bool m_enableBeaconJitter
Flag whether the first beacon should be generated at random time.
void DoInitialize(void) override
Initialize() implementation.
MuEdcaParameterSet GetMuEdcaParameterSet(void) const
Return the MU EDCA Parameter Set of the current AP.
EdcaParameterSet GetEdcaParameterSet(void) const
Return the EDCA Parameter Set of the current AP.
TracedCallback< uint16_t, Mac48Address > m_assocLogger
association logger
bool GetUseNonErpProtection(void) const
Return whether protection for non-ERP stations is used in the BSS.
EventId m_beaconEvent
Event to generate one beacon.
const std::map< uint16_t, Mac48Address > & GetStaList(void) const
Get a const reference to the map of associated stations.
void Enqueue(Ptr< Packet > packet, Mac48Address to) override
uint8_t GetMaxBufferStatus(Mac48Address address) const
Return the maximum among the values of the Queue Size subfield of the last QoS Data or QoS Null frame...
static TypeId GetTypeId(void)
Get the type ID.
Time m_bsrLifetime
Lifetime of Buffer Status Reports.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
uint16_t GetNextAssociationId(void)
uint8_t GetBufferStatus(uint8_t tid, Mac48Address address) const
Return the value of the Queue Size subfield of the last QoS Data or QoS Null frame received from the ...
void SetLinkUpCallback(Callback< void > linkUp) override
uint16_t m_numNonErpStations
Number of non-ERP stations currently associated to the AP.
VhtOperation GetVhtOperation(void) const
Return the VHT operation of the current AP.
void DoDispose(void) override
Destructor implementation.
void SetBufferStatus(uint8_t tid, Mac48Address address, uint8_t size)
Store the value of the Queue Size subfield of the last QoS Data or QoS Null frame received from the s...
void SendAssocResp(Mac48Address to, bool success, bool isReassoc)
Forward an association or a reassociation response packet to the DCF.
std::unordered_map< WifiAddressTidPair, bsrType, WifiAddressTidHash > m_bufferStatus
Per (MAC address, TID) buffer status reports.
void ForwardDown(Ptr< Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet down to DCF/EDCAF (enqueue the packet).
Ptr< WifiMacQueue > GetTxopQueue(AcIndex ac) const override
Get the wifi MAC queue of the (Qos)Txop associated with the given AC, if such (Qos)Txop is installed,...
Time GetBeaconInterval(void) const
AttributeValue implementation for Boolean.
void SetCurrentChannel(uint8_t currentChannel)
Set the Current Channel field in the DsssParameterSet information element.
void SetDsssSupported(uint8_t dsssSupported)
Set DSSS supported.
void SetViTxopLimit(uint16_t txop)
Set the AC_VI TXOP Limit field in the EdcaParameterSet information element.
void SetViAifsn(uint8_t aifsn)
Set the AC_VI AIFSN field in the EdcaParameterSet information element.
void SetVoAci(uint8_t aci)
Set the AC_VO ACI field in the EdcaParameterSet information element.
void SetVoCWmax(uint32_t cwMax)
Set the AC_VO CWmax field in the EdcaParameterSet information element.
void SetViCWmin(uint32_t cwMin)
Set the AC_VI CWmin field in the EdcaParameterSet information element.
void SetVoTxopLimit(uint16_t txop)
Set the AC_VO TXOP Limit field in the EdcaParameterSet information element.
void SetVoAifsn(uint8_t aifsn)
Set the AC_VO AIFSN field in the EdcaParameterSet information element.
void SetQosInfo(uint8_t qosInfo)
Set the QoS Info field in the EdcaParameterSet information element.
void SetBkCWmin(uint32_t cwMin)
Set the AC_BK CWmin field in the EdcaParameterSet information element.
void SetViAci(uint8_t aci)
Set the AC_VI ACI field in the EdcaParameterSet information element.
void SetViCWmax(uint32_t cwMax)
Set the AC_VI CWmax field in the EdcaParameterSet information element.
void SetVoCWmin(uint32_t cwMin)
Set the AC_VO CWmin field in the EdcaParameterSet information element.
void SetBeTxopLimit(uint16_t txop)
Set the AC_BE TXOP Limit field in the EdcaParameterSet information element.
void SetBeCWmax(uint32_t cwMax)
Set the AC_BE CWmax field in the EdcaParameterSet information element.
void SetBeAci(uint8_t aci)
Set the AC_BE ACI field in the EdcaParameterSet information element.
void SetBkCWmax(uint32_t cwMax)
Set the AC_BK CWmax field in the EdcaParameterSet information element.
void SetBkTxopLimit(uint16_t txop)
Set the AC_BK TXOP Limit field in the EdcaParameterSet information element.
void SetBkAifsn(uint8_t aifsn)
Set the AC_BK AIFSN field in the EdcaParameterSet information element.
void SetBeCWmin(uint32_t cwMin)
Set the AC_BE CWmin field in the EdcaParameterSet information element.
void SetBkAci(uint8_t aci)
Set the AC_BK ACI field in the EdcaParameterSet information element.
void SetQosSupported(uint8_t qosSupported)
Set QOS supported function.
void SetBeAifsn(uint8_t aifsn)
Set the AC_BE AIFSN field in the EdcaParameterSet information element.
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
The Extended Capabilities Information Element.
The IEEE 802.11ax HE Capabilities.
bool IsSupportedTxMcs(uint8_t mcs) const
Is RX MCS supported.
uint16_t GetSupportedMcsAndNss() const
Return the MCS and NSS field in the HE Capabilities information element.
The HE Operation Information Element.
void SetBssColor(uint8_t bssColor)
Set the BSS color.
void SetMaxHeMcsPerNss(uint8_t nss, uint8_t maxHeMcs)
Set the Basic HE-MCS and NSS field in the HE Operation information element by specifying the tuple (n...
void SetHeSupported(uint8_t heSupported)
Set the HE supported information element.
The HT Capabilities Information Element.
bool IsSupportedMcs(uint8_t mcs) const
Return the is MCS supported flag.
The HT Operation Information Element.
void SetObssNonHtStasPresent(uint8_t obssNonHtStasPresent)
Set the OBSS non HT STAs present.
void SetRifsMode(uint8_t rifsMode)
Set the RIFS mode.
void SetSecondaryChannelOffset(uint8_t secondaryChannelOffset)
Set the secondary channel offset.
void SetPcoActive(uint8_t pcoActive)
Set the PCO active.
void SetTxUnequalModulation(uint8_t txUnequalModulation)
Set the transmit unequal modulation.
void SetHtProtection(uint8_t htProtection)
Set the HT protection.
void SetTxMaxNSpatialStreams(uint8_t maxTxSpatialStreams)
Set the transmit maximum number spatial streams.
void SetTxRxMcsSetUnequal(uint8_t txRxMcsSetUnequal)
Set the transmit / receive MCS set unequal.
void SetDualBeacon(uint8_t dualBeacon)
Set the dual beacon.
void SetNonGfHtStasPresent(uint8_t nonGfHtStasPresent)
Set the non GF HT STAs present.
void SetTxMcsSetDefined(uint8_t txMcsSetDefined)
Set the transmit MCS set defined.
void SetLSigTxopProtectionFullSupport(uint8_t lSigTxopProtectionFullSupport)
Set the LSIG TXOP protection full support.
void SetStaChannelWidth(uint8_t staChannelWidth)
Set the STA channel width.
void SetRxHighestSupportedDataRate(uint16_t maxSupportedRate)
Set the receive highest supported data rate.
void SetRxMcsBitmask(uint8_t index)
Set the receive MCS bitmask.
void SetPrimaryChannel(uint8_t ctrl)
Set the Primary Channel field in the HT Operation information element.
void SetDualCtsProtection(uint8_t dualCtsProtection)
Set the dual CTS protection.
void SetPhase(uint8_t pcoPhase)
Set the PCO phase.
void SetHtSupported(uint8_t htSupported)
Set the HT Supported.
void SetStbcBeacon(uint8_t stbcBeacon)
Set the STBC beacon.
static Mac48Address GetBroadcast(void)
bool IsBroadcast(void) const
The MU EDCA Parameter Set.
void SetMuCwMin(uint8_t aci, uint16_t cwMin)
Set the ECWmin subfield of the ECWmin/ECWmax field in the MU AC Parameter Record field corresponding ...
void SetMuEdcaTimer(uint8_t aci, Time timer)
Set the MU EDCA Timer field in the MU AC Parameter Record field corresponding to the given AC Index (...
void SetMuAifsn(uint8_t aci, uint8_t aifsn)
Set the AIFSN subfield of the ACI/AIFSN field in the MU AC Parameter Record field corresponding to th...
void SetQosInfo(uint8_t qosInfo)
Set the QoS Info field in the MuEdcaParameterSet information element.
void SetMuCwMax(uint8_t aci, uint16_t cwMax)
Set the ECWmax subfield of the ECWmin/ECWmax field in the MU AC Parameter Record field corresponding ...
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context.
void Initialize(void)
Invoke DoInitialize on all Objects aggregated to this one.
void Dispose(void)
Dispose of this Object.
void AddHeader(const Header &header)
Add header to this packet.
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer.
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Smart pointer class similar to boost::intrusive_ptr.
uint32_t GetMinCw(void) const override
Return the minimum contention window size from the EDCA Parameter Set or the MU EDCA Parameter Set,...
uint8_t GetAifsn(void) const override
Return the number of slots that make up an AIFS according to the EDCA Parameter Set or the MU EDCA Pa...
uint32_t GetMaxCw(void) const override
Return the maximum contention window size from the EDCA Parameter Set or the MU EDCA Parameter Set,...
void SetStream(int64_t stream)
Specifies the stream number for the RngStream.
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
static Time Now(void)
Return the current simulation virtual time.
The IEEE 802.11 SSID Information Element.
Status code for association response.
void SetFailure(void)
Set success bit to 1 (failure).
void SetSuccess(void)
Set success bit to 0 (success).
Hold variables of type string.
The Supported Rates Information Element.
void SetBasicRate(uint64_t bs)
Set the given rate to basic rates.
void AddBssMembershipSelectorRate(uint64_t bs)
Add a special value to the supported rate set, corresponding to a BSS membership selector.
uint8_t GetNRates(void) const
Return the number of supported rates.
void AddSupportedRate(uint64_t bs)
Add the given rate to the supported rates.
bool IsSupportedRate(uint64_t bs) const
Check if the given rate is supported.
Simulation virtual time values and global simulation resolution.
int64_t GetMicroSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
AttributeValue implementation for Time.
void SetMaxCw(uint32_t maxCw)
Set the maximum contention window size.
Ptr< WifiMacQueue > GetWifiMacQueue() const
Return the packet queue associated with this Txop.
Time GetTxopLimit(void) const
Return the TXOP limit.
virtual void SetWifiMac(const Ptr< WifiMac > mac)
Set the wifi MAC this Txop is associated to.
void SetTxMiddle(const Ptr< MacTxMiddle > txMiddle)
Set MacTxMiddle this Txop is associated to.
void SetAifsn(uint8_t aifsn)
Set the number of slots that make up an AIFS.
void SetMinCw(uint32_t minCw)
Set the minimum contention window size.
void SetChannelAccessManager(const Ptr< ChannelAccessManager > manager)
Set ChannelAccessManager this Txop is associated to.
virtual void Queue(Ptr< Packet > packet, const WifiMacHeader &hdr)
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Hold an unsigned integer type.
The IEEE 802.11ac VHT Capabilities.
bool IsSupportedTxMcs(uint8_t mcs) const
Returns true if transmit MCS is supported.
uint16_t GetRxHighestSupportedLgiDataRate() const
Get the receive highest supported LGI data rate.
uint32_t GetVhtCapabilitiesInfo() const
Return the VHT Capabilities Info field in the VHT Capabilities information element.
The VHT Operation Information Element.
void SetVhtSupported(uint8_t vhtSupported)
Set the VHT supported information element.
void SetMaxVhtMcsPerNss(uint8_t nss, uint8_t maxVhtMcs)
Set the Basic VHT-MCS and NSS field in the VHT Operation information element by specifying the tuple ...
void SetChannelWidth(uint8_t channelWidth)
Set the Channel Width field in the VHT Operation information element.
void SetChannelCenterFrequencySegment1(uint8_t channelCenterFrequencySegment1)
Set the Channel Center Frequency Segment 1 field in the VHT Operation information element.
void SetChannelCenterFrequencySegment0(uint8_t channelCenterFrequencySegment0)
Set the Channel Center Frequency Segment 0 field in the VHT Operation information element.
base class for all MAC-level wifi objects.
Ptr< HtConfiguration > GetHtConfiguration(void) const
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities of the device.
bool GetShortSlotTimeSupported(void) const
Ptr< HeConfiguration > GetHeConfiguration(void) const
bool GetVhtSupported() const
Return whether the device supports VHT.
bool GetQosSupported() const
Return whether the device supports QoS.
virtual void SetAddress(Mac48Address address)
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities of the device.
void DoInitialize() override
Initialize() implementation.
Mac48Address GetAddress(void) const
Ptr< QosTxop > GetBEQueue(void) const
Accessor for the AC_BE channel access function.
bool GetHtSupported() const
Return whether the device supports HT.
void SetTypeOfStation(TypeOfStation type)
This method is invoked by a subclass to specify what type of station it is implementing.
Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager(void) const
Ptr< QosTxop > GetVOQueue(void) const
Accessor for the AC_VO channel access function.
Ptr< ChannelAccessManager > m_channelAccessManager
channel access manager
bool GetHeSupported() const
Return whether the device supports HE.
virtual void Receive(Ptr< WifiMacQueueItem > mpdu)
This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has bee...
Ptr< MacTxMiddle > m_txMiddle
TX middle (aggregation etc.)
Ptr< WifiPhy > GetWifiPhy(void) const
virtual Ptr< WifiMacQueue > GetTxopQueue(AcIndex ac) const
Get the wifi MAC queue of the (Qos)Txop associated with the given AC, if such (Qos)Txop is installed,...
void NotifyRxDrop(Ptr< const Packet > packet)
virtual void SetLinkUpCallback(Callback< void > linkUp)
void ForwardUp(Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet up to the device.
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities of the device.
bool GetErpSupported() const
Return whether the device supports ERP.
bool GetDsssSupported() const
Return whether the device supports DSSS.
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities of the device.
Ptr< QosTxop > GetQosTxop(AcIndex ac) const
Accessor for a specified EDCA object.
void NotifyTxDrop(Ptr< const Packet > packet)
void DoDispose() override
Destructor implementation.
void SetBssid(Mac48Address bssid)
Ptr< Txop > GetTxop(void) const
Accessor for the Txop object.
represent a single transmission mode
uint8_t GetMcsValue(void) const
std::string GetUniqueName(void) const
uint64_t GetDataRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
std::list< WifiMode > GetMcsList(void) const
The WifiPhy::GetMcsList() method is used (e.g., by a WifiRemoteStationManager) to determine the set o...
uint8_t GetMaxSupportedRxSpatialStreams(void) const
uint8_t GetMaxSupportedTxSpatialStreams(void) const
void SetSlot(Time slot)
Set the slot duration for this PHY.
uint16_t GetChannelWidth(void) const
uint8_t GetNumberOfSupportedStreams(Mac48Address address) const
Return the number of spatial streams supported by the station.
void SetShortSlotTimeEnabled(bool enable)
Enable or disable short slot time.
void AddBasicMode(WifiMode mode)
Invoked in a STA upon association to store the set of rates which belong to the BSSBasicRateSet of th...
uint16_t GetAssociationId(Mac48Address remoteAddress) const
Get the AID of a remote station.
uint8_t GetNBasicMcs(void) const
Return the number of basic MCS index.
void SetUseNonErpProtection(bool enable)
Enable or disable protection for non-ERP stations.
uint8_t GetNBasicModes(void) const
Return the number of basic modes we support.
void AddSupportedMcs(Mac48Address address, WifiMode mcs)
Record the MCS index supported by the station.
void AddStationVhtCapabilities(Mac48Address from, VhtCapabilities vhtCapabilities)
Records VHT capabilities of the remote station.
void SetShortPreambleEnabled(bool enable)
Enable or disable short PHY preambles.
void RecordWaitAssocTxOk(Mac48Address address)
Records that we are waiting for an ACK for the association response we sent.
void RecordGotAssocTxOk(Mac48Address address)
Records that we got an ACK for the association response we sent.
void AddStationHeCapabilities(Mac48Address from, HeCapabilities heCapabilities)
Records HE capabilities of the remote station.
void AddSupportedMode(Mac48Address address, WifiMode mode)
Invoked in a STA or AP to store the set of modes supported by a destination which is also supported l...
WifiMode GetBasicMcs(uint8_t i) const
Return the MCS at the given list index.
uint8_t GetNMcsSupported(Mac48Address address) const
Return the number of MCS supported by the station.
WifiMode GetBasicMode(uint8_t i) const
Return a basic mode from the set of basic modes.
void AddSupportedPhyPreamble(Mac48Address address, bool isShortPreambleSupported)
Record whether the short PHY preamble is supported by the station.
void RecordDisassociated(Mac48Address address)
Records that the STA was disassociated.
void SetAssociationId(Mac48Address remoteAddress, uint16_t aid)
Record the AID of a remote station.
void AddSupportedErpSlotTime(Mac48Address address, bool isShortSlotTimeSupported)
Record whether the short ERP slot time is supported by the station.
void AddStationHtCapabilities(Mac48Address from, HtCapabilities htCapabilities)
Records HT capabilities of the remote station.
void RecordGotAssocTxFailed(Mac48Address address)
Records that we missed an ACK for the association response we sent.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Ptr< const AttributeChecker > MakeBooleanChecker(void)
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_ABORT_IF(cond)
Abnormal program termination if a condition is true.
#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(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.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
WifiMacDropReason
The reason why an MPDU was dropped.
uint8_t QosUtilsGetTidForPacket(Ptr< const Packet > packet)
If a QoS tag is attached to the packet, returns a value < 8.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
@ WIFI_MOD_CLASS_HR_DSSS
HR/DSSS (Clause 16)
@ WIFI_MOD_CLASS_HT
HT (Clause 19)
@ WIFI_MOD_CLASS_VHT
VHT (Clause 22)
@ WIFI_MOD_CLASS_HE
HE (Clause 27)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
@ WIFI_MAC_MGT_ASSOCIATION_RESPONSE
@ WIFI_MAC_MGT_PROBE_RESPONSE
@ WIFI_MAC_MGT_REASSOCIATION_RESPONSE
std::pair< Mac48Address, uint8_t > WifiAddressTidPair
(MAC address, TID) pair
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
U * PeekPointer(const Ptr< U > &p)