24 #include "ns3/traced-value.h" 30 class ChannelAccessManager;
34 class WifiMacQueueItem;
35 class UniformRandomVariable;
36 class CtrlBAckResponseHeader;
37 class WifiRemoteStationManager;
310 uint32_t
GetCw (
void)
const;
Simulation virtual time values and global simulation resolution.
Smart pointer class similar to boost::intrusive_ptr.
Ptr< MacTxMiddle > m_txMiddle
the MacTxMiddle
TracedCallback< uint32_t > m_backoffTrace
backoff trace value
TracedValue< uint32_t > m_cwTrace
CW trace value.
void DoInitialize(void) override
Initialize() implementation.
Time m_txopLimit
the TXOP limit time
virtual void StartAccessIfNeeded(void)
Request access from Txop if needed.
uint8_t GetAifsn(void) const
Return the number of slots that make up an AIFS.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
uint32_t m_backoffSlots
the number of backoff slots
Callback< void, WifiMacDropReason, Ptr< const WifiMacQueueItem > > DroppedMpdu
typedef for a callback to invoke when an MPDU is dropped.
virtual bool HasFramesToTransmit(void)
Check if the Txop has frames to transmit.
uint32_t m_backoff
the current backoff
void RequestAccess(void)
Request access to the ChannelAccessManager.
void SetChannelAccessManager(const Ptr< ChannelAccessManager > manager)
Set ChannelAccessManager this Txop is associated to.
Ptr< ChannelAccessManager > m_channelAccessManager
the channel access manager
Time GetBackoffStart(void) const
Return the time when the backoff procedure started.
Manage a set of ns3::TxopHandle a set of independent ns3::Txop, each of which represents a single DCF...
Ptr< UniformRandomVariable > m_rng
the random stream
void UpdateBackoffSlotsNow(uint32_t nSlots, Time backoffUpdateBound)
Update backoff slots that nSlots has passed.
virtual void GenerateBackoff(void)
Generate a new backoff now.
virtual ChannelAccessStatus GetAccessStatus(void) const
uint32_t GetMinCw(void) const
Return the minimum contention window size.
uint32_t m_cwMax
the maximum contention window
virtual void NotifyOff(void)
When off operation occurs, the queue gets cleaned up.
ChannelAccessStatus
Enumeration for channel access status.
void UpdateFailedCw(void)
Update the value of the CW variable to take into account a transmission failure.
virtual AcIndex GetAccessCategory(void) const
Get the access category.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
virtual void NotifyChannelReleased(void)
Called by the FrameExchangeManager to notify the completion of the transmissions. ...
static TypeId GetTypeId(void)
Get the type ID.
ChannelAccessStatus m_access
channel access status
virtual bool IsQosTxop() const
Check for QoS TXOP.
uint32_t m_cwMin
the minimum contention window
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t GetCw(void) const
virtual void NotifySleep(void)
When sleep operation occurs, if there is a pending packet transmission, it will be reinserted to the ...
uint32_t GetMaxCw(void) const
Return the maximum contention window size.
virtual void NotifyOn(void)
When on operation occurs, channel access will be started.
Ptr< WifiMacQueue > m_queue
the wifi MAC queue
void DoDispose(void) override
Destructor implementation.
virtual void NotifyChannelSwitching(void)
When a channel switching occurs, enqueued packets are removed.
DroppedMpdu m_droppedMpduCallback
the dropped MPDU callback
virtual void NotifyInternalCollision(void)
Notify the Txop that internal collision has occurred.
virtual void NotifyChannelAccessed(Time txopDuration=Seconds(0))
Called by the FrameExchangeManager to notify that channel access has been granted for the given amoun...
virtual void SetDroppedMpduCallback(DroppedMpdu callback)
uint32_t m_cw
the current contention window
void SetMinCw(uint32_t minCw)
Set the minimum contention window size.
friend class MacLowTransmissionListener
allow MacLowTransmissionListener class access
void SetMaxCw(uint32_t maxCw)
Set the maximum contention window size.
void SetTxopLimit(Time txopLimit)
Set the TXOP limit.
Time m_backoffStart
the backoffStart variable is used to keep track of the time at which a backoff was started or the tim...
void SetTxMiddle(const Ptr< MacTxMiddle > txMiddle)
Set MacTxMiddle this Txop is associated to.
Time Seconds(double value)
Construct a Time in the indicated unit.
uint32_t GetBackoffSlots(void) const
Return the current number of backoff slots.
Ptr< WifiMacQueue > GetWifiMacQueue() const
Return the packet queue associated with this Txop.
virtual void SetWifiRemoteStationManager(const Ptr< WifiRemoteStationManager > remoteManager)
Set WifiRemoteStationsManager this Txop is associated to.
void SetAifsn(uint8_t aifsn)
Set the number of slots that make up an AIFS.
A base class which provides memory management and object aggregation.
virtual void NotifyAccessRequested(void)
Notify that access request has been received.
Ptr< WifiRemoteStationManager > m_stationManager
the wifi remote station manager
virtual void Queue(Ptr< Packet > packet, const WifiMacHeader &hdr)
void ResetCw(void)
Update the value of the CW variable to take into account a transmission success or a transmission abo...
a unique identifier for an interface.
void StartBackoffNow(uint32_t nSlots)
WifiMacDropReason
The reason why an MPDU was dropped.
virtual void NotifyWakeUp(void)
When wake up operation occurs, channel access will be restarted.
Handle packet fragmentation and retransmissions for data and management frames.
Time GetTxopLimit(void) const
Return the TXOP limit.