12#include "ns3/wifi-phy-common.h"
50 RuSpec(
RuType ruType, std::size_t index,
bool primary160MHz,
bool primary80MHzOrLower80MHz);
138 std::size_t phyIndex,
160 static std::size_t
GetNRus(
MHz_u bw,
RuType ruType,
bool includeUndefinedRus =
false);
234 std::size_t& nStations,
235 std::size_t& nCentral26TonesRus);
240 static std::vector<RuSpec>
GetRuSpecs(uint16_t ruAllocation);
bool m_primary160MHz
true if the RU is allocated in the primary 160MHz channel
std::size_t m_index
RU index (starting at 1) within the 80 MHz segment.
bool operator!=(const RuSpec &other) const
Compare this RU to the given RU.
bool GetPrimary80MHzOrLower80MHz() const
bool operator==(const RuSpec &other) const
Compare this RU to the given RU.
bool m_primary80MHzOrLower80MHz
if the RU is allocated in the primary 160MHz channel, true if the RU is allocated in the primary 80MH...
bool operator<(const RuSpec &other) const
Compare this RU to the given RU.
RuSpec()=default
Default constructor.
RuType GetRuType() const
Get the RU type.
std::size_t GetPhyIndex(MHz_u bw, uint8_t p20Index) const
Get the RU PHY index.
std::size_t GetIndex() const
Get the RU index within the 80 MHz segment.
bool GetPrimary160MHz() const
Get whether the RU is allocated in the primary 160MHz channel.
This class stores the subcarrier groups of all the available EHT RUs.
static const RuAllocationMap m_ruAllocations
Table 36-34 of IEEE802.11be-D7.0.
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 std::pair< bool, bool > GetPrimaryFlags(MHz_u bw, RuType ruType, std::size_t phyIndex, uint8_t p20Index)
Get the primary flags of a given RU transmitted in a PPDU.
static uint16_t GetEqualizedRuAllocation(RuType ruType, bool isOdd, bool hasUsers)
Get the RU_ALLOCATION value for equal size RUs.
std::map< uint8_t, std::vector< RuSpec > > RuAllocationMap
RU allocation map.
static std::vector< RuSpec > GetRusOfType(MHz_u bw, RuType ruType)
Get the set of distinct RUs of the given type (number of tones) available in an PPDU of the given ban...
static std::vector< RuSpec > GetRuSpecs(uint16_t ruAllocation)
Get the RU specs based on RU_ALLOCATION.
static std::size_t GetIndexIn80MHzSegment(MHz_u bw, RuType ruType, std::size_t phyIndex)
Get the index of a given RU transmitted in a PPDU within its 80 MHz segment.
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...
static std::vector< RuSpec > GetCentral26TonesRus(MHz_u bw, RuType ruType)
Get the set of 26-tone RUs that can be additionally allocated if the given bandwidth is split in RUs ...
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.
static const SubcarrierGroups m_ruSubcarrierGroups
Subcarrier groups for all EHT RUs.
static uint8_t GetNumCentral26TonesRus(MHz_u bw, RuType ruType)
Get the number of 26-tone RUs that can be allocated if returned RU size is greater than 26 tones.
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 std::size_t GetNRus(MHz_u bw, RuType ruType, bool includeUndefinedRus=false)
Get the number of distinct RUs of the given type (number of tones) available in a PPDU of the given b...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::ostream & operator<<(std::ostream &os, const Angles &a)
RuType
The different Resource Unit (RU) types.
std::vector< SubcarrierRange > SubcarrierGroup
a vector of subcarrier ranges defining a subcarrier group
std::map< BwTonesPair, std::vector< SubcarrierGroup > > SubcarrierGroups
map (bandwidth, number of tones) pairs to the group of subcarrier ranges
double MHz_u
MHz weak type.