wifi: Get the PHY band of the operating channel

This commit is contained in:
Stefano Avallone
2021-04-27 22:49:56 +02:00
parent da0990479d
commit 3a155c2607
2 changed files with 13 additions and 0 deletions

View File

@@ -393,6 +393,13 @@ WifiPhyOperatingChannel::GetWidth (void) const
return std::get<2> (*m_channelIt);
}
WifiPhyBand
WifiPhyOperatingChannel::GetPhyBand (void) const
{
NS_ASSERT (IsSet ());
return std::get<4> (*m_channelIt);
}
bool
WifiPhyOperatingChannel::IsOfdm (void) const
{

View File

@@ -113,6 +113,12 @@ public:
* \return the width of the whole operating channel (in MHz)
*/
uint16_t GetWidth (void) const;
/**
* Return the PHY band of the operating channel
*
* \return the PHY band of the operating channel
*/
WifiPhyBand GetPhyBand (void) const;
/**
* Return whether the operating channel is an OFDM channel.
*