25 #include "ns3/object.h"
26 #include "ns3/mac48-address.h"
27 #include "ns3/packet.h"
47 class WifiMacParameters;
50 class QosBlockedDestinations;
52 class MgtAddBaResponseHeader;
53 class BlockAckManager;
151 virtual void SetMinCw (uint32_t minCw);
152 virtual void SetMaxCw (uint32_t maxCw);
153 virtual void SetAifsn (uint32_t aifsn);
154 virtual uint32_t
GetMinCw (
void)
const;
155 virtual uint32_t
GetMaxCw (
void)
const;
156 virtual uint32_t
GetAifsn (
void)
const;
405 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
keep track of time values and allow control of global simulation resolution
Ptr< const Packet > m_currentPacket
smart pointer class similar to boost::intrusive_ptr
void DoInitialize()
This method is called only once by Object::Initialize.
TxFailed m_txFailedCallback
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 GotBlockAck(const CtrlBAckResponseHeader *blockAck, Mac48Address recipient)
Event handler when a Block ACK is received.
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 SetTxFailedCallback(TxFailed callback)
void GotAck(double snr, WifiMode txMode)
Event handler when an ACK is received.
uint8_t m_blockAckThreshold
void SetWifiRemoteStationManager(Ptr< WifiRemoteStationManager > remoteManager)
Set WifiRemoteStationsManager this EdcaTxopN is associated to.
WifiMacHeader m_currentHdr
BlockAckType
Enumeration for different block ACK policies.
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 received.
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 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 ADDBARequest to establish a block ack agreement with sta addressed by recipient for tid tid...
void SendDelbaFrame(Mac48Address addr, uint8_t tid, bool byOriginator)
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.
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.
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.
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 ADDBARequest frame is sent to...
void StartNext(void)
Start transmission for the next fragment.
void Cancel(void)
Cancel the transmission.
void SetManager(DcfManager *manager)
Set DcfManager this EdcaTxopN is associated to.
void Queue(Ptr< const Packet > packet, const WifiMacHeader &hdr)
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)
BlockAckEventListener * m_blockAckListener
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
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()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
bool IsLastFragment(void) const
Check if the curren 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.
Ptr< WifiMacQueue > GetQueue() const
Return the packet queue associated with this EdcaTxopN.
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.
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.