24 #include "ns3/assert.h"
25 #include "ns3/pointer.h"
38 #include "ns3/simulator.h"
40 #undef NS_LOG_APPEND_CONTEXT
41 #define NS_LOG_APPEND_CONTEXT if (m_low != 0) { std::clog << "[mac=" << m_low->GetAddress () << "] "; }
241 .SetGroupName (
"Wifi")
243 .AddAttribute (
"Queue",
244 "The WifiMacQueue object",
247 MakePointerChecker<WifiMacQueue> ())
248 .AddTraceSource (
"BackoffTrace",
249 "Trace source for backoff values",
251 "ns3::TracedValue::Uint32Callback")
252 .AddTraceSource (
"CwTrace",
253 "Trace source for contention window values",
255 "ns3::TracedValue::Uint32Callback")
263 m_msduAggregator (0),
264 m_mpduAggregator (0),
265 m_typeOfStation (
STA),
268 m_isAccessRequestedForRts (false)
274 m_queue = CreateObject<WifiMacQueue> ();
608 Ptr<Packet> currentAggregatedPacket = Create<Packet> ();
612 bool aggregated =
false;
613 bool isAmsdu =
false;
617 while (peekedPacket != 0)
625 m_queue->Remove (peekedPacket);
639 currentAggregatedPacket = 0;
658 bool resetDcf =
false;
665 packet =
m_queue->Peek (&header);
666 NS_ASSERT_MSG (packet,
"Internal collision but no packet in queue");
716 NS_LOG_DEBUG (
"Dequeueing and discarding head of queue");
717 packet =
m_queue->Peek (&header);
796 NS_FATAL_ERROR (
"Don't know how to extract Traffic ID from this BA action frame");
802 NS_FATAL_ERROR (
"Don't know how to extract Traffic ID from this action frame");
819 bool resetCurrentPacket =
true;
853 resetCurrentPacket =
false;
857 if (resetCurrentPacket ==
true)
905 m_queue->Enqueue (packet, hdr);
968 bool resetCurrentPacket =
true;
1001 resetCurrentPacket =
false;
1005 if (resetCurrentPacket ==
true)
1199 uint16_t seqNumber = 0;
1265 if (peekedPacket == 0)
1312 return remainingTxop;
1331 if (peekedPacket == 0)
1357 return (
GetTxopRemaining () >=
Low ()->CalculateOverallTxTime (peekedPacket, &hdr, params));
1371 NS_LOG_DEBUG (
"a transmission that did not require an ACK just finished");
1512 m_queue->PushFront (packet, hdr);
1520 NS_LOG_DEBUG (
"received ADDBA response from " << recipient);
1521 uint8_t tid = respHdr->
GetTid ();
1526 NS_LOG_DEBUG (
"block ack agreement established with " << recipient);
1542 NS_LOG_DEBUG (
"received DELBA frame from=" << recipient);
1726 uint16_t
timeout,
bool immediateBAck)
1728 NS_LOG_FUNCTION (
this << dest << static_cast<uint32_t> (tid) << startSeq << timeout << immediateBAck);
1749 reqHdr.SetImmediateBlockAck ();
1753 reqHdr.SetDelayedBlockAck ();
1755 reqHdr.SetTid (tid);
1759 reqHdr.SetBufferSize (0);
1760 reqHdr.SetTimeout (timeout);
1761 reqHdr.SetStartingSequence (startSeq);
1791 NS_LOG_FUNCTION (
this << addr << static_cast<uint32_t> (tid) << byOriginator);
virtual uint16_t PeekNextSequenceNumberfor(WifiMacHeader *hdr)
Return the next sequence number for the Traffic ID and destination, but do not pick it (i...
Keep track of destination address - TID pairs that are waiting for a block ACK response.
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
void SetUnblockDestinationCallback(Callback< void, Mac48Address, uint8_t > callback)
virtual void SetMaxCw(uint32_t maxCw)
Set the maximum contention window size.
void SetTxopLimit(Time txopLimit)
Set the TXOP limit.
virtual void DoInitialize(void)
Initialize() implementation.
TransmissionListener * m_transmissionListener
Simulation virtual time values and global simulation resolution.
void NotifyGotBlockAck(const CtrlBAckResponseHeader *blockAck, Mac48Address recipient, double rxSnr, WifiMode txMode, double dataSnr)
Ptr< const Packet > m_currentPacket
Smart pointer class similar to boost::intrusive_ptr.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
void DoInitialize()
Initialize() implementation.
Introspection did not find any typical Config paths.
TxFailed m_txFailedCallback
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
virtual Mac48Address GetDestAddressForAggregation(const WifiMacHeader &hdr)
void NotifyWakeUp(void)
When wake up operation occurs, restart channel access.
void SetBlockAckInactivityTimeout(uint16_t timeout)
bool NeedDataRetransmission(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
uint32_t GetCwMin(void) const
Return the minimum congestion window size.
uint32_t GetFragmentSize(void)
Calculate the size of the current fragment.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
uint16_t m_blockAckInactivityTimeout
void CreateAgreement(const MgtAddBaRequestHeader *reqHdr, Mac48Address recipient)
virtual uint32_t GetNOutstandingPackets(Mac48Address address, uint8_t tid)
virtual bool Aggregate(Ptr< const Packet > packet, Ptr< Packet > aggregatedPacket, Mac48Address src, Mac48Address dest)=0
void VerifyBlockAck(void)
Verifies if dequeued packet has to be transmitted with ack policy Block Ack.
void NotifyCollision(void)
Notify the EDCAF that collision has occurred.
void ReportDataFailed(Mac48Address address, const WifiMacHeader *header)
Should be invoked whenever the AckTimeout associated to a transmission attempt expires.
Ptr< const Packet > PeekNextPacketByTidAndAddress(WifiMacHeader &hdr, Mac48Address recipient, uint8_t tid, Time *timestamp)
void SetTypeOfStation(enum TypeOfStation type)
Set type of station with the given type.
void EnableBasicBlockAck(void)
Wait BASICBLOCKACKTimeout for a Basic Block Ack Response frame.
void StorePacket(Ptr< const Packet > packet, const WifiMacHeader &hdr, Time tStamp)
void RequestAccess(DcfState *state)
void CompleteMpduTx(Ptr< const Packet > packet, WifiMacHeader hdr, Time tstamp)
virtual void EndTxNoAck(void)
Invoked upon the end of the transmission of a frame that does not require an ACK (e.g., broadcast and multicast frames).
Mac48Address GetBssid(void) const
Return the Basic Service Set Identification.
void SetTxFailedCallback(TxFailed callback)
void GotAck(double snr, WifiMode txMode)
Event handler when an ACK is received.
void RegisterBlockAckListenerForAc(enum AcIndex ac, MacLowAggregationCapableTransmissionListener *listener)
bool IsNull(void) const
Check for null implementation.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
bool NeedBarRetransmission(void)
Check if Block ACK Request should be re-transmitted.
virtual int64_t AssignStreams(int64_t stream)=0
Assign a fixed random variable stream number to the random variables used by this model...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
uint8_t m_blockAckThreshold
void SetWifiRemoteStationManager(Ptr< WifiRemoteStationManager > remoteManager)
Set WifiRemoteStationsManager this EdcaTxopN is associated to.
bool HasBar(struct Bar &bar)
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
bool IsBroadcast(void) const
virtual bool IsEdca(void) const
void SetBlockAckType(enum BlockAckType bAckType)
WifiMacHeader m_currentHdr
void NotifySleep(void)
When sleep operation occurs, re-insert pending packet into front of the queue.
void ReportAmpduTxStatus(Mac48Address address, uint8_t tid, uint32_t nSuccessfulMpdus, uint32_t nFailedMpdus, double rxSnr, double dataSnr)
Typically called per A-MPDU, either when a Block ACK was successfully received or when a BlockAckTime...
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
void SetAifsn(uint32_t aifsn)
virtual void Cancel(void)
Invoked if this transmission was canceled one way or another.
bool NeedRts(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet, WifiTxVector txVector)
AggregationCapableTransmissionListener(EdcaTxopN *txop)
void UpdateFragmentationThreshold(void)
Typically called to update the fragmentation threshold at the start of a new transmission.
bool IsLastFragment(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet, uint32_t fragmentNumber)
virtual Ptr< MsduAggregator > GetMsduAggregator(void) const
virtual Ptr< const Packet > PeekNextPacketInBaQueue(WifiMacHeader &header, Mac48Address recipient, uint8_t tid, Time *timestamp)
bool HasPackets(void) const
Returns true if there are packets that need of retransmission or at least a BAR is scheduled...
void ResetCw(void)
Update the value of the CW variable to take into account a transmission success or a transmission abo...
void PrepareForQueue(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
Ptr< MsduAggregator > m_msduAggregator
Ptr< const Packet > PeekNextPacket(WifiMacHeader &hdr)
virtual Time GetTxopLimit(void) const
Return the TXOP limit.
friend class TransmissionListener
listen to events coming from ns3::MacLow.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
virtual void MissedAck(void)
ns3::MacLow did not receive an expected ACK within AckTimeout.
void NextFragment(void)
Continue to the next fragment.
uint8_t GetCurrentTid() const
Get Traffic ID of the current packet.
Time GetTxopLimit(void) const
Return the TXOP limit.
void SetTxOkCallback(TxOk callback)
BlockAckManager * m_baManager
control how a packet is transmitted.
virtual void DoNotifyChannelSwitching(void)
Called by DcfManager to notify a DcfState subclass that a channel switching occured.
bool m_isAccessRequestedForRts
virtual uint32_t GetAifsn(void) const
Return the number of slots that make up an AIFS.
virtual void StartNextFragment(void)
Invoked when ns3::MacLow wants to start a new transmission as configured by MacLowTransmissionParamet...
virtual bool GetBlockAckAgreementExists(Mac48Address address, uint8_t tid)
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
Handles sequence numbering of IEEE 802.11 data frames.
void MissedBlockAck(uint32_t nMpdus)
Event handler when a Block ACK timeout has occurred.
Ptr< MpduAggregator > m_mpduAggregator
virtual void DoNotifyCollision(void)
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 SetTxFailedCallback(TxFailed callback)
void MissedAck(void)
Event handler when an ACK is missed.
enum TypeOfStation GetTypeOfStation(void) const
Return type of station.
void SetLow(Ptr< MacLow > low)
Set MacLow associated with this EdcaTxopN.
Ptr< MacLow > Low(void)
Return the MacLow associated with this EdcaTxopN.
Ptr< Packet > CreateFragment(uint32_t start, uint32_t length) const
Create a new packet which contains a fragment of the original packet.
Ptr< WifiRemoteStationManager > m_stationManager
void DestroyBlockAckAgreement(Mac48Address originator, uint8_t tid)
This queue contains packets for a particular access class.
void GotDelBaFrame(const MgtDelBaHeader *delBaHdr, Mac48Address recipient)
void SetQueue(Ptr< WifiMacQueue > queue)
void NotifyAccessGranted(void)
Notify the EDCAF that access has been granted.
void RemoveRetransmitPacket(uint8_t tid, Mac48Address recipient, uint16_t seqnumber)
Remove a packet after you peek in the retransmit queue and get it.
void ReportFinalDataFailed(Mac48Address address, const WifiMacHeader *header)
Should be invoked after calling ReportDataFailed if NeedDataRetransmission returns false...
listen for block ack events.
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
void NotifyInternalCollision(void)
Notify the EDCAF that internal collision has occurred.
std::map< Mac48Address, bool > m_aMpduEnabled
virtual uint32_t GetNRetryNeededPackets(Mac48Address recipient, uint8_t tid) const
TracedValue< uint32_t > m_cwTrace
void UpdateAgreement(const MgtAddBaResponseHeader *respHdr, Mac48Address recipient)
TracedValue< uint32_t > m_backoffTrace
void ReportRtsFailed(Mac48Address address, const WifiMacHeader *header)
Should be invoked whenever the RtsTimeout associated to a transmission attempt expires.
virtual void SetMinCw(uint32_t minCw)
Set the minimum contention window size.
uint32_t GetNRetryNeededPackets(Mac48Address recipient, uint8_t tid) const
void SendAddBaRequest(Mac48Address recipient, uint8_t tid, uint16_t startSeq, uint16_t timeout, bool immediateBAck)
Sends an ADDBA Request to establish a block ack agreement with sta addressed by recipient for tid tid...
Ptr< const Packet > PeekNextRetransmitPacket(WifiMacHeader &header, Mac48Address recipient, uint8_t tid, Time *timestamp)
void SendDelbaFrame(Mac48Address addr, uint8_t tid, bool byOriginator)
virtual void GotAck(double snr, WifiMode txMode)
void SetBlockAckThreshold(uint8_t threshold)
Set threshold for block ACK mechanism.
void NotifyAgreementUnsuccessful(Mac48Address recipient, uint8_t tid)
void MissedCts(void)
Event handler when a CTS timeout has occurred.
Manage a set of ns3::DcfStateHandle a set of independent ns3::DcfState, each of which represents a si...
virtual void GotBlockAck(const CtrlBAckResponseHeader *blockAck, Mac48Address source, double rxSnr, WifiMode txMode, double dataSnr)
void SetWifiRemoteStationManager(Ptr< WifiRemoteStationManager > manager)
Set up WifiRemoteStationManager associated with this BlockAckManager.
uint16_t PeekNextSequenceNumberfor(WifiMacHeader *hdr)
Return the next sequence number for the Traffic ID and destination, but do not pick it (i...
keep track of the state needed for a single DCF function.
virtual void SetAmpdu(Mac48Address dest, bool enableAmpdu)
std::string GetUniqueName(void) const
static Mac48Address GetBroadcast(void)
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
void NotifyChannelSwitching(void)
When a channel switching occurs, enqueued packets are removed.
Mac48Address GetAddress(void) const
Return the MAC address of this MacLow.
void StartNextFragment(void)
Start transmission for the next fragment.
void SetTxMiddle(MacTxMiddle *txMiddle)
bool IsAccessRequested(void) const
void SetBlockDestinationCallback(Callback< void, Mac48Address, uint8_t > callback)
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
Ptr< Packet > GetFragmentPacket(WifiMacHeader *hdr)
Get the next fragment from the packet with appropriate Wifi header for the fragment.
virtual void StartNext(void)
Invoked when ns3::MacLow wants to continue the TXOP.
uint32_t GetNRetryNeededPackets(Mac48Address recipient, uint8_t tid) const
virtual void DoNotifyWakeUp(void)
Called by DcfManager to notify a DcfState subclass that the device has begun to wake up...
virtual ~AggregationCapableTransmissionListener()
void SetTxOkCallback(TxOk callback)
Time m_currentPacketTimestamp
uint32_t GetCwMax(void) const
Return the maximum congestion window size.
void SetCwMin(uint32_t minCw)
Set the minimum congestion window size.
virtual void GotCts(double snr, WifiMode txMode)
virtual void StartTransmission(Ptr< const Packet > packet, const WifiMacHeader *hdr, MacLowTransmissionParameters parameters, MacLowTransmissionListener *listener)
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer.
uint32_t GetFragmentOffset(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet, uint32_t fragmentNumber)
virtual uint32_t GetMinCw(void) const
Return the minimum contention window size.
void EndTxNoAck(void)
Event handler when a transmission that does not require an ACK has completed.
void StartBackoffNow(uint32_t nSlots)
bool NeedFragmentation(void) const
Check if the current packet should be fragmented.
Ptr< MpduAggregator > GetMpduAggregator(void) const
void EnableCompressedBlockAck(void)
Wait COMPRESSEDBLOCKACKTimeout for a Compressed Block Ack Response frame.
virtual void CompleteTransfer(Mac48Address recipient, uint8_t tid)
virtual void MissedCts(void)
ns3::MacLow did not receive an expected CTS within CtsTimeout.
uint16_t GetNextSequenceNumberfor(const WifiMacHeader *hdr)
Return the next sequence number for the given header.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< MsduAggregator > GetMsduAggregator(void) const
Hold objects of type Ptr.
void SetAccessCategory(enum AcIndex ac)
Set the access category of this EDCAF.
void EnableAck(void)
Wait ACKTimeout for an ACK.
uint16_t PeekNextSequenceNumberfor(const WifiMacHeader *hdr)
Return the next sequence number for the Traffic ID and destination, but do not pick it (i...
bool RemovePacket(uint8_t tid, Mac48Address recipient, uint16_t seqnumber)
Remove a packet after you peek in the queue and get it.
uint32_t GetFragmentSize(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet, uint32_t fragmentNumber)
Mac48Address MapDestAddressForAggregation(const WifiMacHeader &hdr)
bool ExistsAgreementInState(Mac48Address recipient, uint8_t tid, enum OriginatorBlockAckAgreement::State state) const
void SetMpduAggregator(Ptr< MpduAggregator > aggr)
bool SetupBlockAckIfNeeded()
If number of packets in the queue reaches m_blockAckThreshold value, an ADDBA Request frame is sent t...
virtual ~TransmissionListener()
bool GetBaAgreementExists(Mac48Address address, uint8_t tid) const
void StartNext(void)
Start transmission for the next packet if allowed by the TxopLimit.
bool HasVhtSupported(void) const
Return whether the device has VHT capability support enabled.
virtual void DoNotifySleep(void)
Called by DcfManager to notify a DcfState subclass that the device has begun to sleep.
void SetAmpduExist(Mac48Address dest, bool enableAmpdu)
virtual Mac48Address GetSrcAddressForAggregation(const WifiMacHeader &hdr)
Ptr< const Packet > GetNextPacket(WifiMacHeader &hdr)
void Cancel(void)
Cancel the transmission.
void BaTxOk(const WifiMacHeader &hdr)
The packet we sent was successfully received by the receiver.
void SetManager(DcfManager *manager)
Set DcfManager this EdcaTxopN is associated to.
void DisableRts(void)
Do not send rts and wait for cts before sending data.
static Time Now(void)
Return the current simulation virtual time.
void Queue(Ptr< const Packet > packet, const WifiMacHeader &hdr)
uint16_t GetNextSequenceNumberfor(WifiMacHeader *hdr)
Return the next sequence number for the given header.
void SetMsduAggregator(Ptr< MsduAggregator > aggr)
bool GetAmpduExist(Mac48Address dest) const
void SetBlockAckInactivityCallback(Callback< void, Mac48Address, uint8_t, bool > callback)
void GotBlockAck(const CtrlBAckResponseHeader *blockAck, Mac48Address recipient, double rxSnr, WifiMode txMode, double dataSnr)
Event handler when a Block ACK is received.
virtual uint16_t GetNextSequenceNumberfor(WifiMacHeader *hdr)
Return the next sequence number for the given header.
void SetMaxPacketDelay(Time maxDelay)
void NotifyMpduTransmission(Mac48Address recipient, uint8_t tid, uint16_t nextSeqNumber, WifiMacHeader::QosAckPolicy policy)
bool HasHtSupported(void) const
Return whether the device has HT capability support enabled.
virtual Ptr< WifiMacQueue > GetQueue(void)
Returns the EDCA queue to check if there are packets that can be aggregated with a Block Ack...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
bool NeedBarRetransmission(uint8_t tid, uint16_t seqNumber, Mac48Address recipient)
This function returns true if the lifetime of the packets a BAR refers to didn't expire yet else it r...
void PushFront(Ptr< const Packet > packet, const WifiMacHeader &hdr)
bool SwitchToBlockAckIfNeeded(Mac48Address recipient, uint8_t tid, uint16_t startingSeq)
enum BlockAckType m_blockAckType
virtual WifiTxVector GetDataTxVector(Ptr< const Packet > packet, const WifiMacHeader *hdr) const
Return a TXVECTOR for the DATA frame given the destination.
void SetCwMax(uint32_t maxCw)
Set the maximum congestion window size.
virtual void DoNotifyAccessGranted(void)
Called by DcfManager to notify a DcfState subclass that access to the medium is granted and can start...
virtual void BlockAckInactivityTimeout(Mac48Address address, uint8_t tid)
Typically is called in order to notify EdcaTxopN that a block ack inactivity timeout occurs for the b...
static TypeId GetTypeId(void)
virtual void MissedBlockAck(uint32_t nMpdus)
WifiTxVector GetDataTxVector(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
void BaTxFailed(const WifiMacHeader &hdr)
The packet we sent was successfully received by the receiver.
uint32_t GetNBufferedPackets(Mac48Address recipient, uint8_t tid) const
uint32_t GetNextFragmentSize(void)
Calculate the size of the next fragment.
bool NeedRtsRetransmission(Ptr< const Packet > packet, const WifiMacHeader &hdr)
Check if RTS should be re-transmitted if CTS was missed.
void EnableRts(void)
Send a RTS, and wait CTSTimeout for a CTS.
void CompleteConfig(void)
Complete block ACK configuration.
virtual void RemoveFromBaQueue(uint8_t tid, Mac48Address recipient, uint16_t seqnumber)
Remove a packet after you peek in the retransmit queue and get it.
uint32_t GetCw(void) const
uint32_t GetAifsn(void) const
Return the number of slots that make up an AIFS.
void Unblock(Mac48Address dest, uint8_t tid)
Un-block the given destination address and TID (e.g.
void RestartAccessIfNeeded(void)
Restart access request if needed.
void SetBlockAckThreshold(uint8_t nPackets)
QosBlockedDestinations * m_qosBlockedDestinations
void CompleteAmpduExchange(Mac48Address recipient, uint8_t tid)
void CompleteAmpduTransfer(Mac48Address recipient, uint8_t tid)
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Time Seconds(double value)
Construct a Time in the indicated unit.
uint8_t GetBlockAckThreshold(void) const
Return the current threshold for block ACK mechanism.
void CompleteTx(void)
For now is typically invoked to complete transmission of a packets sent with ack policy Block Ack: th...
bool IsSuccess(void) const
Return whether the status code is success.
void SetTxMiddle(MacTxMiddle *txMiddle)
void GotCts(double snr, WifiMode txMode)
Event handler when a CTS is received.
bool NeedFragmentation(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
virtual Ptr< MpduAggregator > GetMpduAggregator(void) const
void EnableNextData(uint32_t size)
Time GetTxopRemaining(void)
void DoDispose()
Destructor implementation.
void DisableOverrideDurationId(void)
Do not force the duration/id field of the packet: its value is automatically calculated by the MacLow...
bool NeedDataRetransmission(Ptr< const Packet > packet, const WifiMacHeader &hdr)
Check if DATA should be re-transmitted if ACK was missed.
bool IsLastFragment(void) const
Check if the current fragment is the last fragment.
void Block(Mac48Address dest, uint8_t tid)
Block the given destination address and TID from sending (e.g.
void DisableNextData(void)
Do not attempt to send data burst after current transmission.
virtual uint32_t GetMaxCw(void) const
Return the maximum contention window size.
bool NeedRtsRetransmission(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
virtual uint32_t GetMaxAmpduSize(void) const =0
Ptr< WifiMacQueue > m_queue
void StartAccessIfNeeded(void)
Request access from DCF manager if needed.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
virtual uint32_t GetNext(uint32_t min, uint32_t max)=0
Get integer between min and max (including min and max).
virtual void CompleteMpduTx(Ptr< const Packet > packet, WifiMacHeader hdr, Time tstamp)
This function stores an MPDU (part of an A-MPDU) in blockackagreement (i.e.
void SendBlockAckRequest(const struct Bar &bar)
After that all packets, for which a block ack agreement was established, have been transmitted...
TypeOfStation
Enumeration for type of station.
virtual void SetTxopLimit(Time txopLimit)
void UpdateFailedCw(void)
Update the value of the CW variable to take into account a transmission failure.
Manages all block ack agreements for an originator station.
bool ExistsAgreement(Mac48Address recipient, uint8_t tid) const
void FlushAggregateQueue(void)
This function is called to flush the aggregate queue, which is used for A-MPDU.
virtual void DoNotifyInternalCollision(void)
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 DisableAck(void)
Do not wait for Ack after data transmission.
TransmissionListener(EdcaTxopN *txop)
uint32_t GetNOutstandingPacketsInBa(Mac48Address address, uint8_t tid)
uint16_t GetNextSeqNumberByTidAndAddress(uint8_t tid, Mac48Address addr) const
Return the next sequence number for the Traffic ID and destination.
a unique identifier for an interface.
void ReportFinalRtsFailed(Mac48Address address, const WifiMacHeader *header)
Should be invoked after calling ReportRtsFailed if NeedRtsRetransmission returns false.
bool NeedsAccess(void) const
Check if the EDCAF requires access.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
uint32_t GetFragmentOffset(void)
Calculate the offset for the current fragment.
AggregationCapableTransmissionListener * m_blockAckListener
void AddHeader(const Header &header)
Add header to this packet.
void GotAddBaResponse(const MgtAddBaResponseHeader *respHdr, Mac48Address recipient)
void TearDownBlockAck(Mac48Address recipient, uint8_t tid)
Implements the IEEE 802.11 MAC trailer.
virtual void SetAifsn(uint32_t aifsn)
TypeOfStation m_typeOfStation
Mac48Address MapSrcAddressForAggregation(const WifiMacHeader &hdr)
This functions are used only to correctly set addresses in a-msdu subframe.
Ptr< WifiMacQueue > GetEdcaQueue() const
Return the packet queue associated with this EdcaTxopN.
virtual Ptr< WifiMacQueue > GetQueue(void)