wifi: Store computed bands in spectrum PHY interface
This commit is contained in:
committed by
Sébastien Deronne
parent
21af571db5
commit
039d310981
@@ -44,6 +44,7 @@ WifiSpectrumPhyInterface::WifiSpectrumPhyInterface(FrequencyRange freqRange)
|
||||
: m_frequencyRange{freqRange},
|
||||
m_centerFrequency{0},
|
||||
m_channelWidth{0},
|
||||
m_bands{},
|
||||
m_ruBands{}
|
||||
{
|
||||
NS_LOG_FUNCTION(this << freqRange);
|
||||
@@ -57,6 +58,7 @@ WifiSpectrumPhyInterface::DoDispose()
|
||||
m_spectrumWifiPhy = nullptr;
|
||||
m_netDevice = nullptr;
|
||||
m_channel = nullptr;
|
||||
m_bands.clear();
|
||||
m_ruBands.clear();
|
||||
}
|
||||
|
||||
@@ -155,6 +157,18 @@ WifiSpectrumPhyInterface::GetChannelWidth() const
|
||||
return m_channelWidth;
|
||||
}
|
||||
|
||||
void
|
||||
WifiSpectrumPhyInterface::SetBands(WifiSpectrumPhyInterface::WifiSpectrumBands&& bands)
|
||||
{
|
||||
m_bands = std::move(bands);
|
||||
}
|
||||
|
||||
const WifiSpectrumPhyInterface::WifiSpectrumBands&
|
||||
WifiSpectrumPhyInterface::GetBands() const
|
||||
{
|
||||
return m_bands;
|
||||
}
|
||||
|
||||
void
|
||||
WifiSpectrumPhyInterface::SetRuBands(HePhy::RuBands&& ruBands)
|
||||
{
|
||||
|
||||
@@ -126,6 +126,22 @@ class WifiSpectrumPhyInterface : public SpectrumPhy
|
||||
uint32_t bandBandwidth,
|
||||
uint16_t guardBandwidth);
|
||||
|
||||
/// vector of spectrum bands handled by this interface
|
||||
using WifiSpectrumBands = std::vector<WifiSpectrumBandInfo>;
|
||||
|
||||
/**
|
||||
* Set the vector of spectrum bands handled by this interface
|
||||
*
|
||||
* \param bands vector of spectrum bands
|
||||
*/
|
||||
void SetBands(WifiSpectrumBands&& bands);
|
||||
/**
|
||||
* Get the vector of spectrum bands handled by this interface
|
||||
*
|
||||
* \return the vector of spectrum bands
|
||||
*/
|
||||
const WifiSpectrumBands& GetBands() const;
|
||||
|
||||
/**
|
||||
* Set the HE RU spectrum bands handled by this interface (if any)
|
||||
*
|
||||
@@ -150,6 +166,8 @@ class WifiSpectrumPhyInterface : public SpectrumPhy
|
||||
uint16_t m_channelWidth; ///< channel width in MHz
|
||||
Ptr<const SpectrumModel> m_rxSpectrumModel; ///< receive spectrum model
|
||||
|
||||
WifiSpectrumBands
|
||||
m_bands; /**< Store all the distinct spectrum bands associated with every channels widths */
|
||||
HePhy::RuBands m_ruBands; /**< Store all the distinct spectrum bands associated with every RU */
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user