Maintains information for a block ack agreement. More...
#include "block-ack-agreement.h"
Public Member Functions | |
BlockAckAgreement (Mac48Address peer, uint8_t tid) | |
Constructor for BlockAckAgreement with given peer and TID. More... | |
virtual | ~BlockAckAgreement () |
BlockAckReqType | GetBlockAckReqType () const |
Get the type of the Block Ack Requests sent by the originator of this agreement. More... | |
BlockAckType | GetBlockAckType () const |
Get the type of the Block Acks sent by the recipient of this agreement. More... | |
uint16_t | GetBufferSize () const |
Return the buffer size. More... | |
Mac48Address | GetPeer () const |
Return the peer address. More... | |
virtual uint16_t | GetStartingSequence () const |
Return the starting sequence number. More... | |
uint16_t | GetStartingSequenceControl () const |
Return the starting sequence control. More... | |
uint8_t | GetTid () const |
Return the Traffic ID (TID). More... | |
uint16_t | GetTimeout () const |
Return the timeout. More... | |
uint16_t | GetWinEnd () const |
Return the last sequence number covered by the ack window. More... | |
bool | IsAmsduSupported () const |
Check whether A-MSDU is supported. More... | |
bool | IsHtSupported () const |
Check whether HT is supported. More... | |
bool | IsImmediateBlockAck () const |
Check whether the current ack policy is immediate BlockAck. More... | |
void | SetAmsduSupport (bool supported) |
Enable or disable A-MSDU support. More... | |
void | SetBufferSize (uint16_t bufferSize) |
Set buffer size. More... | |
void | SetDelayedBlockAck () |
Set block ack policy to delayed Ack. More... | |
void | SetHtSupported (bool htSupported) |
Enable or disable HT support. More... | |
void | SetImmediateBlockAck () |
Set block ack policy to immediate Ack. More... | |
void | SetStartingSequence (uint16_t seq) |
Set starting sequence number. More... | |
void | SetStartingSequenceControl (uint16_t seq) |
Set starting sequence control. More... | |
void | SetTimeout (uint16_t timeout) |
Set timeout. More... | |
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. More... | |
Protected Attributes | |
uint8_t | m_amsduSupported |
Flag whether MSDU aggregation is supported. More... | |
uint8_t | m_blockAckPolicy |
Type of block ack: immediate or delayed. More... | |
uint16_t | m_bufferSize |
Buffer size. More... | |
uint8_t | m_htSupported |
Flag whether HT is supported. More... | |
EventId | m_inactivityEvent |
inactivity event More... | |
Mac48Address | m_peer |
Peer address. More... | |
uint16_t | m_startingSeq |
Starting sequence control. More... | |
uint8_t | m_tid |
Traffic ID. More... | |
uint16_t | m_timeout |
Timeout. More... | |
uint16_t | m_winEnd |
Ending sequence number. More... | |
Friends | |
class | HtFrameExchangeManager |
Maintains information for a block ack agreement.
Definition at line 34 of file block-ack-agreement.h.
ns3::BlockAckAgreement::BlockAckAgreement | ( | Mac48Address | peer, |
uint8_t | tid | ||
) |
Constructor for BlockAckAgreement with given peer and TID.
peer | the peer station |
tid | the TID |
Definition at line 33 of file block-ack-agreement.cc.
References NS_LOG_FUNCTION.
|
virtual |
Definition at line 44 of file block-ack-agreement.cc.
References ns3::EventId::Cancel(), m_inactivityEvent, and NS_LOG_FUNCTION.
BlockAckReqType ns3::BlockAckAgreement::GetBlockAckReqType | ( | ) | const |
Get the type of the Block Ack Requests sent by the originator of this agreement.
Definition at line 187 of file block-ack-agreement.cc.
References ns3::BlockAckReqType::BASIC, ns3::BlockAckReqType::COMPRESSED, and m_htSupported.
BlockAckType ns3::BlockAckAgreement::GetBlockAckType | ( | ) | const |
Get the type of the Block Acks sent by the recipient of this agreement.
Definition at line 171 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().
uint16_t ns3::BlockAckAgreement::GetBufferSize | ( | ) | const |
Return the buffer size.
Definition at line 115 of file block-ack-agreement.cc.
References m_bufferSize.
Referenced by GetWinEnd().
|
static |
Get the distance between the given starting sequence number and the given sequence number.
seqNumber | the given sequence number |
startingSeqNumber | the given starting sequence number |
Definition at line 198 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().
Mac48Address ns3::BlockAckAgreement::GetPeer | ( | ) | const |
Return the peer address.
Definition at line 108 of file block-ack-agreement.cc.
References m_peer, and NS_LOG_FUNCTION.
Referenced by ns3::HtFrameExchangeManager::SendBlockAck().
|
virtual |
Return the starting sequence number.
Reimplemented in ns3::OriginatorBlockAckAgreement.
Definition at line 127 of file block-ack-agreement.cc.
References m_startingSeq.
Referenced by GetWinEnd().
uint16_t ns3::BlockAckAgreement::GetStartingSequenceControl | ( | ) | const |
Return the starting sequence control.
Definition at line 133 of file block-ack-agreement.cc.
References m_startingSeq.
uint8_t ns3::BlockAckAgreement::GetTid | ( | ) | const |
Return the Traffic ID (TID).
Definition at line 102 of file block-ack-agreement.cc.
References m_tid.
Referenced by ns3::HtFrameExchangeManager::SendBlockAck().
uint16_t ns3::BlockAckAgreement::GetTimeout | ( | ) | const |
Return the timeout.
Definition at line 121 of file block-ack-agreement.cc.
References m_timeout.
Referenced by ns3::BlockAckManager::UpdateOriginatorAgreement().
uint16_t ns3::BlockAckAgreement::GetWinEnd | ( | ) | const |
Return the last sequence number covered by the ack window.
Definition at line 152 of file block-ack-agreement.cc.
References GetBufferSize(), GetStartingSequence(), and ns3::SEQNO_SPACE_SIZE.
bool ns3::BlockAckAgreement::IsAmsduSupported | ( | ) | const |
Check whether A-MSDU is supported.
Definition at line 146 of file block-ack-agreement.cc.
References m_amsduSupported.
bool ns3::BlockAckAgreement::IsHtSupported | ( | ) | const |
Check whether HT is supported.
Definition at line 165 of file block-ack-agreement.cc.
References m_htSupported.
bool ns3::BlockAckAgreement::IsImmediateBlockAck | ( | ) | const |
Check whether the current ack policy is immediate BlockAck.
Definition at line 140 of file block-ack-agreement.cc.
References m_blockAckPolicy.
void ns3::BlockAckAgreement::SetAmsduSupport | ( | bool | supported | ) |
Enable or disable A-MSDU support.
supported | enable or disable A-MSDU support |
Definition at line 95 of file block-ack-agreement.cc.
References m_amsduSupported, and NS_LOG_FUNCTION.
Referenced by ns3::BlockAckManager::CreateOriginatorAgreement(), and ns3::BlockAckManager::UpdateOriginatorAgreement().
void ns3::BlockAckAgreement::SetBufferSize | ( | uint16_t | bufferSize | ) |
Set buffer size.
bufferSize | the buffer size (in number of MPDUs) |
Definition at line 51 of file block-ack-agreement.cc.
References m_bufferSize, and NS_LOG_FUNCTION.
Referenced by ns3::BlockAckManager::CreateOriginatorAgreement(), OriginatorBlockAckWindowTest::DoRun(), and ns3::BlockAckManager::UpdateOriginatorAgreement().
void ns3::BlockAckAgreement::SetDelayedBlockAck | ( | ) |
Set block ack policy to delayed Ack.
Definition at line 88 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().
void ns3::BlockAckAgreement::SetHtSupported | ( | bool | htSupported | ) |
Enable or disable HT support.
htSupported | enable or disable HT support |
Definition at line 158 of file block-ack-agreement.cc.
References m_htSupported, and NS_LOG_FUNCTION.
Referenced by ns3::BlockAckManager::CreateOriginatorAgreement().
void ns3::BlockAckAgreement::SetImmediateBlockAck | ( | ) |
Set block ack policy to immediate Ack.
Definition at line 81 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().
void ns3::BlockAckAgreement::SetStartingSequence | ( | uint16_t | seq | ) |
Set starting sequence number.
seq | the starting sequence number |
Definition at line 65 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().
void ns3::BlockAckAgreement::SetStartingSequenceControl | ( | uint16_t | seq | ) |
Set starting sequence control.
seq | the starting sequence control |
Definition at line 73 of file block-ack-agreement.cc.
References m_startingSeq, NS_ASSERT, and NS_LOG_FUNCTION.
void ns3::BlockAckAgreement::SetTimeout | ( | uint16_t | timeout | ) |
Set timeout.
timeout | the timeout value |
Definition at line 58 of file block-ack-agreement.cc.
References m_timeout, NS_LOG_FUNCTION, and timeout.
Referenced by ns3::BlockAckManager::CreateOriginatorAgreement(), and ns3::BlockAckManager::UpdateOriginatorAgreement().
|
friend |
Definition at line 36 of file block-ack-agreement.h.
|
protected |
Flag whether MSDU aggregation is supported.
Definition at line 178 of file block-ack-agreement.h.
Referenced by ns3::RecipientBlockAckAgreement::RecipientBlockAckAgreement(), IsAmsduSupported(), and SetAmsduSupport().
|
protected |
Type of block ack: immediate or delayed.
Definition at line 179 of file block-ack-agreement.h.
Referenced by IsImmediateBlockAck(), SetDelayedBlockAck(), and SetImmediateBlockAck().
|
protected |
Buffer size.
Definition at line 181 of file block-ack-agreement.h.
Referenced by ns3::RecipientBlockAckAgreement::RecipientBlockAckAgreement(), GetBlockAckType(), GetBufferSize(), ns3::OriginatorBlockAckAgreement::InitTxWindow(), and SetBufferSize().
|
protected |
Flag whether HT is supported.
Definition at line 185 of file block-ack-agreement.h.
Referenced by ns3::RecipientBlockAckAgreement::RecipientBlockAckAgreement(), GetBlockAckReqType(), GetBlockAckType(), IsHtSupported(), and SetHtSupported().
|
mutableprotected |
inactivity event
Definition at line 186 of file block-ack-agreement.h.
Referenced by ~BlockAckAgreement(), and ns3::BlockAckManager::UpdateOriginatorAgreement().
|
protected |
|
protected |
Starting sequence control.
Definition at line 183 of file block-ack-agreement.h.
Referenced by ns3::RecipientBlockAckAgreement::RecipientBlockAckAgreement(), GetStartingSequence(), ns3::OriginatorBlockAckAgreement::GetStartingSequence(), GetStartingSequenceControl(), ns3::OriginatorBlockAckAgreement::InitTxWindow(), SetStartingSequence(), and SetStartingSequenceControl().
|
protected |
|
protected |
Timeout.
Definition at line 182 of file block-ack-agreement.h.
Referenced by ns3::RecipientBlockAckAgreement::RecipientBlockAckAgreement(), GetTimeout(), and SetTimeout().
|
protected |
Ending sequence number.
Definition at line 184 of file block-ack-agreement.h.