wifi: Rename NotifyMaybeCcaBusyStart to NotifyCcaBusyStart

This commit is contained in:
Sebastien Deronne
2022-04-20 17:59:45 +02:00
committed by Stefano Avallone
parent b0ec20b41d
commit 5a8d849f89
10 changed files with 16 additions and 16 deletions

View File

@@ -443,7 +443,7 @@ void
OcbWifiMac::MakeVirtualBusy (Time duration)
{
NS_LOG_FUNCTION (this << duration);
m_channelAccessManager->NotifyMaybeCcaBusyStartNow (duration);
m_channelAccessManager->NotifyCcaBusyStartNow (duration);
}
void

View File

@@ -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);

View File

@@ -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
*

View File

@@ -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.
*

View File

@@ -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 ());
}

View File

@@ -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.

View File

@@ -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 ())

View File

@@ -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.

View File

@@ -718,7 +718,7 @@ void
ChannelAccessManagerTest<TxopType>::AddCcaBusyEvt (uint64_t at, uint64_t duration)
{
Simulator::Schedule (MicroSeconds (at) - Now (),
&ChannelAccessManager::NotifyMaybeCcaBusyStartNow, m_ChannelAccessManager,
&ChannelAccessManager::NotifyCcaBusyStartNow, m_ChannelAccessManager,
MicroSeconds (duration));
}

View File

@@ -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");