A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::EhtRu Class Reference

This class stores the subcarrier groups of all the available EHT RUs. More...

#include "eht-ru.h"

+ Collaboration diagram for ns3::EhtRu:

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< RuSpecGetCentral26TonesRus (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< RuSpecGetRusOfType (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< RuSpecGetRuSpecs (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.
 

Detailed Description

This class stores the subcarrier groups of all the available EHT RUs.

Definition at line 27 of file eht-ru.h.

Member Typedef Documentation

◆ RuAllocationMap

using ns3::EhtRu::RuAllocationMap = std::map<uint8_t, std::vector<RuSpec>>
private

RU allocation map.

Definition at line 265 of file eht-ru.h.

Member Function Documentation

◆ DoesOverlap()

bool ns3::EhtRu::DoesOverlap ( MHz_u bw,
EhtRu::RuSpec ru,
const std::vector< RuSpec > & v )
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).

Parameters
bwthe bandwidth of the PPDU (20, 40, 80, 160, 320)
ruthe given RU allocation
vthe given set of RUs
Returns
true if the given RU overlaps with 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindOverlappingRu()

EhtRu::RuSpec ns3::EhtRu::FindOverlappingRu ( MHz_u bw,
EhtRu::RuSpec referenceRu,
RuType searchedRuType )
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.

Parameters
bwthe bandwidth of the PPDU (20, 40, 80, 160, 320)
referenceRuthe reference RU allocation
searchedRuTypethe searched RU type
Returns
the searched RU allocation.

Definition at line 1121 of file eht-ru.cc.

References DoesOverlap(), GetNRus(), and NS_ABORT_MSG.

Referenced by ns3::WifiRu::FindOverlappingRu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCentral26TonesRus()

std::vector< EhtRu::RuSpec > ns3::EhtRu::GetCentral26TonesRus ( MHz_u bw,
RuType ruType )
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.

Parameters
bwthe bandwidth of the PPDU (20, 40, 80, 160, 320)
ruTypethe RU type (number of tones)
Returns
the set of 26-tone RUs that can be additionally allocated

Definition at line 1027 of file eht-ru.cc.

References ns3::RU_242_TONE, and ns3::RU_26_TONE.

Referenced by ns3::WifiRu::GetCentral26TonesRus().

+ Here is the caller graph for this function:

◆ GetEqualizedRuAllocation()

uint16_t ns3::EhtRu::GetEqualizedRuAllocation ( RuType ruType,
bool isOdd,
bool hasUsers )
static

Get the RU_ALLOCATION value for equal size RUs.

Parameters
ruTypeequal size RU type (generated by GetEqualSizedRusForStations)
isOddif number of stations is an odd number
hasUserswhether it contributes to User field(s) in the content channel this RU Allocation belongs to;
Returns
RU_ALLOCATION value

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().

+ Here is the caller graph for this function:

◆ GetEqualSizedRusForStations()

RuType ns3::EhtRu::GetEqualSizedRusForStations ( MHz_u bandwidth,
std::size_t & nStations,
std::size_t & nCentral26TonesRus )
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).

Parameters
bandwidththe channel bandwidth
nStationsthe number of candidate stations. On return, it is set to the number of stations that are assigned an RU
[out]nCentral26TonesRusthe number of additional 26-tone RUs that can be allocated if the returned RU size is greater than 26 tones
Returns
the RU type

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetIndexIn80MHzSegment()

std::size_t ns3::EhtRu::GetIndexIn80MHzSegment ( MHz_u bw,
RuType ruType,
std::size_t phyIndex )
static

Get the index of a given RU transmitted in a PPDU within its 80 MHz segment.

Parameters
bwthe bandwidth of the PPDU (20, 40, 80, 160, 320)
ruTypethe RU type (number of tones)
phyIndexthe PHY index (starting at 1) of the RU
Returns
the index within the 80 MHz segment

Definition at line 946 of file eht-ru.cc.

References ns3::WifiRu::GetBandwidth(), and GetNRus().

Referenced by WifiRuPhyIdxTo80MHzIdxAndFlagsTest::RunOne().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetNRus()

std::size_t ns3::EhtRu::GetNRus ( MHz_u bw,
RuType ruType,
bool includeUndefinedRus = false )
static

Get the number of distinct RUs of the given type (number of tones) available in a PPDU of the given bandwidth.

Parameters
bwthe bandwidth of the PPDU (20, 40, 80, 160, 320)
ruTypethe RU type (number of tones)
includeUndefinedRuswhether undefined RUs should be taken account.
Returns
the number of distinct RUs available

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetNumCentral26TonesRus()

uint8_t ns3::EhtRu::GetNumCentral26TonesRus ( MHz_u bw,
RuType ruType )
staticprivate

Get the number of 26-tone RUs that can be allocated if returned RU size is greater than 26 tones.

Parameters
bwthe bandwidth of the PPDU (20, 40, 80, 160, 320)
ruTypethe RU type (number of tones)
Returns
the number of 26-tone RUs that can be allocated

Definition at line 1171 of file eht-ru.cc.

References ns3::RU_106_TONE, and ns3::RU_52_TONE.

Referenced by GetEqualSizedRusForStations().

+ Here is the caller graph for this function:

◆ GetPrimaryFlags()

std::pair< bool, bool > ns3::EhtRu::GetPrimaryFlags ( MHz_u bw,
RuType ruType,
std::size_t phyIndex,
uint8_t p20Index )
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

Parameters
bwthe bandwidth of the PPDU (20, 40, 80, 160, 320)
ruTypethe RU type (number of tones)
phyIndexthe PHY index (starting at 1) of the RU
p20Indexthe index of the primary20 channel
Returns
the primary flags

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRusOfType()

std::vector< EhtRu::RuSpec > ns3::EhtRu::GetRusOfType ( MHz_u bw,
RuType ruType )
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.

Parameters
bwthe bandwidth of the PPDU (20, 40, 80, 160, 320)
ruTypethe RU type (number of tones)
Returns
the set of distinct RUs available

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRuSpecs()

std::vector< EhtRu::RuSpec > ns3::EhtRu::GetRuSpecs ( uint16_t ruAllocation)
static

Get the RU specs based on RU_ALLOCATION.

Parameters
ruAllocation9 bit RU_ALLOCATION value
Returns
RU spec associated with the RU_ALLOCATION

Definition at line 798 of file eht-ru.cc.

References m_ruAllocations, and NS_FATAL_ERROR.

Referenced by ns3::WifiRu::GetRuSpecs().

+ Here is the caller graph for this function:

◆ GetSubcarrierGroup()

SubcarrierGroup ns3::EhtRu::GetSubcarrierGroup ( MHz_u bw,
RuType ruType,
std::size_t phyIndex )
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.

Parameters
bwthe bandwidth of the PPDU (20, 40, 80, 160, 320)
ruTypethe RU type (number of tones)
phyIndexthe PHY index (starting at 1) of the RU
Returns
the subcarrier range of the specified 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().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_ruAllocations

const EhtRu::RuAllocationMap ns3::EhtRu::m_ruAllocations
staticprivate

Table 36-34 of IEEE802.11be-D7.0.

Definition at line 268 of file eht-ru.h.

Referenced by GetRuSpecs().

◆ m_ruSubcarrierGroups

const SubcarrierGroups ns3::EhtRu::m_ruSubcarrierGroups
staticprivate

Subcarrier groups for all EHT RUs.

Definition at line 262 of file eht-ru.h.

Referenced by GetNRus(), GetRusOfType(), and GetSubcarrierGroup().


The documentation for this class was generated from the following files: