12#include "ns3/wifi-phy-common.h"
70 RuSpec(
RuType ruType, std::size_t index,
bool primary80MHz);
272 std::size_t& nStations,
273 std::size_t& nCentral26TonesRus);
293 static std::vector<RuSpec>
GetRuSpecs(uint8_t ruAllocation);
std::size_t GetIndex() const
Get the RU index.
std::size_t m_index
RU index (starting at 1) as defined by Tables 27-7 to 27-9 of 802.11ax D8.0.
RuType GetRuType() const
Get the RU type.
bool operator<(const RuSpec &other) const
Compare this RU to the given RU.
RuSpec()
Default constructor.
bool m_primary80MHz
true if the RU is allocated in the primary 80MHz channel
std::size_t GetPhyIndex(MHz_u bw, uint8_t p20Index) const
Get the RU PHY index.
bool operator==(const RuSpec &other) const
Compare this RU to the given RU.
bool GetPrimary80MHz() const
Get the primary 80 MHz flag.
bool operator!=(const RuSpec &other) const
Compare this RU to the given RU.
This class stores the subcarrier groups of all the available HE RUs.
static std::vector< HeRu::RuSpec > GetCentral26TonesRus(MHz_u bw, HeRu::RuType ruType)
Get the set of 26-tone RUs that can be additionally allocated if the given bandwidth is split in RUs ...
static std::vector< RuSpec > GetRuSpecs(uint8_t ruAllocation)
Get the RU specs based on RU_ALLOCATION.
static bool DoesOverlap(MHz_u bw, RuSpec ru, const std::vector< RuSpec > &v)
Check whether the given RU overlaps with the given set of RUs.
static MHz_u GetBandwidth(RuType ruType)
Get the approximate bandwidth occupied by a RU.
std::map< uint8_t, std::vector< RuSpec > > RuAllocationMap
RU allocation map.
static RuType GetRuType(MHz_u bandwidth)
Get the RU corresponding to the approximate bandwidth.
static constexpr uint8_t EMPTY_242_TONE_RU
Empty 242-tone RU identifier.
std::pair< MHz_u, RuType > BwTonesPair
(bandwidth, number of tones) pair
static std::vector< HeRu::RuSpec > GetRusOfType(MHz_u bw, HeRu::RuType ruType)
Get the set of distinct RUs of the given type (number of tones) available in a HE PPDU of the given b...
static RuType GetEqualSizedRusForStations(MHz_u bandwidth, std::size_t &nStations, std::size_t &nCentral26TonesRus)
Given the channel bandwidth and the number of stations candidate for being assigned an RU,...
static SubcarrierGroup GetSubcarrierGroup(MHz_u bw, RuType ruType, std::size_t phyIndex)
Get the subcarrier group of the RU having the given PHY index among all the RUs of the given type (nu...
std::vector< SubcarrierRange > SubcarrierGroup
a vector of subcarrier ranges defining a subcarrier group
static RuSpec FindOverlappingRu(MHz_u bw, RuSpec referenceRu, RuType searchedRuType)
Find the RU allocation of the given RU type overlapping the given reference RU allocation.
std::pair< int16_t, int16_t > SubcarrierRange
(lowest index, highest index) pair defining a subcarrier range
static const SubcarrierGroups m_heRuSubcarrierGroups
Subcarrier groups for all RUs (with indices being applicable to primary 80 MHz channel)
static uint8_t GetEqualizedRuAllocation(RuType ruType, bool isOdd)
Get the RU_ALLOCATION value for equal size RUs.
static std::size_t GetNRus(MHz_u bw, RuType ruType)
Get the number of distinct RUs of the given type (number of tones) available in a HE PPDU of the give...
RuType
The different HE Resource Unit (RU) types.
static const RuAllocationMap m_heRuAllocations
Table 27-26 of IEEE 802.11ax-2021.
std::map< BwTonesPair, std::vector< SubcarrierGroup > > SubcarrierGroups
map (bandwidth, number of tones) pairs to the group of subcarrier ranges
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::ostream & operator<<(std::ostream &os, const Angles &a)
Struct providing a function call operator to compare two RUs.
MHz_u m_channelWidth
The channel width.
RuSpecCompare(MHz_u channelWidth, uint8_t p20Index)
Constructor.
uint8_t m_p20Index
Primary20 channel index.
bool operator()(const RuSpec &lhs, const RuSpec &rhs) const
Function call operator.