24 #include "ns3/nstime.h"
25 #include "ns3/event-id.h"
113 uint32_t
GetCw (
void)
const;
void NotifyWakeupNow(void)
Notify the DCF that the device has been resumed from sleep mode.
Simulation virtual time values and global simulation resolution.
void NotifySleep(void)
Notify that the device has started to sleep.
void NotifyInternalCollision(void)
Notify that internal collision has occurred.
uint32_t GetCwMin(void) const
Return the minimum congestion window size.
void NotifyAccessGranted(void)
Notify that access has been granted.
void RequestAccess(DcfState *state)
Time GetBackoffStart(void) const
Return the time when the backoff procedure started.
void SetupLowListener(Ptr< MacLow > low)
Set up listener for MacLow events.
void NotifyWakeUp(void)
Notify that the device has started to wake up.
void UpdateBackoff(void)
Update backoff slots for all DcfStates.
virtual void DoNotifyCollision(void)=0
Called by DcfManager to notify a DcfState subclass that a normal collision occured, that is, that the medium was busy when access was requested.
void SetAifsn(uint32_t aifsn)
void ResetCw(void)
Update the value of the CW variable to take into account a transmission success or a transmission abo...
Time m_lastSwitchingDuration
void DoGrantAccess(void)
Grant access to DCF.
void NotifyNavResetNow(Time duration)
Time GetBackoffStartFor(DcfState *state)
Return the time when the backoff procedure started for the given DcfState.
void NotifyCtsTimeoutStartNow(Time duration)
Notify that CTS timer has started for the given duration.
void NotifyRxEndOkNow(void)
Notify the DCF that a packet reception was just completed successfully.
PhyListener * m_phyListener
Time GetAccessGrantStart(void) const
Access will never be granted to the medium before the time returned by this method.
Time GetBackoffEndFor(DcfState *state)
Return the time when the backoff procedure ended (or will ended) for the given DcfState.
void NotifyTxStartNow(Time duration)
void RemovePhyListener(Ptr< WifiPhy > phy)
Remove current registered listener for Phy events.
void NotifyAckTimeoutStartNow(Time duration)
Notify that ACK timer has started for the given duration.
void SetupPhyListener(Ptr< WifiPhy > phy)
Set up listener for Phy events.
Manage a set of ns3::DcfStateHandle a set of independent ns3::DcfState, each of which represents a si...
keep track of the state needed for a single DCF function.
bool IsAccessRequested(void) const
uint32_t GetBackoffSlots(void) const
Return the current number of backoff slots.
uint32_t GetCwMax(void) const
Return the maximum congestion window size.
void SetCwMin(uint32_t minCw)
Set the minimum congestion window size.
void StartBackoffNow(uint32_t nSlots)
virtual void DoNotifyWakeUp(void)=0
Called by DcfManager to notify a DcfState subclass that the device has begun to wake up...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void DoNotifyAccessGranted(void)=0
Called by DcfManager to notify a DcfState subclass that access to the medium is granted and can start...
std::vector< DcfState * > States
typedef for a vector of DcfStates
void NotifyAccessRequested(void)
Notify that access request has been received.
void NotifyRxEndErrorNow(void)
Notify the DCF that a packet reception was just completed unsuccessfully.
Time m_lastSwitchingStart
void SetEifsNoDifs(Time eifsNoDifs)
virtual void DoNotifyInternalCollision(void)=0
Called by DcfManager to notify a DcfState subclass that an 'internal' collision occured, that is, that the backoff timer of a higher priority DcfState expired at the same time and that access was granted to this higher priority DcfState.
void NotifyMaybeCcaBusyStartNow(Time duration)
void AccessTimeout(void)
Called when access timeout should occur (e.g.
void SetSlot(Time slotTime)
void SetCwMax(uint32_t maxCw)
Set the maximum congestion window size.
void NotifyAckTimeoutResetNow()
Notify that ACK timer has resetted.
LowDcfListener * m_lowListener
void NotifyNavStartNow(Time duration)
An identifier for simulation events.
void NotifyChannelSwitching(void)
Notify that the device is switching channel.
uint32_t GetCw(void) const
uint32_t GetAifsn(void) const
Return the number of slots that make up an AIFS.
virtual void DoNotifyChannelSwitching(void)=0
Called by DcfManager to notify a DcfState subclass that a channel switching occured.
void NotifyRxStartNow(Time duration)
virtual void DoNotifySleep(void)=0
Called by DcfManager to notify a DcfState subclass that the device has begun to sleep.
void UpdateBackoffSlotsNow(uint32_t nSlots, Time backoffUpdateBound)
Update backoff slots that nSlots has passed.
Time GetEifsNoDifs() const
void NotifySleepNow(void)
Notify the DCF that the device has been put in sleep mode.
void NotifyCtsTimeoutResetNow()
Notify that CTS timer has resetted.
void NotifyCollision(void)
Notify that collision has occurred.
bool IsBusy(void) const
Check if the device is busy sending or receiving, or NAV busy.
void DoRestartAccessTimeoutIfNeeded(void)
void UpdateFailedCw(void)
Update the value of the CW variable to take into account a transmission failure.
void NotifySwitchingStartNow(Time duration)
Time MostRecent(Time a, Time b) const
Return the most recent time.