A Discrete-Event Network Simulator
API
ns3::HeRu Class Reference

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

#include "he-ru.h"

+ Collaboration diagram for ns3::HeRu:

Classes

struct  RuSpec
 RU Specification. More...
 

Public Types

typedef std::pair< uint8_t, RuTypeBwTonesPair
 (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< SubcarrierRangeSubcarrierGroup
 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::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 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 index)
 Get the subcarrier group of the RU having the given 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
 

Detailed Description

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

Definition at line 35 of file he-ru.h.

Member Typedef Documentation

◆ BwTonesPair

typedef std::pair<uint8_t, RuType> ns3::HeRu::BwTonesPair

(bandwidth, number of tones) pair

Definition at line 151 of file he-ru.h.

◆ SubcarrierGroup

a vector of subcarrier ranges defining a subcarrier group

Definition at line 56 of file he-ru.h.

◆ SubcarrierGroups

typedef std::map<BwTonesPair, std::vector<SubcarrierGroup> > ns3::HeRu::SubcarrierGroups

map (bandwidth, number of tones) pairs to the group of subcarrier ranges

Subcarrier groups for all RUs (with indices being applicable to primary 80 MHz channel)

Definition at line 154 of file he-ru.h.

◆ SubcarrierRange

typedef std::pair<int16_t, int16_t> ns3::HeRu::SubcarrierRange

(lowest index, highest index) pair defining a subcarrier range

Definition at line 53 of file he-ru.h.

Member Enumeration Documentation

◆ RuType

The different HE Resource Unit (RU) types.

Enumerator
RU_26_TONE 
RU_52_TONE 
RU_106_TONE 
RU_242_TONE 
RU_484_TONE 
RU_996_TONE 
RU_2x996_TONE 

Definition at line 41 of file he-ru.h.

Member Function Documentation

◆ DoesOverlap() [1/2]

bool ns3::HeRu::DoesOverlap ( uint16_t  bw,
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 (MHz) of the HE PPDU (20, 40, 80, 160)
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 211 of file he-ru.cc.

References GetSubcarrierGroup(), ns3::HeRu::RuSpec::index, ns3::HeRu::RuSpec::primary80MHz, RU_2x996_TONE, and ns3::HeRu::RuSpec::ruType.

Referenced by FindOverlappingRu(), ns3::WifiTxVector::GetNumRusPerHeSigBContentChannel(), and ns3::CtrlTriggerHeader::IsValid().

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

◆ DoesOverlap() [2/2]

bool ns3::HeRu::DoesOverlap ( uint16_t  bw,
RuSpec  ru,
const SubcarrierGroup toneRanges 
)
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).

Parameters
bwthe bandwidth (MHz) of the HE PPDU (20, 40, 80, 160)
ruthe given RU allocation
toneRangesthe given set of tone ranges
Returns
true if the given RU overlaps with the given set of tone ranges.

Definition at line 236 of file he-ru.cc.

References GetSubcarrierGroup(), ns3::HeRu::RuSpec::index, RU_2x996_TONE, and ns3::HeRu::RuSpec::ruType.

+ Here is the call graph for this function:

◆ FindOverlappingRu()

HeRu::RuSpec ns3::HeRu::FindOverlappingRu ( uint16_t  bw,
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 (MHz) of the HE PPDU (20, 40, 80, 160)
referenceRuthe reference RU allocation
searchedRuTypethe searched RU type
Returns
the searched RU allocation.

Definition at line 258 of file he-ru.cc.

References DoesOverlap(), GetNRus(), ns3::HeRu::RuSpec::index, NS_ABORT_MSG, ns3::HeRu::RuSpec::primary80MHz, and ns3::HeRu::RuSpec::ruType.

Referenced by ns3::HePhy::GetCenterFrequencyForNonOfdmaPart(), and ns3::HePhy::GetNonOfdmaBand().

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

◆ GetBandwidth()

uint16_t ns3::HeRu::GetBandwidth ( RuType  ruType)
static

Get the approximate bandwidth occupied by a RU.

Parameters
ruTypethe RU type
Returns
the approximate bandwidth (in MHz) occupied by the RU

Definition at line 333 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::HePhy::GetTransmissionChannelWidth(), and ns3::HePhy::GetTxPowerSpectralDensity().

+ Here is the caller graph for this function:

◆ GetNRus()

std::size_t ns3::HeRu::GetNRus ( uint16_t  bw,
RuType  ruType 
)
static

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

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

Definition at line 152 of file he-ru.cc.

References m_heRuSubcarrierGroups, and RU_2x996_TONE.

Referenced by FindOverlappingRu(), GetSubcarrierGroup(), and ns3::SpectrumWifiPhy::UpdateInterferenceHelperBands().

+ Here is the caller graph for this function:

◆ GetRuType()

HeRu::RuType ns3::HeRu::GetRuType ( uint16_t  bandwidth)
static

Get the RU corresponding to the approximate bandwidth.

Parameters
bandwidththe approximate bandwidth (in MHz) occupied by the RU
Returns
the RU type

Definition at line 358 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().

+ Here is the caller graph for this function:

◆ GetSubcarrierGroup()

HeRu::SubcarrierGroup ns3::HeRu::GetSubcarrierGroup ( uint16_t  bw,
RuType  ruType,
std::size_t  index 
)
static

Get the subcarrier group of the RU having the given 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 index parameter is used to distinguish between primary and secondary 80 MHz subchannels.

Parameters
bwthe bandwidth (MHz) of the HE PPDU (20, 40, 80, 160)
ruTypethe RU type (number of tones)
indexthe index (starting at 1) of the RU
Returns
the subcarrier range of the specified RU

Definition at line 172 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().

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

Member Data Documentation

◆ m_heRuSubcarrierGroups

const HeRu::SubcarrierGroups ns3::HeRu::m_heRuSubcarrierGroups
static

Definition at line 157 of file he-ru.h.

Referenced by GetNRus(), and GetSubcarrierGroup().


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