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

Class that keeps track of all information about the current PHY operating channel. More...

#include "wifi-phy-operating-channel.h"

+ Collaboration diagram for ns3::WifiPhyOperatingChannel:

Public Types

typedef std::set< FrequencyChannelInfo >::const_iterator ConstIterator
 Typedef for a const iterator pointing to a channel in the set of available channels.
 

Public Member Functions

 WifiPhyOperatingChannel ()
 Create an uninitialized PHY operating channel.
 
 WifiPhyOperatingChannel (ConstIterator it)
 Create a PHY operating channel from an iterator pointing to a channel in the set of available channels.
 
virtual ~WifiPhyOperatingChannel ()
 
std::set< uint8_t > Get20MHzIndicesCoveringRu (HeRu::RuSpec ru, uint16_t width) const
 Get the channel indices of the minimum subset of 20 MHz channels containing the given RU.
 
std::set< uint8_t > GetAll20MHzChannelIndicesInPrimary (uint16_t width) const
 Get the channel indices of all the 20 MHz channels included in the primary channel of the given width, if such primary channel exists, or an empty set, otherwise.
 
std::set< uint8_t > GetAll20MHzChannelIndicesInSecondary (const std::set< uint8_t > &primaryIndices) const
 Get the channel indices of all the 20 MHz channels included in the secondary channel corresponding to the given primary channel, if such secondary channel exists, or an empty set, otherwise.
 
std::set< uint8_t > GetAll20MHzChannelIndicesInSecondary (uint16_t width) const
 Get the channel indices of all the 20 MHz channels included in the secondary channel of the given width, if such secondary channel exists, or an empty set, otherwise.
 
uint16_t GetFrequency () const
 Return the center frequency of the operating channel (in MHz).
 
uint8_t GetNumber () const
 Return the channel number identifying the whole operating channel.
 
WifiPhyBand GetPhyBand () const
 Return the PHY band of the operating channel.
 
uint16_t GetPrimaryChannelCenterFrequency (uint16_t primaryChannelWidth) const
 Get the center frequency of the primary channel of the given width.
 
uint8_t GetPrimaryChannelIndex (uint16_t primaryChannelWidth) const
 If the operating channel width is a multiple of 20 MHz, return the index of the primary channel of the given width within the operating channel (0 indicates the 20 MHz subchannel with the lowest center frequency).
 
uint8_t GetPrimaryChannelNumber (uint16_t primaryChannelWidth, WifiStandard standard) const
 Get channel number of the primary channel.
 
uint16_t GetSecondaryChannelCenterFrequency (uint16_t secondaryChannelWidth) const
 Get the center frequency of the secondary channel of the given width.
 
uint8_t GetSecondaryChannelIndex (uint16_t secondaryChannelWidth) const
 If the operating channel width is made of a multiple of 20 MHz, return the index of the secondary channel of the given width within the operating channel (0 indicates the 20 MHz subchannel with the lowest center frequency).
 
uint16_t GetWidth () const
 Return the width of the whole operating channel (in MHz).
 
bool Is80211p () const
 Return whether the operating channel is an 802.11p channel.
 
bool IsDsss () const
 Return whether the operating channel is a DSSS channel.
 
bool IsOfdm () const
 Return whether the operating channel is an OFDM channel.
 
bool IsSet () const
 Return true if a valid channel has been set, false otherwise.
 
bool operator!= (const WifiPhyOperatingChannel &other) const
 Check if the given WifiPhyOperatingChannel is different.
 
bool operator== (const WifiPhyOperatingChannel &other) const
 Check if the given WifiPhyOperatingChannel is equivalent.
 
void Set (uint8_t number, uint16_t frequency, uint16_t width, WifiStandard standard, WifiPhyBand band)
 Set the channel according to the specified parameters if a unique frequency channel matches the specified criteria, or abort the simulation otherwise.
 
void SetDefault (uint16_t width, WifiStandard standard, WifiPhyBand band)
 Set the default channel of the given width and for the given standard and band.
 
void SetPrimary20Index (uint8_t index)
 Set the index of the primary 20 MHz channel (0 indicates the 20 MHz subchannel with the lowest center frequency).
 

Static Public Member Functions

static ConstIterator FindFirst (uint8_t number, uint16_t frequency, uint16_t width, WifiStandard standard, WifiPhyBand band, ConstIterator start=m_frequencyChannels.begin())
 Find the first channel matching the specified parameters.
 
static uint8_t GetDefaultChannelNumber (uint16_t width, WifiStandard standard, WifiPhyBand band)
 Get the default channel number of the given width and for the given standard and band.
 

Static Public Attributes

static const std::set< FrequencyChannelInfom_frequencyChannels
 Available frequency channels.
 

Private Attributes

ConstIterator m_channelIt
 const iterator pointing to the configured frequency channel
 
uint8_t m_primary20Index
 index of the primary20 channel (0 indicates the 20 MHz subchannel with the lowest center frequency)
 

Detailed Description

Class that keeps track of all information about the current PHY operating channel.

Definition at line 46 of file wifi-phy-operating-channel.h.

Member Typedef Documentation

◆ ConstIterator

Typedef for a const iterator pointing to a channel in the set of available channels.

Definition at line 50 of file wifi-phy-operating-channel.h.

Constructor & Destructor Documentation

◆ WifiPhyOperatingChannel() [1/2]

ns3::WifiPhyOperatingChannel::WifiPhyOperatingChannel ( )

Create an uninitialized PHY operating channel.

Definition at line 271 of file wifi-phy-operating-channel.cc.

◆ WifiPhyOperatingChannel() [2/2]

ns3::WifiPhyOperatingChannel::WifiPhyOperatingChannel ( ConstIterator  it)

Create a PHY operating channel from an iterator pointing to a channel in the set of available channels.

Parameters
itthe iterator pointing to a channel in the set of available channels

Definition at line 276 of file wifi-phy-operating-channel.cc.

References NS_LOG_FUNCTION.

◆ ~WifiPhyOperatingChannel()

ns3::WifiPhyOperatingChannel::~WifiPhyOperatingChannel ( )
virtual

Definition at line 283 of file wifi-phy-operating-channel.cc.

References NS_LOG_FUNCTION_NOARGS.

Member Function Documentation

◆ FindFirst()

WifiPhyOperatingChannel::ConstIterator ns3::WifiPhyOperatingChannel::FindFirst ( uint8_t  number,
uint16_t  frequency,
uint16_t  width,
WifiStandard  standard,
WifiPhyBand  band,
ConstIterator  start = m_frequencyChannels.begin() 
)
static

Find the first channel matching the specified parameters.

Parameters
numberthe channel number (use 0 to leave it unspecified)
frequencythe channel center frequency in MHz (use 0 to leave it unspecified)
widththe channel width in MHz (use 0 to leave it unspecified)
standardthe standard (use WIFI_STANDARD_UNSPECIFIED not to check whether a channel is suitable for a specific standard)
bandthe PHY band
startan iterator pointing to the channel to start the search with
Returns
an iterator pointing to the found channel, if any, or to past-the-end of the set of available channels

Definition at line 347 of file wifi-phy-operating-channel.cc.

References ns3::GetFrequencyChannelType(), ns3::GetMaximumChannelWidth(), ns3::GetModulationClassForStandard(), m_frequencyChannels, ns3::WIFI_STANDARD_UNSPECIFIED, and ns3::wifiStandards.

Referenced by TestPrimary20CoveredByPpdu::CreatePpdu(), SpectrumWifiPhyMultipleInterfacesTest::DoRun(), ReducedNeighborReportTest::DoRun(), TestNonHtDuplicatePhyReception::DoRun(), SpectrumWifiPhyMultipleInterfacesTest::DoSetup(), TestNonHtDuplicatePhyReception::DoSetup(), TestMultipleCtsResponsesFromMuRts::DoSetup(), WifiPhyCcaThresholdsTest::DoSetup(), TestUlOfdmaPpduUid::DoSetup(), TestPhyPaddingExclusion::DoSetup(), GetDefaultChannelNumber(), GetPrimaryChannelNumber(), SpectrumWifiPhyFilterTest::RunOne(), WifiPhyCcaIndicationTest::RunOne(), TestDlMuMimoPhyTransmission::RunOne(), TestUlMuMimoPhyTransmission::RunOne(), TestDlOfdmaPhyTransmission::RunOne(), TestDlOfdmaPhyPuncturing::RunOne(), TestUlOfdmaPhyTransmission::RunOne(), TestPrimary20CoveredByPpdu::RunOne(), WifiPhyCcaIndicationTest::SendHeSuPpdu(), and Set().

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

◆ Get20MHzIndicesCoveringRu()

std::set< uint8_t > ns3::WifiPhyOperatingChannel::Get20MHzIndicesCoveringRu ( HeRu::RuSpec  ru,
uint16_t  width 
) const

Get the channel indices of the minimum subset of 20 MHz channels containing the given RU.

Parameters
ruthe given RU
widththe width in MHz of the channel to which the given RU refers to; normally, it is the width in MHz of the PPDU for which the RU is allocated
Returns
the channel indices of the minimum subset of 20 MHz channels containing the given RU

Definition at line 586 of file wifi-phy-operating-channel.cc.

References GetAll20MHzChannelIndicesInPrimary(), GetAll20MHzChannelIndicesInSecondary(), ns3::HeRu::GetBandwidth(), ns3::HeRu::RuSpec::GetIndex(), ns3::HeRu::GetNRus(), ns3::HeRu::RuSpec::GetPrimary80MHz(), GetPrimaryChannelIndex(), ns3::HeRu::RuSpec::GetRuType(), GetWidth(), m_primary20Index, NS_ABORT_MSG, NS_ASSERT, NS_ASSERT_MSG, ns3::HeRu::RU_106_TONE, ns3::HeRu::RU_242_TONE, ns3::HeRu::RU_26_TONE, ns3::HeRu::RU_2x996_TONE, ns3::HeRu::RU_484_TONE, ns3::HeRu::RU_52_TONE, and ns3::HeRu::RU_996_TONE.

Referenced by Wifi20MHzIndicesCoveringRuTest::RunOne().

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

◆ GetAll20MHzChannelIndicesInPrimary()

std::set< uint8_t > ns3::WifiPhyOperatingChannel::GetAll20MHzChannelIndicesInPrimary ( uint16_t  width) const

Get the channel indices of all the 20 MHz channels included in the primary channel of the given width, if such primary channel exists, or an empty set, otherwise.

Parameters
widththe width in MHz of the primary channel
Returns
the channel indices of all the 20 MHz channels included in the primary channel of the given width, if such primary channel exists, or an empty set, otherwise

Definition at line 523 of file wifi-phy-operating-channel.cc.

References GetAll20MHzChannelIndicesInSecondary(), GetWidth(), and m_primary20Index.

Referenced by Get20MHzIndicesCoveringRu(), GetAll20MHzChannelIndicesInSecondary(), ns3::HePhy::GetPer20MHzDurations(), ns3::HePhy::GetTxPowerSpectralDensity(), and Wifi20MHzChannelIndicesTest::RunOne().

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

◆ GetAll20MHzChannelIndicesInSecondary() [1/2]

std::set< uint8_t > ns3::WifiPhyOperatingChannel::GetAll20MHzChannelIndicesInSecondary ( const std::set< uint8_t > &  primaryIndices) const

Get the channel indices of all the 20 MHz channels included in the secondary channel corresponding to the given primary channel, if such secondary channel exists, or an empty set, otherwise.

Parameters
primaryIndicesthe channel indices of all the 20 MHz channels included in the primary channel
Returns
the channel indices of all the 20 MHz channels included in the secondary channel corresponding to the given primary channel, if such secondary channel exists, or an empty set, otherwise

Definition at line 551 of file wifi-phy-operating-channel.cc.

References GetWidth().

+ Here is the call graph for this function:

◆ GetAll20MHzChannelIndicesInSecondary() [2/2]

std::set< uint8_t > ns3::WifiPhyOperatingChannel::GetAll20MHzChannelIndicesInSecondary ( uint16_t  width) const

Get the channel indices of all the 20 MHz channels included in the secondary channel of the given width, if such secondary channel exists, or an empty set, otherwise.

Parameters
widththe width in MHz of the secondary channel
Returns
the channel indices of all the 20 MHz channels included in the secondary channel of the given width, if such secondary channel exists, or an empty set, otherwise

Definition at line 545 of file wifi-phy-operating-channel.cc.

References GetAll20MHzChannelIndicesInPrimary(), and GetAll20MHzChannelIndicesInSecondary().

Referenced by Get20MHzIndicesCoveringRu(), GetAll20MHzChannelIndicesInPrimary(), GetAll20MHzChannelIndicesInSecondary(), and Wifi20MHzChannelIndicesTest::RunOne().

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

◆ GetDefaultChannelNumber()

uint8_t ns3::WifiPhyOperatingChannel::GetDefaultChannelNumber ( uint16_t  width,
WifiStandard  standard,
WifiPhyBand  band 
)
static

Get the default channel number of the given width and for the given standard and band.

Parameters
widththe channel width in MHz
standardthe standard
bandthe PHY band
Returns
the default channel number

Definition at line 329 of file wifi-phy-operating-channel.cc.

References FindFirst(), and m_frequencyChannels.

Referenced by ns3::WifiPhy::DoChannelSwitch(), and SetDefault().

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

◆ GetFrequency()

uint16_t ns3::WifiPhyOperatingChannel::GetFrequency ( ) const

Return the center frequency of the operating channel (in MHz).

Returns
the center frequency of the operating channel (in MHz)

Definition at line 403 of file wifi-phy-operating-channel.cc.

References IsSet(), m_channelIt, and NS_ASSERT.

Referenced by MultiLinkSetupTest::CheckMlSetup(), ns3::WifiPhy::GetFrequency(), and GetPrimaryChannelCenterFrequency().

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

◆ GetNumber()

uint8_t ns3::WifiPhyOperatingChannel::GetNumber ( ) const

Return the channel number identifying the whole operating channel.

Returns
the channel number identifying the whole operating channel

Definition at line 396 of file wifi-phy-operating-channel.cc.

References IsSet(), m_channelIt, and NS_ASSERT.

Referenced by MultiLinkSetupTest::CheckMlSetup(), and ns3::WifiPhy::GetChannelNumber().

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

◆ GetPhyBand()

WifiPhyBand ns3::WifiPhyOperatingChannel::GetPhyBand ( ) const

Return the PHY band of the operating channel.

Returns
the PHY band of the operating channel

Definition at line 417 of file wifi-phy-operating-channel.cc.

References IsSet(), m_channelIt, and NS_ASSERT.

Referenced by MultiLinkSetupTest::CheckMlSetup(), ns3::HtPpdu::GetTxDuration(), ns3::OfdmPpdu::GetTxDuration(), ns3::HtPpdu::SetLSigHeader(), and ns3::HePpdu::SetLSigHeader().

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

◆ GetPrimaryChannelCenterFrequency()

uint16_t ns3::WifiPhyOperatingChannel::GetPrimaryChannelCenterFrequency ( uint16_t  primaryChannelWidth) const

Get the center frequency of the primary channel of the given width.

Parameters
primaryChannelWidththe width of the primary channel in MHz
Returns
the center frequency of the primary channel of the given width

Definition at line 492 of file wifi-phy-operating-channel.cc.

References GetFrequency(), GetPrimaryChannelIndex(), GetWidth(), and NS_LOG_FUNCTION.

Referenced by ns3::PhyEntity::CanStartRx(), TestNonHtDuplicatePhyReception::DoRun(), ns3::HtPhy::GetCcaIndication(), ns3::VhtPhy::GetCcaIndication(), ns3::PhyEntity::GetCenterFrequencyForChannelWidth(), GetPrimaryChannelNumber(), GetSecondaryChannelCenterFrequency(), and TestPrimary20CoveredByPpdu::RunOne().

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

◆ GetPrimaryChannelIndex()

uint8_t ns3::WifiPhyOperatingChannel::GetPrimaryChannelIndex ( uint16_t  primaryChannelWidth) const

If the operating channel width is a multiple of 20 MHz, return the index of the primary channel of the given width within the operating channel (0 indicates the 20 MHz subchannel with the lowest center frequency).

Otherwise, return 0.

Parameters
primaryChannelWidththe width of the primary channel in MHz
Returns
the index of the requested primary channel within the operating channel

Definition at line 445 of file wifi-phy-operating-channel.cc.

References GetWidth(), m_primary20Index, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by MultiLinkSetupTest::CheckMlSetup(), Get20MHzIndicesCoveringRu(), ns3::HePhy::GetCenterFrequencyForNonHePart(), ns3::SpectrumWifiPhy::GetHeRuBands(), ns3::HePhy::GetNonOfdmaBand(), ns3::WifiPhy::GetPrimary20Index(), ns3::PhyEntity::GetPrimaryBand(), GetPrimaryChannelCenterFrequency(), ns3::HePhy::GetRuBandForRx(), ns3::HePhy::GetRuBandForTx(), GetSecondaryChannelCenterFrequency(), GetSecondaryChannelIndex(), ns3::HePhy::GetSigBSize(), ns3::EhtPhy::GetSigBSize(), ns3::HePhy::GetTxPowerSpectralDensity(), ns3::EhtPpdu::SetEhtPhyHeader(), ns3::HePpdu::SetHeSigHeader(), ns3::HePpdu::SetTxVectorFromPhyHeaders(), and ns3::EhtPpdu::SetTxVectorFromPhyHeaders().

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

◆ GetPrimaryChannelNumber()

uint8_t ns3::WifiPhyOperatingChannel::GetPrimaryChannelNumber ( uint16_t  primaryChannelWidth,
WifiStandard  standard 
) const

Get channel number of the primary channel.

Parameters
primaryChannelWidththe width of the primary channel (MHz)
standardthe standard
Returns
channel number of the primary channel

Definition at line 511 of file wifi-phy-operating-channel.cc.

References FindFirst(), GetPrimaryChannelCenterFrequency(), IsSet(), m_channelIt, m_frequencyChannels, and NS_ASSERT_MSG.

Referenced by ns3::WifiPhy::GetPrimaryChannelNumber().

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

◆ GetSecondaryChannelCenterFrequency()

uint16_t ns3::WifiPhyOperatingChannel::GetSecondaryChannelCenterFrequency ( uint16_t  secondaryChannelWidth) const

Get the center frequency of the secondary channel of the given width.

Parameters
secondaryChannelWidththe width of the secondary channel in MHz
Returns
the center frequency of the secondary channel of the given width

Definition at line 502 of file wifi-phy-operating-channel.cc.

References GetPrimaryChannelCenterFrequency(), and GetPrimaryChannelIndex().

Referenced by ns3::HtPhy::GetCcaIndication(), and ns3::VhtPhy::GetCcaIndication().

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

◆ GetSecondaryChannelIndex()

uint8_t ns3::WifiPhyOperatingChannel::GetSecondaryChannelIndex ( uint16_t  secondaryChannelWidth) const

If the operating channel width is made of a multiple of 20 MHz, return the index of the secondary channel of the given width within the operating channel (0 indicates the 20 MHz subchannel with the lowest center frequency).

Otherwise, return 0.

Parameters
secondaryChannelWidththe width of the secondary channel in MHz
Returns
the index of the requested secondary channel within the operating channel

Definition at line 472 of file wifi-phy-operating-channel.cc.

References GetPrimaryChannelIndex(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by ns3::PhyEntity::GetSecondaryBand().

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

◆ GetWidth()

uint16_t ns3::WifiPhyOperatingChannel::GetWidth ( ) const

Return the width of the whole operating channel (in MHz).

Returns
the width of the whole operating channel (in MHz)

Definition at line 410 of file wifi-phy-operating-channel.cc.

References IsSet(), m_channelIt, and NS_ASSERT.

Referenced by MultiLinkSetupTest::CheckMlSetup(), Get20MHzIndicesCoveringRu(), GetAll20MHzChannelIndicesInPrimary(), GetAll20MHzChannelIndicesInSecondary(), ns3::WifiPhy::GetChannelWidth(), GetPrimaryChannelCenterFrequency(), GetPrimaryChannelIndex(), Wifi20MHzIndicesCoveringRuTest::RunOne(), and SetPrimary20Index().

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

◆ Is80211p()

bool ns3::WifiPhyOperatingChannel::Is80211p ( ) const

Return whether the operating channel is an 802.11p channel.

Returns
whether the operating channel is an 802.11p channel

Definition at line 438 of file wifi-phy-operating-channel.cc.

References IsSet(), m_channelIt, NS_ASSERT, and ns3::WIFI_PHY_80211p_CHANNEL.

+ Here is the call graph for this function:

◆ IsDsss()

bool ns3::WifiPhyOperatingChannel::IsDsss ( ) const

Return whether the operating channel is a DSSS channel.

Returns
whether the operating channel is a DSSS channel

Definition at line 431 of file wifi-phy-operating-channel.cc.

References IsSet(), m_channelIt, NS_ASSERT, and ns3::WIFI_PHY_DSSS_CHANNEL.

+ Here is the call graph for this function:

◆ IsOfdm()

bool ns3::WifiPhyOperatingChannel::IsOfdm ( ) const

Return whether the operating channel is an OFDM channel.

Returns
whether the operating channel is an OFDM channel

Definition at line 424 of file wifi-phy-operating-channel.cc.

References IsSet(), m_channelIt, NS_ASSERT, and ns3::WIFI_PHY_OFDM_CHANNEL.

Referenced by ns3::ChannelAccessManager::DoGrantDcfAccess(), and ns3::ChannelAccessManager::InitLastBusyStructs().

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

◆ IsSet()

bool ns3::WifiPhyOperatingChannel::IsSet ( ) const

Return true if a valid channel has been set, false otherwise.

Returns
true if a valid channel has been set, false otherwise

Definition at line 289 of file wifi-phy-operating-channel.cc.

References m_channelIt, and m_frequencyChannels.

Referenced by ns3::WifiPhy::ConfigureStandard(), ns3::SpectrumWifiPhy::DoChannelSwitch(), GetFrequency(), GetNumber(), GetPhyBand(), GetPrimaryChannelNumber(), ns3::HtPpdu::GetTxDuration(), ns3::OfdmPpdu::GetTxDuration(), GetWidth(), Is80211p(), IsDsss(), IsOfdm(), ns3::HtPpdu::SetLSigHeader(), and ns3::HePpdu::SetLSigHeader().

+ Here is the caller graph for this function:

◆ operator!=()

bool ns3::WifiPhyOperatingChannel::operator!= ( const WifiPhyOperatingChannel other) const

Check if the given WifiPhyOperatingChannel is different.

Parameters
otheranother WifiPhyOperatingChannel
Returns
true if the given WifiPhyOperatingChannel is different, false otherwise

Definition at line 705 of file wifi-phy-operating-channel.cc.

◆ operator==()

bool ns3::WifiPhyOperatingChannel::operator== ( const WifiPhyOperatingChannel other) const

Check if the given WifiPhyOperatingChannel is equivalent.

Note that the primary20 channels are not compared.

Parameters
otheranother WifiPhyOperatingChannel
Returns
true if the given WifiPhyOperatingChannel is equivalent, false otherwise

Definition at line 699 of file wifi-phy-operating-channel.cc.

References m_channelIt.

◆ Set()

void ns3::WifiPhyOperatingChannel::Set ( uint8_t  number,
uint16_t  frequency,
uint16_t  width,
WifiStandard  standard,
WifiPhyBand  band 
)

Set the channel according to the specified parameters if a unique frequency channel matches the specified criteria, or abort the simulation otherwise.

If the channel width is a multiple of 20 MHz, the primary 20 MHz channel is set to the 20 MHz subchannel with the lowest center frequency.

Parameters
numberthe channel number (use 0 to leave it unspecified)
frequencythe channel center frequency in MHz (use 0 to leave it unspecified)
widththe channel width in MHz (use 0 to leave it unspecified)
standardthe standard
bandthe PHY band

Definition at line 295 of file wifi-phy-operating-channel.cc.

References FindFirst(), m_channelIt, m_frequencyChannels, m_primary20Index, and NS_LOG_FUNCTION.

Referenced by ns3::WifiPhy::DoChannelSwitch(), and SetDefault().

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

◆ SetDefault()

void ns3::WifiPhyOperatingChannel::SetDefault ( uint16_t  width,
WifiStandard  standard,
WifiPhyBand  band 
)

Set the default channel of the given width and for the given standard and band.

If the channel width is a multiple of 20 MHz, the primary 20 MHz channel is set to the 20 MHz subchannel with the lowest center frequency.

Parameters
widththe channel width in MHz
standardthe standard
bandthe PHY band

Definition at line 321 of file wifi-phy-operating-channel.cc.

References GetDefaultChannelNumber(), NS_LOG_FUNCTION, and Set().

Referenced by Wifi20MHzChannelIndicesTest::DoRun(), and Wifi20MHzIndicesCoveringRuTest::DoRun().

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

◆ SetPrimary20Index()

void ns3::WifiPhyOperatingChannel::SetPrimary20Index ( uint8_t  index)

Set the index of the primary 20 MHz channel (0 indicates the 20 MHz subchannel with the lowest center frequency).

Parameters
indexthe index of the primary 20 MHz channel

Definition at line 483 of file wifi-phy-operating-channel.cc.

References GetWidth(), m_primary20Index, NS_ABORT_MSG_IF, and NS_LOG_FUNCTION.

Referenced by ns3::WifiPhy::DoChannelSwitch(), Wifi20MHzChannelIndicesTest::RunOne(), and Wifi20MHzIndicesCoveringRuTest::RunOne().

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

Member Data Documentation

◆ m_channelIt

ConstIterator ns3::WifiPhyOperatingChannel::m_channelIt
private

const iterator pointing to the configured frequency channel

Definition at line 300 of file wifi-phy-operating-channel.h.

Referenced by GetFrequency(), GetNumber(), GetPhyBand(), GetPrimaryChannelNumber(), GetWidth(), Is80211p(), IsDsss(), IsOfdm(), IsSet(), operator==(), and Set().

◆ m_frequencyChannels

◆ m_primary20Index

uint8_t ns3::WifiPhyOperatingChannel::m_primary20Index
private

index of the primary20 channel (0 indicates the 20 MHz subchannel with the lowest center frequency)

Definition at line 301 of file wifi-phy-operating-channel.h.

Referenced by Get20MHzIndicesCoveringRu(), GetAll20MHzChannelIndicesInPrimary(), GetPrimaryChannelIndex(), Set(), and SetPrimary20Index().


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