38 #include "ns3/he-configuration.h"
39 #include "ns3/ht-configuration.h"
41 #include "ns3/multi-link-element.h"
42 #include "ns3/packet.h"
43 #include "ns3/pointer.h"
44 #include "ns3/random-variable-stream.h"
45 #include "ns3/simulator.h"
46 #include "ns3/string.h"
65 "Delay between two beacons",
69 .AddAttribute(
"BeaconJitter",
70 "A uniform random variable to cause the initial beacon starting time "
71 "(after simulation time 0) "
72 "to be distributed between 0 and the BeaconInterval.",
75 MakePointerChecker<UniformRandomVariable>())
76 .AddAttribute(
"EnableBeaconJitter",
77 "If beacons are enabled, whether to jitter the initial send event.",
81 .AddAttribute(
"BeaconGeneration",
82 "Whether or not beacons are generated.",
86 .AddAttribute(
"EnableNonErpProtection",
87 "Whether or not protection mechanism should be used when non-ERP STAs "
88 "are present within the BSS."
89 "This parameter is only used when ERP is supported by the AP.",
93 .AddAttribute(
"BsrLifetime",
94 "Lifetime of Buffer Status Reports received from stations.",
98 .AddTraceSource(
"AssociatedSta",
99 "A station associated with this access point.",
101 "ns3::ApWifiMac::AssociationCallback")
102 .AddTraceSource(
"DeAssociatedSta",
103 "A station lost association with this access point.",
105 "ns3::ApWifiMac::AssociationCallback");
110 : m_enableBeaconGeneration(false)
141 std::unique_ptr<WifiMac::LinkEntity>
144 return std::make_unique<ApLinkEntity>();
162 for (uint8_t linkId = 0; linkId <
GetNLinks(); linkId++)
182 for (uint8_t linkId = 0; linkId <
GetNLinks(); ++linkId)
222 NS_FATAL_ERROR(
"beacon interval should be multiple of 1024us (802.11 time unit), see IEEE "
228 "beacon interval should be smaller then or equal to 65535 * 1024us (802.11 time unit)");
248 for (
const auto& sta : link.staList)
252 link.shortSlotTimeEnabled =
false;
256 link.shortSlotTimeEnabled =
true;
260 link.shortSlotTimeEnabled =
false;
271 for (
const auto& sta : link.staList)
276 link.shortPreambleEnabled =
false;
280 link.shortPreambleEnabled =
true;
284 link.shortPreambleEnabled =
false;
346 std::list<Mac48Address> addr2Set;
350 for (uint8_t linkId = 0; linkId <
GetNLinks(); linkId++)
361 NS_ASSERT_MSG(linkId,
"Station " << to <<
"is not associated, cannot send it a frame");
368 for (
const auto& addr2 : addr2Set)
433 for (
const auto& mode :
GetWifiPhy(linkId)->GetModeList())
435 uint64_t modeDataRate = mode.GetDataRate(
GetWifiPhy(linkId)->GetChannelWidth());
436 NS_LOG_DEBUG(
"Adding supported rate of " << modeDataRate);
444 NS_LOG_DEBUG(
"Adding basic mode " << mode.GetUniqueName());
463 for (
const auto& selector :
GetWifiPhy(linkId)->GetBssMembershipSelectorList())
478 return dsssParameters;
501 if (
GetLink(linkId).shortPreambleEnabled)
557 return edcaParameters;
560 std::optional<MuEdcaParameterSet>
575 heConfiguration->GetAttribute(
"MuBeAifsn", uintegerValue);
577 heConfiguration->GetAttribute(
"MuBeCwMin", uintegerValue);
579 heConfiguration->GetAttribute(
"MuBeCwMax", uintegerValue);
581 heConfiguration->GetAttribute(
"BeMuEdcaTimer", timeValue);
584 heConfiguration->GetAttribute(
"MuBkAifsn", uintegerValue);
586 heConfiguration->GetAttribute(
"MuBkCwMin", uintegerValue);
588 heConfiguration->GetAttribute(
"MuBkCwMax", uintegerValue);
590 heConfiguration->GetAttribute(
"BkMuEdcaTimer", timeValue);
593 heConfiguration->GetAttribute(
"MuViAifsn", uintegerValue);
595 heConfiguration->GetAttribute(
"MuViCwMin", uintegerValue);
597 heConfiguration->GetAttribute(
"MuViCwMax", uintegerValue);
599 heConfiguration->GetAttribute(
"ViMuEdcaTimer", timeValue);
602 heConfiguration->GetAttribute(
"MuVoAifsn", uintegerValue);
604 heConfiguration->GetAttribute(
"MuVoCwMin", uintegerValue);
606 heConfiguration->GetAttribute(
"MuVoCwMax", uintegerValue);
608 heConfiguration->GetAttribute(
"VoMuEdcaTimer", timeValue);
613 auto timerNotNull = [&muEdcaParameters](uint8_t aci) {
616 auto aci = {0, 1, 2, 3};
617 if (std::all_of(aci.begin(), aci.end(), timerNotNull))
619 return muEdcaParameters;
623 "MU EDCA Timers must be all zero if the IE is not advertised.");
628 std::optional<ReducedNeighborReport>
641 for (uint8_t index = 0; index <
GetNLinks(); ++index)
675 staMldAddress.has_value())
677 for (uint8_t i = 0; i <
GetNLinks(); i++)
680 if (
auto staAddress = remoteStationManager->GetAffiliatedStaAddress(*staMldAddress);
681 i != linkId && staAddress.has_value() &&
682 (remoteStationManager->IsWaitAssocTxOk(*staAddress) ||
683 remoteStationManager->IsAssocRefused(*staAddress)))
696 perStaProfile.SetCompleteProfile();
700 perStaProfile.SetAssocResponse(
GetAssocResp(*staAddress, i));
720 if (
phy->GetChannelWidth() > 20)
725 if (
GetLink(linkId).numNonHtStations == 0)
733 uint64_t maxSupportedRate = 0;
736 uint8_t nss = (mcs.GetMcsValue() / 8) + 1;
739 mcs.GetDataRate(
phy->GetChannelWidth(),
742 if (dataRate > maxSupportedRate)
744 maxSupportedRate = dataRate;
745 NS_LOG_DEBUG(
"Updating maxSupportedRate to " << maxSupportedRate);
748 uint8_t maxSpatialStream =
phy->GetMaxSupportedTxSpatialStreams();
750 uint8_t nMcs = mcsList.size();
751 for (
const auto& sta :
GetLink(linkId).staList)
753 if (remoteStationManager->GetHtSupported(sta.second))
755 uint64_t maxSupportedRateByHtSta = 0;
756 auto itMcs = mcsList.begin();
758 j < (
std::min(nMcs, remoteStationManager->GetNMcsSupported(sta.second)));
765 remoteStationManager->GetChannelWidthSupported(sta.second),
766 remoteStationManager->GetShortGuardIntervalSupported(sta.second) ? 400 : 800,
768 if (dataRate > maxSupportedRateByHtSta)
770 maxSupportedRateByHtSta = dataRate;
773 if (maxSupportedRateByHtSta < maxSupportedRate)
775 maxSupportedRate = maxSupportedRateByHtSta;
777 if (remoteStationManager->GetNMcsSupported(sta.second) < nMcs)
779 nMcs = remoteStationManager->GetNMcsSupported(sta.second);
781 if (remoteStationManager->GetNumberOfSupportedStreams(sta.second) < maxSpatialStream)
783 maxSpatialStream = remoteStationManager->GetNumberOfSupportedStreams(sta.second);
788 static_cast<uint16_t
>(maxSupportedRate / 1e6));
815 const uint16_t bssBandwidth =
phy->GetChannelWidth();
825 (bssBandwidth == 160)
826 ?
phy->GetOperatingChannel().GetPrimaryChannelNumber(80,
phy->GetStandard())
827 :
phy->GetChannelNumber());
834 uint8_t maxSpatialStream =
phy->GetMaxSupportedRxSpatialStreams();
835 for (
const auto& sta :
GetLink(linkId).staList)
837 if (remoteStationManager->GetVhtSupported(sta.second))
839 if (remoteStationManager->GetNumberOfSupportedStreams(sta.second) < maxSpatialStream)
841 maxSpatialStream = remoteStationManager->GetNumberOfSupportedStreams(sta.second);
845 for (uint8_t nss = 1; nss <= maxSpatialStream; nss++)
864 for (
const auto& sta :
GetLink(linkId).staList)
866 if (remoteStationManager->GetHeSupported(sta.second))
868 if (remoteStationManager->GetNumberOfSupportedStreams(sta.second) < maxSpatialStream)
870 maxSpatialStream = remoteStationManager->GetNumberOfSupportedStreams(sta.second);
874 for (uint8_t nss = 1; nss <= maxSpatialStream; nss++)
894 for (
const auto& sta :
GetLink(linkId).staList)
896 if (remoteStationManager->GetEhtSupported(sta.second))
898 if (remoteStationManager->GetNumberOfSupportedStreams(sta.second) < maxSpatialStream)
900 maxSpatialStream = remoteStationManager->GetNumberOfSupportedStreams(sta.second);
927 GetLink(linkId).shortPreambleEnabled);
929 GetLink(linkId).shortSlotTimeEnabled);
1020 if (remoteStationManager->IsWaitAssocTxOk(to))
1026 NS_ABORT_IF(!remoteStationManager->IsAssocRefused(to));
1028 remoteStationManager->RecordDisassociated(to);
1080 linkIdStaAddrMap[linkId] = to;
1087 "Sending a Multi-Link Element to a single link device");
1088 for (std::size_t idx = 0; idx < mle->GetNPerStaProfileSubelements(); idx++)
1090 auto& perStaProfile = mle->GetPerStaProfile(idx);
1091 if (perStaProfile.HasAssocResponse() &&
1092 perStaProfile.GetAssocResponse().GetStatusCode().IsSuccess())
1094 uint8_t otherLinkId = perStaProfile.GetLinkId();
1098 "No STA to associate with on link " << +otherLinkId);
1099 const auto [it, inserted] = linkIdStaAddrMap.insert({otherLinkId, *staAddress});
1101 "More than one Association Response to MLD "
1102 << *staMldAddress <<
" on link ID " << +otherLinkId);
1107 return linkIdStaAddrMap;
1113 if (linkIdStaAddrMap.empty())
1120 std::set<uint16_t> aids;
1121 std::map<uint8_t , uint16_t > linkIdAidMap;
1123 for (
const auto& [
id, staAddr] : linkIdStaAddrMap)
1125 for (
const auto& [aid, addr] :
GetLink(
id).staList)
1127 if (addr == staAddr)
1130 linkIdAidMap[id] = aid;
1138 while (!aids.empty())
1140 const uint16_t aid = *aids.begin();
1143 for (
const auto& [
id, staAddr] : linkIdStaAddrMap)
1145 if (
auto it =
GetLink(
id).staList.find(aid);
1146 it !=
GetLink(
id).staList.end() && it->second != staAddr)
1150 aids.erase(aids.begin());
1168 aid = *aids.begin();
1172 std::list<uint8_t> linkIds;
1173 std::transform(linkIdStaAddrMap.cbegin(),
1174 linkIdStaAddrMap.cend(),
1175 std::back_inserter(linkIds),
1176 [](
auto&& linkIdStaAddrPair) { return linkIdStaAddrPair.first; });
1181 const auto& [linkId, staAddr] = *linkIdStaAddrMap.cbegin();
1185 for (
const auto& [
id, staAddr] : linkIdStaAddrMap)
1190 if (
auto it = linkIdAidMap.find(
id); it == linkIdAidMap.end() || it->second != aid)
1193 link.staList.insert(std::make_pair(aid, staAddr));
1195 remoteStationManager->SetAssociationId(staAddr, aid);
1197 if (it == linkIdAidMap.end())
1200 if (remoteStationManager->GetDsssSupported(staAddr) &&
1201 !remoteStationManager->GetErpOfdmSupported(staAddr))
1203 link.numNonErpStations++;
1205 if (!remoteStationManager->GetHtSupported(staAddr))
1207 link.numNonHtStations++;
1215 link.staList.erase(it->second);
1231 for (std::size_t idx = 0; idx < mle->GetNPerStaProfileSubelements(); idx++)
1233 if (
const auto& perStaProfile = mle->GetPerStaProfile(idx);
1234 perStaProfile.HasAssocResponse() &&
1235 perStaProfile.GetAssocResponse().GetStatusCode().IsSuccess())
1237 perStaProfile.GetAssocResponse().SetAssociationId(aid);
1270 SetAid(assoc, linkIdStaAddrMap);
1309 std::list<uint8_t> linkIds;
1310 std::transform(linkIdStaAddrMap.cbegin(),
1311 linkIdStaAddrMap.cend(),
1312 std::back_inserter(linkIds),
1313 [](
auto&& linkIdStaAddrPair) { return linkIdStaAddrPair.first; });
1324 for (
const auto& [acIndex, wifiAc] :
wifiAcList)
1326 for (
auto tid : {wifiAc.GetLowTid(), wifiAc.GetHighTid()})
1329 m_scheduler->SetLinkIds(acIndex, queueId, linkIds);
1342 hdr.
SetAddr2(link.feManager->GetAddress());
1343 hdr.
SetAddr3(link.feManager->GetAddress());
1427 if (link.shortSlotTimeEnabled)
1457 if (
auto staMldAddress =
1459 staMldAddress.has_value())
1462 for (uint8_t i = 0; i <
GetNLinks(); i++)
1465 if (
auto staAddress = stationManager->GetAffiliatedStaAddress(*staMldAddress);
1466 staAddress.has_value() && i != *linkId &&
1467 stationManager->IsWaitAssocTxOk(*staAddress))
1470 <<
" associated with STA=" << *staAddress);
1471 stationManager->RecordGotAssocTxOk(*staAddress);
1492 <<
" association failed with STA=" << hdr.
GetAddr1());
1496 if (
auto staMldAddress =
1498 staMldAddress.has_value())
1501 for (uint8_t i = 0; i <
GetNLinks(); i++)
1504 if (
auto staAddress = stationManager->GetAffiliatedStaAddress(*staMldAddress);
1505 staAddress.has_value() && i != *linkId &&
1506 stationManager->IsWaitAssocTxOk(*staAddress))
1509 <<
" association failed with STA=" << *staAddress);
1510 stationManager->RecordGotAssocTxFailed(*staAddress);
1517 std::optional<uint8_t>
1520 for (uint8_t linkId = 0; linkId <
GetNLinks(); linkId++)
1528 return std::nullopt;
1539 std::optional<Mac48Address>
1545 return staIt->second;
1547 return std::nullopt;
1555 const WifiMacHeader* hdr = &mpdu->GetOriginal()->GetHeader();
1560 std::optional<uint8_t> apLinkId;
1562 (apLinkId =
IsAssociated(mpdu->GetHeader().GetAddr2())) &&
1577 <<
", size=" << packet->
GetSize());
1593 NS_LOG_DEBUG(
"forwarding frame from=" << from <<
", to=" << to);
1628 else if (hdr->
IsMgt())
1648 NS_LOG_DEBUG(
"Probe request received from " << from <<
": send probe response");
1658 <<
" request received from " << from
1659 << ((
GetNLinks() > 1) ?
" on link ID " + std::to_string(linkId) :
""));
1686 for (
auto it = staList.begin(); it != staList.end(); ++it)
1688 if (it->second == from)
1726 auto failure = [&](
const std::string& msg) ->
bool {
1727 NS_LOG_DEBUG(
"Association Request from " << from <<
" refused: " << msg);
1728 remoteStationManager->RecordAssocRefused(from);
1733 auto recvAssocRequest = [&](
auto&& frameRefWrapper) ->
bool {
1734 const auto& frame = frameRefWrapper.get();
1739 remoteStationManager->AddSupportedPhyPreamble(from, capabilities.
IsShortPreamble());
1744 return failure(
"STA's supported rate set not compatible with our Basic Rate set");
1750 const auto& htCapabilities = frame.GetHtCapabilities();
1751 if (htCapabilities.has_value() && htCapabilities->IsSupportedMcs(0))
1753 for (uint8_t i = 0; i < remoteStationManager->GetNBasicMcs(); i++)
1755 WifiMode mcs = remoteStationManager->GetBasicMcs(i);
1756 if (!htCapabilities->IsSupportedMcs(mcs.
GetMcsValue()))
1758 return failure(
"HT STA does not support all MCSs in Basic MCS Set");
1766 const auto& vhtCapabilities = frame.GetVhtCapabilities();
1767 if (vhtCapabilities.has_value() && vhtCapabilities->GetVhtCapabilitiesInfo() != 0)
1769 for (uint8_t i = 0; i < remoteStationManager->GetNBasicMcs(); i++)
1771 WifiMode mcs = remoteStationManager->GetBasicMcs(i);
1772 if (!vhtCapabilities->IsSupportedTxMcs(mcs.
GetMcsValue()))
1774 return failure(
"VHT STA does not support all MCSs in Basic MCS Set");
1782 const auto& heCapabilities = frame.GetHeCapabilities();
1783 if (heCapabilities.has_value() && heCapabilities->GetSupportedMcsAndNss() != 0)
1785 for (uint8_t i = 0; i < remoteStationManager->GetNBasicMcs(); i++)
1787 WifiMode mcs = remoteStationManager->GetBasicMcs(i);
1788 if (!heCapabilities->IsSupportedTxMcs(mcs.
GetMcsValue()))
1790 return failure(
"HE STA does not support all MCSs in Basic MCS Set");
1806 for (
const auto& mode :
phy->GetModeList())
1810 remoteStationManager->AddSupportedMode(from, mode);
1813 if (
GetErpSupported(linkId) && remoteStationManager->GetErpOfdmSupported(from) &&
1816 remoteStationManager->AddSupportedErpSlotTime(from,
true);
1820 const auto& htCapabilities = frame.GetHtCapabilities();
1821 if (htCapabilities.has_value() && htCapabilities->IsSupportedMcs(0))
1823 remoteStationManager->AddStationHtCapabilities(from, *htCapabilities);
1830 const auto& vhtCapabilities = frame.GetVhtCapabilities();
1833 if (vhtCapabilities.has_value() &&
1834 vhtCapabilities->GetRxHighestSupportedLgiDataRate() > 0)
1836 remoteStationManager->AddStationVhtCapabilities(from, *vhtCapabilities);
1839 if (vhtCapabilities->IsSupportedTxMcs(mcs.GetMcsValue()))
1841 remoteStationManager->AddSupportedMcs(from, mcs);
1849 const auto& heCapabilities = frame.GetHeCapabilities();
1850 if (heCapabilities.has_value() && heCapabilities->GetSupportedMcsAndNss() != 0)
1852 remoteStationManager->AddStationHeCapabilities(from, *heCapabilities);
1855 if (heCapabilities->IsSupportedTxMcs(mcs.GetMcsValue()))
1857 remoteStationManager->AddSupportedMcs(from, mcs);
1865 if (
const auto& ehtCapabilities = frame.GetEhtCapabilities())
1867 remoteStationManager->AddStationEhtCapabilities(from, *ehtCapabilities);
1872 remoteStationManager->AddSupportedMcs(from, mcs);
1877 NS_LOG_DEBUG(
"Association Request from " << from <<
" accepted");
1878 remoteStationManager->RecordWaitAssocTxOk(from);
1883 return std::visit(recvAssocRequest, assoc);
1892 auto recvMle = [&](
auto&& frame) {
1893 const auto& mle = frame.get().GetMultiLinkElement();
1895 if (!mle.has_value())
1902 for (std::size_t i = 0; i < mle->GetNPerStaProfileSubelements(); i++)
1904 auto& perStaProfile = mle->GetPerStaProfile(i);
1905 if (!perStaProfile.HasStaMacAddress())
1908 <<
"] Cannot setup a link if the STA MAC address is missing");
1911 uint8_t newLinkId = perStaProfile.GetLinkId();
1912 if (newLinkId == linkId || newLinkId >=
GetNLinks())
1914 NS_LOG_DEBUG(
"[i=" << i <<
"] Link ID " << newLinkId <<
" not valid");
1917 if (!perStaProfile.HasAssocRequest() && !perStaProfile.HasReassocRequest())
1919 NS_LOG_DEBUG(
"[i=" << i <<
"] No (Re)Association Request frame body present");
1924 perStaProfile.GetStaMacAddress(),
1927 mle->GetMldMacAddress());
1931 std::visit(recvMle, assoc);
1940 auto from = i.second.GetSourceAddr();
1941 auto to = i.second.GetDestinationAddr();
1945 NS_LOG_DEBUG(
"forwarding QoS frame from=" << from <<
", to=" << to);
1946 ForwardDown(i.first->Copy(), from, to, mpdu->GetHeader().GetQosTid());
1959 for (uint8_t linkId = 0; linkId <
GetNLinks(); ++linkId)
1969 NS_LOG_DEBUG(
"Scheduling initial beacon for access point "
1970 <<
GetAddress() <<
" at time " << jitterUs <<
"us");
1991 return useProtection;
1998 for (uint16_t nextAid = 1; nextAid <= 2007; nextAid++)
2000 if (std::all_of(linkIds.begin(), linkIds.end(), [&](
auto&& linkId) {
2001 auto& staList = GetLink(linkId).staList;
2002 return staList.find(nextAid) == staList.end();
2012 const std::map<uint16_t, Mac48Address>&
2032 return it->second.value;
2052 uint8_t maxSize = 0;
2055 for (uint8_t tid = 0; tid < 8; tid++)
void SendAssocResp(Mac48Address to, bool isReassoc, uint8_t linkId)
Forward an association or a reassociation response packet to the DCF/EDCA.
uint16_t GetAssociationId(Mac48Address addr, uint8_t linkId) const
std::unique_ptr< LinkEntity > CreateLinkEntity() const override
Create a LinkEntity object.
Ptr< Txop > m_beaconTxop
Dedicated Txop for beacons.
void SetBeaconGeneration(bool enable)
Enable or disable beacon generation of the AP.
void ParseReportedStaInfo(const AssocReqRefVariant &assoc, Mac48Address from, uint8_t linkId)
Given a (Re)Association Request frame body containing a Multi-Link Element, check if a link can be se...
void UpdateShortSlotTimeEnabled(uint8_t linkId)
Update whether short slot time should be enabled or not in the BSS corresponding to the given link.
const std::map< uint16_t, Mac48Address > & GetStaList(uint8_t linkId) const
Get a const reference to the map of associated stations on the given link.
void DoDispose() override
Destructor implementation.
void SetBeaconInterval(Time interval)
bool ReceiveAssocRequest(const AssocReqRefVariant &assoc, const Mac48Address &from, uint8_t linkId)
Check whether the supported rate set included in the received (Re)Association Request frame is compat...
std::map< uint8_t, Mac48Address > LinkIdStaAddrMap
Map of (link ID, remote STA address) of the links to setup.
Mac48Address DoGetLocalAddress(const Mac48Address &remoteAddr) const override
This method is called if this device is an MLD to determine the MAC address of the affiliated STA use...
CapabilityInformation GetCapabilities(uint8_t linkId) const
Return the Capability information of the current AP for the given link.
Ptr< UniformRandomVariable > m_beaconJitter
UniformRandomVariable used to randomize the time of the first beacon.
SupportedRates GetSupportedRates(uint8_t linkId) const
Return an instance of SupportedRates that contains all rates that we support for the given link (incl...
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.
EdcaParameterSet GetEdcaParameterSet(uint8_t linkId) const
Return the EDCA Parameter Set of the current AP for the given link.
MultiLinkElement GetMultiLinkElement(uint8_t linkId, WifiMacType frameType, const Mac48Address &to=Mac48Address::GetBroadcast())
Return the Multi-Link Element that the current AP includes in the management frames of the given type...
HtOperation GetHtOperation(uint8_t linkId) const
Return the HT operation of the current AP for the given link.
std::optional< Mac48Address > GetMldOrLinkAddressByAid(uint16_t aid) const
void UpdateShortPreambleEnabled(uint8_t linkId)
Update whether short preamble should be enabled or not in the BSS corresponding to the given link.
void TxOk(Ptr< const WifiMpdu > mpdu)
The packet we sent was successfully received by the receiver (i.e.
std::map< uint16_t, Mac48Address > m_aidToMldOrLinkAddress
Maps AIDs to MLD addresses (for MLDs) or link addresses (in case of single link devices)
TracedCallback< uint16_t, Mac48Address > m_deAssocLogger
deassociation logger
LinkIdStaAddrMap GetLinkIdStaAddrMap(MgtAssocResponseHeader &assoc, const Mac48Address &to, uint8_t linkId)
Get a map of (link ID, remote STA address) of the links to setup.
void SetAid(MgtAssocResponseHeader &assoc, const LinkIdStaAddrMap &linkIdStaAddrMap)
Set the AID field of the given Association Response frame.
bool m_enableBeaconGeneration
Flag whether beacons are being generated.
Time m_beaconInterval
Beacon interval.
uint16_t GetNextAssociationId(std::list< uint8_t > linkIds)
bool m_enableBeaconJitter
Flag whether the first beacon should be generated at random time.
std::unordered_map< WifiAddressTidPair, BsrType, WifiAddressTidHash > m_bufferStatus
Per (MAC address, TID) buffer status reports.
void SendProbeResp(Mac48Address to, uint8_t linkId)
Send a Probe Response in response to a Probe Request received from the STA with the given address on ...
DsssParameterSet GetDsssParameterSet(uint8_t linkId) const
Return the DSSS Parameter Set that we support on the given link.
TracedCallback< uint16_t, Mac48Address > m_assocLogger
association logger
Time GetBeaconInterval() const
static TypeId GetTypeId()
Get the type ID.
std::optional< ReducedNeighborReport > GetReducedNeighborReport(uint8_t linkId) const
Return the Reduced Neighbor Report (RNR) element that the current AP sends on the given link,...
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...
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.
ApLinkEntity & GetLink(uint8_t linkId) const
Get a reference to the link associated with the given ID.
void Receive(Ptr< const WifiMpdu > mpdu, uint8_t linkId) override
This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has bee...
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 ...
EhtOperation GetEhtOperation(uint8_t linkId) const
Return the EHT operation of the current AP for the given link.
void ConfigureStandard(WifiStandard standard) override
ErpInformation GetErpInformation(uint8_t linkId) const
Return the ERP information of the current AP for the given link.
void SetLinkUpCallback(Callback< void > linkUp) override
VhtOperation GetVhtOperation(uint8_t linkId) const
Return the VHT operation of the current AP for the given link.
void TxFailed(WifiMacDropReason timeoutReason, Ptr< const WifiMpdu > mpdu)
The packet we sent was successfully received by the receiver (i.e.
HeOperation GetHeOperation(uint8_t linkId) const
Return the HE operation of the current AP for the given link.
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...
std::optional< MuEdcaParameterSet > GetMuEdcaParameterSet() const
Return the MU EDCA Parameter Set of the current AP, if one needs to be advertised.
void DeaggregateAmsduAndForward(Ptr< const WifiMpdu > mpdu) override
This method is called to de-aggregate an A-MSDU and forward the constituent packets up the stack.
bool SupportsSendFrom() const override
MgtAssocResponseHeader GetAssocResp(Mac48Address to, uint8_t linkId)
Get the Association Response frame to send on a given link.
void ForwardDown(Ptr< Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet down to DCF/EDCAF (enqueue the packet).
void DoInitialize() override
Initialize() implementation.
std::optional< uint8_t > IsAssociated(const Mac48Address &address) const
Get the ID of a link (if any) that has been setup with the station having the given MAC address.
void SendOneBeacon(uint8_t linkId)
Forward a beacon packet to the beacon special DCF for transmission on the given link.
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,...
void ConfigQueueScheduler(const LinkIdStaAddrMap &linkIdStaAddrMap, const Mac48Address &to, uint8_t linkId)
Configure the queue scheduler so that frames stored in the container queues associated with the stati...
bool GetUseNonErpProtection(uint8_t linkId) const
Return whether protection for non-ERP stations is used in the BSS corresponding to the given link.
AttributeValue implementation for Boolean.
void Add(Ptr< Txop > txop)
void SetCurrentChannel(uint8_t currentChannel)
Set the Current Channel field in the DsssParameterSet information element.
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 SetBeAifsn(uint8_t aifsn)
Set the AC_BE AIFSN field in the EdcaParameterSet information element.
EHT Operation Information Element.
void SetMaxTxNss(uint8_t maxNss, uint8_t mcsStart, uint8_t mcsEnd)
Set the max Tx NSS for input MCS index range.
void SetMaxRxNss(uint8_t maxNss, uint8_t mcsStart, uint8_t mcsEnd)
Set the max Rx NSS for input MCS index range.
void Cancel()
This method is syntactic sugar for the ns3::Simulator::Cancel method.
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...
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 SetStbcBeacon(uint8_t stbcBeacon)
Set the STBC beacon.
static Mac48Address GetBroadcast()
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.
Time GetMuEdcaTimer(uint8_t aci) const
Get the MU EDCA Timer value encoded in the MU AC Parameter Record field corresponding to the given AC...
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 SetLinkId(uint8_t linkId)
Set the Link ID subfield in the STA Control field.
void AddPerStaProfileSubelement()
Add a Per-STA Profile Subelement in the Link Info field.
void SetBssParamsChangeCount(uint8_t count)
Set the BSS Parameters Change Count subfield in the Common Info field.
void SetLinkIdInfo(uint8_t linkIdInfo)
Set the Link ID Info subfield in the Common Info field.
PerStaProfileSubelement & GetPerStaProfile(std::size_t i)
Get a reference to the i-th Per-STA Profile Subelement in the Link Info field.
void SetMldMacAddress(Mac48Address address)
Set the MLD MAC Address subfield in the Common Info field.
std::size_t GetNPerStaProfileSubelements() const
Return the number of Per-STA Profile Subelement in the Link Info field.
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context.
void Initialize()
Invoke DoInitialize on all Objects aggregated to this one.
void Dispose()
Dispose of this Object.
void AddHeader(const Header &header)
Add header to this packet.
uint32_t GetSize() const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Ptr< Packet > Copy() const
performs a COW copy of the packet.
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer.
Smart pointer class similar to boost::intrusive_ptr.
uint8_t GetAifsn(uint8_t linkId) const override
For the given link, return the number of slots that make up an AIFS according to the EDCA Parameter S...
uint32_t GetMinCw(uint8_t linkId) const override
For the given link, return the minimum contention window size from the EDCA Parameter Set or the MU E...
uint32_t GetMaxCw(uint8_t linkId) const override
For the given link, return the maximum contention window size from the EDCA Parameter Set or the MU E...
void SetStream(int64_t stream)
Specifies the stream number for the RngStream.
The Reduced Neighbor Report element.
std::size_t GetNNbrApInfoFields() const
Get the number of Neighbor AP Information fields.
void SetMldParameters(std::size_t nbrApInfoId, std::size_t index, uint8_t mldId, uint8_t linkId, uint8_t changeSequence)
Set the MLD Parameters subfield of the i-th TBTT Information field of the given Neighbor AP Informati...
void SetShortSsid(std::size_t nbrApInfoId, std::size_t index, uint32_t shortSsid)
Set the Short SSID field of the i-th TBTT Information field of the given Neighbor AP Information fiel...
void SetBssid(std::size_t nbrApInfoId, std::size_t index, Mac48Address bssid)
Set the BSSID field of the i-th TBTT Information field of the given Neighbor AP Information field.
void SetPsd20MHz(std::size_t nbrApInfoId, std::size_t index, uint8_t psd20MHz)
Set the 20 MHz PSD field of the i-th TBTT Information field of the given Neighbor AP Information fiel...
void AddNbrApInfoField()
Add a Neighbor AP Information field.
void SetBssParameters(std::size_t nbrApInfoId, std::size_t index, uint8_t bssParameters)
Set the BSS Parameters field of the i-th TBTT Information field of the given Neighbor AP Information ...
void AddTbttInformationField(std::size_t nbrApInfoId)
Add a TBTT Information fields to the TBTT Information Set field of the given Neighbor AP Information ...
void SetOperatingChannel(std::size_t nbrApInfoId, const WifiPhyOperatingChannel &channel)
Set the Operating Class and the Channel Number fields of the given Neighbor AP Information field base...
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static Time Now()
Return the current simulation virtual time.
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
The IEEE 802.11 SSID Information Element.
Status code for association response.
bool IsSuccess() const
Return whether the status code is success.
void SetFailure()
Set success bit to 1 (failure).
void SetSuccess()
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() 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.
bool IsZero() const
Exactly equivalent to t == 0.
int64_t GetMicroSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
AttributeValue implementation for Time.
Time GetTxopLimit() const
Return the TXOP limit.
Ptr< WifiMacQueue > GetWifiMacQueue() const
Return the packet queue associated with this Txop.
virtual void SetWifiMac(const Ptr< WifiMac > mac)
Set the wifi MAC this Txop is associated to.
void SetMaxCws(std::vector< uint32_t > maxCws)
Set the maximum contention window size for each link.
void SetTxMiddle(const Ptr< MacTxMiddle > txMiddle)
Set MacTxMiddle this Txop is associated to.
void SetMinCws(std::vector< uint32_t > minCws)
Set the minimum contention window size for each link.
void SetAifsns(std::vector< uint8_t > aifsns)
Set the number of slots that make up an AIFS for each link.
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 VHT Operation 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< FrameExchangeManager > GetFrameExchangeManager(uint8_t linkId=SINGLE_LINK_OP_ID) const
Get the Frame Exchange Manager associated with the given link.
Ptr< QosTxop > GetBEQueue() const
Accessor for the AC_BE channel access function.
std::optional< Mac48Address > GetMldAddress(const Mac48Address &remoteAddr) const
Ptr< HeConfiguration > GetHeConfiguration() const
Ptr< Txop > GetTxop() const
Accessor for the Txop object.
VhtCapabilities GetVhtCapabilities(uint8_t linkId) const
Return the VHT capabilities of the device for the given link.
bool GetQosSupported() const
Return whether the device supports QoS.
uint8_t GetNLinks() const
Get the number of links (can be greater than 1 for 11be devices only).
Ptr< WifiMacQueueScheduler > m_scheduler
wifi MAC queue scheduler
void DoInitialize() override
Initialize() implementation.
virtual void ConfigureStandard(WifiStandard standard)
bool GetErpSupported(uint8_t linkId) const
Return whether the device supports ERP on the given link.
bool GetHtSupported() const
Return whether the device supports HT.
Ptr< QosTxop > GetVOQueue() const
Accessor for the AC_VO channel access function.
void SetTypeOfStation(TypeOfStation type)
This method is invoked by a subclass to specify what type of station it is implementing.
Ptr< WifiPhy > GetWifiPhy(uint8_t linkId=SINGLE_LINK_OP_ID) const
bool GetEhtSupported() const
Return whether the device supports EHT.
bool GetHeSupported() const
Return whether the device supports HE.
HtCapabilities GetHtCapabilities(uint8_t linkId) const
Return the HT capabilities of the device for the given link.
virtual std::optional< uint8_t > GetLinkIdByAddress(const Mac48Address &address) const
Get the ID of the link having the given MAC address, if any.
bool GetVhtSupported(uint8_t linkId) const
Return whether the device supports VHT on the given link.
Ptr< MacTxMiddle > m_txMiddle
TX middle (aggregation etc.)
Ptr< HtConfiguration > GetHtConfiguration() const
ExtendedCapabilities GetExtendedCapabilities() const
Return the extended capabilities of the device.
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,...
bool GetShortSlotTimeSupported() const
void NotifyRxDrop(Ptr< const Packet > packet)
virtual void SetLinkUpCallback(Callback< void > linkUp)
Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager(uint8_t linkId=0) const
void ForwardUp(Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet up to the device.
virtual void Receive(Ptr< const WifiMpdu > mpdu, uint8_t linkId)
This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has bee...
Mac48Address GetAddress() const
EhtCapabilities GetEhtCapabilities(uint8_t linkId) const
Return the EHT capabilities of the device for the given link.
LinkEntity & GetLink(uint8_t linkId) const
Get a reference to the link associated with the given ID.
HeCapabilities GetHeCapabilities(uint8_t linkId) const
Return the HE capabilities of the device for the given link.
Ptr< QosTxop > GetQosTxop(AcIndex ac) const
Accessor for a specified EDCA object.
void NotifyTxDrop(Ptr< const Packet > packet)
void DoDispose() override
Destructor implementation.
bool GetDsssSupported(uint8_t linkId) const
Return whether the device supports DSSS on the given link.
represent a single transmission mode
std::string GetUniqueName() const
uint64_t GetDataRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
uint8_t GetMcsValue() const
uint8_t GetMaxSupportedRxSpatialStreams() const
void SetSlot(Time slot)
Set the slot duration for this PHY.
const WifiPhyOperatingChannel & GetOperatingChannel() const
Get a const reference to the operating channel.
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 GetNBasicModes() const
Return the number of basic modes we support.
void SetUseNonErpProtection(bool enable)
Enable or disable protection for non-ERP stations.
std::optional< Mac48Address > GetAffiliatedStaAddress(const Mac48Address &mldAddress) const
Get the address of the remote station operating on this link and affiliated with the MLD having the g...
void SetShortPreambleEnabled(bool enable)
Enable or disable short PHY preambles.
bool IsAssociated(Mac48Address address) const
Return whether the station associated.
void SetMldAddress(const Mac48Address &address, const Mac48Address &mldAddress)
Set the address of the MLD the given station is affiliated with.
void RecordGotAssocTxOk(Mac48Address address)
Records that we got an ACK for the association response we sent.
WifiMode GetBasicMode(uint8_t i) const
Return a basic mode from the set of basic modes.
void RecordDisassociated(Mac48Address address)
Records that the STA was disassociated.
void RecordGotAssocTxFailed(Mac48Address address)
Records that we missed an ACK for the association response we sent.
std::optional< Mac48Address > GetMldAddress(const Mac48Address &address) const
Get the address of the MLD the given station is affiliated with, if any.
bool IsWaitAssocTxOk(Mac48Address address) const
Return whether we are waiting for 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,...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
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 AttributeChecker > MakeBooleanChecker()
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_ABORT_MSG_UNLESS(cond, msg)
Abnormal program termination if a condition is false, with a message.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
#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_NOARGS()
Output the name of the function.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
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.
WifiStandard
Identifies the IEEE 802.11 specifications that a Wifi device can be configured to use.
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_EHT
EHT (Clause 36)
@ 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.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
std::variant< std::reference_wrapper< MgtAssocRequestHeader >, std::reference_wrapper< MgtReassocRequestHeader > > AssocReqRefVariant
variant holding a reference to a (Re)Association Request
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
static constexpr uint8_t SINGLE_LINK_OP_ID
Link ID for single link operations (helps tracking places where correct link ID is to be used to supp...
constexpr uint8_t WIFI_EHT_MAX_MCS_INDEX
IEEE 802.11be D2.0 Figure 9-1002ai.
const std::map< AcIndex, WifiAc > wifiAcList
Map containing the four ACs in increasing order of priority (according to Table 10-1 "UP-to-AC Mappin...
WifiMacType
Combination of valid MAC header type/subtype.
@ WIFI_MAC_MGT_ASSOCIATION_RESPONSE
@ WIFI_MAC_MGT_PROBE_RESPONSE
@ WIFI_MAC_MGT_REASSOCIATION_RESPONSE
@ WIFI_QOSDATA_UNICAST_QUEUE
std::pair< Mac48Address, uint8_t > WifiAddressTidPair
(MAC address, TID) pair
std::tuple< WifiContainerQueueType, Mac48Address, std::optional< uint8_t > > WifiContainerQueueId
Tuple (queue type, Address, TID) identifying a container queue.
U * PeekPointer(const Ptr< U > &p)
Structure holding information specific to a single link.
std::map< uint16_t, Mac48Address > staList
Map of all stations currently associated to the AP with their association ID.
EventId beaconEvent
Event to generate one beacon.
~ApLinkEntity() override
Destructor (a virtual method is needed to make this struct polymorphic)
uint16_t numNonHtStations
Number of non-HT stations currently associated to the AP.
uint16_t numNonErpStations
Number of non-ERP stations currently associated to the AP.
Ptr< WifiPhy > phy
Wifi PHY object.
Ptr< FrameExchangeManager > feManager
Frame Exchange Manager object.
Ptr< ChannelAccessManager > channelAccessManager
channel access manager object