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" 49 .SetGroupName (
"Wifi")
51 .AddAttribute (
"BeaconInterval",
52 "Delay between two beacons",
57 .AddAttribute (
"CfpMaxDuration",
"The maximum size of the CFP (used when AP supports PCF)",
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 (
"RifsMode",
"If non-HT STAs are detected, whether to force RIFS to be disabled within the BSS." 84 "This parameter is only used when HT is supported by the AP.",
93 : m_enableBeaconGeneration (false)
199 NS_LOG_WARN (
"beacon interval should be multiple of 1024us (802.11 time unit), see IEEE Std. 802.11-2012");
210 NS_LOG_WARN (
"CFP max duration should be multiple of 1024us (802.11 time unit)");
232 for (std::map<uint16_t, Mac48Address>::const_iterator i =
m_staList.begin (); i !=
m_staList.end (); i++)
264 bool isNonGfHtStasPresent =
false;
265 for (std::map<uint16_t, Mac48Address>::const_iterator i =
m_staList.begin (); i !=
m_staList.end (); i++)
269 isNonGfHtStasPresent =
true;
274 return isNonGfHtStasPresent;
281 for (std::map<uint16_t, Mac48Address>::const_iterator i =
m_staList.begin (); i !=
m_staList.end (); i++)
412 NS_LOG_DEBUG (
"Adding supported rate of " << modeDataRate);
455 return dsssParameters;
540 return edcaParameters;
555 return cfParameterSet;
582 uint64_t maxSupportedRate = 0;
593 if (dataRate > maxSupportedRate)
595 maxSupportedRate = dataRate;
596 NS_LOG_DEBUG (
"Updating maxSupportedRate to " << maxSupportedRate);
601 for (std::map<uint16_t, Mac48Address>::const_iterator i =
m_staList.begin (); i !=
m_staList.end (); i++)
605 uint64_t maxSupportedRateByHtSta = 0;
616 if (dataRate > maxSupportedRateByHtSta)
618 maxSupportedRateByHtSta = dataRate;
621 if (maxSupportedRateByHtSta < maxSupportedRate)
623 maxSupportedRate = maxSupportedRateByHtSta;
662 if (channelWidth == 160)
666 else if (channelWidth == 80)
674 for (uint8_t nss = 1; nss <= 8; nss++)
677 if (nss <= m_phy->GetMaxSupportedRxSpatialStreams ())
784 for (std::map<uint16_t, Mac48Address>::const_iterator i =
m_staList.begin (); i !=
m_staList.end (); ++i)
797 m_staList.insert (std::make_pair (aid, to));
799 assoc.SetAssociationId (aid);
806 assoc.SetStatusCode (code);
1034 NS_LOG_DEBUG (
"forwarding frame from=" << from <<
", to=" << to);
1070 else if (hdr->
IsMgt ())
1075 NS_LOG_DEBUG (
"Probe request received from " << from <<
": send probe response");
1083 NS_LOG_DEBUG (
"Association request received from " << from);
1091 bool problem =
false;
1092 bool isHtStation =
false;
1093 bool isOfdmStation =
false;
1094 bool isErpStation =
false;
1095 bool isDsssStation =
false;
1103 isDsssStation =
false;
1107 isErpStation =
false;
1111 isOfdmStation =
false;
1113 if (isDsssStation ==
false && isErpStation ==
false && isOfdmStation ==
false)
1123 isDsssStation =
true;
1127 isErpStation =
true;
1131 isOfdmStation =
true;
1190 NS_LOG_DEBUG (
"One of the Basic Rate set mode is not supported by the station: send association response with an error status");
1195 NS_LOG_DEBUG (
"The Basic Rate set modes are supported by the station");
1265 if (!isErpStation && isDsssStation)
1270 NS_LOG_DEBUG (
"Send association response with success status");
1277 NS_LOG_DEBUG (
"Reassociation request received from " << from);
1285 bool problem =
false;
1286 bool isHtStation =
false;
1287 bool isOfdmStation =
false;
1288 bool isErpStation =
false;
1289 bool isDsssStation =
false;
1297 isDsssStation =
false;
1301 isErpStation =
false;
1305 isOfdmStation =
false;
1307 if (isDsssStation ==
false && isErpStation ==
false && isOfdmStation ==
false)
1317 isDsssStation =
true;
1321 isErpStation =
true;
1325 isOfdmStation =
true;
1384 NS_LOG_DEBUG (
"One of the Basic Rate set mode is not supported by the station: send reassociation response with an error status");
1389 NS_LOG_DEBUG (
"The Basic Rate set modes are supported by the station");
1451 if (!isErpStation && isDsssStation)
1456 NS_LOG_DEBUG (
"Send reassociation response with success status");
1463 NS_LOG_DEBUG (
"Disassociation received from " << from);
1465 for (std::map<uint16_t, Mac48Address>::const_iterator j =
m_staList.begin (); j !=
m_staList.end (); j++)
1467 if (j->second == from)
1514 i != packets.end (); ++i)
1516 if ((*i).second.GetDestinationAddr () ==
GetAddress ())
1518 ForwardUp ((*i).first, (*i).second.GetSourceAddr (),
1519 (*i).second.GetDestinationAddr ());
1525 NS_LOG_DEBUG (
"forwarding QoS frame from=" << from <<
", to=" << to);
1559 return useProtection;
1565 bool rifsMode =
false;
1588 for (uint16_t nextAid = 1; nextAid <= 2007; nextAid++)
void SetRxHighestSupportedDataRate(uint16_t maxsupportedrate)
Set the receive highest supported data rate.
uint8_t GetNMcsSupported(Mac48Address address) const
Return the number of MCS supported by the station.
void DoInitialize(void)
Initialize() implementation.
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
void Dispose(void)
Dispose of this Object.
void SendCfEnd(void)
Send a CF-End packet.
std::map< uint16_t, Mac48Address > m_staList
Map of all stations currently associated to the AP with their association ID.
void SetBeaconInterval(Time interval)
bool IsBroadcast(void) const
Simulation virtual time values and global simulation resolution.
void SendCfFrame(WifiMacType frameType, Mac48Address addr)
Sends CF frame to sta with address addr.
void AddSupportedMcs(Mac48Address address, WifiMode mcs)
Record the MCS index supported by the station.
void SetHeSupported(uint8_t hesupported)
Set the HE supported information element.
std::list< Mac48Address >::iterator m_itCfPollingList
Iterator to the list of all PCF stations currently associated to the AP.
#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 SetStream(int64_t stream)
Specifies the stream number for the RngStream.
bool GetRifsMode(void) const
Return whether RIFS is allowed in the BSS.
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.
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 ...
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.
WifiMode GetMcs(uint8_t mcs) const
The WifiPhy::GetMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of tr...
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 m_disableRifs
Flag whether to force RIFS to be disabled within the BSS If non-HT STAs are detected.
bool GetShortPreambleSupported(Mac48Address address) const
Return whether the station supports short PLCP 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.
bool GetShortGuardInterval(void) const
Return whether short guard interval is supported.
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.
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 SetTxMaxNSpatialStreams(uint8_t maxtxspatialstreams)
Set the transmit maximum number spatial streams.
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 SetBasicRate(uint64_t bs)
Set the given rate to basic rates.
uint8_t GetNBssMembershipSelectors(void) const
The WifiPhy::NBssMembershipSelectors() method is used (e.g., by a WifiRemoteStationManager) to determ...
void SetChannelAccessManager(const Ptr< ChannelAccessManager > manager)
Set ChannelAccessManager this Txop is associated to.
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities of the device.
bool IsSupportedTxMcs(uint8_t mcs) const
Get the is transmit MCS 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...
void SetSecondaryChannelOffset(uint8_t secondarychanneloffset)
Set the secondary channel offset.
#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.
CfParameterSet GetCfParameterSet(void) const
Return the CF parameter set of the current AP.
void SetCFPDurRemainingUs(uint64_t cfpdurremaining)
Set the CFP MaxDuration in microseconds.
bool GetRifsSupported(void) const
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
The HT Capabilities Information ElementThis class knows how to serialise and deserialise the HT Capab...
void SetVoAifsn(uint8_t aifsn)
Set the AC_VO AIFSN field in the EdcaParameterSet information element.
bool GetPcfSupported() const
Return whether the device supports PCF.
std::list< std::pair< Ptr< Packet >, AmsduSubframeHeader > >::const_iterator DeaggregatedMsdusCI
DeaggregatedMsdusCI typedef.
WifiMode GetBasicMcs(uint8_t i) const
Return the MCS at the given list index.
void SetSlot(Time slotTime)
static DeaggregatedMsdus Deaggregate(Ptr< Packet > aggregatedPacket)
void NotifyRxDrop(Ptr< const Packet > packet)
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 SetPhase(uint8_t pcophase)
Set the PCO phase.
Time GetBeaconInterval(void) const
virtual void SetPcfSupported(bool enable)
Enable or disable PCF capability support.
bool CanStartNextPolling(void) const
Check if the next PCF transmission can fit in the remaining CFP duration.
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
void SetHtProtection(uint8_t htprotection)
Set the HT protection.
uint16_t GetNextAssociationId(void)
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...
void SetCFPCount(uint8_t cfpcount)
Set the CFP Count in DTIM frames unit.
bool GetGreenfieldSupported(Mac48Address address) const
Return whether the station supports Greenfield or not.
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.
bool GetShortSlotTimeSupported(void) const
void AddSupportedRate(uint64_t bs)
Add the given rate to the supported rates.
virtual void Receive(Ptr< Packet > packet, const WifiMacHeader *hdr)
This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has bee...
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.
void SetStaChannelWidth(uint8_t stachannelwidth)
Set the STA channel width.
bool IsMandatory(void) const
void RecordDisassociated(Mac48Address address)
Records that the STA was disassociated.
The Wifi MAC high model for a STA or AP in a BSS.
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
bool m_enableBeaconGeneration
Flag whether beacons are being generated.
bool GetShortPlcpPreambleSupported(void) const
Return whether short PLCP preamble is supported.
void SendAssocResp(Mac48Address to, bool success, bool isReassoc)
Forward an association or a reassociation response packet to the DCF.
void SetWifiRemoteStationManager(const Ptr< WifiRemoteStationManager > stationManager)
uint16_t GetChannelWidth(void) const
void Enqueue(Ptr< const Packet > packet, Mac48Address to)
void SetShortSlotTimeEnabled(bool enable)
Enable or disable short slot time.
void SetVhtSupported(uint8_t vhtsupported)
Set the VHT supported information element.
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...
uint8_t GetNMcs(void) const
The WifiPhy::GetNMcs() method is used (e.g., by a WifiRemoteStationManager) to determine the set of t...
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 SetDualBeacon(uint8_t dualbeacon)
Set the dual beacon.
void ForwardUp(Ptr< Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet up to the device.
void SetTxUnequalModulation(uint8_t txunequalmodulation)
Set the transmit unequal modulation.
void SetSuccess(void)
Set success bit to 0 (success).
void SetCfpMaxDuration(Time duration)
bool GetVhtSupported(Mac48Address address) const
Return whether the station supports VHT or not.
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...
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
Mac48Address GetAddress(void) const
Return the MAC address of this MacLow.
bool IsSupportedMcs(uint8_t mcs) const
Return the is MCS supported flag.
void SetTypeOfStation(TypeOfStation type)
This method is invoked by a subclass to specify what type of station it is implementing.
AttributeValue implementation for Time.
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.
CapabilityInformation GetCapabilities(void) const
Return the Capability information of the current AP.
void NotifyTxDrop(Ptr< const Packet > packet)
void ForwardDown(Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet down to DCF/EDCAF (enqueue the packet).
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 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.
virtual bool IsCfPeriod(void) const
This function indicates whether it is the CF period.
bool GetShortSlotTimeEnabled(void) const
Determine whether short slot time should be enabled or not in the BSS.
The CF Parameter SetThis class knows how to serialise and deserialise the CF Parameter Set...
void AddStationHtCapabilities(Mac48Address from, HtCapabilities htcapabilities)
Records HT capabilities of the remote station.
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 SetAddress(Mac48Address address)
bool GetShortPreambleEnabled(void) const
Determine whether short preamble should be enabled or not in the BSS.
static Mac48Address GetBroadcast(void)
EventId m_beaconEvent
Event to generate one beacon.
Ptr< MacRxMiddle > m_rxMiddle
RX middle (de-fragmentation etc.)
void SetViTxopLimit(uint16_t txop)
Set the AC_VI TXOP Limit field in the EdcaParameterSet information element.
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
Ptr< Txop > m_beaconTxop
Dedicated Txop for beacons.
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities of the device.
void SetRxMcsBitmask(uint8_t index)
Set the receive MCS bitmask.
void AddStationHeCapabilities(Mac48Address from, HeCapabilities hecapabilities)
Records HE capabilities of the remote station.
bool IsAssociated(Mac48Address address) const
Return whether the station associated.
void SetPcfSupported(uint8_t pcfSupported)
Set PCF supported function.
void SetCurrentChannel(uint8_t currentChannel)
Set the Current Channel field in the DsssParameterSet information element.
std::list< Mac48Address > m_cfPollingList
List of all PCF stations currently associated to the AP.
void SendNextCfFrame(void)
Determine what is the next PCF frame and trigger its transmission.
WifiModulationClass GetModulationClass() const
Ptr< MacLow > m_low
MacLow (RTS, CTS, DATA, ACK etc.)
std::string GetUniqueName(void) const
Time GetCfpMaxDuration(void) const
void Receive(Ptr< Packet > packet, const WifiMacHeader *hdr)
This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has bee...
void DeaggregateAmsduAndForward(Ptr< Packet > aggregatedPacket, const WifiMacHeader *hdr)
This method is called to de-aggregate an A-MSDU and forward the constituent packets up the stack...
int64_t GetMicroSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Status code for association response.
virtual void SetWifiRemoteStationManager(const Ptr< WifiRemoteStationManager > stationManager)
void SetLinkUpCallback(Callback< void > linkUp)
void SetLinkUpCallback(Callback< void > linkUp)
virtual void DoDispose()
Destructor implementation.
std::list< std::pair< Ptr< Packet >, AmsduSubframeHeader > > DeaggregatedMsdus
DeaggregatedMsdus typedef.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetCfpMaxDuration(Time duration)
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 SetCFPPeriod(uint8_t cfpperiod)
Set the CFP Period in DTIM frames unit.
Ptr< const AttributeChecker > MakeBooleanChecker(void)
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...
void SetCFPMaxDurationUs(uint64_t cfpmaxduration)
Set the CFP MaxDuration in microseconds.
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
void SetUseNonErpProtection(bool enable)
Enable or disable protection for non-ERP stations.
void SetTxRxMcsSetUnequal(uint8_t txrxmcssetunequal)
Set the transmit / receive MCS set unequal.
void SetBkAifsn(uint8_t aifsn)
Set the AC_BK AIFSN field in the EdcaParameterSet information element.
bool IsSupportedTxMcs(uint8_t mcs) const
Is transmit MCS supported.
void SetDsssSupported(uint8_t DsssSupported)
Set DSSS supported.
void SetMacLow(const Ptr< MacLow > low)
Set MacLow associated with this Txop.
static EventId ScheduleNow(MEM mem_ptr, OBJ obj)
Schedule an event to expire Now.
void SetStbcBeacon(uint8_t stbcbeacon)
Set the STBC beacon.
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.
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.
DsssParameterSet GetDsssParameterSet(void) const
Return the DSSS Parameter Set that we support.
void SetDualCtsProtection(uint8_t dualctsprotection)
Set the dual CTS protection.
HtOperation GetHtOperation(void) const
Return the HT operation of the current AP.
void AddSupportedPlcpPreamble(Mac48Address address, bool isShortPreambleSupported)
Record whether the short PLCP preamble is supported by the station.
void SetBeaconInterval(Time interval)
ErpInformation GetErpInformation(void) const
Return the ERP information of the current AP.
Mac48Address GetAddress(void) const
uint8_t GetNModes(void) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
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...
WifiMode GetMode(uint8_t mode) const
The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used (e.g., by a WifiRemoteStationManager...
void SetPcoActive(uint8_t pcoactive)
Set the PCO active.
uint8_t GetBssMembershipSelector(uint8_t selector) const
The WifiPhy::BssMembershipSelector() method is used (e.g., by a WifiRemoteStationManager) to determin...
EventId m_cfpEvent
Event to generate one PCF frame.
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.
virtual void Queue(Ptr< const Packet > packet, const WifiMacHeader &hdr)
void TxFailed(const WifiMacHeader &hdr)
The packet we sent was successfully received by the receiver (i.e.
bool GetHtSupported(Mac48Address address) const
Return whether the station supports HT or not.
void SetNonGfHtStasPresent(uint8_t nongfhtstaspresent)
Set the non GF HT STAs present.
void SendOneBeacon(void)
Forward a beacon packet to the beacon special DCF.
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.
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
bool GetHtSupported() const
Return whether the device supports HT.
void DoDispose(void)
Destructor implementation.
void SetAddress(Mac48Address address)
#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.
Ptr< UniformRandomVariable > m_beaconJitter
UniformRandomVariable used to randomize the time of the first beacon.
void SetVoTxopLimit(uint16_t txop)
Set the AC_VO TXOP Limit field in the EdcaParameterSet information element.
void SetUseGreenfieldProtection(bool enable)
Enable or disable protection for stations that do not support HT greenfield format.
std::list< Mac48Address > m_nonErpStations
List of all non-ERP stations currently associated to the AP.
void SetObssNonHtStasPresent(uint8_t obssnonhtstaspresent)
Set the OBSS non HT STAs present.
virtual void DoInitialize()
Initialize() implementation.
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
void IncrementPollingListIterator(void)
Increment the PCF polling list iterator to indicate that the next polling station can be polled...
void SetLSigTxopProtectionFullSupport(uint8_t lsigtxopprotectionfullsupport)
Set the LSIG TXOP protection full support.
void SetRifsMode(uint8_t rifsmode)
Set the RIFS mode.
virtual void SetWifiRemoteStationManager(const Ptr< WifiRemoteStationManager > remoteManager)
Set WifiRemoteStationsManager this Txop is associated to.
void SendCfPoll(void)
Send a CF-Poll packet to the next polling STA.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Time GetCfpMaxDuration(void) const
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.
bool IsNonGfHtStasPresent(void) const
Determine whether non-Greenfield HT stations are present or not.
virtual void TxOk(const WifiMacHeader &hdr)
The packet we sent was successfully received by the receiver (i.e.
void TxOk(const WifiMacHeader &hdr)
The packet we sent was successfully received by the receiver (i.e.
bool GetShortGuardInterval(Mac48Address address) const
Return whether the station supports HT/VHT short guard interval.
Time GetBeaconInterval(void) const
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 PLCP 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...
void SetHtSupported(uint8_t htsupported)
Set the HT Supported.
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 SetTxMcsSetDefined(uint8_t txmcssetdefined)
Set the transmit MCS set defined.
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).
void SetTxOkCallback(TxOk callback)
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities of the device.
std::list< Mac48Address > m_nonHtStations
List of all non-HT stations currently associated to the AP.
The IEEE 802.11ax HE Capabilities.
uint8_t GetMcsValue(void) const
bool SupportsSendFrom(void) const
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.
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.)
void SetRifsPermitted(bool allow)
Permit or prohibit RIFS.
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.
void AddStationVhtCapabilities(Mac48Address from, VhtCapabilities vhtcapabilities)
Records VHT capabilities of the remote station.
uint16_t GetChannelWidthSupported(Mac48Address address) const
Return the channel width supported by the station.
uint8_t GetMaxSupportedRxSpatialStreams(void) const
void SetBeaconGeneration(bool enable)
Enable or disable beacon generation of the AP.
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities of the device.
void SetChannelWidth(uint8_t channelWidth)
Set the Channel Width field in the VHT Operation information element.
virtual void TxFailed(const WifiMacHeader &hdr)
The packet we sent was successfully received by the receiver (i.e.
Time GetTxopLimit(void) const
Return the TXOP limit.