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" 38 #include "ns3/ht-configuration.h" 39 #include "ns3/he-configuration.h" 52 .SetGroupName (
"Wifi")
54 .AddAttribute (
"BeaconInterval",
55 "Delay between two beacons",
60 .AddAttribute (
"BeaconJitter",
61 "A uniform random variable to cause the initial beacon starting time (after simulation time 0) " 62 "to be distributed between 0 and the BeaconInterval.",
65 MakePointerChecker<UniformRandomVariable> ())
66 .AddAttribute (
"EnableBeaconJitter",
67 "If beacons are enabled, whether to jitter the initial send event.",
71 .AddAttribute (
"BeaconGeneration",
72 "Whether or not beacons are generated.",
76 .AddAttribute (
"EnableNonErpProtection",
"Whether or not protection mechanism should be used when non-ERP STAs are present within the BSS." 77 "This parameter is only used when ERP is supported by the AP.",
81 .AddAttribute (
"BsrLifetime",
82 "Lifetime of Buffer Status Reports received from stations.",
86 .AddTraceSource (
"AssociatedSta",
87 "A station associated with this access point.",
89 "ns3::ApWifiMac::AssociationCallback")
90 .AddTraceSource (
"DeAssociatedSta",
91 "A station lost association with this access point.",
93 "ns3::ApWifiMac::AssociationCallback")
99 : m_enableBeaconGeneration (false),
100 m_numNonErpStations (0),
101 m_numNonHtStations (0),
102 m_shortSlotTimeEnabled (false),
103 m_shortPreambleEnabled (false)
193 NS_FATAL_ERROR (
"beacon interval should be multiple of 1024us (802.11 time unit), see IEEE Std. 802.11-2012");
197 NS_FATAL_ERROR (
"beacon interval should be smaller then or equal to 65535 * 1024us (802.11 time unit)");
389 NS_LOG_DEBUG (
"Adding supported rate of " << modeDataRate);
396 NS_LOG_DEBUG (
"Adding basic mode " << mode.GetUniqueName ());
432 return dsssParameters;
513 return edcaParameters;
540 uint64_t maxSupportedRate = 0;
543 uint8_t nss = (mcs.GetMcsValue () / 8) + 1;
546 if (dataRate > maxSupportedRate)
548 maxSupportedRate = dataRate;
549 NS_LOG_DEBUG (
"Updating maxSupportedRate to " << maxSupportedRate);
554 uint8_t nMcs = mcsList.size ();
559 uint64_t maxSupportedRateByHtSta = 0;
560 auto itMcs = mcsList.begin ();
568 if (dataRate > maxSupportedRateByHtSta)
570 maxSupportedRateByHtSta = dataRate;
573 if (maxSupportedRateByHtSta < maxSupportedRate)
575 maxSupportedRate = maxSupportedRateByHtSta;
614 if (channelWidth == 160)
618 else if (channelWidth == 80)
637 for (uint8_t nss = 1; nss <= maxSpatialStream; nss++)
665 for (uint8_t nss = 1; nss <= maxSpatialStream; nss++)
753 if (sta.second == to)
764 m_staList.insert (std::make_pair (aid, to));
778 assoc.SetAssociationId (aid);
785 assoc.SetStatusCode (code);
958 NS_LOG_DEBUG (
"forwarding frame from=" << from <<
", to=" << to);
994 else if (hdr->
IsMgt ())
1001 Ssid ssid = probeRequestHeader.GetSsid ();
1004 NS_LOG_DEBUG (
"Probe request received from " << from <<
": send probe response");
1013 NS_LOG_DEBUG (
"Association request received from " << from);
1021 bool problem =
false;
1079 NS_LOG_DEBUG (
"One of the Basic Rate set mode is not supported by the station: send association response with an error status");
1084 NS_LOG_DEBUG (
"The Basic Rate set modes are supported by the station");
1144 NS_LOG_DEBUG (
"Send association response with success status");
1151 NS_LOG_DEBUG (
"Reassociation request received from " << from);
1159 bool problem =
false;
1217 NS_LOG_DEBUG (
"One of the Basic Rate set mode is not supported by the station: send reassociation response with an error status");
1222 NS_LOG_DEBUG (
"The Basic Rate set modes are supported by the station");
1282 NS_LOG_DEBUG (
"Send reassociation response with success status");
1289 NS_LOG_DEBUG (
"Disassociation received from " << from);
1293 if (it->second == from)
1328 if (i.second.GetDestinationAddr () ==
GetAddress ())
1330 ForwardUp (i.first, i.second.GetSourceAddr (),
1331 i.second.GetDestinationAddr ());
1337 NS_LOG_DEBUG (
"forwarding QoS frame from=" << from <<
", to=" << to);
1375 return useProtection;
1382 for (uint16_t nextAid = 1; nextAid <= 2007; nextAid++)
1393 const std::map<uint16_t, Mac48Address>&
1420 return it->second.value;
1440 uint8_t maxSize = 0;
1443 for (uint8_t tid = 0; tid < 8; tid++)
1448 maxSize =
std::max (maxSize, size);
uint8_t GetNMcsSupported(Mac48Address address) const
Return the number of MCS supported by the station.
void Enqueue(Ptr< Packet > packet, Mac48Address to) override
void Dispose(void)
Dispose of this Object.
void SetPcoActive(uint8_t pcoActive)
Set the PCO active.
std::pair< Mac48Address, uint8_t > WifiAddressTidPair
(MAC address, TID) pair
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
std::map< uint16_t, Mac48Address > m_staList
Map of all stations currently associated to the AP with their association ID.
void SetBeaconInterval(Time interval)
Ptr< HeConfiguration > GetHeConfiguration(void) const
bool IsBroadcast(void) const
Simulation virtual time values and global simulation resolution.
void AddSupportedMcs(Mac48Address address, WifiMode mcs)
Record the MCS index supported by the station.
bool GetVhtSupported(void) const
Return whether the device has VHT capability support enabled.
void SetStbcBeacon(uint8_t stbcBeacon)
Set the STBC beacon.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
void SetQosSupported(uint8_t qosSupported)
Set QOS supported function.
void SetLinkUpCallback(Callback< void > linkUp) override
void SetStream(int64_t stream)
Specifies the stream number for the RngStream.
AttributeValue implementation for Boolean.
void SetViCWmin(uint32_t cwMin)
Set the AC_VI CWmin field in the EdcaParameterSet information element.
bool GetHeSupported() const
Return whether the device supports HE.
void ForwardDown(Ptr< Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet down to DCF/EDCAF (enqueue the packet).
SupportedRates GetSupportedRates(void) const
Return an instance of SupportedRates that contains all rates that we support including HT rates...
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 ...
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Ptr< Txop > m_txop
This holds a pointer to the TXOP instance for this WifiMac - used for transmission of frames to non-Q...
EdcaParameterSet GetEdcaParameterSet(void) const
Return the EDCA Parameter Set of the current AP.
uint8_t GetAifsn(void) const
Return the number of slots that make up an AIFS.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
bool GetShortPreambleSupported(Mac48Address address) const
Return whether the station supports short PHY preamble or not.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
HeOperation GetHeOperation(void) const
Return the HE operation of the current AP.
Hold variables of type string.
void SetAddress(Mac48Address address) override
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
void RecordWaitAssocTxOk(Mac48Address address)
Records that we are waiting for an ACK for the association response we sent.
TracedCallback< uint16_t, Mac48Address > m_deAssocLogger
deassociation logger
bool GetQosSupported() const
Return whether the device supports QoS.
bool IsSupportedRate(uint64_t bs) const
Check if the given rate is supported.
uint16_t GetSupportedMcsAndNss() const
Return the MCS and NSS field in the HE Capabilities information element.
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
void SetVoAci(uint8_t aci)
Set the AC_VO ACI field in the EdcaParameterSet information element.
EdcaQueues m_edca
This is a map from Access Category index to the corresponding channel access function.
void SetPhase(uint8_t pcoPhase)
Set the PCO phase.
void SetBasicRate(uint64_t bs)
Set the given rate to basic rates.
void AddStationVhtCapabilities(Mac48Address from, VhtCapabilities vhtCapabilities)
Records VHT capabilities of the remote station.
void SetLSigTxopProtectionFullSupport(uint8_t lSigTxopProtectionFullSupport)
Set the LSIG TXOP protection full support.
std::list< WifiMode > GetModeList(void) const
The WifiPhy::GetModeList() method is used (e.g., by a WifiRemoteStationManager) to determine the set ...
bool m_shortPreambleEnabled
Flag whether short preamble is enabled in the BSS.
void SetChannelAccessManager(const Ptr< ChannelAccessManager > manager)
Set ChannelAccessManager this Txop is associated to.
void SetRxHighestSupportedDataRate(uint16_t maxSupportedRate)
Set the receive highest supported data rate.
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities of the device.
void SetWifiRemoteStationManager(const Ptr< WifiRemoteStationManager > stationManager) override
uint16_t m_numNonHtStations
Number of non-HT stations currently associated to the AP.
bool IsSupportedTxMcs(uint8_t mcs) const
Returns true if transmit MCS is supported.
The Extended Capabilities Information ElementThis class knows how to serialise and deserialise the Ex...
The VHT Operation Information ElementThis class knows how to serialise and deserialise the VHT Operat...
bool GetHeSupported(void) const
Return whether the device has HE capability support enabled.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
void SetQosInfo(uint8_t qosInfo)
Set the QoS Info field in the EdcaParameterSet information element.
U * PeekPointer(const Ptr< U > &p)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void SetNonGfHtStasPresent(uint8_t nonGfHtStasPresent)
Set the non GF HT STAs present.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
void SetSlot(Time slot)
Set the slot duration for this PHY.
The HT Capabilities Information ElementThis class knows how to serialise and deserialise the HT Capab...
uint16_t m_numNonErpStations
Number of non-ERP stations currently associated to the AP.
void SetVoAifsn(uint8_t aifsn)
Set the AC_VO AIFSN field in the EdcaParameterSet information element.
void AddSupportedPhyPreamble(Mac48Address address, bool isShortPreambleSupported)
Record whether the short PHY preamble is supported by the station.
WifiMode GetBasicMcs(uint8_t i) const
Return the MCS at the given list index.
void NotifyRxDrop(Ptr< const Packet > packet)
uint16_t GetAssociationId(Mac48Address addr) const
The HT Operation Information ElementThis class knows how to serialise and deserialise the HT Operatio...
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
void UpdateShortSlotTimeEnabled(void)
Update whether short slot time should be enabled or not in the BSS.
void SetTxMaxNSpatialStreams(uint8_t maxTxSpatialStreams)
Set the transmit maximum number spatial streams.
Time GetBeaconInterval(void) const
const std::map< uint16_t, Mac48Address > & GetStaList(void) const
Get a const reference to the map of associated stations.
void SetHeSupported(uint8_t heSupported)
Set the HE supported information element.
Ptr< WifiPhy > m_phy
Wifi PHY.
uint16_t GetVhtOperationalChannelWidth(void) const
Determine the VHT operational channel width (in MHz).
Ptr< ChannelAccessManager > m_channelAccessManager
channel access manager
uint16_t GetNextAssociationId(void)
std::list< WifiMode > GetMcsList(void) const
The WifiPhy::GetMcsList() method is used (e.g., by a WifiRemoteStationManager) to determine the set o...
uint8_t GetNBasicMcs(void) const
Return the number of basic MCS index.
void SetVoCWmin(uint32_t cwMin)
Set the AC_VO CWmin field in the EdcaParameterSet information element.
uint32_t GetMinCw(void) const
Return the minimum contention window size.
The Supported Rates Information ElementThis class knows how to serialise and deserialise the Supporte...
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
uint16_t GetRxHighestSupportedLgiDataRate() const
Get the receive highest supported LGI data rate.
void SetTxMcsSetDefined(uint8_t txMcsSetDefined)
Set the transmit MCS set defined.
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...
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 GetShortSlotTimeSupported(void) const override
void AddSupportedRate(uint64_t bs)
Add the given rate to the supported rates.
void SetDualCtsProtection(uint8_t dualCtsProtection)
Set the dual CTS protection.
bool GetDsssSupported() const
Return whether the device supports DSSS.
uint8_t QosUtilsGetTidForPacket(Ptr< const Packet > packet)
If a QoS tag is attached to the packet, returns a value < 8.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
void RecordDisassociated(Mac48Address address)
Records that the STA was disassociated.
bool m_enableBeaconGeneration
Flag whether beacons are being generated.
void SendAssocResp(Mac48Address to, bool success, bool isReassoc)
Forward an association or a reassociation response packet to the DCF.
uint16_t GetChannelWidth(void) const
void SetShortSlotTimeEnabled(bool enable)
Enable or disable short slot time.
void SetBssid(Mac48Address bssid)
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 SetViAifsn(uint8_t aifsn)
Set the AC_VI AIFSN field in the EdcaParameterSet information element.
uint8_t GetNumberOfSupportedStreams(Mac48Address address) const
Return the number of spatial streams supported by the station.
void SetHtProtection(uint8_t htProtection)
Set the HT protection.
base class for all MAC-level wifi objects.
void SetSuccess(void)
Set success bit to 0 (success).
Ptr< HtConfiguration > GetHtConfiguration(void) const
const WifiMacHeader & GetHeader(void) const
Get the header stored in this item.
bool GetErpSupported() const
Return whether the device supports ERP.
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
bool IsSupportedMcs(uint8_t mcs) const
Return the is MCS supported flag.
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...
bool SupportsSendFrom(void) const override
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
AttributeValue implementation for Time.
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...
bool GetVhtSupported() const
Return whether the device supports VHT.
void SetVoCWmax(uint32_t cwMax)
Set the AC_VO CWmax field in the EdcaParameterSet information element.
bool GetShortSlotTimeSupported(Mac48Address address) const
Return whether the station supports short ERP slot time or not.
The IEEE 802.11ac VHT Capabilities.
static TypeId GetTypeId(void)
Get the type ID.
void AddStationHtCapabilities(Mac48Address from, HtCapabilities htCapabilities)
Records HT capabilities of the remote station.
CapabilityInformation GetCapabilities(void) const
Return the Capability information of the current AP.
void NotifyTxDrop(Ptr< const Packet > packet)
Time m_bsrLifetime
Lifetime of Buffer Status Reports.
void SetBeCWmin(uint32_t cwMin)
Set the AC_BE CWmin field in the EdcaParameterSet information element.
VhtOperation GetVhtOperation(void) const
Return the VHT operation of the current AP.
void SetWifiRemoteStationManager(const Ptr< WifiRemoteStationManager > stationManager) override
void SetViAci(uint8_t aci)
Set the AC_VI ACI field in the EdcaParameterSet information element.
void RecordGotAssocTxFailed(Mac48Address address)
Records that we missed an ACK for the association response we sent.
void SetLinkUpCallback(Callback< void > linkUp) override
bool GetHtSupported(void) const
Return whether the device has HT capability support enabled.
bool m_enableNonErpProtection
Flag whether protection mechanism is used or not when non-ERP STAs are present within the BSS...
AcIndex QosUtilsMapTidToAc(uint8_t tid)
Maps TID (Traffic ID) to Access classes.
void SetHtSupported(uint8_t htSupported)
Set the HT Supported.
void SetVhtSupported(uint8_t vhtSupported)
Set the VHT supported information element.
void AddStationHeCapabilities(Mac48Address from, HeCapabilities heCapabilities)
Records HE capabilities of the remote station.
void DoDispose() override
Destructor implementation.
static Mac48Address GetBroadcast(void)
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer.
EventId m_beaconEvent
Event to generate one beacon.
bool GetErpOfdmSupported(const Mac48Address &address) const
Return whether the station supports ERP OFDM or not.
void SetViTxopLimit(uint16_t txop)
Set the AC_VI TXOP Limit field in the EdcaParameterSet information element.
Ptr< Txop > m_beaconTxop
Dedicated Txop for beacons.
std::list< uint8_t > GetBssMembershipSelectorList(void) const
The WifiPhy::BssMembershipSelector() method is used (e.g., by a WifiRemoteStationManager) to determin...
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities of the device.
void SetRxMcsBitmask(uint8_t index)
Set the receive MCS bitmask.
bool IsAssociated(Mac48Address address) const
Return whether the station associated.
void SetAddress(Mac48Address address) override
void SetCurrentChannel(uint8_t currentChannel)
Set the Current Channel field in the DsssParameterSet information element.
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...
std::string GetUniqueName(void) const
void TxFailed(uint8_t timeoutReason, Ptr< const WifiMacQueueItem > mpdu, const WifiTxVector &txVector)
The packet we sent was successfully received by the receiver (i.e.
int64_t GetMicroSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Ptr< const Packet > GetPacket(void) const
Get the packet stored in this item.
Status code for association response.
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context.
void SetTxUnequalModulation(uint8_t txUnequalModulation)
Set the transmit unequal modulation.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetDsssSupported(uint8_t dsssSupported)
Set DSSS supported.
The EDCA Parameter SetThis class knows how to serialise and deserialise the EDCA Parameter Set...
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...
void TxOk(Ptr< const WifiMacQueueItem > mpdu)
The packet we sent was successfully received by the receiver (i.e.
uint32_t GetMaxCw(void) const
Return the maximum contention window size.
void AddBssMembershipSelectorRate(uint64_t bs)
Add a special value to the supported rate set, corresponding to a BSS membership selector.
void AddBasicMode(WifiMode mode)
Invoked in a STA upon association to store the set of rates which belong to the BSSBasicRateSet of th...
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
void SetUseNonErpProtection(bool enable)
Enable or disable protection for non-ERP stations.
bool GetShortPhyPreambleSupported(void) const
Return whether short PHY preamble is supported.
void SetBkAifsn(uint8_t aifsn)
Set the AC_BK AIFSN field in the EdcaParameterSet information element.
bool GetDsssSupported(const Mac48Address &address) const
Return whether the station supports DSSS or not.
bool IsSupportedTxMcs(uint8_t mcs) const
Is RX MCS supported.
bool m_shortSlotTimeEnabled
Flag whether short slot time is enabled within the BSS.
void SetTypeOfStation(TypeOfStation type) override
This method is invoked by a subclass to specify what type of station it is implementing.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
uint8_t GetChannelNumber(void) const
Return current channel number.
void SetBeAci(uint8_t aci)
Set the AC_BE ACI field in the EdcaParameterSet information element.
void SetRifsMode(uint8_t rifsMode)
Set the RIFS mode.
void UpdateShortPreambleEnabled(void)
Update whether short preamble should be enabled or not in the BSS.
bool GetShortGuardIntervalSupported(void) const
Return whether the device has SGI support enabled.
static Time Now(void)
Return the current simulation virtual time.
Wi-Fi AP state machineHandle association, dis-association and authentication, of STAs within an infra...
void SetBkAci(uint8_t aci)
Set the AC_BK ACI field in the EdcaParameterSet information element.
The IEEE 802.11 SSID Information Element.
DsssParameterSet GetDsssParameterSet(void) const
Return the DSSS Parameter Set that we support.
HtOperation GetHtOperation(void) const
Return the HT operation of the current AP.
ErpInformation GetErpInformation(void) const
Return the ERP information of the current AP.
void SendProbeResp(Mac48Address to)
Forward a probe response packet to the DCF.
uint8_t GetNBasicModes(void) const
Return the number of basic modes we support.
The DSSS Parameter SetThis class knows how to serialise and deserialise the DSSS Parameter Set...
#define NS_ABORT_IF(cond)
Abnormal program termination if a condition is true.
bool GetUseNonErpProtection(void) const
Return whether protection for non-ERP stations is used in the BSS.
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 SetObssNonHtStasPresent(uint8_t obssNonHtStasPresent)
Set the OBSS non HT STAs present.
void SetBssColor(uint8_t bssColor)
Set the BSS color.
void SendOneBeacon(void)
Forward a beacon packet to the beacon special DCF.
void SetTxRxMcsSetUnequal(uint8_t txRxMcsSetUnequal)
Set the transmit / receive MCS set unequal.
void DoInitialize() override
Initialize() implementation.
void SetBkCWmin(uint32_t cwMin)
Set the AC_BK CWmin field in the EdcaParameterSet information element.
void SetMinCw(uint32_t minCw)
Set the minimum contention window size.
uint32_t GetVhtCapabilitiesInfo() const
Return the VHT Capabilities Info field in the VHT Capabilities information element.
void AddSupportedErpSlotTime(Mac48Address address, bool isShortSlotTimeSupported)
Record whether the short ERP slot time is supported by the station.
void SetMaxCw(uint32_t maxCw)
Set the maximum contention window size.
bool GetHtSupported() const
Return whether the device supports HT.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
void SetTxMiddle(const Ptr< MacTxMiddle > txMiddle)
Set MacTxMiddle this Txop is associated to.
void SetStaChannelWidth(uint8_t staChannelWidth)
Set the STA channel width.
Ssid GetSsid(void) const override
Ptr< const AttributeChecker > MakeBooleanChecker(void)
Ptr< UniformRandomVariable > m_beaconJitter
UniformRandomVariable used to randomize the time of the first beacon.
Time m_beaconInterval
Beacon interval.
void SetVoTxopLimit(uint16_t txop)
Set the AC_VO TXOP Limit field in the EdcaParameterSet information element.
std::unordered_map< WifiAddressTidPair, bsrType, WifiAddressTidHash > m_bufferStatus
Per (MAC address, TID) buffer status reports.
void SetDualBeacon(uint8_t dualBeacon)
Set the dual beacon.
void DoInitialize(void) override
Initialize() implementation.
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
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 ...
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
void ForwardUp(Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet up to the device.
Mac48Address GetAddress(void) const override
virtual void SetWifiRemoteStationManager(const Ptr< WifiRemoteStationManager > remoteManager)
Set WifiRemoteStationsManager this Txop is associated to.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
uint8_t GetNRates(void) const
Return the number of supported rates.
bool m_enableBeaconJitter
Flag whether the first beacon should be generated at random time.
void SetAifsn(uint8_t aifsn)
Set the number of slots that make up an AIFS.
void DoDispose(void) override
Destructor implementation.
bool IsWaitAssocTxOk(Mac48Address address) const
Return whether we are waiting for an ACK for the association response we sent.
void SetShortPreambleEnabled(bool enable)
Enable or disable short PHY preambles.
void SetBeCWmax(uint32_t cwMax)
Set the AC_BE CWmax field in the EdcaParameterSet information element.
The HE Operation Information ElementThis class knows how to serialise and deserialise the HE Operatio...
TracedCallback< uint16_t, Mac48Address > m_assocLogger
association logger
Ptr< WifiRemoteStationManager > m_stationManager
Remote station manager (rate control, RTS/CTS/fragmentation thresholds etc.)
WifiMode GetBasicMode(uint8_t i) const
Return a basic mode from the set of basic modes.
void SetBeAifsn(uint8_t aifsn)
Set the AC_BE AIFSN field in the EdcaParameterSet information element.
void SetFailure(void)
Set success bit to 1 (failure).
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities of the device.
The IEEE 802.11ax HE Capabilities.
uint8_t GetMcsValue(void) const
virtual void Queue(Ptr< Packet > packet, const WifiMacHeader &hdr)
void SetBeTxopLimit(uint16_t txop)
Set the AC_BE TXOP Limit field in the EdcaParameterSet information element.
uint8_t GetMaxSupportedTxSpatialStreams(void) const
a unique identifier for an interface.
void SetPrimaryChannel(uint8_t ctrl)
Set the Primary Channel field in the HT Operation information element.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
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...
void SetViCWmax(uint32_t cwMax)
Set the AC_VI CWmax field in the EdcaParameterSet information element.
void Initialize(void)
Invoke DoInitialize on all Objects aggregated to this one.
Ptr< MacTxMiddle > m_txMiddle
TX middle (aggregation etc.)
uint64_t GetDataRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
void RecordGotAssocTxOk(Mac48Address address)
Records that we got an ACK for the association response we sent.
void AddHeader(const Header &header)
Add header to this packet.
uint16_t GetChannelWidthSupported(Mac48Address address) const
Return the channel width supported by the station.
uint8_t GetMaxSupportedRxSpatialStreams(void) const
std::unordered_map< Mac48Address, uint16_t, WifiAddressHash > m_addressIdMap
Maps MAC addresses of associated stations to their association ID.
void SetBeaconGeneration(bool enable)
Enable or disable beacon generation of the AP.
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities of the device.
void SetSecondaryChannelOffset(uint8_t secondaryChannelOffset)
Set the secondary channel offset.
void SetChannelWidth(uint8_t channelWidth)
Set the Channel Width field in the VHT Operation information element.
Time GetTxopLimit(void) const
Return the TXOP limit.