25 #include "ns3/object.h"
26 #include "ns3/mac48-address.h"
27 #include "ns3/packet.h"
45 class WifiMacParameters;
48 class QosBlockedDestinations;
50 class MgtAddBaResponseHeader;
51 class BlockAckManager;
149 virtual void SetMinCw (uint32_t minCw);
150 virtual void SetMaxCw (uint32_t maxCw);
151 virtual void SetAifsn (uint32_t aifsn);
152 virtual uint32_t
GetMinCw (
void)
const;
153 virtual uint32_t
GetMaxCw (
void)
const;
154 virtual uint32_t
GetAifsn (
void)
const;
502 uint16_t
timeout,
bool immediateBAck);
Keep track of destination address - TID pairs that are waiting for a block ACK response.
virtual void SetMaxCw(uint32_t maxCw)
Set the maximum congestion window size.
TransmissionListener * m_transmissionListener
Simulation virtual time values and global simulation resolution.
Ptr< const Packet > m_currentPacket
void DoInitialize()
Initialize() implementation.
TxFailed m_txFailedCallback
void NotifyWakeUp(void)
When wake up operation occurs, restart channel access.
void SetBlockAckInactivityTimeout(uint16_t timeout)
uint32_t GetFragmentSize(void)
Calculate the size of the current fragment.
uint16_t m_blockAckInactivityTimeout
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 SetTypeOfStation(enum TypeOfStation type)
Set type of station with the given type.
bool NeedDataRetransmission(void)
Check if DATA should be re-transmitted if ACK was missed.
void CompleteMpduTx(Ptr< const Packet > packet, WifiMacHeader hdr, Time tstamp)
void SetTxFailedCallback(TxFailed callback)
void GotAck(double snr, WifiMode txMode)
Event handler when an ACK is received.
bool NeedBarRetransmission(void)
Check if Block ACK Request should be re-transmitted.
uint8_t m_blockAckThreshold
void SetWifiRemoteStationManager(Ptr< WifiRemoteStationManager > remoteManager)
Set WifiRemoteStationsManager this EdcaTxopN is associated to.
WifiMacHeader m_currentHdr
void NotifySleep(void)
When sleep operation occurs, re-insert pending packet into front of the queue.
BlockAckType
Enumeration for different block ACK policies.
void SetAmpduExist(bool ampdu)
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
void NextFragment(void)
Continue to the next fragment.
void SetTxOkCallback(TxOk callback)
BlockAckManager * m_baManager
bool NeedRtsRetransmission(void)
Check if RTS should be re-transmitted if CTS was missed.
virtual uint32_t GetAifsn(void) const
Return the number of slots that make up an AIFS.
Handles sequence numbering of IEEE 802.11 data frames.
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< WifiRemoteStationManager > m_stationManager
This queue contains packets for a particular access class.
void GotDelBaFrame(const MgtDelBaHeader *delBaHdr, Mac48Address recipient)
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 NotifyInternalCollision(void)
Notify the EDCAF that internal collision has occurred.
virtual void SetMinCw(uint32_t minCw)
Set the minimum congestion window size.
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)
bool GetBaAgreementExists(Mac48Address address, uint8_t tid)
void SetBlockAckThreshold(uint8_t threshold)
Set threshold for block ACK mechanism.
Callback< void, const WifiMacHeader & > TxOk
typedef for a callback to invoke when a packet transmission was completed successfully.
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...
A simple wrapper around RngStream to make testing of the code easier.
uint16_t PeekNextSequenceNumberfor(WifiMacHeader *hdr)
Return the next sequence number for the Traffic ID and destination, but do not pick it (i...
void NotifyChannelSwitching(void)
When a channel switching occurs, enqueued packets are removed.
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.
uint32_t GetNRetryNeededPackets(Mac48Address recipient, uint8_t tid) const
Time m_currentPacketTimestamp
virtual uint32_t GetMinCw(void) const
Return the minimum congestion window size.
void MissedBlockAck(void)
Event handler when a Block ACK timeout has occurred.
void EndTxNoAck(void)
Event handler when a transmission that does not require an ACK has completed.
bool NeedFragmentation(void) const
Check if the current packet should be fragmented.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< MsduAggregator > GetMsduAggregator(void) const
void SetAccessCategory(enum AcIndex ac)
Set the access category of this EDCAF.
Callback< void, const WifiMacHeader & > TxFailed
typedef for a callback to invoke when a packet transmission was failed.
Mac48Address MapDestAddressForAggregation(const WifiMacHeader &hdr)
bool SetupBlockAckIfNeeded()
If number of packets in the queue reaches m_blockAckThreshold value, an ADDBA Request frame is sent t...
void StartNext(void)
Start transmission for the next fragment.
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 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)
EdcaTxopN & operator=(const EdcaTxopN &)
void PushFront(Ptr< const Packet > packet, const WifiMacHeader &hdr)
enum BlockAckType m_blockAckType
static TypeId GetTypeId(void)
void BaTxFailed(const WifiMacHeader &hdr)
The packet we sent was successfully received by the receiver.
uint32_t GetNextFragmentSize(void)
Calculate the size of the next fragment.
void CompleteConfig(void)
Complete block ACK configuration.
void RestartAccessIfNeeded(void)
Restart access request if needed.
QosBlockedDestinations * m_qosBlockedDestinations
void CompleteAmpduTransfer(Mac48Address recipient, uint8_t tid)
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...
void SetTxMiddle(MacTxMiddle *txMiddle)
void GotCts(double snr, WifiMode txMode)
Event handler when a CTS is received.
void DoDispose()
Destructor implementation.
bool IsLastFragment(void) const
Check if the current fragment is the last fragment.
virtual uint32_t GetMaxCw(void) const
Return the maximum congestion window size.
Ptr< WifiMacQueue > m_queue
void StartAccessIfNeeded(void)
Request access from DCF manager if needed.
bool NeedRts(void)
Check if the current packet should be sent with a RTS protection.
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.
Ptr< MsduAggregator > m_aggregator
Manages all block ack agreements for an originator station.
void GotBlockAck(const CtrlBAckResponseHeader *blockAck, Mac48Address recipient, WifiMode txMode)
Event handler when a Block ACK is received.
uint32_t GetNOutstandingPacketsInBa(Mac48Address address, uint8_t tid)
a unique identifier for an interface.
bool NeedsAccess(void) const
Check if the EDCAF requires access.
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 GotAddBaResponse(const MgtAddBaResponseHeader *respHdr, Mac48Address recipient)
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.