diff --git a/src/wave/model/ocb-wifi-mac.cc b/src/wave/model/ocb-wifi-mac.cc index 2283ef8c7..5c1abd80a 100644 --- a/src/wave/model/ocb-wifi-mac.cc +++ b/src/wave/model/ocb-wifi-mac.cc @@ -443,7 +443,7 @@ void OcbWifiMac::MakeVirtualBusy (Time duration) { NS_LOG_FUNCTION (this << duration); - m_channelAccessManager->NotifyMaybeCcaBusyStartNow (duration); + m_channelAccessManager->NotifyCcaBusyStartNow (duration); } void diff --git a/src/wifi/model/channel-access-manager.cc b/src/wifi/model/channel-access-manager.cc index 3b9089f14..f212bd8ca 100644 --- a/src/wifi/model/channel-access-manager.cc +++ b/src/wifi/model/channel-access-manager.cc @@ -64,9 +64,9 @@ public: { m_cam->NotifyTxStartNow (duration); } - void NotifyMaybeCcaBusyStart (Time duration) + void NotifyCcaBusyStart (Time duration) { - m_cam->NotifyMaybeCcaBusyStartNow (duration); + m_cam->NotifyCcaBusyStartNow (duration); } void NotifySwitchingStart (Time duration) { @@ -613,7 +613,7 @@ ChannelAccessManager::NotifyTxStartNow (Time duration) } void -ChannelAccessManager::NotifyMaybeCcaBusyStartNow (Time duration) +ChannelAccessManager::NotifyCcaBusyStartNow (Time duration) { NS_LOG_FUNCTION (this << duration); NS_LOG_DEBUG ("busy start for " << duration); diff --git a/src/wifi/model/channel-access-manager.h b/src/wifi/model/channel-access-manager.h index b52832af1..9efdf3e82 100644 --- a/src/wifi/model/channel-access-manager.h +++ b/src/wifi/model/channel-access-manager.h @@ -155,7 +155,7 @@ public: * * Notify the Txop that a CCA busy period has just started. */ - void NotifyMaybeCcaBusyStartNow (Time duration); + void NotifyCcaBusyStartNow (Time duration); /** * \param duration expected duration of channel switching period * diff --git a/src/wifi/model/wifi-phy-listener.h b/src/wifi/model/wifi-phy-listener.h index 85ea48b2c..5a9046d03 100644 --- a/src/wifi/model/wifi-phy-listener.h +++ b/src/wifi/model/wifi-phy-listener.h @@ -91,7 +91,7 @@ public: * which the last NotifyCcaBusyStart method is called and * what duration it reported. */ - virtual void NotifyMaybeCcaBusyStart (Time duration) = 0; + virtual void NotifyCcaBusyStart (Time duration) = 0; /** * \param duration the expected channel switching duration. * diff --git a/src/wifi/model/wifi-phy-state-helper.cc b/src/wifi/model/wifi-phy-state-helper.cc index 14aeaff0d..8cd5bfd29 100644 --- a/src/wifi/model/wifi-phy-state-helper.cc +++ b/src/wifi/model/wifi-phy-state-helper.cc @@ -266,12 +266,12 @@ WifiPhyStateHelper::NotifyRxEndError (void) } void -WifiPhyStateHelper::NotifyMaybeCcaBusyStart (Time duration) +WifiPhyStateHelper::NotifyCcaBusyStart (Time duration) { NS_LOG_FUNCTION (this); for (const auto& listener : m_listeners) { - listener->NotifyMaybeCcaBusyStart (duration); + listener->NotifyCcaBusyStart (duration); } } @@ -521,7 +521,7 @@ WifiPhyStateHelper::SwitchMaybeToCcaBusy (Time duration) NS_LOG_FUNCTION (this << duration); if (GetState () != WifiPhyState::RX) { - NotifyMaybeCcaBusyStart (duration); + NotifyCcaBusyStart (duration); } Time now = Simulator::Now (); switch (GetState ()) @@ -584,7 +584,7 @@ WifiPhyStateHelper::SwitchFromRxAbort (void) NotifyRxEndOk (); DoSwitchFromRx (); m_endCcaBusy = Simulator::Now (); - NotifyMaybeCcaBusyStart (Seconds (0)); + NotifyCcaBusyStart (Seconds (0)); NS_ASSERT (IsStateIdle ()); } diff --git a/src/wifi/model/wifi-phy-state-helper.h b/src/wifi/model/wifi-phy-state-helper.h index b7ad2f5a5..cbec432c2 100644 --- a/src/wifi/model/wifi-phy-state-helper.h +++ b/src/wifi/model/wifi-phy-state-helper.h @@ -315,7 +315,7 @@ private: * * \param duration the duration of the CCA state */ - void NotifyMaybeCcaBusyStart (Time duration); + void NotifyCcaBusyStart (Time duration); /** * Notify all WifiPhyListener that we are switching channel with the given channel * switching delay. diff --git a/src/wifi/model/wifi-radio-energy-model.cc b/src/wifi/model/wifi-radio-energy-model.cc index 2d8e3abf4..a54950297 100644 --- a/src/wifi/model/wifi-radio-energy-model.cc +++ b/src/wifi/model/wifi-radio-energy-model.cc @@ -541,7 +541,7 @@ WifiRadioEnergyModelPhyListener::NotifyTxStart (Time duration, double txPowerDbm } void -WifiRadioEnergyModelPhyListener::NotifyMaybeCcaBusyStart (Time duration) +WifiRadioEnergyModelPhyListener::NotifyCcaBusyStart (Time duration) { NS_LOG_FUNCTION (this << duration); if (m_changeStateCallback.IsNull ()) diff --git a/src/wifi/model/wifi-radio-energy-model.h b/src/wifi/model/wifi-radio-energy-model.h index 5a3d95466..bd22090ed 100644 --- a/src/wifi/model/wifi-radio-energy-model.h +++ b/src/wifi/model/wifi-radio-energy-model.h @@ -109,7 +109,7 @@ public: * * Defined in ns3::WifiPhyListener */ - void NotifyMaybeCcaBusyStart (Time duration) override; + void NotifyCcaBusyStart (Time duration) override; /** * \param duration the expected channel switching duration. diff --git a/src/wifi/test/channel-access-manager-test.cc b/src/wifi/test/channel-access-manager-test.cc index bf6216211..6bca13b14 100644 --- a/src/wifi/test/channel-access-manager-test.cc +++ b/src/wifi/test/channel-access-manager-test.cc @@ -718,7 +718,7 @@ void ChannelAccessManagerTest::AddCcaBusyEvt (uint64_t at, uint64_t duration) { Simulator::Schedule (MicroSeconds (at) - Now (), - &ChannelAccessManager::NotifyMaybeCcaBusyStartNow, m_ChannelAccessManager, + &ChannelAccessManager::NotifyCcaBusyStartNow, m_ChannelAccessManager, MicroSeconds (duration)); } diff --git a/src/wifi/test/spectrum-wifi-phy-test.cc b/src/wifi/test/spectrum-wifi-phy-test.cc index efea7923f..a5237b3b1 100644 --- a/src/wifi/test/spectrum-wifi-phy-test.cc +++ b/src/wifi/test/spectrum-wifi-phy-test.cc @@ -253,7 +253,7 @@ public: { NS_LOG_FUNCTION (this << duration << txPowerDbm); } - void NotifyMaybeCcaBusyStart (Time duration) override + void NotifyCcaBusyStart (Time duration) override { NS_LOG_FUNCTION (this); ++m_notifyMaybeCcaBusyStart; @@ -321,7 +321,7 @@ SpectrumWifiPhyListenerTest::DoRun (void) Simulator::Run (); NS_TEST_ASSERT_MSG_EQ (m_count, 1, "Didn't receive right number of packets"); - NS_TEST_ASSERT_MSG_EQ (m_listener->m_notifyMaybeCcaBusyStart, 2, "Didn't receive NotifyMaybeCcaBusyStart (once preamble is detected + prolonged by L-SIG reception, then switched to Rx by at the beginning of data)"); + NS_TEST_ASSERT_MSG_EQ (m_listener->m_notifyMaybeCcaBusyStart, 2, "Didn't receive NotifyCcaBusyStart (once preamble is detected + prolonged by L-SIG reception, then switched to Rx by at the beginning of data)"); NS_TEST_ASSERT_MSG_EQ (m_listener->m_notifyRxStart, 1, "Didn't receive NotifyRxStart"); NS_TEST_ASSERT_MSG_EQ (m_listener->m_notifyRxEndOk, 1, "Didn't receive NotifyRxEnd");