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