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 | |
using | RuAllocationMap = std::map<uint8_t, std::vector<RuSpec>> |
RU allocation map. | |
Static Public Member Functions | |
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 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 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 of the given type. | |
static uint16_t | GetEqualizedRuAllocation (RuType ruType, bool isOdd, bool hasUsers) |
Get the RU_ALLOCATION value for equal size RUs. | |
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, 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). | |
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 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 given bandwidth. | |
static bool | GetPrimary80MHzFlag (MHz_u bw, RuType ruType, std::size_t phyIndex, uint8_t p20Index) |
Get the primary 80 MHz flag of a given RU transmitted in a PPDU. | |
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 a HE PPDU of the given bandwidth. | |
static std::vector< RuSpec > | GetRuSpecs (uint16_t ruAllocation) |
Get the RU specs based on RU_ALLOCATION. | |
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 (number of tones) available in a HE PPDU of the given bandwidth. | |
Static Public Attributes | |
static constexpr uint8_t | EMPTY_242_TONE_RU = 113 |
Empty 242-tone RU identifier. | |
static const RuAllocationMap | m_heRuAllocations |
Table 27-26 of IEEE 802.11ax-2021. | |
static const SubcarrierGroups | m_heRuSubcarrierGroups |
Subcarrier groups for all RUs (with indices being applicable to primary 80 MHz channel) | |
Static Private Member Functions | |
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. | |
This class stores the subcarrier groups of all the available HE RUs.
using ns3::HeRu::RuAllocationMap = std::map<uint8_t, std::vector<RuSpec>> |
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 of the HE PPDU (20, 40, 80, 160) |
ru | the given RU allocation |
v | the given set of RUs |
Definition at line 631 of file he-ru.cc.
References ns3::HeRu::RuSpec::GetIndex(), ns3::HeRu::RuSpec::GetPrimary80MHz(), ns3::HeRu::RuSpec::GetRuType(), GetSubcarrierGroup(), and ns3::RU_2x996_TONE.
Referenced by ns3::WifiRu::DoesOverlap(), and FindOverlappingRu().
|
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 of the HE PPDU (20, 40, 80, 160) |
referenceRu | the reference RU allocation |
searchedRuType | the searched RU type |
Definition at line 673 of file he-ru.cc.
References DoesOverlap(), GetNRus(), ns3::HeRu::RuSpec::GetPrimary80MHz(), NS_ABORT_MSG, and ns3::RU_2x996_TONE.
Referenced by ns3::WifiRu::FindOverlappingRu().
|
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 of the HE PPDU (20, 40, 80, 160) |
ruType | the RU type (number of tones) |
Definition at line 546 of file he-ru.cc.
References ns3::RU_106_TONE, ns3::RU_242_TONE, ns3::RU_26_TONE, ns3::RU_484_TONE, and ns3::RU_52_TONE.
Referenced by ns3::WifiRu::GetCentral26TonesRus().
|
static |
Get the RU_ALLOCATION value for equal size RUs.
ruType | equal size RU type (generated by GetEqualSizedRusForStations) |
isOdd | if number of stations is an odd number |
hasUsers | whether it contributes to User field(s) in the content channel this RU Allocation belongs to |
Definition at line 397 of file he-ru.cc.
References ns3::RU_106_TONE, ns3::RU_242_TONE, ns3::RU_26_TONE, ns3::RU_484_TONE, and ns3::RU_52_TONE.
Referenced by ns3::WifiTxVector::DeriveRuAllocation(), and ns3::WifiRu::GetEqualizedRuAllocation().
|
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 | |
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 719 of file he-ru.cc.
References GetNumCentral26TonesRus(), m_heRuSubcarrierGroups, NS_ABORT_IF, and ns3::RU_2x996_TONE.
Referenced by ns3::WifiRu::GetEqualSizedRusForStations().
|
static |
Get the index of a given RU transmitted in a PPDU within its 80 MHz segment.
bw | the bandwidth of the 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 475 of file he-ru.cc.
References ns3::WifiRu::GetBandwidth(), and GetNRus().
Referenced by TestMultiUserScheduler::ComputeWifiTxVector(), WifiPrimaryChannelsTest::DoSendHeTbPpdu(), ns3::SpectrumWifiPhy::GetRuBands(), TestUlOfdmaPhyTransmission::GetTxVectorForHeTbPpdu(), WifiRuPhyIdxTo80MHzIdxAndFlagsTest::RunOne(), and WifiPrimaryChannelsTest::SendDlMuPpdu().
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 of the HE PPDU (20, 40, 80, 160) |
ruType | the RU type (number of tones) |
Definition at line 491 of file he-ru.cc.
References m_heRuSubcarrierGroups, and ns3::RU_2x996_TONE.
Referenced by WifiPrimaryChannelsTest::DoRun(), FindOverlappingRu(), GetIndexIn80MHzSegment(), ns3::WifiRu::GetNRus(), ns3::HeRu::RuSpec::GetPhyIndex(), GetPrimary80MHzFlag(), GetRusOfType(), ns3::HePpdu::GetRuSpec(), and GetSubcarrierGroup().
Get the number of 26-tone RUs that can be allocated if returned RU size is greater than 26 tones.
bw | the bandwidth (MHz) of the HE PPDU (20, 40, 80, 160) |
ruType | the RU type (number of tones) |
Definition at line 757 of file he-ru.cc.
References ns3::RU_106_TONE, ns3::RU_242_TONE, ns3::RU_484_TONE, and ns3::RU_52_TONE.
Referenced by GetEqualSizedRusForStations().
|
static |
Get the primary 80 MHz flag of a given RU transmitted in a PPDU.
The flag identifies whether the RU is in the primary 80 MHz.
bw | the bandwidth of the PPDU (20, 40, 80, 160) |
ruType | the RU type (number of tones) |
phyIndex | the PHY index (starting at 1) of the RU |
p20Index | the index of the primary20 channel |
Definition at line 462 of file he-ru.cc.
References GetNRus(), and ns3::RU_2x996_TONE.
Referenced by TestMultiUserScheduler::ComputeWifiTxVector(), WifiPrimaryChannelsTest::DoSendHeTbPpdu(), ns3::SpectrumWifiPhy::GetRuBands(), TestUlOfdmaPhyTransmission::GetTxVectorForHeTbPpdu(), WifiRuPhyIdxTo80MHzIdxAndFlagsTest::RunOne(), and WifiPrimaryChannelsTest::SendDlMuPpdu().
|
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 of the HE PPDU (20, 40, 80, 160) |
ruType | the RU type (number of tones) |
Definition at line 511 of file he-ru.cc.
References GetNRus(), m_heRuSubcarrierGroups, NS_ASSERT, and ns3::RU_2x996_TONE.
Referenced by ns3::WifiRu::GetRusOfType(), and ns3::HePpdu::GetRuSpec().
|
static |
Get the RU specs based on RU_ALLOCATION.
ruAllocation | 9 bit RU_ALLOCATION value |
Definition at line 365 of file he-ru.cc.
References m_heRuAllocations, and NS_FATAL_ERROR.
Referenced by ns3::WifiRu::GetRuSpecs().
|
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 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 592 of file he-ru.cc.
References GetNRus(), m_heRuSubcarrierGroups, NS_ABORT_MSG_IF, and ns3::RU_2x996_TONE.
Referenced by DoesOverlap(), OfdmaTestHePhy::GetNonOfdmaBand(), and ns3::WifiRu::GetSubcarrierGroup().
|
staticconstexpr |
Empty 242-tone RU identifier.
Definition at line 243 of file he-ru.h.
Referenced by ns3::WifiTxVector::DeriveRuAllocation().
|
static |
Table 27-26 of IEEE 802.11ax-2021.
Definition at line 227 of file he-ru.h.
Referenced by GetRuSpecs().
|
static |
Subcarrier groups for all RUs (with indices being applicable to primary 80 MHz channel)
Definition at line 221 of file he-ru.h.
Referenced by GetEqualSizedRusForStations(), GetNRus(), GetRusOfType(), and GetSubcarrierGroup().