This class stores the subcarrier groups of all the available EHT RUs. More...
#include "eht-ru.h"
Classes | |
class | RuSpec |
RU Specification. More... | |
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, bool includeUndefinedRus=false) |
Get the number of distinct RUs of the given type (number of tones) available in a PPDU of the given bandwidth. | |
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 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 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 an PPDU of the given bandwidth. | |
Private Types | |
using | RuAllocationMap = std::map<uint8_t, std::vector<RuSpec>> |
RU allocation map. | |
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. | |
Static Private Attributes | |
static const RuAllocationMap | m_ruAllocations |
Table 36-34 of IEEE802.11be-D7.0. | |
static const SubcarrierGroups | m_ruSubcarrierGroups |
Subcarrier groups for all EHT RUs. | |
This class stores the subcarrier groups of all the available EHT RUs.
|
private |
|
static |
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 PPDU (20, 40, 80, 160, 320) |
ru | the given RU allocation |
v | the given set of RUs |
Definition at line 1072 of file eht-ru.cc.
References ns3::WifiRu::GetBandwidth(), ns3::EhtRu::RuSpec::GetIndex(), ns3::EhtRu::RuSpec::GetPrimary160MHz(), ns3::EhtRu::RuSpec::GetPrimary80MHzOrLower80MHz(), ns3::EhtRu::RuSpec::GetRuType(), GetSubcarrierGroup(), and ns3::RU_4x996_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 PPDU (20, 40, 80, 160, 320) |
referenceRu | the reference RU allocation |
searchedRuType | the searched RU type |
Definition at line 1121 of file eht-ru.cc.
References DoesOverlap(), GetNRus(), and NS_ABORT_MSG.
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 PPDU (20, 40, 80, 160, 320) |
ruType | the RU type (number of tones) |
Definition at line 1027 of file eht-ru.cc.
References ns3::RU_242_TONE, and ns3::RU_26_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 821 of file eht-ru.cc.
References ns3::RU_106_TONE, ns3::RU_242_TONE, ns3::RU_26_TONE, ns3::RU_484_TONE, ns3::RU_52_TONE, and ns3::RU_996_TONE.
Referenced by 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 1143 of file eht-ru.cc.
References ns3::WifiRu::GetBandwidth(), GetNRus(), GetNumCentral26TonesRus(), NS_ASSERT_MSG, ns3::RU_26_TONE, ns3::RU_4x996_TONE, and ns3::RU_TYPE_MAX.
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, 320) |
ruType | the RU type (number of tones) |
phyIndex | the PHY index (starting at 1) of the RU |
Definition at line 946 of file eht-ru.cc.
References ns3::WifiRu::GetBandwidth(), and GetNRus().
Referenced by WifiRuPhyIdxTo80MHzIdxAndFlagsTest::RunOne().
|
static |
Get the number of distinct RUs of the given type (number of tones) available in a PPDU of the given bandwidth.
bw | the bandwidth of the PPDU (20, 40, 80, 160, 320) |
ruType | the RU type (number of tones) |
includeUndefinedRus | whether undefined RUs should be taken account. |
Definition at line 963 of file eht-ru.cc.
References ns3::WifiRu::GetBandwidth(), m_ruSubcarrierGroups, and ns3::RU_26_TONE.
Referenced by FindOverlappingRu(), GetEqualSizedRusForStations(), GetIndexIn80MHzSegment(), ns3::WifiRu::GetNRus(), ns3::EhtRu::RuSpec::GetPhyIndex(), GetPrimaryFlags(), and GetRusOfType().
Get the number of 26-tone RUs that can be allocated if returned RU size is greater than 26 tones.
bw | the bandwidth of the PPDU (20, 40, 80, 160, 320) |
ruType | the RU type (number of tones) |
Definition at line 1171 of file eht-ru.cc.
References ns3::RU_106_TONE, and ns3::RU_52_TONE.
Referenced by GetEqualSizedRusForStations().
|
static |
Get the primary flags of a given RU transmitted in a PPDU.
The first flag identifies whether the RU is in the primary 160 MHz. The second flag identifies whether the RU is allocated in the primary 80MHz channel if the RU is allocated in the primary 160MHz channel, or whether the RU is allocated in the lower 80MHz channel if the RU is allocated in the secondary 160MHz channel
bw | the bandwidth of the PPDU (20, 40, 80, 160, 320) |
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 913 of file eht-ru.cc.
References ns3::WifiRu::GetBandwidth(), GetNRus(), ns3::RU_2x996_TONE, and ns3::RU_4x996_TONE.
Referenced by WifiRuPhyIdxTo80MHzIdxAndFlagsTest::RunOne().
|
static |
Get the set of distinct RUs of the given type (number of tones) available in an PPDU of the given bandwidth.
This does not take undefined RUs into account.
bw | the bandwidth of the PPDU (20, 40, 80, 160, 320) |
ruType | the RU type (number of tones) |
Definition at line 988 of file eht-ru.cc.
References ns3::WifiRu::GetBandwidth(), GetNRus(), m_ruSubcarrierGroups, NS_ASSERT, and ns3::RU_2x996_TONE.
Referenced by ns3::WifiRu::GetRusOfType().
|
static |
Get the RU specs based on RU_ALLOCATION.
ruAllocation | 9 bit RU_ALLOCATION value |
Definition at line 798 of file eht-ru.cc.
References m_ruAllocations, 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 an 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.
bw | the bandwidth of the PPDU (20, 40, 80, 160, 320) |
ruType | the RU type (number of tones) |
phyIndex | the PHY index (starting at 1) of the RU |
Definition at line 1064 of file eht-ru.cc.
References m_ruSubcarrierGroups, and NS_ABORT_MSG_IF.
Referenced by DoesOverlap(), and ns3::WifiRu::GetSubcarrierGroup().
|
staticprivate |
Table 36-34 of IEEE802.11be-D7.0.
Definition at line 268 of file eht-ru.h.
Referenced by GetRuSpecs().
|
staticprivate |
Subcarrier groups for all EHT RUs.
Definition at line 262 of file eht-ru.h.
Referenced by GetNRus(), GetRusOfType(), and GetSubcarrierGroup().