Manages all block ack agreements for an originator station. More...
#include "block-ack-manager.h"
Public Types | |
using | AgreementKey = std::pair<Mac48Address, uint8_t> |
agreement key typedef (MAC address and TID) | |
typedef void(* | AgreementStateTracedCallback) (Time now, const Mac48Address &recipient, uint8_t tid, OriginatorBlockAckAgreement::State state) |
TracedCallback signature for state changes. | |
typedef Callback< void, Ptr< const WifiMpdu > > | DroppedOldMpdu |
typedef for a callback to invoke when an MPDU is dropped. | |
using | OriginatorAgreementOptConstRef |
optional const reference to OriginatorBlockAckAgreement | |
using | RecipientAgreementOptConstRef |
optional const reference to RecipientBlockAckAgreement | |
typedef Callback< void, Ptr< const WifiMpdu > > | TxFailed |
typedef for a callback to invoke when an MPDU is negatively ack'ed. | |
typedef Callback< void, Ptr< const WifiMpdu > > | TxOk |
typedef for a callback to invoke when an MPDU is successfully ack'ed. | |
Public Member Functions | |
BlockAckManager () | |
BlockAckManager (const BlockAckManager &)=delete | |
~BlockAckManager () override | |
void | AddToSendBarIfDataQueuedList (const Mac48Address &recipient, uint8_t tid) |
Add the given (recipient, TID) pair to the list of BA agreements for which a BAR shall only be sent if there are queued data frames belonging to those agreements. | |
void | CreateOriginatorAgreement (const MgtAddBaRequestHeader &reqHdr, const Mac48Address &recipient) |
void | CreateRecipientAgreement (const MgtAddBaResponseHeader &respHdr, const Mac48Address &originator, uint16_t startingSeq, Ptr< MacRxMiddle > rxMiddle) |
void | DestroyOriginatorAgreement (const Mac48Address &recipient, uint8_t tid, std::optional< Mac48Address > gcrGroupAddr) |
void | DestroyRecipientAgreement (const Mac48Address &originator, uint8_t tid, std::optional< Mac48Address > gcrGroupAddr) |
Destroy a recipient Block Ack agreement. | |
OriginatorAgreementOptConstRef | GetAgreementAsOriginator (const Mac48Address &recipient, uint8_t tid, std::optional< Mac48Address > gcrGroupAddr=std::nullopt) const |
RecipientAgreementOptConstRef | GetAgreementAsRecipient (const Mac48Address &originator, uint8_t tid, std::optional< Mac48Address > gcrGroupAddr=std::nullopt) const |
CtrlBAckRequestHeader | GetBlockAckReqHeader (const Mac48Address &recipient, uint8_t tid, std::optional< Mac48Address > gcrGroupAddr=std::nullopt) const |
uint16_t | GetGcrBufferSize (const Mac48Address &groupAddress, uint8_t tid) const |
This function returns the minimum buffer size from ADDBA Response frames sent by all members of a group address groupAddress for a given TID tid. | |
uint16_t | GetGcrStartingSequence (const Mac48Address &groupAddress, uint8_t tid) const |
This function returns the starting sequence number of the transmit window for a given GCR Block Ack agreement established with all members of a group address groupAddress for a given TID tid. | |
uint32_t | GetNBufferedPackets (const Mac48Address &recipient, uint8_t tid) const |
uint16_t | GetOriginatorStartingSequence (const Mac48Address &recipient, uint8_t tid) const |
This function returns the starting sequence number of the transmit window. | |
uint16_t | GetRecipientBufferSize (const Mac48Address &recipient, uint8_t tid) const |
This function returns the buffer size negotiated with the recipient. | |
const std::list< AgreementKey > & | GetSendBarIfDataQueuedList () const |
bool | IsGcrAgreementEstablished (const Mac48Address &gcrGroupAddress, uint8_t tid, const GcrManager::GcrMembers &members) const |
Check if a GCR Block Ack agreement has been successfully established with all members of the group. | |
bool | NeedBarRetransmission (uint8_t tid, const Mac48Address &recipient) |
This function returns true if a block ack agreement is established with the given recipient for the given TID and there is at least an outstanding MPDU for such agreement whose lifetime is not expired. | |
bool | NeedGcrBarRetransmission (const Mac48Address &gcrGroupAddress, const Mac48Address &recipient, uint8_t tid) const |
This function returns true if a GCR block ack agreement is established with the given recipient, for the given TID, for the given GCR group address and there is at least an outstanding MPDU for such agreement whose lifetime is not expired. | |
void | NotifyDiscardedMpdu (Ptr< const WifiMpdu > mpdu) |
void | NotifyGotAck (uint8_t linkId, Ptr< const WifiMpdu > mpdu) |
Invoked upon receipt of an Ack frame on the given link after the transmission of a QoS data frame sent under an established block ack agreement. | |
std::pair< uint16_t, uint16_t > | NotifyGotBlockAck (uint8_t linkId, const CtrlBAckResponseHeader &blockAck, const Mac48Address &recipient, const std::set< uint8_t > &tids, size_t index=0) |
void | NotifyGotBlockAckRequest (const Mac48Address &originator, uint8_t tid, uint16_t startingSeq, std::optional< Mac48Address > gcrGroupAddr=std::nullopt) |
std::optional< std::pair< uint16_t, uint16_t > > | NotifyGotGcrBlockAck (uint8_t linkId, const CtrlBAckResponseHeader &blockAck, const Mac48Address &recipient, const GcrManager::GcrMembers &members) |
void | NotifyGotMpdu (Ptr< const WifiMpdu > mpdu) |
void | NotifyLastGcrUrTx (Ptr< const WifiMpdu > mpdu, const GcrManager::GcrMembers &recipients) |
Notify the block ack manager about the last groupcast MPDU transmitted with the GCR-UR service. | |
void | NotifyMissedAck (uint8_t linkId, Ptr< WifiMpdu > mpdu) |
Invoked upon missed reception of an Ack frame on the given link after the transmission of a QoS data frame sent under an established block ack agreement. | |
void | NotifyMissedBlockAck (uint8_t linkId, const Mac48Address &recipient, uint8_t tid) |
void | NotifyOriginatorAgreementNoReply (const Mac48Address &recipient, uint8_t tid, std::optional< Mac48Address > gcrGroupAddr) |
void | NotifyOriginatorAgreementRejected (const Mac48Address &recipient, uint8_t tid, std::optional< Mac48Address > gcrGroupAddr) |
void | NotifyOriginatorAgreementReset (const Mac48Address &recipient, uint8_t tid, std::optional< Mac48Address > gcrGroupAddr) |
BlockAckManager & | operator= (const BlockAckManager &)=delete |
void | RemoveFromSendBarIfDataQueuedList (const Mac48Address &recipient, uint8_t tid) |
Remove the given (recipient, TID) pair from the list of BA agreements for which a BAR shall only be sent if there are queued data frames belonging to those agreements. | |
void | ScheduleBar (const CtrlBAckRequestHeader &reqHdr, const WifiMacHeader &hdr) |
void | SetBlockAckInactivityCallback (Callback< void, Mac48Address, uint8_t, bool, std::optional< Mac48Address > > callback) |
Set block ack inactivity callback. | |
void | SetBlockAckThreshold (uint8_t nPackets) |
void | SetBlockDestinationCallback (Callback< void, Mac48Address, uint8_t > callback) |
Set block destination callback. | |
void | SetDroppedOldMpduCallback (DroppedOldMpdu callback) |
void | SetQueue (const Ptr< WifiMacQueue > queue) |
void | SetTxFailedCallback (TxFailed callback) |
void | SetTxOkCallback (TxOk callback) |
void | SetUnblockDestinationCallback (Callback< void, Mac48Address, uint8_t > callback) |
Set unblock destination callback. | |
void | StoreGcrPacket (Ptr< WifiMpdu > mpdu, const GcrManager::GcrMembers &members) |
void | StorePacket (Ptr< WifiMpdu > mpdu) |
void | UpdateOriginatorAgreement (const MgtAddBaResponseHeader &respHdr, const Mac48Address &recipient, uint16_t startingSeq) |
![]() | |
Object () | |
Constructor. | |
~Object () override | |
Destructor. | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. | |
void | Dispose () |
Dispose of this Object. | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. | |
TypeId | GetInstanceTypeId () const final |
Get the most derived TypeId for this Object. | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated Object. | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. | |
bool | IsInitialized () const |
Check if the object has been initialized. | |
void | UnidirectionalAggregateObject (Ptr< Object > other) |
Aggregate an Object to another Object. | |
![]() | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
![]() | |
virtual | ~ObjectBase () |
Virtual destructor. | |
void | GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const |
Get the value of an attribute, raising fatal errors if unsuccessful. | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising errors. | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the type ID. | |
![]() | |
static TypeId | GetTypeId () |
Register this type. | |
![]() | |
static TypeId | GetTypeId () |
Get the type ID. | |
Protected Member Functions | |
void | DoDispose () override |
Destructor implementation. | |
![]() | |
Object (const Object &o) | |
Copy an Object. | |
virtual void | DoInitialize () |
Initialize() implementation. | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. | |
![]() | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. | |
Private Types | |
using | GcrBlockAcks = std::map<Mac48Address, CtrlBAckResponseHeader> |
List of received GCR BlockAck frames indexed by originator. | |
enum | MpduStatus : uint8_t { STAY_INFLIGHT = 0 , TO_RETRANSMIT , ACKNOWLEDGED } |
Enumeration for the statuses of a buffered MPDU. More... | |
using | OriginatorAgreements |
AgreementKey-indexed map of originator block ack agreements. | |
using | OriginatorAgreementsCI = OriginatorAgreements::const_iterator |
A const iterator for originator block ack agreements. | |
using | OriginatorAgreementsI = OriginatorAgreements::iterator |
An iterator for originator block ack agreements. | |
using | PacketQueue = std::list<Ptr<WifiMpdu>> |
typedef for a list of WifiMpdu. | |
using | PacketQueueI = std::list<Ptr<WifiMpdu>>::iterator |
typedef for an iterator for PacketQueue. | |
using | RecipientAgreements = std::multimap<AgreementKey, RecipientBlockAckAgreement> |
AgreementKey-indexed map of recipient block ack agreements. | |
using | RecipientAgreementsCI = RecipientAgreements::const_iterator |
A const iterator for recipient block ack agreements. | |
using | RecipientAgreementsI = RecipientAgreements::iterator |
An iterator for recipient block ack agreements. | |
Private Member Functions | |
void | DoStorePacket (Ptr< WifiMpdu > mpdu, const Mac48Address &recipient, std::optional< Mac48Address > gcrGroupAddr=std::nullopt) |
OriginatorAgreementsI | GetOriginatorBaAgreement (const Mac48Address &recipient, uint8_t tid, std::optional< Mac48Address > gcrGroupAddr=std::nullopt) |
OriginatorAgreementsCI | GetOriginatorBaAgreement (const Mac48Address &recipient, uint8_t tid, std::optional< Mac48Address > gcrGroupAddr=std::nullopt) const |
RecipientAgreementsI | GetRecipientBaAgreement (const Mac48Address &originator, uint8_t tid, std::optional< Mac48Address > gcrGroupAddr=std::nullopt) |
RecipientAgreementsCI | GetRecipientBaAgreement (const Mac48Address &originator, uint8_t tid, std::optional< Mac48Address > gcrGroupAddr=std::nullopt) const |
void | HandleDiscardedMpdu (Ptr< const WifiMpdu > mpdu, OriginatorAgreementsI iter) |
Handle discarded MPDU by making the transmit window advance beyond the discarded frame. | |
PacketQueueI | HandleInFlightMpdu (uint8_t linkId, PacketQueueI mpduIt, MpduStatus status, const OriginatorAgreementsI &it, const Time &now) |
Handle the given in flight MPDU based on its given status. | |
void | InactivityTimeout (const Mac48Address &recipient, uint8_t tid, std::optional< Mac48Address > gcrGroupAddr) |
Inactivity timeout function for a Block Ack agreement. | |
Private Attributes | |
Callback< void, Mac48Address, uint8_t, bool, std::optional< Mac48Address > > | m_blockAckInactivityTimeout |
BlockAck inactivity timeout callback. | |
uint8_t | m_blockAckThreshold |
block ack threshold | |
Callback< void, Mac48Address, uint8_t > | m_blockPackets |
block packets callback | |
DroppedOldMpdu | m_droppedOldMpduCallback |
the dropped MPDU callback | |
std::map< Mac48Address, GcrBlockAcks > | m_gcrBlockAcks |
received GCR Block ACKs | |
OriginatorAgreements | m_originatorAgreements |
This data structure contains, for each originator block ack agreement (recipient, TID), a set of packets for which an ack by block ack is requested. | |
TracedCallback< Time, Mac48Address, uint8_t, OriginatorBlockAckAgreement::State > | m_originatorAgreementState |
The trace source fired when a state transition occurred. | |
Ptr< WifiMacQueue > | m_queue |
queue | |
RecipientAgreements | m_recipientAgreements |
Recipient Block Ack agreements. | |
std::list< AgreementKey > | m_sendBarIfDataQueued |
list of BA agreements for which a BAR shall only be sent if data is queued | |
TxFailed | m_txFailedCallback |
transmit failed callback | |
TxOk | m_txOkCallback |
transmit OK callback | |
Callback< void, Mac48Address, uint8_t > | m_unblockPackets |
unblock packets callback | |
Additional Inherited Members | |
![]() | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
Manages all block ack agreements for an originator station.
ns3::BlockAckManager is accessible through the following paths with Config::Set and Config::Connect:
No Attributes are defined for this type.
Group: Wifi
Size of this type is 312 bytes (on a 64-bit architecture).
Definition at line 41 of file block-ack-manager.h.
using ns3::BlockAckManager::AgreementKey = std::pair<Mac48Address, uint8_t> |
agreement key typedef (MAC address and TID)
Definition at line 477 of file block-ack-manager.h.
typedef void(* ns3::BlockAckManager::AgreementStateTracedCallback) (Time now, const Mac48Address &recipient, uint8_t tid, OriginatorBlockAckAgreement::State state) |
TracedCallback signature for state changes.
[in] | now | Time when the state changed. |
[in] | recipient | MAC address of the recipient. |
[in] | tid | the TID. |
[in] | state | The state. |
Definition at line 433 of file block-ack-manager.h.
typedef Callback<void, Ptr<const WifiMpdu> > ns3::BlockAckManager::DroppedOldMpdu |
typedef for a callback to invoke when an MPDU is dropped.
Definition at line 408 of file block-ack-manager.h.
|
private |
List of received GCR BlockAck frames indexed by originator.
Definition at line 690 of file block-ack-manager.h.
optional const reference to OriginatorBlockAckAgreement
Definition at line 69 of file block-ack-manager.h.
|
private |
AgreementKey-indexed map of originator block ack agreements.
Definition at line 583 of file block-ack-manager.h.
|
private |
A const iterator for originator block ack agreements.
Definition at line 588 of file block-ack-manager.h.
|
private |
An iterator for originator block ack agreements.
Definition at line 586 of file block-ack-manager.h.
|
private |
typedef for a list of WifiMpdu.
Definition at line 576 of file block-ack-manager.h.
|
private |
typedef for an iterator for PacketQueue.
Definition at line 580 of file block-ack-manager.h.
optional const reference to RecipientBlockAckAgreement
Definition at line 72 of file block-ack-manager.h.
|
private |
AgreementKey-indexed map of recipient block ack agreements.
Definition at line 591 of file block-ack-manager.h.
|
private |
A const iterator for recipient block ack agreements.
Definition at line 595 of file block-ack-manager.h.
|
private |
An iterator for recipient block ack agreements.
Definition at line 593 of file block-ack-manager.h.
typedef Callback<void, Ptr<const WifiMpdu> > ns3::BlockAckManager::TxFailed |
typedef for a callback to invoke when an MPDU is negatively ack'ed.
Definition at line 404 of file block-ack-manager.h.
typedef Callback<void, Ptr<const WifiMpdu> > ns3::BlockAckManager::TxOk |
typedef for a callback to invoke when an MPDU is successfully ack'ed.
Definition at line 400 of file block-ack-manager.h.
|
private |
Enumeration for the statuses of a buffered MPDU.
Enumerator | |
---|---|
STAY_INFLIGHT | |
TO_RETRANSMIT | |
ACKNOWLEDGED |
Definition at line 47 of file block-ack-manager.h.
ns3::BlockAckManager::BlockAckManager | ( | ) |
Definition at line 47 of file block-ack-manager.cc.
References NS_LOG_FUNCTION.
|
override |
Definition at line 52 of file block-ack-manager.cc.
References NS_LOG_FUNCTION.
|
delete |
void ns3::BlockAckManager::AddToSendBarIfDataQueuedList | ( | const Mac48Address & | recipient, |
uint8_t | tid ) |
Add the given (recipient, TID) pair to the list of BA agreements for which a BAR shall only be sent if there are queued data frames belonging to those agreements.
recipient | the recipient |
tid | the TID |
Definition at line 1035 of file block-ack-manager.cc.
References m_sendBarIfDataQueued, and NS_LOG_FUNCTION.
void ns3::BlockAckManager::CreateOriginatorAgreement | ( | const MgtAddBaRequestHeader & | reqHdr, |
const Mac48Address & | recipient ) |
reqHdr | Relative Add block ack request (action frame). |
recipient | Address of peer station involved in block ack mechanism. |
Creates a new originator block ack agreement in pending state. When a ADDBA response with a successful status code is received, the relative agreement becomes established.
Definition at line 158 of file block-ack-manager.cc.
References ns3::MgtAddBaRequestHeader::GetBufferSize(), ns3::MgtAddBaRequestHeader::GetGcrGroupAddress(), GetOriginatorBaAgreement(), ns3::MgtAddBaRequestHeader::GetStartingSequence(), ns3::MgtAddBaRequestHeader::GetTid(), ns3::MgtAddBaRequestHeader::GetTimeout(), ns3::MgtAddBaRequestHeader::IsAmsduSupported(), ns3::MgtAddBaRequestHeader::IsImmediateBlockAck(), m_blockPackets, m_originatorAgreements, m_originatorAgreementState, ns3::Simulator::Now(), NS_ASSERT_MSG, NS_LOG_FUNCTION, ns3::OriginatorBlockAckAgreement::PENDING, ns3::BlockAckAgreement::SetAmsduSupport(), ns3::BlockAckAgreement::SetBufferSize(), ns3::BlockAckAgreement::SetDelayedBlockAck(), ns3::BlockAckAgreement::SetGcrGroupAddress(), ns3::BlockAckAgreement::SetHtSupported(), ns3::BlockAckAgreement::SetImmediateBlockAck(), ns3::BlockAckAgreement::SetStartingSequence(), ns3::OriginatorBlockAckAgreement::SetState(), and ns3::BlockAckAgreement::SetTimeout().
void ns3::BlockAckManager::CreateRecipientAgreement | ( | const MgtAddBaResponseHeader & | respHdr, |
const Mac48Address & | originator, | ||
uint16_t | startingSeq, | ||
Ptr< MacRxMiddle > | rxMiddle ) |
respHdr | Add block ack response from originator (action frame). |
originator | Address of peer station involved in block ack mechanism. |
startingSeq | Sequence number of the first MPDU of all packets for which block ack was negotiated. |
rxMiddle | the MAC RX Middle on this station |
This function is typically invoked only by ns3::WifiMac when the STA (which may be non-AP in ESS, or in an IBSS) has received an ADDBA Request frame and is transmitting an ADDBA Response frame. At this point the frame exchange manager must allocate buffers to collect all correctly received packets belonging to the category for which block ack was negotiated.
Definition at line 301 of file block-ack-manager.cc.
References ns3::MgtAddBaResponseHeader::GetBufferSize(), ns3::MgtAddBaResponseHeader::GetGcrGroupAddress(), GetRecipientBaAgreement(), ns3::MgtAddBaResponseHeader::GetTid(), ns3::MgtAddBaResponseHeader::GetTimeout(), ns3::MgtAddBaResponseHeader::IsAmsduSupported(), ns3::MgtAddBaResponseHeader::IsImmediateBlockAck(), m_recipientAgreements, NS_ASSERT_MSG, NS_LOG_FUNCTION, ns3::BlockAckAgreement::SetDelayedBlockAck(), ns3::BlockAckAgreement::SetGcrGroupAddress(), ns3::BlockAckAgreement::SetImmediateBlockAck(), and ns3::RecipientBlockAckAgreement::SetMacRxMiddle().
void ns3::BlockAckManager::DestroyOriginatorAgreement | ( | const Mac48Address & | recipient, |
uint8_t | tid, | ||
std::optional< Mac48Address > | gcrGroupAddr ) |
recipient | Address of peer station involved in block ack mechanism. |
tid | traffic ID of transmitted packet. |
gcrGroupAddr | the GCR Group Address (only if it a GCR Block Ack agreement) |
Invoked when a recipient reject a block ack agreement or when a DELBA frame is Received/Transmitted.
Definition at line 218 of file block-ack-manager.cc.
References GetOriginatorBaAgreement(), m_originatorAgreements, and NS_LOG_FUNCTION.
void ns3::BlockAckManager::DestroyRecipientAgreement | ( | const Mac48Address & | originator, |
uint8_t | tid, | ||
std::optional< Mac48Address > | gcrGroupAddr ) |
Destroy a recipient Block Ack agreement.
originator | the originator MAC address |
tid | the TID associated with the Block Ack agreement |
gcrGroupAddr | the GCR Group Address (only if it a GCR Block Ack agreement) |
Definition at line 354 of file block-ack-manager.cc.
References GetRecipientBaAgreement(), m_recipientAgreements, and NS_LOG_FUNCTION.
|
overrideprotectedvirtual |
Destructor implementation.
This method is called by Dispose() or by the Object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.
It is safe to call GetObject() from within this method.
Reimplemented from ns3::Object.
Definition at line 58 of file block-ack-manager.cc.
References m_originatorAgreements, m_queue, and NS_LOG_FUNCTION.
|
private |
mpdu | MPDU to store. |
recipient | intended recipient for the stored MPDU. |
gcrGroupAddr | the GCR Group Address (only if MPDU is transmitted using the GCR service) |
Stores mpdu for a possible future retransmission.
Definition at line 386 of file block-ack-manager.cc.
References GetOriginatorBaAgreement(), m_originatorAgreements, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::SEQNO_SPACE_HALF_SIZE.
Referenced by StoreGcrPacket(), and StorePacket().
BlockAckManager::OriginatorAgreementOptConstRef ns3::BlockAckManager::GetAgreementAsOriginator | ( | const Mac48Address & | recipient, |
uint8_t | tid, | ||
std::optional< Mac48Address > | gcrGroupAddr = std::nullopt ) const |
recipient | MAC address of the recipient |
tid | Traffic ID |
gcrGroupAddr | the GCR Group Address (only if it is a GCR Block Ack agreement) |
Check if we are the originator of an existing block ack agreement with the given recipient.
Definition at line 132 of file block-ack-manager.cc.
References GetOriginatorBaAgreement(), and m_originatorAgreements.
Referenced by IsGcrAgreementEstablished().
BlockAckManager::RecipientAgreementOptConstRef ns3::BlockAckManager::GetAgreementAsRecipient | ( | const Mac48Address & | originator, |
uint8_t | tid, | ||
std::optional< Mac48Address > | gcrGroupAddr = std::nullopt ) const |
originator | MAC address of the originator |
tid | Traffic ID |
gcrGroupAddr | the GCR Group Address (only if it is a GCR Block Ack agreement) |
Check if we are the recipient of an existing block ack agreement with the given originator.
Definition at line 145 of file block-ack-manager.cc.
References GetRecipientBaAgreement(), and m_recipientAgreements.
CtrlBAckRequestHeader ns3::BlockAckManager::GetBlockAckReqHeader | ( | const Mac48Address & | recipient, |
uint8_t | tid, | ||
std::optional< Mac48Address > | gcrGroupAddr = std::nullopt ) const |
recipient | the recipient |
tid | the TID |
gcrGroupAddr | the GCR Group Address (only if the Block Ack Request is being used for the GCR service) |
Get the BlockAckRequest header for the established BA agreement (recipient,tid).
Definition at line 975 of file block-ack-manager.cc.
References ns3::BlockAckReqType::GCR, GetOriginatorBaAgreement(), m_originatorAgreements, NS_ASSERT, ns3::CtrlBAckRequestHeader::SetGcrGroupAddress(), ns3::CtrlBAckRequestHeader::SetStartingSequence(), ns3::CtrlBAckRequestHeader::SetTidInfo(), and ns3::CtrlBAckRequestHeader::SetType().
Referenced by HandleDiscardedMpdu().
uint16_t ns3::BlockAckManager::GetGcrBufferSize | ( | const Mac48Address & | groupAddress, |
uint8_t | tid ) const |
This function returns the minimum buffer size from ADDBA Response frames sent by all members of a group address groupAddress for a given TID tid.
groupAddress | the group address |
tid | the traffic ID. |
Definition at line 1248 of file block-ack-manager.cc.
References m_originatorAgreements.
uint16_t ns3::BlockAckManager::GetGcrStartingSequence | ( | const Mac48Address & | groupAddress, |
uint8_t | tid ) const |
This function returns the starting sequence number of the transmit window for a given GCR Block Ack agreement established with all members of a group address groupAddress for a given TID tid.
groupAddress | the group address |
tid | Traffic ID |
Definition at line 1229 of file block-ack-manager.cc.
References m_originatorAgreements.
uint32_t ns3::BlockAckManager::GetNBufferedPackets | ( | const Mac48Address & | recipient, |
uint8_t | tid ) const |
recipient | Address of peer station involved in block ack mechanism. |
tid | Traffic ID. |
Returns the number of packets buffered for a specified agreement. This methods doesn't return the number of buffered MPDUs but the number of buffered MSDUs.
Definition at line 433 of file block-ack-manager.cc.
References GetOriginatorBaAgreement(), and m_originatorAgreements.
|
private |
recipient | MAC address of the recipient |
tid | Traffic ID |
gcrGroupAddr | the GCR Group Address (only if it is a GCR Block Ack agreement) |
Definition at line 66 of file block-ack-manager.cc.
References m_originatorAgreements.
Referenced by CreateOriginatorAgreement(), DestroyOriginatorAgreement(), DoStorePacket(), GetAgreementAsOriginator(), GetBlockAckReqHeader(), GetNBufferedPackets(), GetOriginatorStartingSequence(), GetRecipientBufferSize(), NeedBarRetransmission(), NeedGcrBarRetransmission(), NotifyDiscardedMpdu(), NotifyGotAck(), NotifyGotBlockAck(), NotifyGotGcrBlockAck(), NotifyLastGcrUrTx(), NotifyMissedAck(), NotifyMissedBlockAck(), NotifyOriginatorAgreementNoReply(), NotifyOriginatorAgreementRejected(), NotifyOriginatorAgreementReset(), and UpdateOriginatorAgreement().
|
private |
recipient | MAC address of the recipient |
tid | Traffic ID |
gcrGroupAddr | the GCR Group Address (only if it is a GCR Block Ack agreement) |
Definition at line 83 of file block-ack-manager.cc.
References m_originatorAgreements.
uint16_t ns3::BlockAckManager::GetOriginatorStartingSequence | ( | const Mac48Address & | recipient, |
uint8_t | tid ) const |
This function returns the starting sequence number of the transmit window.
tid | Traffic ID |
recipient | MAC address of the recipient |
Definition at line 1222 of file block-ack-manager.cc.
References GetOriginatorBaAgreement(), and m_originatorAgreements.
|
private |
originator | MAC address of the originator |
tid | Traffic ID |
gcrGroupAddr | the GCR Group Address (only if it is a GCR Block Ack agreement) |
Definition at line 100 of file block-ack-manager.cc.
References m_recipientAgreements.
Referenced by CreateRecipientAgreement(), DestroyRecipientAgreement(), GetAgreementAsRecipient(), NotifyGotBlockAckRequest(), and NotifyGotMpdu().
|
private |
originator | MAC address of the originator |
tid | Traffic ID |
gcrGroupAddr | the GCR Group Address (only if it is a GCR Block Ack agreement) |
Definition at line 116 of file block-ack-manager.cc.
References m_recipientAgreements.
uint16_t ns3::BlockAckManager::GetRecipientBufferSize | ( | const Mac48Address & | recipient, |
uint8_t | tid ) const |
This function returns the buffer size negotiated with the recipient.
tid | Traffic ID |
recipient | MAC address of the recipient |
Definition at line 1215 of file block-ack-manager.cc.
References GetOriginatorBaAgreement(), and m_originatorAgreements.
const std::list< BlockAckManager::AgreementKey > & ns3::BlockAckManager::GetSendBarIfDataQueuedList | ( | ) | const |
Definition at line 1029 of file block-ack-manager.cc.
References m_sendBarIfDataQueued.
|
static |
Get the type ID.
Definition at line 33 of file block-ack-manager.cc.
References m_originatorAgreementState, ns3::MakeTraceSourceAccessor(), and ns3::TypeId::SetParent().
|
private |
Handle discarded MPDU by making the transmit window advance beyond the discarded frame.
This also involves (i) the removal of frames that consequently become old from the retransmit queue and from the queue of the block ack agreement, and (ii) the scheduling of a BlockAckRequest.
mpdu | the discarded MPDU |
iter | an iterator to the corresponding agreement |
Definition at line 883 of file block-ack-manager.cc.
References GetBlockAckReqHeader(), ns3::Callback< R, UArgs >::IsNull(), m_droppedOldMpduCallback, m_originatorAgreements, m_queue, NS_LOG_DEBUG, ns3::QosUtilsIsOldPacket(), ScheduleBar(), ns3::SEQNO_SPACE_HALF_SIZE, ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiMacHeader::SetNoMoreFragments(), ns3::WifiMacHeader::SetNoRetry(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_CTL_BACKREQ.
Referenced by NotifyDiscardedMpdu().
|
private |
Handle the given in flight MPDU based on its given status.
If the status is ACKNOWLEDGED, the MPDU is removed from both the EDCA queue and the queue of in flight MPDUs. If the status is TO_RETRANSMIT, the MPDU is only removed from the queue of in flight MPDUs. Note that the MPDU is removed from both queues (independently of the status) if the MPDU is not stored in the EDCA queue, is an old packet or its lifetime expired.
linkId | the ID of the link on which the MPDU has been transmitted |
mpduIt | an iterator pointing to the MPDU in the queue of in flight MPDUs |
status | the status of the in flight MPDU |
it | iterator pointing to the Block Ack agreement |
now | the current time |
Definition at line 447 of file block-ack-manager.cc.
References ACKNOWLEDGED, ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMacHeader::GetSequenceNumber(), ns3::Mac48Address::IsGroup(), ns3::Callback< R, UArgs >::IsNull(), ns3::WifiMacHeader::IsQosData(), m_droppedOldMpduCallback, m_queue, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::SEQNO_SPACE_HALF_SIZE, STAY_INFLIGHT, and TO_RETRANSMIT.
Referenced by NeedBarRetransmission(), NotifyGotAck(), NotifyGotBlockAck(), NotifyGotGcrBlockAck(), NotifyMissedAck(), and NotifyMissedBlockAck().
|
private |
Inactivity timeout function for a Block Ack agreement.
recipient | the recipient MAC address |
tid | Traffic ID |
gcrGroupAddr | the GCR Group Address (only if it a GCR Block Ack agreement) |
Definition at line 1055 of file block-ack-manager.cc.
References m_blockAckInactivityTimeout, and NS_LOG_FUNCTION.
Referenced by NotifyGotBlockAck(), NotifyGotGcrBlockAck(), and UpdateOriginatorAgreement().
bool ns3::BlockAckManager::IsGcrAgreementEstablished | ( | const Mac48Address & | gcrGroupAddress, |
uint8_t | tid, | ||
const GcrManager::GcrMembers & | members ) const |
Check if a GCR Block Ack agreement has been successfully established with all members of the group.
gcrGroupAddress | the GCR Group Address. |
tid | the traffic ID. |
members | members of the group. |
Definition at line 1267 of file block-ack-manager.cc.
References GetAgreementAsOriginator(), and NS_ASSERT.
bool ns3::BlockAckManager::NeedBarRetransmission | ( | uint8_t | tid, |
const Mac48Address & | recipient ) |
This function returns true if a block ack agreement is established with the given recipient for the given TID and there is at least an outstanding MPDU for such agreement whose lifetime is not expired.
tid | Traffic ID |
recipient | MAC address of the recipient |
Definition at line 1137 of file block-ack-manager.cc.
References GetOriginatorBaAgreement(), HandleInFlightMpdu(), m_originatorAgreements, ns3::Simulator::Now(), ns3::SINGLE_LINK_OP_ID, and STAY_INFLIGHT.
bool ns3::BlockAckManager::NeedGcrBarRetransmission | ( | const Mac48Address & | gcrGroupAddress, |
const Mac48Address & | recipient, | ||
uint8_t | tid ) const |
This function returns true if a GCR block ack agreement is established with the given recipient, for the given TID, for the given GCR group address and there is at least an outstanding MPDU for such agreement whose lifetime is not expired.
gcrGroupAddress | the GCR group address |
tid | Traffic ID |
recipient | MAC address of the recipient |
Definition at line 1166 of file block-ack-manager.cc.
References GetOriginatorBaAgreement(), and m_originatorAgreements.
mpdu | the discarded frame |
Notify the block ack manager that an MPDU has been discarded, e.g., because the MSDU lifetime expired. If there is an established block ack agreement, make the transmit window advance beyond the discarded frame. This also involves (i) the removal of frames that consequently become old from the retransmit queue and from the queue of the block ack agreement, and (ii) the scheduling of a BlockAckRequest.
Definition at line 845 of file block-ack-manager.cc.
References GetOriginatorBaAgreement(), HandleDiscardedMpdu(), m_originatorAgreements, NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by ns3::QosTxop::CreateQueue().
Invoked upon receipt of an Ack frame on the given link after the transmission of a QoS data frame sent under an established block ack agreement.
Remove the acknowledged frame from the outstanding packets and update the starting sequence number of the transmit window, if needed.
linkId | the ID of the given link |
mpdu | The acknowledged MPDU. |
Definition at line 512 of file block-ack-manager.cc.
References ACKNOWLEDGED, GetOriginatorBaAgreement(), HandleInFlightMpdu(), ns3::Callback< R, UArgs >::IsNull(), m_originatorAgreements, m_queue, m_txOkCallback, ns3::Simulator::Now(), NS_ASSERT, and NS_LOG_FUNCTION.
std::pair< uint16_t, uint16_t > ns3::BlockAckManager::NotifyGotBlockAck | ( | uint8_t | linkId, |
const CtrlBAckResponseHeader & | blockAck, | ||
const Mac48Address & | recipient, | ||
const std::set< uint8_t > & | tids, | ||
size_t | index = 0 ) |
linkId | the ID of the given link |
blockAck | The received BlockAck frame. |
recipient | Sender of BlockAck frame. |
tids | the set of TIDs the acknowledged MPDUs belong to |
index | the index of the Per AID TID Info subfield, in case of Multi-STA Block Ack, or 0, otherwise |
Invoked upon receipt of a Block Ack frame on the given link. Typically, this function is called by the frame exchange manager. Performs a check on which MPDUs, previously sent with Ack Policy set to Block Ack, were correctly received by the recipient. An acknowledged MPDU is removed from the buffer, retransmitted otherwise. Note that tids is only used if blockAck is a Multi-STA Block Ack using All-ack context.
Definition at line 585 of file block-ack-manager.cc.
References ACKNOWLEDGED, ns3::CtrlBAckResponseHeader::GetAckType(), GetOriginatorBaAgreement(), ns3::CtrlBAckResponseHeader::GetTidInfo(), HandleInFlightMpdu(), InactivityTimeout(), ns3::CtrlBAckResponseHeader::IsBasic(), ns3::CtrlBAckResponseHeader::IsCompressed(), ns3::CtrlBAckResponseHeader::IsExtendedCompressed(), ns3::CtrlBAckResponseHeader::IsMultiSta(), ns3::CtrlBAckResponseHeader::IsMultiTid(), ns3::Callback< R, UArgs >::IsNull(), ns3::CtrlBAckResponseHeader::IsPacketReceived(), m_originatorAgreements, m_queue, m_txFailedCallback, m_txOkCallback, ns3::MicroSeconds(), ns3::Simulator::Now(), NS_ABORT_MSG_IF, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), STAY_INFLIGHT, timeout, and TO_RETRANSMIT.
void ns3::BlockAckManager::NotifyGotBlockAckRequest | ( | const Mac48Address & | originator, |
uint8_t | tid, | ||
uint16_t | startingSeq, | ||
std::optional< Mac48Address > | gcrGroupAddr = std::nullopt ) |
originator | MAC address of the sender of the Block Ack Request |
tid | Traffic ID |
startingSeq | the starting sequence number in the Block Ack Request |
gcrGroupAddr | the GCR Group Address (only if it is a GCR Block Ack Request frame) |
Perform required actions upon receiving a Block Ack Request frame.
Definition at line 941 of file block-ack-manager.cc.
References GetRecipientBaAgreement(), m_recipientAgreements, and NS_LOG_FUNCTION.
std::optional< std::pair< uint16_t, uint16_t > > ns3::BlockAckManager::NotifyGotGcrBlockAck | ( | uint8_t | linkId, |
const CtrlBAckResponseHeader & | blockAck, | ||
const Mac48Address & | recipient, | ||
const GcrManager::GcrMembers & | members ) |
linkId | the ID of the given link |
blockAck | The received BlockAck frame. |
recipient | Sender of BlockAck frame. |
members | the list of member STAs for that GCR group |
Invoked upon receipt of a GCR Block Ack frame on the given link. Typically, this function is called by the frame exchange manager. Stores the received Block Ack response for each GCR member STA. Once all responses have been received, it performs a check on which MPDUs, previously sent with Ack Policy set to Block Ack, were correctly received by the recipient. An acknowledged MPDU is removed from the buffer, retransmitted otherwise.
Definition at line 683 of file block-ack-manager.cc.
References ACKNOWLEDGED, ns3::CtrlBAckResponseHeader::GetGcrGroupAddress(), GetOriginatorBaAgreement(), ns3::CtrlBAckResponseHeader::GetTidInfo(), HandleInFlightMpdu(), InactivityTimeout(), ns3::CtrlBAckResponseHeader::IsGcr(), ns3::Callback< R, UArgs >::IsNull(), m_gcrBlockAcks, m_originatorAgreements, m_queue, m_txFailedCallback, m_txOkCallback, ns3::MicroSeconds(), ns3::Simulator::Now(), NS_ABORT_MSG_IF, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), STAY_INFLIGHT, timeout, and TO_RETRANSMIT.
mpdu | the received MPDU |
Perform required actions upon receiving an MPDU.
Definition at line 955 of file block-ack-manager.cc.
References GetRecipientBaAgreement(), m_recipientAgreements, NS_ASSERT, and NS_LOG_FUNCTION.
void ns3::BlockAckManager::NotifyLastGcrUrTx | ( | Ptr< const WifiMpdu > | mpdu, |
const GcrManager::GcrMembers & | recipients ) |
Notify the block ack manager about the last groupcast MPDU transmitted with the GCR-UR service.
If there is an established block ack agreement, it makes the transmit window advance beyond the transmitted MPDU.
mpdu | the groupcast MPDU |
recipients | the list of recipients for the groupcast MPDU |
Definition at line 543 of file block-ack-manager.cc.
References GetOriginatorBaAgreement(), m_originatorAgreements, NS_ASSERT, and NS_LOG_FUNCTION.
Invoked upon missed reception of an Ack frame on the given link after the transmission of a QoS data frame sent under an established block ack agreement.
Remove the acknowledged frame from the outstanding packets and insert it in the retransmission queue.
linkId | the ID of the given link |
mpdu | The unacknowledged MPDU. |
Definition at line 560 of file block-ack-manager.cc.
References GetOriginatorBaAgreement(), HandleInFlightMpdu(), m_originatorAgreements, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, and TO_RETRANSMIT.
void ns3::BlockAckManager::NotifyMissedBlockAck | ( | uint8_t | linkId, |
const Mac48Address & | recipient, | ||
uint8_t | tid ) |
linkId | the ID of the given link |
recipient | Sender of the expected BlockAck frame. |
tid | Traffic ID. |
Invoked upon missed reception of a block ack frame on the given link. Typically, this function is called by ns3::QosTxop object. Performs a check on which MPDUs, previously sent with ack policy set to Block Ack, should be placed in the retransmission queue.
Definition at line 817 of file block-ack-manager.cc.
References GetOriginatorBaAgreement(), HandleInFlightMpdu(), m_originatorAgreements, ns3::Simulator::Now(), NS_LOG_FUNCTION, STAY_INFLIGHT, and TO_RETRANSMIT.
void ns3::BlockAckManager::NotifyOriginatorAgreementNoReply | ( | const Mac48Address & | recipient, |
uint8_t | tid, | ||
std::optional< Mac48Address > | gcrGroupAddr ) |
recipient | Address of peer station involved in block ack mechanism. |
tid | Traffic ID of transmitted packet. |
gcrGroupAddr | the GCR Group Address (only if it a GCR Block Ack agreement) |
Marks an originator agreement after not receiving response to ADDBA request. During this state any packets in queue will be transmitted using normal MPDU. This also unblocks recipient address.
Definition at line 1086 of file block-ack-manager.cc.
References GetOriginatorBaAgreement(), m_originatorAgreements, m_originatorAgreementState, m_unblockPackets, ns3::OriginatorBlockAckAgreement::NO_REPLY, ns3::Simulator::Now(), NS_ASSERT, and NS_LOG_FUNCTION.
void ns3::BlockAckManager::NotifyOriginatorAgreementRejected | ( | const Mac48Address & | recipient, |
uint8_t | tid, | ||
std::optional< Mac48Address > | gcrGroupAddr ) |
recipient | Address of peer station involved in block ack mechanism. |
tid | Traffic ID of transmitted packet. |
gcrGroupAddr | the GCR Group Address (only if it a GCR Block Ack agreement) |
Marks an originator agreement as rejected. This happens if recipient station reject block ack setup by an ADDBA Response frame with a failure status code. For now we assume that every QoS station accepts a block ack setup.
Definition at line 1064 of file block-ack-manager.cc.
References GetOriginatorBaAgreement(), m_originatorAgreements, m_originatorAgreementState, m_unblockPackets, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, and ns3::OriginatorBlockAckAgreement::REJECTED.
void ns3::BlockAckManager::NotifyOriginatorAgreementReset | ( | const Mac48Address & | recipient, |
uint8_t | tid, | ||
std::optional< Mac48Address > | gcrGroupAddr ) |
recipient | Address of peer station involved in block ack mechanism. |
tid | Traffic ID of transmitted packet. |
gcrGroupAddr | the GCR Group Address (only if it a GCR Block Ack agreement) |
Set Originator BA agreement to a transitory state to reset it after not receiving response to ADDBA request.
Definition at line 1108 of file block-ack-manager.cc.
References GetOriginatorBaAgreement(), m_originatorAgreements, m_originatorAgreementState, m_unblockPackets, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, and ns3::OriginatorBlockAckAgreement::RESET.
|
delete |
void ns3::BlockAckManager::RemoveFromSendBarIfDataQueuedList | ( | const Mac48Address & | recipient, |
uint8_t | tid ) |
Remove the given (recipient, TID) pair from the list of BA agreements for which a BAR shall only be sent if there are queued data frames belonging to those agreements.
recipient | the recipient |
tid | the TID |
Definition at line 1048 of file block-ack-manager.cc.
References m_sendBarIfDataQueued, and NS_LOG_FUNCTION.
void ns3::BlockAckManager::ScheduleBar | ( | const CtrlBAckRequestHeader & | reqHdr, |
const WifiMacHeader & | hdr ) |
reqHdr | the BlockAckRequest header |
hdr | the 802.11 MAC header |
Enqueue the given BlockAckRequest into the queue storing the next BAR frames to transmit. If a BAR for the same recipient and TID is already present in the queue, it is replaced by the new one. If the given BAR is retransmitted, it is placed at the head of the queue, otherwise at the tail.
Definition at line 997 of file block-ack-manager.cc.
References ns3::Create(), ns3::WifiMacHeader::GetAddr1(), ns3::CtrlBAckRequestHeader::GetTidInfo(), m_queue, NS_LOG_FUNCTION, ns3::WIFI_CTL_QUEUE, and ns3::WIFI_UNICAST.
Referenced by HandleDiscardedMpdu().
void ns3::BlockAckManager::SetBlockAckInactivityCallback | ( | Callback< void, Mac48Address, uint8_t, bool, std::optional< Mac48Address > > | callback | ) |
Set block ack inactivity callback.
callback | the block ack inactivity callback function |
Definition at line 1175 of file block-ack-manager.cc.
References m_blockAckInactivityTimeout, and NS_LOG_FUNCTION.
void ns3::BlockAckManager::SetBlockAckThreshold | ( | uint8_t | nPackets | ) |
nPackets | Minimum number of packets for use of block ack. |
Upon receipt of a BlockAck frame, if total number of packets (packets in WifiMacQueue and buffered packets) is greater of nPackets, they are transmitted using block ack mechanism.
Definition at line 440 of file block-ack-manager.cc.
References m_blockAckThreshold, and NS_LOG_FUNCTION.
void ns3::BlockAckManager::SetBlockDestinationCallback | ( | Callback< void, Mac48Address, uint8_t > | callback | ) |
Set block destination callback.
callback | the block destination callback |
Definition at line 1183 of file block-ack-manager.cc.
References m_blockPackets, and NS_LOG_FUNCTION.
void ns3::BlockAckManager::SetDroppedOldMpduCallback | ( | DroppedOldMpdu | callback | ) |
callback | the callback to invoke when an old MPDU is dropped |
Definition at line 1209 of file block-ack-manager.cc.
References m_droppedOldMpduCallback.
void ns3::BlockAckManager::SetQueue | ( | const Ptr< WifiMacQueue > | queue | ) |
queue | The WifiMacQueue object. |
Definition at line 1130 of file block-ack-manager.cc.
References m_queue, and NS_LOG_FUNCTION.
void ns3::BlockAckManager::SetTxFailedCallback | ( | TxFailed | callback | ) |
callback | the callback to invoke when a packet transmission was completed unsuccessfuly. |
Definition at line 1203 of file block-ack-manager.cc.
References m_txFailedCallback.
void ns3::BlockAckManager::SetTxOkCallback | ( | TxOk | callback | ) |
callback | the callback to invoke when a packet transmission was completed successfully. |
Definition at line 1197 of file block-ack-manager.cc.
References m_txOkCallback.
void ns3::BlockAckManager::SetUnblockDestinationCallback | ( | Callback< void, Mac48Address, uint8_t > | callback | ) |
Set unblock destination callback.
callback | the unblock destination callback |
Definition at line 1190 of file block-ack-manager.cc.
References m_unblockPackets, and NS_LOG_FUNCTION.
void ns3::BlockAckManager::StoreGcrPacket | ( | Ptr< WifiMpdu > | mpdu, |
const GcrManager::GcrMembers & | members ) |
mpdu | groupcast MPDU to store. |
members | intended recipients for the groupcast MPDU. |
Stores mpdu for a possible future retransmission. Retransmission occurs if the packet, in a GCR Block Ack frame, is indicated by recipient as not received.
Definition at line 376 of file block-ack-manager.cc.
References DoStorePacket(), and NS_LOG_FUNCTION.
mpdu | MPDU to store. |
Stores mpdu for a possible future retransmission. Retransmission occurs if the packet, in a Block Ack frame, is indicated by recipient as not received.
Definition at line 369 of file block-ack-manager.cc.
References DoStorePacket(), and NS_LOG_FUNCTION.
void ns3::BlockAckManager::UpdateOriginatorAgreement | ( | const MgtAddBaResponseHeader & | respHdr, |
const Mac48Address & | recipient, | ||
uint16_t | startingSeq ) |
respHdr | Relative Add block ack response (action frame). |
recipient | Address of peer station involved in block ack mechanism. |
startingSeq | the updated starting sequence number |
Invoked upon receipt of a ADDBA response frame from recipient.
Definition at line 231 of file block-ack-manager.cc.
References ns3::OriginatorBlockAckAgreement::ESTABLISHED, ns3::MgtAddBaResponseHeader::GetBufferSize(), ns3::MgtAddBaResponseHeader::GetGcrGroupAddress(), GetOriginatorBaAgreement(), ns3::MgtAddBaResponseHeader::GetTid(), ns3::BlockAckAgreement::GetTimeout(), ns3::MgtAddBaResponseHeader::GetTimeout(), InactivityTimeout(), ns3::OriginatorBlockAckAgreement::InitTxWindow(), ns3::MgtAddBaResponseHeader::IsAmsduSupported(), ns3::MgtAddBaResponseHeader::IsImmediateBlockAck(), m_gcrBlockAcks, ns3::BlockAckAgreement::m_inactivityEvent, m_originatorAgreements, m_originatorAgreementState, m_unblockPackets, ns3::MicroSeconds(), ns3::Simulator::Now(), NS_LOG_FUNCTION, ns3::Simulator::Schedule(), ns3::BlockAckAgreement::SetAmsduSupport(), ns3::BlockAckAgreement::SetBufferSize(), ns3::BlockAckAgreement::SetDelayedBlockAck(), ns3::BlockAckAgreement::SetGcrGroupAddress(), ns3::BlockAckAgreement::SetImmediateBlockAck(), ns3::BlockAckAgreement::SetStartingSequence(), ns3::OriginatorBlockAckAgreement::SetState(), ns3::BlockAckAgreement::SetTimeout(), and timeout.
|
private |
BlockAck inactivity timeout callback.
Definition at line 697 of file block-ack-manager.h.
Referenced by InactivityTimeout(), and SetBlockAckInactivityCallback().
|
private |
block ack threshold
Definition at line 694 of file block-ack-manager.h.
Referenced by SetBlockAckThreshold().
|
private |
block packets callback
Definition at line 698 of file block-ack-manager.h.
Referenced by CreateOriginatorAgreement(), and SetBlockDestinationCallback().
|
private |
the dropped MPDU callback
Definition at line 702 of file block-ack-manager.h.
Referenced by HandleDiscardedMpdu(), HandleInFlightMpdu(), and SetDroppedOldMpduCallback().
|
private |
received GCR Block ACKs
Definition at line 692 of file block-ack-manager.h.
Referenced by NotifyGotGcrBlockAck(), and UpdateOriginatorAgreement().
|
private |
This data structure contains, for each originator block ack agreement (recipient, TID), a set of packets for which an ack by block ack is requested.
Every packet or fragment indicated as correctly received in BlockAck frame is erased from this data structure. Pushed back in retransmission queue otherwise.
Definition at line 683 of file block-ack-manager.h.
Referenced by CreateOriginatorAgreement(), DestroyOriginatorAgreement(), DoDispose(), DoStorePacket(), GetAgreementAsOriginator(), GetBlockAckReqHeader(), GetGcrBufferSize(), GetGcrStartingSequence(), GetNBufferedPackets(), GetOriginatorBaAgreement(), GetOriginatorBaAgreement(), GetOriginatorStartingSequence(), GetRecipientBufferSize(), HandleDiscardedMpdu(), NeedBarRetransmission(), NeedGcrBarRetransmission(), NotifyDiscardedMpdu(), NotifyGotAck(), NotifyGotBlockAck(), NotifyGotGcrBlockAck(), NotifyLastGcrUrTx(), NotifyMissedAck(), NotifyMissedBlockAck(), NotifyOriginatorAgreementNoReply(), NotifyOriginatorAgreementRejected(), NotifyOriginatorAgreementReset(), and UpdateOriginatorAgreement().
|
private |
The trace source fired when a state transition occurred.
Definition at line 708 of file block-ack-manager.h.
Referenced by CreateOriginatorAgreement(), GetTypeId(), NotifyOriginatorAgreementNoReply(), NotifyOriginatorAgreementRejected(), NotifyOriginatorAgreementReset(), and UpdateOriginatorAgreement().
|
private |
queue
Definition at line 695 of file block-ack-manager.h.
Referenced by DoDispose(), HandleDiscardedMpdu(), HandleInFlightMpdu(), NotifyGotAck(), NotifyGotBlockAck(), NotifyGotGcrBlockAck(), ScheduleBar(), and SetQueue().
|
private |
Recipient Block Ack agreements.
Definition at line 684 of file block-ack-manager.h.
Referenced by CreateRecipientAgreement(), DestroyRecipientAgreement(), GetAgreementAsRecipient(), GetRecipientBaAgreement(), GetRecipientBaAgreement(), NotifyGotBlockAckRequest(), and NotifyGotMpdu().
|
private |
list of BA agreements for which a BAR shall only be sent if data is queued
Definition at line 686 of file block-ack-manager.h.
Referenced by AddToSendBarIfDataQueuedList(), GetSendBarIfDataQueuedList(), and RemoveFromSendBarIfDataQueuedList().
|
private |
transmit failed callback
Definition at line 701 of file block-ack-manager.h.
Referenced by NotifyGotBlockAck(), NotifyGotGcrBlockAck(), and SetTxFailedCallback().
|
private |
transmit OK callback
Definition at line 700 of file block-ack-manager.h.
Referenced by NotifyGotAck(), NotifyGotBlockAck(), NotifyGotGcrBlockAck(), and SetTxOkCallback().
|
private |
unblock packets callback
Definition at line 699 of file block-ack-manager.h.
Referenced by NotifyOriginatorAgreementNoReply(), NotifyOriginatorAgreementRejected(), NotifyOriginatorAgreementReset(), SetUnblockDestinationCallback(), and UpdateOriginatorAgreement().