|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
21 #ifndef CHANNEL_ACCESS_MANAGER_H
22 #define CHANNEL_ACCESS_MANAGER_H
26 #include "ns3/event-id.h"
27 #include "ns3/nstime.h"
34 class FrameExchangeManager;
296 typedef std::vector<Ptr<Txop>>
Txops;
std::vector< Ptr< Txop > > Txops
typedef for a vector of Txops
virtual Time GetEifsNoDifs(void) const
Return the EIFS duration minus a DIFS.
void DisableEdcaFor(Ptr< Txop > qosTxop, Time duration)
Manage a set of ns3::Txop.
An identifier for simulation events.
Time m_lastSwitchingStart
the last switching start time
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void NotifyTxStartNow(Time duration)
Time m_lastTxDuration
the last transmit duration time
void SetupPhyListener(Ptr< WifiPhy > phy)
Set up listener for PHY events.
void NotifyWakeupNow(void)
Notify the Txop that the device has been resumed from sleep mode.
PhyListener * m_phyListener
the PHY listener
Ptr< FrameExchangeManager > m_feManager
pointer to the Frame Exchange Manager
void NotifyOffNow(void)
Notify the Txop that the device has been put in off mode.
Time m_lastNavDuration
the last NAV duration time
bool m_sleeping
flag whether it is in sleeping state
Time GetBackoffStartFor(Ptr< Txop > txop)
Return the time when the backoff procedure started for the given Txop.
void DoGrantDcfAccess(void)
Grant access to Txop using DCF/EDCF contention rules.
void NotifyRxEndErrorNow(void)
Notify the Txop that a packet reception was just completed unsuccessfully.
bool m_lastRxReceivedOk
the last receive OK
virtual Time GetSifs(void) const
Return the Short Interframe Space (SIFS) for this PHY.
Time m_eifsNoDifs
EIFS no DIFS time.
EventId m_accessTimeout
the access timeout ID
Time m_lastRxDuration
the last receive duration time
void NotifySleepNow(void)
Notify the Txop that the device has been put in sleep mode.
Time MostRecent(std::initializer_list< Time > list) const
Return the most recent time.
virtual ~ChannelAccessManager()
void NotifySwitchingStartNow(Time duration)
void RequestAccess(Ptr< Txop > txop)
void DoRestartAccessTimeoutIfNeeded(void)
Time m_lastBusyDuration
the last busy duration time
A base class which provides memory management and object aggregation.
Time m_lastBusyStart
the last busy start time
bool m_off
flag whether it is in off state
Time m_lastCtsTimeoutEnd
the last CTS timeout end time
void NotifyNavStartNow(Time duration)
void NotifyAckTimeoutStartNow(Time duration)
Notify that ack timer has started for the given duration.
void NotifyCtsTimeoutStartNow(Time duration)
Notify that CTS timer has started for the given duration.
void SetupFrameExchangeManager(Ptr< FrameExchangeManager > feManager)
Set up the Frame Exchange Manager.
bool NeedBackoffUponAccess(Ptr< Txop > txop)
Determine if a new backoff needs to be generated when a packet is queued for transmission.
Simulation virtual time values and global simulation resolution.
Txops m_txops
the vector of managed Txops
void Add(Ptr< Txop > txop)
bool IsBusy(void) const
Check if the device is busy sending or receiving, or NAV or CCA busy.
Time m_lastSwitchingDuration
the last switching duration time
void UpdateBackoff(void)
Update backoff slots for all Txops.
Time GetBackoffEndFor(Ptr< Txop > txop)
Return the time when the backoff procedure ended (or will ended) for the given Txop.
Ptr< WifiPhy > m_phy
pointer to the PHY
Time m_lastAckTimeoutEnd
the last Ack timeout end time
void NotifyRxStartNow(Time duration)
void NotifyCtsTimeoutResetNow(void)
Notify that CTS timer has reset.
void AccessTimeout(void)
Called when access timeout should occur (e.g.
virtual Time GetSlot(void) const
Return the slot duration for this PHY.
Time m_lastRxStart
the last receive start time
void RemovePhyListener(Ptr< WifiPhy > phy)
Remove current registered listener for PHY events.
void DoDispose(void) override
Destructor implementation.
void NotifyRxEndOkNow(void)
Notify the Txop that a packet reception was just completed successfully.
void NotifyAckTimeoutResetNow(void)
Notify that ack timer has reset.
Time m_lastTxStart
the last transmit start time
Time GetAccessGrantStart(bool ignoreNav=false) const
Access will never be granted to the medium before the time returned by this method.
void NotifyNavResetNow(Time duration)
void NotifyOnNow(void)
Notify the Txop that the device has been resumed from off mode.
void NotifyMaybeCcaBusyStartNow(Time duration)
Time m_lastNavStart
the last NAV start time