20 #ifndef BLOCK_ACK_MANAGER_H
21 #define BLOCK_ACK_MANAGER_H
27 #include "ns3/packet.h"
36 class MgtAddBaResponseHeader;
37 class MgtAddBaRequestHeader;
319 typedef std::map<std::pair<Mac48Address, uint8_t>,
320 std::pair<OriginatorBlockAckAgreement, PacketQueue> >
Agreements;
324 typedef std::map<std::pair<Mac48Address, uint8_t>,
325 std::pair<OriginatorBlockAckAgreement, PacketQueue> >::iterator
AgreementsI;
329 typedef std::map<std::pair<Mac48Address, uint8_t>,
330 std::pair<OriginatorBlockAckAgreement, PacketQueue> >::const_iterator
AgreementsCI;
std::map< std::pair< Mac48Address, uint8_t >, std::pair< OriginatorBlockAckAgreement, PacketQueue > > Agreements
typedef for a map between MAC address and block ACK agreement.
void SetUnblockDestinationCallback(Callback< void, Mac48Address, uint8_t > callback)
keep track of time values and allow control of global simulation resolution
std::list< Item > PacketQueue
typedef for a list of Item struct.
void NotifyGotBlockAck(const CtrlBAckResponseHeader *blockAck, Mac48Address recipient)
std::map< std::pair< Mac48Address, uint8_t >, std::pair< OriginatorBlockAckAgreement, PacketQueue > >::const_iterator AgreementsCI
typedef for a const iterator for Agreements.
void CreateAgreement(const MgtAddBaRequestHeader *reqHdr, Mac48Address recipient)
void StorePacket(Ptr< const Packet > packet, const WifiMacHeader &hdr, Time tStamp)
uint8_t m_blockAckThreshold
Agreements m_agreements
This data structure contains, for each block ack agreement (recipient, tid), a set of packets for whi...
bool HasBar(struct Bar &bar)
void InactivityTimeout(Mac48Address, uint8_t)
std::map< std::pair< Mac48Address, uint8_t >, std::pair< OriginatorBlockAckAgreement, PacketQueue > >::iterator AgreementsI
typedef for an iterator for Agreements.
void SetBlockAckType(enum BlockAckType bAckType)
bool HasPackets(void) const
Returns true if there are packets that need of retransmission or at least a BAR is scheduled...
BlockAckType
Enumeration for different block ACK policies.
Handles sequence numbering of IEEE 802.11 data frames.
Ptr< Packet > ScheduleBlockAckReqIfNeeded(Mac48Address recipient, uint8_t tid)
void SetQueue(Ptr< WifiMacQueue > queue)
void NotifyAgreementEstablished(Mac48Address recipient, uint8_t tid, uint16_t startingSeq)
void UpdateAgreement(const MgtAddBaResponseHeader *respHdr, Mac48Address recipient)
uint32_t GetNRetryNeededPackets(Mac48Address recipient, uint8_t tid) const
uint32_t GetNextPacketSize(void) const
uint16_t GetSeqNumOfNextRetryPacket(Mac48Address recipient, uint8_t tid) const
void NotifyAgreementUnsuccessful(Mac48Address recipient, uint8_t tid)
bool HasOtherFragments(uint16_t sequenceNumber) const
std::list< PacketQueueI > m_retryPackets
This list contains all iterators to stored packets that need to be retransmitted. ...
void SetTxMiddle(MacTxMiddle *txMiddle)
void SetBlockDestinationCallback(Callback< void, Mac48Address, uint8_t > callback)
void DestroyAgreement(Mac48Address recipient, uint8_t tid)
Callback< void, Mac48Address, uint8_t, bool > m_blockAckInactivityTimeout
bool ExistsAgreementInState(Mac48Address recipient, uint8_t tid, enum OriginatorBlockAckAgreement::State state) const
Callback< void, Mac48Address, uint8_t > m_blockPackets
Ptr< const Packet > GetNextPacket(WifiMacHeader &hdr)
State
Represents the state for this agreement.
void SetBlockAckInactivityCallback(Callback< void, Mac48Address, uint8_t, bool > callback)
void SetMaxPacketDelay(Time maxDelay)
A struct for packet, Wifi header, and timestamp.
bool SwitchToBlockAckIfNeeded(Mac48Address recipient, uint8_t tid, uint16_t startingSeq)
std::list< Item >::const_iterator PacketQueueCI
typedef for a const iterator for PacketQueue.
BlockAckManager & operator=(const BlockAckManager &)
Callback< void, Mac48Address, uint8_t > m_unblockPackets
uint32_t GetNBufferedPackets(Mac48Address recipient, uint8_t tid) const
enum BlockAckType m_blockAckType
void CleanupBuffers(void)
This method removes packets whose lifetime was exceeded.
void SetBlockAckThreshold(uint8_t nPackets)
Manages all block ack agreements for an originator station.
bool ExistsAgreement(Mac48Address recipient, uint8_t tid) const
Ptr< const Packet > packet
void NotifyMpduTransmission(Mac48Address recipient, uint8_t tid, uint16_t nextSeqNumber)
void TearDownBlockAck(Mac48Address recipient, uint8_t tid)
Ptr< WifiMacQueue > m_queue
std::list< Item >::iterator PacketQueueI
typedef for an iterator for PacketQueue.