A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::BlockAckAgreement Class Reference

Maintains information for a block ack agreement. More...

#include "block-ack-agreement.h"

+ Inheritance diagram for ns3::BlockAckAgreement:
+ Collaboration diagram for ns3::BlockAckAgreement:

Public Member Functions

 BlockAckAgreement (Mac48Address peer, uint8_t tid)
 Constructor for BlockAckAgreement with given peer and TID.
 
virtual ~BlockAckAgreement ()
 
BlockAckReqType GetBlockAckReqType () const
 Get the type of the Block Ack Requests sent by the originator of this agreement.
 
BlockAckType GetBlockAckType () const
 Get the type of the Block Acks sent by the recipient of this agreement.
 
uint16_t GetBufferSize () const
 Return the buffer size.
 
Mac48Address GetPeer () const
 Return the peer address.
 
virtual uint16_t GetStartingSequence () const
 Return the starting sequence number.
 
uint16_t GetStartingSequenceControl () const
 Return the starting sequence control.
 
uint8_t GetTid () const
 Return the Traffic ID (TID).
 
uint16_t GetTimeout () const
 Return the timeout.
 
uint16_t GetWinEnd () const
 Return the last sequence number covered by the ack window.
 
bool IsAmsduSupported () const
 Check whether A-MSDU is supported.
 
bool IsHtSupported () const
 Check whether HT is supported.
 
bool IsImmediateBlockAck () const
 Check whether the current ack policy is immediate BlockAck.
 
void SetAmsduSupport (bool supported)
 Enable or disable A-MSDU support.
 
void SetBufferSize (uint16_t bufferSize)
 Set buffer size.
 
void SetDelayedBlockAck ()
 Set block ack policy to delayed Ack.
 
void SetHtSupported (bool htSupported)
 Enable or disable HT support.
 
void SetImmediateBlockAck ()
 Set block ack policy to immediate Ack.
 
void SetStartingSequence (uint16_t seq)
 Set starting sequence number.
 
void SetStartingSequenceControl (uint16_t seq)
 Set starting sequence control.
 
void SetTimeout (uint16_t timeout)
 Set timeout.
 

Static Public Member Functions

static std::size_t GetDistance (uint16_t seqNumber, uint16_t startingSeqNumber)
 Get the distance between the given starting sequence number and the given sequence number.
 

Protected Attributes

uint8_t m_amsduSupported
 Flag whether MSDU aggregation is supported.
 
uint8_t m_blockAckPolicy
 Type of block ack: immediate or delayed.
 
uint16_t m_bufferSize
 Buffer size.
 
uint8_t m_htSupported
 Flag whether HT is supported.
 
EventId m_inactivityEvent
 inactivity event
 
Mac48Address m_peer
 Peer address.
 
uint16_t m_startingSeq
 Starting sequence control.
 
uint8_t m_tid
 Traffic ID.
 
uint16_t m_timeout
 Timeout.
 
uint16_t m_winEnd
 Ending sequence number.
 

Friends

class HtFrameExchangeManager
 

Detailed Description

Maintains information for a block ack agreement.

Definition at line 23 of file block-ack-agreement.h.

Constructor & Destructor Documentation

◆ BlockAckAgreement()

ns3::BlockAckAgreement::BlockAckAgreement ( Mac48Address peer,
uint8_t tid )

Constructor for BlockAckAgreement with given peer and TID.

Parameters
peerthe peer station
tidthe TID

Definition at line 22 of file block-ack-agreement.cc.

References NS_LOG_FUNCTION.

◆ ~BlockAckAgreement()

ns3::BlockAckAgreement::~BlockAckAgreement ( )
virtual

Definition at line 33 of file block-ack-agreement.cc.

References ns3::EventId::Cancel(), m_inactivityEvent, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Member Function Documentation

◆ GetBlockAckReqType()

BlockAckReqType ns3::BlockAckAgreement::GetBlockAckReqType ( ) const

Get the type of the Block Ack Requests sent by the originator of this agreement.

Returns
the type of the Block Ack Requests sent by the originator of this agreement

Definition at line 176 of file block-ack-agreement.cc.

References ns3::BlockAckReqType::BASIC, ns3::BlockAckReqType::COMPRESSED, and m_htSupported.

◆ GetBlockAckType()

BlockAckType ns3::BlockAckAgreement::GetBlockAckType ( ) const

Get the type of the Block Acks sent by the recipient of this agreement.

Returns
the type of the Block Acks sent by the recipient of this agreement

Definition at line 160 of file block-ack-agreement.cc.

References ns3::BlockAckType::BASIC, ns3::BlockAckType::COMPRESSED, m_bufferSize, m_htSupported, and NS_ASSERT_MSG.

Referenced by ns3::HtFrameExchangeManager::SendBlockAck().

+ Here is the caller graph for this function:

◆ GetBufferSize()

uint16_t ns3::BlockAckAgreement::GetBufferSize ( ) const

Return the buffer size.

Returns
the buffer size (in number of MPDUs)

Definition at line 104 of file block-ack-agreement.cc.

References m_bufferSize.

Referenced by GetWinEnd().

+ Here is the caller graph for this function:

◆ GetDistance()

std::size_t ns3::BlockAckAgreement::GetDistance ( uint16_t seqNumber,
uint16_t startingSeqNumber )
static

Get the distance between the given starting sequence number and the given sequence number.

Parameters
seqNumberthe given sequence number
startingSeqNumberthe given starting sequence number
Returns
the distance of the given sequence number from the given starting sequence number

Definition at line 187 of file block-ack-agreement.cc.

References NS_ASSERT, and ns3::SEQNO_SPACE_SIZE.

Referenced by ns3::OriginatorBlockAckAgreement::GetDistance(), ns3::RecipientBlockAckAgreement::NotifyReceivedBar(), ns3::RecipientBlockAckAgreement::NotifyReceivedMpdu(), ns3::RecipientBlockAckAgreement::PassBufferedMpdusUntilFirstLost(), and ns3::RecipientBlockAckAgreement::PassBufferedMpdusWithSeqNumberLessThan().

+ Here is the caller graph for this function:

◆ GetPeer()

Mac48Address ns3::BlockAckAgreement::GetPeer ( ) const

Return the peer address.

Returns
the peer MAC address

Definition at line 97 of file block-ack-agreement.cc.

References m_peer, and NS_LOG_FUNCTION.

Referenced by ns3::HtFrameExchangeManager::SendBlockAck().

+ Here is the caller graph for this function:

◆ GetStartingSequence()

uint16_t ns3::BlockAckAgreement::GetStartingSequence ( ) const
virtual

Return the starting sequence number.

Returns
starting sequence number

Reimplemented in ns3::OriginatorBlockAckAgreement.

Definition at line 116 of file block-ack-agreement.cc.

References m_startingSeq.

Referenced by GetWinEnd().

+ Here is the caller graph for this function:

◆ GetStartingSequenceControl()

uint16_t ns3::BlockAckAgreement::GetStartingSequenceControl ( ) const

Return the starting sequence control.

Returns
starting sequence control

Definition at line 122 of file block-ack-agreement.cc.

References m_startingSeq.

◆ GetTid()

uint8_t ns3::BlockAckAgreement::GetTid ( ) const

Return the Traffic ID (TID).

Returns
TID

Definition at line 91 of file block-ack-agreement.cc.

References m_tid.

Referenced by ns3::HtFrameExchangeManager::SendBlockAck().

+ Here is the caller graph for this function:

◆ GetTimeout()

uint16_t ns3::BlockAckAgreement::GetTimeout ( ) const

Return the timeout.

Returns
the timeout

Definition at line 110 of file block-ack-agreement.cc.

References m_timeout.

Referenced by ns3::BlockAckManager::UpdateOriginatorAgreement().

+ Here is the caller graph for this function:

◆ GetWinEnd()

uint16_t ns3::BlockAckAgreement::GetWinEnd ( ) const

Return the last sequence number covered by the ack window.

Returns
ending sequence number

Definition at line 141 of file block-ack-agreement.cc.

References GetBufferSize(), GetStartingSequence(), and ns3::SEQNO_SPACE_SIZE.

+ Here is the call graph for this function:

◆ IsAmsduSupported()

bool ns3::BlockAckAgreement::IsAmsduSupported ( ) const

Check whether A-MSDU is supported.

Returns
true if A-MSDU is supported, false otherwise

Definition at line 135 of file block-ack-agreement.cc.

References m_amsduSupported.

◆ IsHtSupported()

bool ns3::BlockAckAgreement::IsHtSupported ( ) const

Check whether HT is supported.

Returns
true if HT is supported, false otherwise

Definition at line 154 of file block-ack-agreement.cc.

References m_htSupported.

◆ IsImmediateBlockAck()

bool ns3::BlockAckAgreement::IsImmediateBlockAck ( ) const

Check whether the current ack policy is immediate BlockAck.

Returns
true if the current ack policy is immediate BlockAck, false otherwise

Definition at line 129 of file block-ack-agreement.cc.

References m_blockAckPolicy.

◆ SetAmsduSupport()

void ns3::BlockAckAgreement::SetAmsduSupport ( bool supported)

Enable or disable A-MSDU support.

Parameters
supportedenable or disable A-MSDU support

Definition at line 84 of file block-ack-agreement.cc.

References m_amsduSupported, and NS_LOG_FUNCTION.

Referenced by ns3::BlockAckManager::CreateOriginatorAgreement(), and ns3::BlockAckManager::UpdateOriginatorAgreement().

+ Here is the caller graph for this function:

◆ SetBufferSize()

void ns3::BlockAckAgreement::SetBufferSize ( uint16_t bufferSize)

Set buffer size.

Parameters
bufferSizethe buffer size (in number of MPDUs)

Definition at line 40 of file block-ack-agreement.cc.

References m_bufferSize, and NS_LOG_FUNCTION.

Referenced by ns3::BlockAckManager::CreateOriginatorAgreement(), OriginatorBlockAckWindowTest::DoRun(), and ns3::BlockAckManager::UpdateOriginatorAgreement().

+ Here is the caller graph for this function:

◆ SetDelayedBlockAck()

void ns3::BlockAckAgreement::SetDelayedBlockAck ( )

Set block ack policy to delayed Ack.

Definition at line 77 of file block-ack-agreement.cc.

References m_blockAckPolicy, and NS_LOG_FUNCTION.

Referenced by ns3::BlockAckManager::CreateOriginatorAgreement(), ns3::BlockAckManager::CreateRecipientAgreement(), and ns3::BlockAckManager::UpdateOriginatorAgreement().

+ Here is the caller graph for this function:

◆ SetHtSupported()

void ns3::BlockAckAgreement::SetHtSupported ( bool htSupported)

Enable or disable HT support.

Parameters
htSupportedenable or disable HT support

Definition at line 147 of file block-ack-agreement.cc.

References m_htSupported, and NS_LOG_FUNCTION.

Referenced by ns3::BlockAckManager::CreateOriginatorAgreement().

+ Here is the caller graph for this function:

◆ SetImmediateBlockAck()

void ns3::BlockAckAgreement::SetImmediateBlockAck ( )

Set block ack policy to immediate Ack.

Definition at line 70 of file block-ack-agreement.cc.

References m_blockAckPolicy, and NS_LOG_FUNCTION.

Referenced by ns3::BlockAckManager::CreateOriginatorAgreement(), ns3::BlockAckManager::CreateRecipientAgreement(), and ns3::BlockAckManager::UpdateOriginatorAgreement().

+ Here is the caller graph for this function:

◆ SetStartingSequence()

void ns3::BlockAckAgreement::SetStartingSequence ( uint16_t seq)

Set starting sequence number.

Parameters
seqthe starting sequence number

Definition at line 54 of file block-ack-agreement.cc.

References m_startingSeq, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by ns3::BlockAckManager::CreateOriginatorAgreement(), OriginatorBlockAckWindowTest::DoRun(), and ns3::BlockAckManager::UpdateOriginatorAgreement().

+ Here is the caller graph for this function:

◆ SetStartingSequenceControl()

void ns3::BlockAckAgreement::SetStartingSequenceControl ( uint16_t seq)

Set starting sequence control.

Parameters
seqthe starting sequence control

Definition at line 62 of file block-ack-agreement.cc.

References m_startingSeq, NS_ASSERT, and NS_LOG_FUNCTION.

◆ SetTimeout()

void ns3::BlockAckAgreement::SetTimeout ( uint16_t timeout)

Set timeout.

Parameters
timeoutthe timeout value

Definition at line 47 of file block-ack-agreement.cc.

References m_timeout, NS_LOG_FUNCTION, and timeout.

Referenced by ns3::BlockAckManager::CreateOriginatorAgreement(), and ns3::BlockAckManager::UpdateOriginatorAgreement().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ HtFrameExchangeManager

friend class HtFrameExchangeManager
friend

Definition at line 25 of file block-ack-agreement.h.

Member Data Documentation

◆ m_amsduSupported

uint8_t ns3::BlockAckAgreement::m_amsduSupported
protected

Flag whether MSDU aggregation is supported.

Definition at line 167 of file block-ack-agreement.h.

Referenced by ns3::RecipientBlockAckAgreement::RecipientBlockAckAgreement(), IsAmsduSupported(), and SetAmsduSupport().

◆ m_blockAckPolicy

uint8_t ns3::BlockAckAgreement::m_blockAckPolicy
protected

Type of block ack: immediate or delayed.

Definition at line 168 of file block-ack-agreement.h.

Referenced by IsImmediateBlockAck(), SetDelayedBlockAck(), and SetImmediateBlockAck().

◆ m_bufferSize

◆ m_htSupported

uint8_t ns3::BlockAckAgreement::m_htSupported
protected

◆ m_inactivityEvent

EventId ns3::BlockAckAgreement::m_inactivityEvent
mutableprotected

inactivity event

Definition at line 175 of file block-ack-agreement.h.

Referenced by ~BlockAckAgreement(), and ns3::BlockAckManager::UpdateOriginatorAgreement().

◆ m_peer

Mac48Address ns3::BlockAckAgreement::m_peer
protected

Peer address.

Definition at line 166 of file block-ack-agreement.h.

Referenced by GetPeer().

◆ m_startingSeq

◆ m_tid

uint8_t ns3::BlockAckAgreement::m_tid
protected

Traffic ID.

Definition at line 169 of file block-ack-agreement.h.

Referenced by GetTid().

◆ m_timeout

uint16_t ns3::BlockAckAgreement::m_timeout
protected

◆ m_winEnd

uint16_t ns3::BlockAckAgreement::m_winEnd
protected

Ending sequence number.

Definition at line 173 of file block-ack-agreement.h.


The documentation for this class was generated from the following files: