A Discrete-Event Network Simulator
API
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
ns3::OriginatorBlockAckAgreement Class Reference

Maintains the state and information about transmitted MPDUs with ack policy block ack for an originator station. More...

#include "originator-block-ack-agreement.h"

+ Inheritance diagram for ns3::OriginatorBlockAckAgreement:

Public Types

enum  State { PENDING, ESTABLISHED, INACTIVE, UNSUCCESSFUL }
 Represents the state for this agreement. More...
 

Public Member Functions

 OriginatorBlockAckAgreement (Mac48Address recipient, uint8_t tid)
 Constructor. More...
 
 ~OriginatorBlockAckAgreement ()
 
void CompleteExchange (void)
 Complete exchange function. More...
 
bool IsBlockAckRequestNeeded (void) const
 Returns true if all packets for which a block ack was negotiated have been transmitted so a block ack request is needed in order to acknowledge them. More...
 
bool IsEstablished (void) const
 Check if the current state of this agreement is ESTABLISHED. More...
 
bool IsInactive (void) const
 Check if the current state of this agreement is INACTIVE. More...
 
bool IsPending (void) const
 Check if the current state of this agreement is PENDING. More...
 
bool IsUnsuccessful (void) const
 Check if the current state of this agreement is UNSUCCESSFUL. More...
 
void NotifyMpduTransmission (uint16_t nextSeqNumber)
 Notifies a packet's transmission with ack policy Block Ack. More...
 
void SetState (State state)
 Set the current state. More...
 
- Public Member Functions inherited from ns3::BlockAckAgreement
 BlockAckAgreement (Mac48Address peer, uint8_t tid)
 Constructor for BlockAckAgreement with given peer and TID. More...
 
 ~BlockAckAgreement ()
 
uint16_t GetBufferSize (void) const
 Return the buffer size. More...
 
Mac48Address GetPeer (void) const
 Return the peer address. More...
 
uint16_t GetStartingSequence (void) const
 Return the starting squence number. More...
 
uint16_t GetStartingSequenceControl (void) const
 Return the starting sequence control. More...
 
uint8_t GetTid (void) const
 Return the Traffic ID (TID). More...
 
uint16_t GetTimeout (void) const
 Return the timeout. More...
 
uint16_t GetWinEnd (void) const
 Return the ending sequence number. More...
 
bool IsAmsduSupported (void) const
 Check whether A-MSDU is supported. More...
 
bool IsHtSupported (void) const
 Check whether HT is supported. More...
 
bool IsImmediateBlockAck (void) const
 Check whether the current ACK policy is immediate block ACK. More...
 
void SetAmsduSupport (bool supported)
 Enable or disable A-MSDU support. More...
 
void SetBufferSize (uint16_t bufferSize)
 Set buffer size. More...
 
void SetDelayedBlockAck (void)
 Set Block ACK policy to delayed ACK. More...
 
void SetHtSupported (bool htSupported)
 Enable or disable HT support. More...
 
void SetImmediateBlockAck (void)
 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...
 
void SetWinEnd (uint16_t seq)
 Set ending sequence number. More...
 

Private Attributes

bool m_needBlockAckReq
 flag whether it needs a Block ACK request More...
 
uint16_t m_sentMpdus
 sent MPDUs More...
 
State m_state
 state More...
 

Friends

class BlockAckManager
 allow BlockAckManager class access More...
 

Additional Inherited Members

- Protected Attributes inherited from ns3::BlockAckAgreement
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 squence control. More...
 
uint8_t m_tid
 Traffic ID. More...
 
uint16_t m_timeout
 Timeout. More...
 
uint16_t m_winEnd
 Ending sequence number. More...
 

Detailed Description

Maintains the state and information about transmitted MPDUs with ack policy block ack for an originator station.

Definition at line 33 of file originator-block-ack-agreement.h.

Member Enumeration Documentation

◆ State

Represents the state for this agreement.

PENDING: If an agreement is in PENDING state it means that an ADDBARequest frame was sent to recipient in order to setup the block ack and the originator is waiting for the relative ADDBAResponse frame.

ESTABLISHED: The block ack is active and all packets relative to this agreement are transmitted with ack policy set to block ack.

INACTIVE: In our implementation, block ack tear-down happens only if an inactivity timeout occurs so we could have an active block ack but a number of packets that doesn't reach the value of m_blockAckThreshold (see ns3::BlockAckManager). In these conditions the agreement becomes INACTIVE until that the number of packets reaches the value of m_blockAckThreshold again.

UNSUCCESSFUL (not used for now): The agreement's state becomes UNSUCCESSFUL if:

  • its previous state was PENDING and an ADDBAResponse frame wasn't received from recipient station within an interval of time defined by m_bAckSetupTimeout attribute in ns3::WifiMac.
  • an ADDBAResponse frame is received from recipient and the Status Code field is set to failure.

In both cases for station addressed by BlockAckAgreement::m_peer and for TID BlockAckAgreement::m_tid block ack mechanism won't be used.State enumeration

Enumerator
PENDING 
ESTABLISHED 
INACTIVE 
UNSUCCESSFUL 

Definition at line 98 of file originator-block-ack-agreement.h.

Constructor & Destructor Documentation

◆ OriginatorBlockAckAgreement()

ns3::OriginatorBlockAckAgreement::OriginatorBlockAckAgreement ( Mac48Address  recipient,
uint8_t  tid 
)

Constructor.

Parameters
recipientMAC address
tidTraffic ID

Definition at line 26 of file originator-block-ack-agreement.cc.

◆ ~OriginatorBlockAckAgreement()

ns3::OriginatorBlockAckAgreement::~OriginatorBlockAckAgreement ( )

Definition at line 34 of file originator-block-ack-agreement.cc.

Member Function Documentation

◆ CompleteExchange()

void ns3::OriginatorBlockAckAgreement::CompleteExchange ( void  )

◆ IsBlockAckRequestNeeded()

bool ns3::OriginatorBlockAckAgreement::IsBlockAckRequestNeeded ( void  ) const

Returns true if all packets for which a block ack was negotiated have been transmitted so a block ack request is needed in order to acknowledge them.

Returns
true if all packets for which a block ack was negotiated have been transmitted, false otherwise

Definition at line 87 of file originator-block-ack-agreement.cc.

References m_needBlockAckReq.

◆ IsEstablished()

bool ns3::OriginatorBlockAckAgreement::IsEstablished ( void  ) const

Check if the current state of this agreement is ESTABLISHED.

Returns
true if the current state of this agreement is ESTABLISHED, false otherwise

Definition at line 56 of file originator-block-ack-agreement.cc.

References ESTABLISHED, and m_state.

◆ IsInactive()

bool ns3::OriginatorBlockAckAgreement::IsInactive ( void  ) const

Check if the current state of this agreement is INACTIVE.

Returns
true if the current state of this agreement is INACTIVE, false otherwise

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

References INACTIVE, and m_state.

◆ IsPending()

bool ns3::OriginatorBlockAckAgreement::IsPending ( void  ) const

Check if the current state of this agreement is PENDING.

Returns
true if the current state of this agreement is PENDING, false otherwise

Definition at line 50 of file originator-block-ack-agreement.cc.

References m_state, and PENDING.

◆ IsUnsuccessful()

bool ns3::OriginatorBlockAckAgreement::IsUnsuccessful ( void  ) const

Check if the current state of this agreement is UNSUCCESSFUL.

Returns
true if the current state of this agreement is UNSUCCESSFUL, false otherwise

Definition at line 68 of file originator-block-ack-agreement.cc.

References m_state, and UNSUCCESSFUL.

◆ NotifyMpduTransmission()

void ns3::OriginatorBlockAckAgreement::NotifyMpduTransmission ( uint16_t  nextSeqNumber)

Notifies a packet's transmission with ack policy Block Ack.

Parameters
nextSeqNumber

Definition at line 74 of file originator-block-ack-agreement.cc.

References ns3::BlockAckAgreement::m_bufferSize, m_needBlockAckReq, m_sentMpdus, ns3::BlockAckAgreement::m_startingSeq, min, and NS_ASSERT.

◆ SetState()

void ns3::OriginatorBlockAckAgreement::SetState ( State  state)

Set the current state.

Parameters
stateto set

Definition at line 39 of file originator-block-ack-agreement.cc.

References INACTIVE, m_needBlockAckReq, m_sentMpdus, and m_state.

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

Friends And Related Function Documentation

◆ BlockAckManager

friend class BlockAckManager
friend

allow BlockAckManager class access

Definition at line 36 of file originator-block-ack-agreement.h.

Member Data Documentation

◆ m_needBlockAckReq

bool ns3::OriginatorBlockAckAgreement::m_needBlockAckReq
private

flag whether it needs a Block ACK request

Definition at line 160 of file originator-block-ack-agreement.h.

Referenced by CompleteExchange(), IsBlockAckRequestNeeded(), NotifyMpduTransmission(), and SetState().

◆ m_sentMpdus

uint16_t ns3::OriginatorBlockAckAgreement::m_sentMpdus
private

sent MPDUs

Definition at line 159 of file originator-block-ack-agreement.h.

Referenced by CompleteExchange(), NotifyMpduTransmission(), and SetState().

◆ m_state

State ns3::OriginatorBlockAckAgreement::m_state
private

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