diff --git a/src/wifi/model/wifi-phy-operating-channel.cc b/src/wifi/model/wifi-phy-operating-channel.cc index 0a211ea88..0d4df8fab 100644 --- a/src/wifi/model/wifi-phy-operating-channel.cc +++ b/src/wifi/model/wifi-phy-operating-channel.cc @@ -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 { diff --git a/src/wifi/model/wifi-phy-operating-channel.h b/src/wifi/model/wifi-phy-operating-channel.h index 054654c26..d4470b0c7 100644 --- a/src/wifi/model/wifi-phy-operating-channel.h +++ b/src/wifi/model/wifi-phy-operating-channel.h @@ -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. *