This class stores the subcarrier groups of all the available HE RUs. More...
#include "he-ru.h"
Classes | |
class | RuSpec |
RU Specification. More... | |
Public Types | |
typedef std::pair< uint8_t, RuType > | BwTonesPair |
(bandwidth, number of tones) pair More... | |
enum | RuType { RU_26_TONE = 0 , RU_52_TONE , RU_106_TONE , RU_242_TONE , RU_484_TONE , RU_996_TONE , RU_2x996_TONE } |
The different HE Resource Unit (RU) types. More... | |
typedef std::vector< SubcarrierRange > | SubcarrierGroup |
a vector of subcarrier ranges defining a subcarrier group More... | |
typedef std::map< BwTonesPair, std::vector< SubcarrierGroup > > | SubcarrierGroups |
map (bandwidth, number of tones) pairs to the group of subcarrier ranges More... | |
typedef std::pair< int16_t, int16_t > | SubcarrierRange |
(lowest index, highest index) pair defining a subcarrier range More... | |
Static Public Member Functions | |
static bool | DoesOverlap (uint16_t bw, RuSpec ru, const std::vector< RuSpec > &v) |
Check whether the given RU overlaps with the given set of RUs. More... | |
static bool | DoesOverlap (uint16_t bw, RuSpec ru, const SubcarrierGroup &toneRanges) |
Check whether the given RU overlaps with the given tone ranges. More... | |
static RuSpec | FindOverlappingRu (uint16_t bw, RuSpec referenceRu, RuType searchedRuType) |
Find the RU allocation of the given RU type overlapping the given reference RU allocation. More... | |
static uint16_t | GetBandwidth (RuType ruType) |
Get the approximate bandwidth occupied by a RU. More... | |
static std::vector< HeRu::RuSpec > | GetCentral26TonesRus (uint16_t bw, HeRu::RuType ruType) |
Get the set of 26-tone RUs that can be additionally allocated if the given bandwidth is split in RUs of the given type. More... | |
static RuType | GetEqualSizedRusForStations (uint16_t bandwidth, std::size_t &nStations, std::size_t &nCentral26TonesRus) |
Given the channel bandwidth and the number of stations candidate for being assigned an RU, maximize the number of candidate stations that can be assigned an RU subject to the constraint that all the stations must be assigned an RU of the same size (in terms of number of tones). More... | |
static std::size_t | GetNRus (uint16_t bw, RuType ruType) |
Get the number of distinct RUs of the given type (number of tones) available in a HE PPDU of the given bandwidth. More... | |
static std::vector< HeRu::RuSpec > | GetRusOfType (uint16_t 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 bandwidth. More... | |
static RuType | GetRuType (uint16_t bandwidth) |
Get the RU corresponding to the approximate bandwidth. More... | |
static SubcarrierGroup | GetSubcarrierGroup (uint16_t 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 (number of tones) available in a HE PPDU of the given bandwidth. More... | |
Static Public Attributes | |
static const SubcarrierGroups | m_heRuSubcarrierGroups |
Subcarrier groups for all RUs (with indices being applicable to primary 80 MHz channel) More... | |
This class stores the subcarrier groups of all the available HE RUs.
typedef std::pair<uint8_t, RuType> ns3::HeRu::BwTonesPair |
typedef std::vector<SubcarrierRange> ns3::HeRu::SubcarrierGroup |
typedef std::map<BwTonesPair, std::vector<SubcarrierGroup> > ns3::HeRu::SubcarrierGroups |
typedef std::pair<int16_t, int16_t> ns3::HeRu::SubcarrierRange |
enum ns3::HeRu::RuType |
Check whether the given RU overlaps with the given set of RUs.
Note that for channel width of 160 MHz the returned range is relative to the 160 MHz channel (i.e. -1012 to 1012).
bw | the bandwidth (MHz) of the HE PPDU (20, 40, 80, 160) |
ru | the given RU allocation |
v | the given set of RUs |
Definition at line 352 of file he-ru.cc.
References ns3::HeRu::RuSpec::GetIndex(), ns3::HeRu::RuSpec::GetPrimary80MHz(), ns3::HeRu::RuSpec::GetRuType(), GetSubcarrierGroup(), and RU_2x996_TONE.
Referenced by FindOverlappingRu(), ns3::WifiTxVector::GetNumRusPerHeSigBContentChannel(), and ns3::CtrlTriggerHeader::IsValid().
|
static |
Check whether the given RU overlaps with the given tone ranges.
Note that for channel width of 160 MHz the returned range is relative to the 160 MHz channel (i.e. -1012 to 1012).
bw | the bandwidth (MHz) of the HE PPDU (20, 40, 80, 160) |
ru | the given RU allocation |
toneRanges | the given set of tone ranges |
Definition at line 388 of file he-ru.cc.
References ns3::HeRu::RuSpec::GetPhyIndex(), ns3::HeRu::RuSpec::GetRuType(), GetSubcarrierGroup(), and RU_2x996_TONE.
|
static |
Find the RU allocation of the given RU type overlapping the given reference RU allocation.
Note that an assert is generated if the RU allocation is not found.
bw | the bandwidth (MHz) of the HE PPDU (20, 40, 80, 160) |
referenceRu | the reference RU allocation |
searchedRuType | the searched RU type |
Definition at line 410 of file he-ru.cc.
References DoesOverlap(), GetNRus(), ns3::HeRu::RuSpec::GetPrimary80MHz(), NS_ABORT_MSG, and RU_2x996_TONE.
Referenced by ns3::HePhy::GetCenterFrequencyForNonOfdmaPart(), and ns3::HePhy::GetNonOfdmaBand().
|
static |
Get the approximate bandwidth occupied by a RU.
ruType | the RU type |
Definition at line 487 of file he-ru.cc.
References NS_ABORT_MSG, RU_106_TONE, RU_242_TONE, RU_26_TONE, RU_2x996_TONE, RU_484_TONE, RU_52_TONE, and RU_996_TONE.
Referenced by ns3::HePhy::GetChannelWidthAndBand(), ns3::HePhy::GetDataRateFromTxVector(), ns3::HePhy::GetNonOfdmaWidth(), ns3::HePhy::GetPhyRateFromTxVector(), ns3::HePpdu::GetTransmissionChannelWidth(), and ns3::HePhy::GetTxPowerSpectralDensity().
|
static |
Get the set of 26-tone RUs that can be additionally allocated if the given bandwidth is split in RUs of the given type.
bw | the bandwidth (MHz) of the HE PPDU (20, 40, 80, 160) |
ruType | the RU type (number of tones) |
Definition at line 267 of file he-ru.cc.
References RU_106_TONE, RU_242_TONE, RU_26_TONE, RU_484_TONE, and RU_52_TONE.
|
static |
Given the channel bandwidth and the number of stations candidate for being assigned an RU, maximize the number of candidate stations that can be assigned an RU subject to the constraint that all the stations must be assigned an RU of the same size (in terms of number of tones).
bandwidth | the channel bandwidth in MHz | |
nStations | the number of candidate stations. On return, it is set to the number of stations that are assigned an RU | |
[out] | nCentral26TonesRus | the number of additional 26-tone RUs that can be allocated if the returned RU size is greater than 26 tones |
Definition at line 537 of file he-ru.cc.
References m_heRuSubcarrierGroups, NS_ABORT_IF, RU_106_TONE, RU_242_TONE, RU_2x996_TONE, RU_484_TONE, and RU_52_TONE.
Referenced by ns3::RrMultiUserScheduler::TrySendingBasicTf(), and ns3::RrMultiUserScheduler::TrySendingDlMuPpdu().
|
static |
Get the number of distinct RUs of the given type (number of tones) available in a HE PPDU of the given bandwidth.
bw | the bandwidth (MHz) of the HE PPDU (20, 40, 80, 160) |
ruType | the RU type (number of tones) |
Definition at line 219 of file he-ru.cc.
References m_heRuSubcarrierGroups, and RU_2x996_TONE.
Referenced by FindOverlappingRu(), GetSubcarrierGroup(), ns3::HeRu::RuSpec::SetPhyIndex(), and ns3::SpectrumWifiPhy::UpdateInterferenceHelperBands().
|
static |
Get the set of distinct RUs of the given type (number of tones) available in a HE PPDU of the given bandwidth.
bw | the bandwidth (MHz) of the HE PPDU (20, 40, 80, 160) |
ruType | the RU type (number of tones) |
Definition at line 239 of file he-ru.cc.
References m_heRuSubcarrierGroups, NS_ASSERT, and RU_2x996_TONE.
|
static |
Get the RU corresponding to the approximate bandwidth.
bandwidth | the approximate bandwidth (in MHz) occupied by the RU |
Definition at line 512 of file he-ru.cc.
References NS_ABORT_MSG, RU_106_TONE, RU_242_TONE, RU_26_TONE, RU_2x996_TONE, RU_484_TONE, RU_52_TONE, and RU_996_TONE.
Referenced by ns3::HePhy::GetCenterFrequencyForNonOfdmaPart(), and ns3::HePhy::GetNonOfdmaBand().
|
static |
Get the subcarrier group of the RU having the given PHY index among all the RUs of the given type (number of tones) available in a HE PPDU of the given bandwidth.
A subcarrier group is defined as one or more pairs indicating the lowest frequency index and the highest frequency index. Note that for channel width of 160 MHz the returned range is relative to the 160 MHz channel (i.e. -1012 to 1012). The PHY index parameter is used to distinguish between lower and higher 80 MHz subchannels.
bw | the bandwidth (MHz) of the HE PPDU (20, 40, 80, 160) |
ruType | the RU type (number of tones) |
phyIndex | the PHY index (starting at 1) of the RU |
Definition at line 313 of file he-ru.cc.
References GetNRus(), m_heRuSubcarrierGroups, NS_ABORT_MSG_IF, and RU_2x996_TONE.
Referenced by DoesOverlap(), ns3::HePhy::GetNonOfdmaBand(), ns3::HePhy::GetRuBandForRx(), ns3::HePhy::GetRuBandForTx(), and ns3::SpectrumWifiPhy::UpdateInterferenceHelperBands().
|
static |
Subcarrier groups for all RUs (with indices being applicable to primary 80 MHz channel)
Definition at line 269 of file he-ru.h.
Referenced by GetEqualSizedRusForStations(), GetNRus(), GetRusOfType(), and GetSubcarrierGroup().