|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
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"
53 .SetGroupName (
"Wifi")
55 .AddAttribute (
"BeaconInterval",
56 "Delay between two beacons",
61 .AddAttribute (
"BeaconJitter",
62 "A uniform random variable to cause the initial beacon starting time (after simulation time 0) "
63 "to be distributed between 0 and the BeaconInterval.",
66 MakePointerChecker<UniformRandomVariable> ())
67 .AddAttribute (
"EnableBeaconJitter",
68 "If beacons are enabled, whether to jitter the initial send event.",
72 .AddAttribute (
"BeaconGeneration",
73 "Whether or not beacons are generated.",
77 .AddAttribute (
"EnableNonErpProtection",
"Whether or not protection mechanism should be used when non-ERP STAs are present within the BSS."
78 "This parameter is only used when ERP is supported by the AP.",
82 .AddAttribute (
"BsrLifetime",
83 "Lifetime of Buffer Status Reports received from stations.",
87 .AddTraceSource (
"AssociatedSta",
88 "A station associated with this access point.",
90 "ns3::ApWifiMac::AssociationCallback")
91 .AddTraceSource (
"DeAssociatedSta",
92 "A station lost association with this access point.",
94 "ns3::ApWifiMac::AssociationCallback")
100 : m_enableBeaconGeneration (false),
101 m_numNonErpStations (0),
102 m_numNonHtStations (0),
103 m_shortSlotTimeEnabled (false),
104 m_shortPreambleEnabled (false)
196 NS_FATAL_ERROR (
"beacon interval should be multiple of 1024us (802.11 time unit), see IEEE Std. 802.11-2012");
200 NS_FATAL_ERROR (
"beacon interval should be smaller then or equal to 65535 * 1024us (802.11 time unit)");
392 NS_LOG_DEBUG (
"Adding supported rate of " << modeDataRate);
399 NS_LOG_DEBUG (
"Adding basic mode " << mode.GetUniqueName ());
435 return dsssParameters;
516 return edcaParameters;
534 heConfiguration->GetAttribute (
"MuBeAifsn", uintegerValue);
536 heConfiguration->GetAttribute (
"MuBeCwMin", uintegerValue);
538 heConfiguration->GetAttribute (
"MuBeCwMax", uintegerValue);
540 heConfiguration->GetAttribute (
"BeMuEdcaTimer", timeValue);
543 heConfiguration->GetAttribute (
"MuBkAifsn", uintegerValue);
545 heConfiguration->GetAttribute (
"MuBkCwMin", uintegerValue);
547 heConfiguration->GetAttribute (
"MuBkCwMax", uintegerValue);
549 heConfiguration->GetAttribute (
"BkMuEdcaTimer", timeValue);
552 heConfiguration->GetAttribute (
"MuViAifsn", uintegerValue);
554 heConfiguration->GetAttribute (
"MuViCwMin", uintegerValue);
556 heConfiguration->GetAttribute (
"MuViCwMax", uintegerValue);
558 heConfiguration->GetAttribute (
"ViMuEdcaTimer", timeValue);
561 heConfiguration->GetAttribute (
"MuVoAifsn", uintegerValue);
563 heConfiguration->GetAttribute (
"MuVoCwMin", uintegerValue);
565 heConfiguration->GetAttribute (
"MuVoCwMax", uintegerValue);
567 heConfiguration->GetAttribute (
"VoMuEdcaTimer", timeValue);
570 return muEdcaParameters;
597 uint64_t maxSupportedRate = 0;
600 uint8_t nss = (mcs.GetMcsValue () / 8) + 1;
603 if (dataRate > maxSupportedRate)
605 maxSupportedRate = dataRate;
606 NS_LOG_DEBUG (
"Updating maxSupportedRate to " << maxSupportedRate);
611 uint8_t nMcs = mcsList.size ();
616 uint64_t maxSupportedRateByHtSta = 0;
617 auto itMcs = mcsList.begin ();
625 if (dataRate > maxSupportedRateByHtSta)
627 maxSupportedRateByHtSta = dataRate;
630 if (maxSupportedRateByHtSta < maxSupportedRate)
632 maxSupportedRate = maxSupportedRateByHtSta;
671 if (channelWidth == 160)
675 else if (channelWidth == 80)
694 for (uint8_t nss = 1; nss <= maxSpatialStream; nss++)
722 for (uint8_t nss = 1; nss <= maxSpatialStream; nss++)
811 if (sta.second == to)
822 m_staList.insert (std::make_pair (aid, to));
1018 NS_LOG_DEBUG (
"forwarding frame from=" << from <<
", to=" << to);
1054 else if (hdr->
IsMgt ())
1064 NS_LOG_DEBUG (
"Probe request received from " << from <<
": send probe response");
1073 NS_LOG_DEBUG (
"Association request received from " << from);
1081 bool problem =
false;
1139 NS_LOG_DEBUG (
"One of the Basic Rate set mode is not supported by the station: send association response with an error status");
1144 NS_LOG_DEBUG (
"The Basic Rate set modes are supported by the station");
1204 NS_LOG_DEBUG (
"Send association response with success status");
1211 NS_LOG_DEBUG (
"Reassociation request received from " << from);
1219 bool problem =
false;
1277 NS_LOG_DEBUG (
"One of the Basic Rate set mode is not supported by the station: send reassociation response with an error status");
1282 NS_LOG_DEBUG (
"The Basic Rate set modes are supported by the station");
1342 NS_LOG_DEBUG (
"Send reassociation response with success status");
1349 NS_LOG_DEBUG (
"Disassociation received from " << from);
1353 if (it->second == from)
1387 if (i.second.GetDestinationAddr () ==
GetAddress ())
1389 ForwardUp (i.first, i.second.GetSourceAddr (),
1390 i.second.GetDestinationAddr ());
1396 NS_LOG_DEBUG (
"forwarding QoS frame from=" << from <<
", to=" << to);
1434 return useProtection;
1441 for (uint16_t nextAid = 1; nextAid <= 2007; nextAid++)
1452 const std::map<uint16_t, Mac48Address>&
1473 return it->second.value;
1493 uint8_t maxSize = 0;
1496 for (uint8_t tid = 0; tid < 8; tid++)
1501 maxSize =
std::max (maxSize, size);
Ptr< Txop > m_beaconTxop
Dedicated Txop for beacons.
bool IsAssociated(Mac48Address address) const
Return whether the station associated.
void DoInitialize(void) override
Initialize() implementation.
void SetVoAci(uint8_t aci)
Set the AC_VO ACI field in the EdcaParameterSet information element.
a unique identifier for an interface.
void SetCurrentChannel(uint8_t currentChannel)
Set the Current Channel field in the DsssParameterSet information element.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
SupportedRates GetSupportedRates(void) const
Return an instance of SupportedRates that contains all rates that we support including HT rates.
The IEEE 802.11ac VHT Capabilities.
void SetQosInfo(uint8_t qosInfo)
Set the QoS Info field in the EdcaParameterSet information element.
void Dispose(void)
Dispose of this Object.
uint8_t GetNBasicMcs(void) const
Return the number of basic MCS index.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Ptr< const Packet > GetPacket(void) const
Get the packet stored in this item.
std::unordered_map< WifiAddressTidPair, bsrType, WifiAddressTidHash > m_bufferStatus
Per (MAC address, TID) buffer status reports.
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
AttributeValue implementation for Boolean.
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer.
void AddStationHeCapabilities(Mac48Address from, HeCapabilities heCapabilities)
Records HE capabilities of the remote station.
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities of the device.
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 ...
void NotifyTxDrop(Ptr< const Packet > packet)
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
void AddHeader(const Header &header)
Add header to this packet.
void SetMaxCw(uint32_t maxCw)
Set the maximum contention window size.
Ssid GetSsid(void) const override
static Time Now(void)
Return the current simulation virtual time.
void DeaggregateAmsduAndForward(Ptr< WifiMacQueueItem > mpdu) override
This method is called to de-aggregate an A-MSDU and forward the constituent packets up the stack.
HeOperation GetHeOperation(void) const
Return the HE operation of the current AP.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetChannelAccessManager(const Ptr< ChannelAccessManager > manager)
Set ChannelAccessManager this Txop is associated to.
void SetShortSlotTimeEnabled(bool enable)
Enable or disable short slot time.
void SetChannelWidth(uint8_t channelWidth)
Set the Channel Width field in the VHT Operation information element.
HtOperation GetHtOperation(void) const
Return the HT operation of the current AP.
bool GetShortGuardIntervalSupported(void) const
Return whether the device has SGI support enabled.
@ WIFI_MOD_CLASS_HT
HT (Clause 19)
void SetPhase(uint8_t pcoPhase)
Set the PCO phase.
@ WIFI_MOD_CLASS_HE
HE (Clause 27)
bool IsSupportedTxMcs(uint8_t mcs) const
Returns true if transmit MCS is supported.
void SetBssid(Mac48Address bssid)
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
@ WIFI_MAC_MGT_REASSOCIATION_RESPONSE
void SetStbcBeacon(uint8_t stbcBeacon)
Set the STBC beacon.
void TxFailed(uint8_t timeoutReason, Ptr< const WifiMacQueueItem > mpdu, const WifiTxVector &txVector)
The packet we sent was successfully received by the receiver (i.e.
bool GetHeSupported() const
Return whether the device supports HE.
uint8_t GetChannelNumber(void) const
Return current channel number.
The IEEE 802.11ax HE Capabilities.
void SetBkAci(uint8_t aci)
Set the AC_BK ACI field in the EdcaParameterSet information element.
void RecordGotAssocTxFailed(Mac48Address address)
Records that we missed an ACK for the association response we sent.
@ WIFI_MAC_MGT_ASSOCIATION_RESPONSE
uint8_t GetNBasicModes(void) const
Return the number of basic modes we support.
void SetAssociationId(Mac48Address remoteAddress, uint16_t aid)
Record the AID of a remote station.
const std::map< uint16_t, Mac48Address > & GetStaList(void) const
Get a const reference to the map of associated stations.
DsssParameterSet GetDsssParameterSet(void) const
Return the DSSS Parameter Set that we support.
bool GetHtSupported(void) const
Return whether the device has HT capability support enabled.
void TxOk(Ptr< const WifiMacQueueItem > mpdu)
The packet we sent was successfully received by the receiver (i.e.
void SetTxMaxNSpatialStreams(uint8_t maxTxSpatialStreams)
Set the transmit maximum number spatial streams.
bool GetErpSupported() const
Return whether the device supports ERP.
bool GetVhtSupported(void) const
Return whether the device has VHT capability support enabled.
void SetTxUnequalModulation(uint8_t txUnequalModulation)
Set the transmit unequal modulation.
void SetBssColor(uint8_t bssColor)
Set the BSS color.
void SetRxHighestSupportedDataRate(uint16_t maxSupportedRate)
Set the receive highest supported data rate.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
bool IsSupportedTxMcs(uint8_t mcs) const
Is RX MCS supported.
void SetViAci(uint8_t aci)
Set the AC_VI ACI field in the EdcaParameterSet information element.
uint16_t GetChannelWidthSupported(Mac48Address address) const
Return the channel width supported by the station.
void SetBeCWmax(uint32_t cwMax)
Set the AC_BE CWmax field in the EdcaParameterSet information element.
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
void SetLinkUpCallback(Callback< void > linkUp) override
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
void SetBkTxopLimit(uint16_t txop)
Set the AC_BK TXOP Limit field in the EdcaParameterSet information element.
base class for all MAC-level wifi objects.
const WifiMacHeader & GetHeader(void) const
Get the header stored in this item.
bool GetShortPreambleSupported(Mac48Address address) const
Return whether the station supports short PHY preamble or not.
void SetBasicRate(uint64_t bs)
Set the given rate to basic rates.
void SetFailure(void)
Set success bit to 1 (failure).
Time GetTxopLimit(void) const
Return the TXOP limit.
bool GetQosSupported() const
Return whether the device supports QoS.
void SetBeAifsn(uint8_t aifsn)
Set the AC_BE AIFSN field in the EdcaParameterSet information element.
U * PeekPointer(const Ptr< U > &p)
TypeId SetParent(TypeId tid)
Set the parent TypeId.
void SetBeaconInterval(Time interval)
void SetVoCWmin(uint32_t cwMin)
Set the AC_VO CWmin field in the EdcaParameterSet information element.
The IEEE 802.11 SSID Information Element.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
bool m_shortPreambleEnabled
Flag whether short preamble is enabled in the BSS.
The VHT Operation Information Element.
void SetViTxopLimit(uint16_t txop)
Set the AC_VI TXOP Limit field in the EdcaParameterSet information element.
void SetRifsMode(uint8_t rifsMode)
Set the RIFS mode.
void SetHtSupported(uint8_t htSupported)
Set the HT Supported.
void SetMinCw(uint32_t minCw)
Set the minimum contention window size.
static TypeId GetTypeId(void)
Get the type ID.
Mac48Address GetAddress(void) const override
bool m_enableBeaconGeneration
Flag whether beacons are being generated.
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...
@ WIFI_MOD_CLASS_HR_DSSS
HR/DSSS (Clause 16)
bool m_shortSlotTimeEnabled
Flag whether short slot time is enabled within the BSS.
bool IsSupportedRate(uint64_t bs) const
Check if the given rate is supported.
The Supported Rates Information Element.
Smart pointer class similar to boost::intrusive_ptr.
uint16_t m_numNonHtStations
Number of non-HT stations currently associated to the AP.
uint8_t GetMaxSupportedTxSpatialStreams(void) const
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
void SetTxMcsSetDefined(uint8_t txMcsSetDefined)
Set the transmit MCS set defined.
static Mac48Address GetBroadcast(void)
void SetVoCWmax(uint32_t cwMax)
Set the AC_VO CWmax field in the EdcaParameterSet 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 ...
EdcaQueues m_edca
This is a map from Access Category index to the corresponding channel access function.
uint8_t GetNumberOfSupportedStreams(Mac48Address address) const
Return the number of spatial streams supported by the station.
void SetDualBeacon(uint8_t dualBeacon)
Set the dual beacon.
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...
represent a single transmission mode
void SetBkCWmax(uint32_t cwMax)
Set the AC_BK CWmax field in the EdcaParameterSet information element.
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...
bool GetShortPhyPreambleSupported(void) const
Return whether short PHY preamble is supported.
int64_t GetMicroSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
void AddSupportedErpSlotTime(Mac48Address address, bool isShortSlotTimeSupported)
Record whether the short ERP slot time is supported by the station.
CapabilityInformation GetCapabilities(void) const
Return the Capability information of the current AP.
Time m_beaconInterval
Beacon interval.
bool GetVhtSupported() const
Return whether the device supports VHT.
bool GetShortSlotTimeSupported(Mac48Address address) const
Return whether the station supports short ERP slot time or not.
void SetAddress(Mac48Address address) override
The HT Capabilities Information Element.
AcIndex QosUtilsMapTidToAc(uint8_t tid)
Maps TID (Traffic ID) to Access classes.
void DoDispose() override
Destructor implementation.
void SetRxMcsBitmask(uint8_t index)
Set the receive MCS bitmask.
bool IsBroadcast(void) const
Ptr< WifiMacQueue > GetTxopQueue(AcIndex ac) const override
Get the wifi MAC queue of the (Qos)Txop associated with the given AC.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
void SetSuccess(void)
Set success bit to 0 (success).
void AddBasicMode(WifiMode mode)
Invoked in a STA upon association to store the set of rates which belong to the BSSBasicRateSet of th...
void SendOneBeacon(void)
Forward a beacon packet to the beacon special DCF.
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
Ptr< WifiMacQueue > GetWifiMacQueue() const
Return the packet queue associated with this Txop.
Ptr< Txop > m_txop
This holds a pointer to the TXOP instance for this WifiMac - used for transmission of frames to non-Q...
void SetBeCWmin(uint32_t cwMin)
Set the AC_BE CWmin field in the EdcaParameterSet information element.
bool GetShortSlotTimeSupported(void) const override
Ptr< HeConfiguration > GetHeConfiguration(void) const
EventId m_beaconEvent
Event to generate one beacon.
Ptr< WifiRemoteStationManager > m_stationManager
Remote station manager (rate control, RTS/CTS/fragmentation thresholds etc.)
Ptr< const AttributeChecker > MakeBooleanChecker(void)
void SendProbeResp(Mac48Address to)
Forward a probe response packet to the DCF.
The HE Operation Information Element.
void SetBeTxopLimit(uint16_t txop)
Set the AC_BE TXOP Limit field in the EdcaParameterSet information element.
std::string GetUniqueName(void) const
Simulation virtual time values and global simulation resolution.
void SetBeaconGeneration(bool enable)
Enable or disable beacon generation of the AP.
uint16_t GetRxHighestSupportedLgiDataRate() const
Get the receive highest supported LGI data rate.
void SetTypeOfStation(TypeOfStation type) override
This method is invoked by a subclass to specify what type of station it is implementing.
void SendAssocResp(Mac48Address to, bool success, bool isReassoc)
Forward an association or a reassociation response packet to the DCF.
bool GetErpOfdmSupported(const Mac48Address &address) const
Return whether the station supports ERP OFDM or not.
uint8_t GetNRates(void) const
Return the number of supported rates.
void AddSupportedPhyPreamble(Mac48Address address, bool isShortPreambleSupported)
Record whether the short PHY preamble is supported by the station.
void SetShortPreambleEnabled(bool enable)
Enable or disable short PHY preambles.
WifiMode GetBasicMcs(uint8_t i) const
Return the MCS at the given list index.
uint16_t GetVhtOperationalChannelWidth(void) const
Determine the VHT operational channel width (in MHz).
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...
VhtOperation GetVhtOperation(void) const
Return the VHT operation of the current AP.
void RecordWaitAssocTxOk(Mac48Address address)
Records that we are waiting for an ACK for the association response we sent.
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 SetPcoActive(uint8_t pcoActive)
Set the PCO active.
void ForwardUp(Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet up to the device.
Status code for association response.
Ptr< UniformRandomVariable > m_beaconJitter
UniformRandomVariable used to randomize the time of the first beacon.
void AddStationHtCapabilities(Mac48Address from, HtCapabilities htCapabilities)
Records HT capabilities of the remote station.
std::map< uint16_t, Mac48Address > m_staList
Map of all stations currently associated to the AP with their association ID.
void SetViCWmin(uint32_t cwMin)
Set the AC_VI CWmin field in the EdcaParameterSet information element.
void SetSlot(Time slot)
Set the slot duration for this PHY.
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...
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
void AddStationVhtCapabilities(Mac48Address from, VhtCapabilities vhtCapabilities)
Records VHT capabilities of the remote station.
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
virtual Ptr< WifiMacQueue > GetTxopQueue(AcIndex ac) const
Get the wifi MAC queue of the (Qos)Txop associated with the given AC.
Hold variables of type string.
void SetQosSupported(uint8_t qosSupported)
Set QOS supported function.
#define NS_ABORT_IF(cond)
Abnormal program termination if a condition is true.
uint32_t GetVhtCapabilitiesInfo() const
Return the VHT Capabilities Info field in the VHT Capabilities information element.
void SetBkCWmin(uint32_t cwMin)
Set the AC_BK CWmin field in the EdcaParameterSet information element.
void NotifyRxDrop(Ptr< const Packet > packet)
uint16_t GetSupportedMcsAndNss() const
Return the MCS and NSS field in the HE Capabilities information element.
uint16_t GetAssociationId(Mac48Address addr) const
void UpdateShortPreambleEnabled(void)
Update whether short preamble should be enabled or not in the BSS.
bool m_enableBeaconJitter
Flag whether the first beacon should be generated at random time.
void SetLSigTxopProtectionFullSupport(uint8_t lSigTxopProtectionFullSupport)
Set the LSIG TXOP protection full support.
The Extended Capabilities Information Element.
void SetTxRxMcsSetUnequal(uint8_t txRxMcsSetUnequal)
Set the transmit / receive MCS set unequal.
uint32_t GetMinCw(void) const override
Return the minimum contention window size from the EDCA Parameter Set or the MU EDCA Parameter Set,...
void RecordDisassociated(Mac48Address address)
Records that the STA was disassociated.
Time GetBeaconInterval(void) const
Ptr< HtConfiguration > GetHtConfiguration(void) const
std::pair< Mac48Address, uint8_t > WifiAddressTidPair
(MAC address, TID) pair
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...
void SetQosInfo(uint8_t qosInfo)
Set the QoS Info field in the MuEdcaParameterSet information element.
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities of the device.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
virtual void SetWifiMac(const Ptr< RegularWifiMac > mac)
Set the wifi MAC this Txop is associated to.
void ForwardDown(Ptr< Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet down to DCF/EDCAF (enqueue the packet).
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities of the device.
void SetDsssSupported(uint8_t dsssSupported)
Set DSSS supported.
uint16_t m_numNonErpStations
Number of non-ERP stations currently associated to the AP.
void SetBeAci(uint8_t aci)
Set the AC_BE ACI field in the EdcaParameterSet information element.
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
void SetAddress(Mac48Address address) override
uint32_t GetMaxCw(void) const override
Return the maximum contention window size from the EDCA Parameter Set or the MU EDCA Parameter Set,...
void RecordGotAssocTxOk(Mac48Address address)
Records that we got an ACK for the association response we sent.
void UpdateShortSlotTimeEnabled(void)
Update whether short slot time should be enabled or not in the BSS.
AttributeValue implementation for Time.
uint16_t GetChannelWidth(void) const
void DoInitialize() override
Initialize() implementation.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Ptr< MacTxMiddle > m_txMiddle
TX middle (aggregation etc.)
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 SetPrimaryChannel(uint8_t ctrl)
Set the Primary Channel field in the HT Operation information element.
uint8_t GetMaxSupportedRxSpatialStreams(void) const
std::list< WifiMode > GetModeList(void) const
The WifiPhy::GetModeList() method is used (e.g., by a WifiRemoteStationManager) to determine the set ...
MuEdcaParameterSet GetMuEdcaParameterSet(void) const
Return the MU EDCA Parameter Set of the current AP.
uint8_t GetNMcsSupported(Mac48Address address) const
Return the number of MCS supported by the station.
void SetSecondaryChannelOffset(uint8_t secondaryChannelOffset)
Set the secondary channel offset.
void SetUseNonErpProtection(bool enable)
Enable or disable protection for non-ERP stations.
Ptr< ChannelAccessManager > m_channelAccessManager
channel access manager
void SetHeSupported(uint8_t heSupported)
Set the HE supported information element.
void SetBkAifsn(uint8_t aifsn)
Set the AC_BK AIFSN field in the EdcaParameterSet information element.
void SetStream(int64_t stream)
Specifies the stream number for the RngStream.
void SetViCWmax(uint32_t cwMax)
Set the AC_VI CWmax field in the EdcaParameterSet information element.
bool GetDsssSupported(const Mac48Address &address) const
Return whether the station supports DSSS or not.
std::list< uint8_t > GetBssMembershipSelectorList(void) const
The WifiPhy::BssMembershipSelector() method is used (e.g., by a WifiRemoteStationManager) to determin...
bool GetDsssSupported() const
Return whether the device supports DSSS.
void SetHtProtection(uint8_t htProtection)
Set the HT protection.
void AddSupportedMcs(Mac48Address address, WifiMode mcs)
Record the MCS index supported by the station.
Hold an unsigned integer type.
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities of the device.
bool SupportsSendFrom(void) const override
@ WIFI_MAC_MGT_PROBE_RESPONSE
void AddSupportedRate(uint64_t bs)
Add the given rate to the supported rates.
The HT Operation Information Element.
TracedCallback< uint16_t, Mac48Address > m_deAssocLogger
deassociation logger
Ptr< WifiPhy > m_phy
Wifi PHY.
EdcaParameterSet GetEdcaParameterSet(void) const
Return the EDCA Parameter Set of the current AP.
void SetNonGfHtStasPresent(uint8_t nonGfHtStasPresent)
Set the non GF HT STAs present.
void SetVoTxopLimit(uint16_t txop)
Set the AC_VO TXOP Limit field in the EdcaParameterSet information element.
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context.
ErpInformation GetErpInformation(void) const
Return the ERP information of the current AP.
void DoDispose(void) override
Destructor implementation.
TracedCallback< uint16_t, Mac48Address > m_assocLogger
association logger
void SetDualCtsProtection(uint8_t dualCtsProtection)
Set the dual CTS protection.
WifiMode GetBasicMode(uint8_t i) const
Return a basic mode from the set of basic modes.
Time m_bsrLifetime
Lifetime of Buffer Status Reports.
uint64_t GetDataRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
@ WIFI_MOD_CLASS_VHT
VHT (Clause 22)
void AddBssMembershipSelectorRate(uint64_t bs)
Add a special value to the supported rate set, corresponding to a BSS membership selector.
bool IsSupportedMcs(uint8_t mcs) const
Return the is MCS supported flag.
void Initialize(void)
Invoke DoInitialize on all Objects aggregated to this one.
uint16_t GetAssociationId(Mac48Address remoteAddress) const
Get the AID of a remote station.
void SetTxMiddle(const Ptr< MacTxMiddle > txMiddle)
Set MacTxMiddle this Txop is associated to.
bool GetUseNonErpProtection(void) const
Return whether protection for non-ERP stations is used in the BSS.
bool m_enableNonErpProtection
Flag whether protection mechanism is used or not when non-ERP STAs are present within the BSS.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
bool IsWaitAssocTxOk(Mac48Address address) const
Return whether we are waiting for an ACK for the association response we sent.
std::list< WifiMode > GetMcsList(void) const
The WifiPhy::GetMcsList() method is used (e.g., by a WifiRemoteStationManager) to determine the set o...
void SetViAifsn(uint8_t aifsn)
Set the AC_VI AIFSN field in the EdcaParameterSet information element.
bool GetHtSupported() const
Return whether the device supports HT.
virtual void Queue(Ptr< Packet > packet, const WifiMacHeader &hdr)
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...
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
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 SetObssNonHtStasPresent(uint8_t obssNonHtStasPresent)
Set the OBSS non HT STAs present.
void SetVoAifsn(uint8_t aifsn)
Set the AC_VO AIFSN field in the EdcaParameterSet information element.
void SetStaChannelWidth(uint8_t staChannelWidth)
Set the STA channel width.
bool GetHeSupported(void) const
Return whether the device has HE capability support enabled.
uint8_t QosUtilsGetTidForPacket(Ptr< const Packet > packet)
If a QoS tag is attached to the packet, returns a value < 8.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
void SetAifsn(uint8_t aifsn)
Set the number of slots that make up an AIFS.
void SetVhtSupported(uint8_t vhtSupported)
Set the VHT supported information element.
The MU EDCA Parameter Set.
void Enqueue(Ptr< Packet > packet, Mac48Address to) override
uint8_t GetMcsValue(void) const
uint16_t GetNextAssociationId(void)