30 class ChannelAccessManager;
35 class WifiMacQueueItem;
36 class UniformRandomVariable;
37 class CtrlBAckResponseHeader;
38 class WifiRemoteStationManager;
257 virtual void GotAck (
void);
296 virtual void Cancel (
void);
313 virtual bool HasTxop (
void)
const;
387 uint32_t
GetCw (
void)
const;
TxFailed m_txFailedCallback
the transmit failed callback
Simulation virtual time values and global simulation resolution.
void SendCfFrame(WifiMacType frameType, Mac48Address addr)
Sends CF frame to sta with address addr.
Ptr< MacTxMiddle > m_txMiddle
the MacTxMiddle
Time m_txopLimit
the txop limit time
virtual void RestartAccessIfNeeded(void)
Restart access request if needed.
virtual void StartAccessIfNeeded(void)
Request access from DCF manager if needed.
uint8_t GetAifsn(void) const
Return the number of slots that make up an AIFS.
virtual void StartNextPacket(void)
Start transmission for the next packet if allowed by the TxopLimit.
virtual void EndTxNoAck(void)
Event handler when a transmission that does not require an ACK has completed.
uint32_t m_backoffSlots
the backoff slots
virtual void StartNextFragment(void)
Start transmission for the next fragment.
void SetChannelAccessManager(const Ptr< ChannelAccessManager > manager)
Set ChannelAccessManager this Txop is associated to.
Ptr< ChannelAccessManager > m_channelAccessManager
the channel access manager
virtual void NotifyAccessGranted(void)
Notify the DCF that access has been granted.
virtual void MissedAck(void)
Event handler when an ACK is missed.
void SetTxDroppedCallback(TxDropped callback)
virtual void DoInitialize(void)
Initialize() implementation.
Time GetBackoffStart(void) const
Return the time when the backoff procedure started.
virtual void Cancel(void)
Cancel the transmission.
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.
bool CanStartNextPolling(void) const
Check if the next PCF transmission can fit in the remaining CFP duration.
Callback< void, Ptr< const Packet > > TxDropped
typedef for a callback to invoke when a packet is dropped.
uint32_t GetMinCw(void) const
Return the minimum contention window size.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
uint32_t m_cwMax
the CW maximum
control how a packet is transmitted.
virtual void NotifyOff(void)
When off operation occurs, the queue gets cleaned up.
void UpdateFailedCw(void)
Update the value of the CW variable to take into account a transmission failure.
friend class DcfListener
allow DcfListener class access
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
WifiMacType
Combination of valid MAC header type/subtype.
void NextFragment(void)
Continue to the next fragment.
static TypeId GetTypeId(void)
Get the type ID.
virtual bool IsAccessRequested(void) const
virtual bool IsQosTxop() const
Check for QoS TXOP.
virtual uint32_t GetNextFragmentSize(void) const
Calculate the size of the next fragment.
uint32_t m_cwMin
the CW minimum
bool NeedRtsRetransmission(Ptr< const Packet > packet, const WifiMacHeader &hdr)
Check if RTS should be re-transmitted if CTS was missed.
Ptr< MacLow > GetLow(void) const
Return the MacLow associated with this Txop.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void GotCfEnd(void)
Event handler when a CF-END frame is received.
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 MissedBlockAck(uint8_t nMpdus)
Event handler when a Block ACK timeout has occurred.
virtual void NotifyOn(void)
When on operation occurs, channel access will be started.
Ptr< WifiMacQueue > m_queue
the wifi MAC queue
virtual void DoDispose(void)
Destructor implementation.
bool NeedDataRetransmission(Ptr< const Packet > packet, const WifiMacHeader &hdr)
Check if DATA should be re-transmitted if ACK was missed.
Ptr< const Packet > m_currentPacket
the current packet
void SetMacLow(const Ptr< MacLow > low)
Set MacLow associated with this Txop.
virtual bool NeedFragmentation(void) const
Check if the current packet should be fragmented.
virtual Ptr< Packet > GetFragmentPacket(WifiMacHeader *hdr)
Get the next fragment from the packet with appropriate Wifi header for the fragment.
virtual void NotifyChannelSwitching(void)
When a channel switching occurs, enqueued packets are removed.
Callback< void, const WifiMacHeader & > TxOk
typedef for a callback to invoke when a packet transmission was completed successfully.
virtual void NotifyInternalCollision(void)
Notify the DCF that internal collision has occurred.
Ptr< MacLow > m_low
the MacLow
virtual bool IsLastFragment(void) const
Check if the current fragment is the last fragment.
void TxDroppedPacket(Ptr< const WifiMacQueueItem > item)
Pass the packet included in the wifi MAC queue item to the packet dropped callback.
uint32_t m_cw
the current CW
MacLowTransmissionParameters m_currentParams
current transmission parameters
virtual void Queue(Ptr< const Packet > packet, const WifiMacHeader &hdr)
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.
bool m_accessRequested
flag whether channel access is already requested
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...
virtual void GotAck(void)
Event handler when an ACK is received.
virtual void MissedCts(void)
Event handler when a CTS timeout has occurred.
void SetTxMiddle(const Ptr< MacTxMiddle > txMiddle)
Set MacTxMiddle this Txop is associated to.
virtual void NotifyCollision(void)
Notify the DCF that collision has occurred.
uint32_t GetBackoffSlots(void) const
Return the current number of backoff slots.
Callback< void, const WifiMacHeader & > TxFailed
typedef for a callback to invoke when a packet transmission was failed.
Ptr< WifiMacQueue > GetWifiMacQueue() const
Return the packet queue associated with this Txop.
void MissedCfPollResponse(bool expectedCfAck)
Event handler when a response to a CF-POLL frame is missed.
TxOk m_txOkCallback
the transmit OK callback
virtual void SetWifiRemoteStationManager(const Ptr< WifiRemoteStationManager > remoteManager)
Set WifiRemoteStationsManager this Txop is associated to.
uint8_t m_fragmentNumber
the fragment number
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.
WifiMacHeader m_currentHdr
the current header
void SetTxFailedCallback(TxFailed callback)
Ptr< WifiRemoteStationManager > m_stationManager
the wifi remote station manager
virtual uint32_t GetFragmentOffset(void) const
Calculate the offset for the current fragment.
void SetTxOkCallback(TxOk callback)
virtual void GotBlockAck(const CtrlBAckResponseHeader *blockAck, Mac48Address recipient, double rxSnr, WifiMode txMode, double dataSnr)
Event handler when a Block ACK is received.
virtual uint32_t GetFragmentSize(void) const
Calculate the size of the current fragment.
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)
virtual bool HasTxop(void) const
Check if the station has TXOP granted for the next MPDU.
virtual void NotifyWakeUp(void)
When wake up operation occurs, channel access will be restarted.
TxDropped m_txDroppedCallback
the packet dropped callback
Handle packet fragmentation and retransmissions for data and management frames.
Time GetTxopLimit(void) const
Return the TXOP limit.