wifi: SpectrumChannelSwitched callback function should be static
This commit is contained in:
committed by
Sébastien Deronne
parent
41ba71b748
commit
4bcfd1200d
@@ -148,7 +148,7 @@ SpectrumWifiPhyHelper::Create(Ptr<Node> node, Ptr<WifiNetDevice> device) const
|
||||
}
|
||||
InstallPhyInterfaces(i, phy);
|
||||
phy->SetChannelSwitchedCallback(
|
||||
MakeCallback(&SpectrumWifiPhyHelper::SpectrumChannelSwitched, this).Bind(phy));
|
||||
MakeCallback(&SpectrumWifiPhyHelper::SpectrumChannelSwitched).Bind(phy));
|
||||
phy->SetDevice(device);
|
||||
phy->SetMobility(node->GetObject<MobilityModel>());
|
||||
ret.emplace_back(phy);
|
||||
@@ -178,9 +178,8 @@ SpectrumWifiPhyHelper::InstallPhyInterfaces(uint8_t linkId, Ptr<SpectrumWifiPhy>
|
||||
}
|
||||
|
||||
void
|
||||
SpectrumWifiPhyHelper::SpectrumChannelSwitched(Ptr<SpectrumWifiPhy> phy) const
|
||||
SpectrumWifiPhyHelper::SpectrumChannelSwitched(Ptr<SpectrumWifiPhy> phy)
|
||||
{
|
||||
NS_LOG_FUNCTION(this << phy);
|
||||
for (const auto& otherPhy : phy->GetDevice()->GetPhys())
|
||||
{
|
||||
auto spectrumPhy = DynamicCast<SpectrumWifiPhy>(otherPhy);
|
||||
|
||||
@@ -119,12 +119,6 @@ class SpectrumWifiPhyHelper : public WifiPhyHelper
|
||||
*/
|
||||
void InstallPhyInterfaces(uint8_t linkId, Ptr<SpectrumWifiPhy> phy) const;
|
||||
|
||||
/**
|
||||
* Function that is notified when a spectrum channel switched
|
||||
* \param phy spectrum PHY instance that has switched its channel
|
||||
*/
|
||||
void SpectrumChannelSwitched(Ptr<SpectrumWifiPhy> phy) const;
|
||||
|
||||
/**
|
||||
* \param channel The channel to inspect to possibly add a WifiBandwidthFilter
|
||||
*
|
||||
@@ -133,6 +127,12 @@ class SpectrumWifiPhyHelper : public WifiPhyHelper
|
||||
*/
|
||||
void AddWifiBandwidthFilter(Ptr<SpectrumChannel> channel);
|
||||
|
||||
/**
|
||||
* Function that is notified when a spectrum channel switched
|
||||
* \param phy spectrum PHY instance that has switched its channel
|
||||
*/
|
||||
static void SpectrumChannelSwitched(Ptr<SpectrumWifiPhy> phy);
|
||||
|
||||
std::map<FrequencyRange, Ptr<SpectrumChannel>> m_channels; ///< the spectrum channels
|
||||
std::map<uint8_t /* linkId */, std::set<FrequencyRange>>
|
||||
m_interfacesMap; ///< map of the spectrum PHY interfaces to be added to the PHY instance
|
||||
|
||||
Reference in New Issue
Block a user