From 6c960f977850ce03e8a50972b7fb6ed2e864bb55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Sat, 22 Sep 2018 17:29:39 +0200 Subject: [PATCH] wifi: Rename functions in ChannelAccessManager to differentiate DCF and PCF --- src/wifi/model/channel-access-manager.cc | 14 +++++++------- src/wifi/model/channel-access-manager.h | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/wifi/model/channel-access-manager.cc b/src/wifi/model/channel-access-manager.cc index 823aa0679..46d766679 100644 --- a/src/wifi/model/channel-access-manager.cc +++ b/src/wifi/model/channel-access-manager.cc @@ -290,7 +290,7 @@ ChannelAccessManager::RequestAccess (Ptr state, bool isCfPeriod) { state->NotifyAccessRequested (); Time delay = (MostRecent (GetAccessGrantStart (true), Simulator::Now ()) - Simulator::Now ()); - m_accessTimeout = Simulator::Schedule (delay, &ChannelAccessManager::GrantPcfAccess, this, state); + m_accessTimeout = Simulator::Schedule (delay, &ChannelAccessManager::DoGrantPcfAccess, this, state); return; } UpdateBackoff (); @@ -328,18 +328,18 @@ ChannelAccessManager::RequestAccess (Ptr state, bool isCfPeriod) return; } } - DoGrantAccess (); + DoGrantDcfAccess (); DoRestartAccessTimeoutIfNeeded (); } void -ChannelAccessManager::GrantPcfAccess (Ptr state) //to be renamed +ChannelAccessManager::DoGrantPcfAccess (Ptr state) { state->NotifyAccessGranted (); } void -ChannelAccessManager::DoGrantAccess (void) +ChannelAccessManager::DoGrantDcfAccess (void) { NS_LOG_FUNCTION (this); uint32_t k = 0; @@ -398,7 +398,7 @@ ChannelAccessManager::AccessTimeout (void) { NS_LOG_FUNCTION (this); UpdateBackoff (); - DoGrantAccess (); + DoGrantDcfAccess (); DoRestartAccessTimeoutIfNeeded (); } @@ -792,7 +792,7 @@ ChannelAccessManager::NotifyAckTimeoutStartNow (Time duration) } void -ChannelAccessManager::NotifyAckTimeoutResetNow () +ChannelAccessManager::NotifyAckTimeoutResetNow (void) { NS_LOG_FUNCTION (this); m_lastAckTimeoutEnd = Simulator::Now (); @@ -807,7 +807,7 @@ ChannelAccessManager::NotifyCtsTimeoutStartNow (Time duration) } void -ChannelAccessManager::NotifyCtsTimeoutResetNow () +ChannelAccessManager::NotifyCtsTimeoutResetNow (void) { NS_LOG_FUNCTION (this); m_lastCtsTimeoutEnd = Simulator::Now (); diff --git a/src/wifi/model/channel-access-manager.h b/src/wifi/model/channel-access-manager.h index a396cc10f..eabdec847 100644 --- a/src/wifi/model/channel-access-manager.h +++ b/src/wifi/model/channel-access-manager.h @@ -97,7 +97,7 @@ public: /** * \return value set previously using SetEifsNoDifs. */ - Time GetEifsNoDifs () const; + Time GetEifsNoDifs (void) const; /** * \param dcf a new Txop. @@ -198,7 +198,7 @@ public: /** * Notify that ACK timer has reset. */ - void NotifyAckTimeoutResetNow (); + void NotifyAckTimeoutResetNow (void); /** * Notify that CTS timer has started for the given duration. * @@ -208,7 +208,7 @@ public: /** * Notify that CTS timer has reset. */ - void NotifyCtsTimeoutResetNow (); + void NotifyCtsTimeoutResetNow (void); /** * Check if the device is busy sending or receiving, @@ -304,7 +304,7 @@ private: /** * Grant access to DCF */ - void DoGrantAccess (void); + void DoGrantDcfAccess (void); /** * Check if the device is between frames (in DIFS or AIFS interval) * @@ -316,7 +316,7 @@ private: /** * Grant access to PCF */ - void GrantPcfAccess (Ptr state); + void DoGrantPcfAccess (Ptr state); /** * typedef for a vector of Txops