A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::OriginatorBlockAckAgreement Class Reference

#include <originator-block-ack-agreement.h>

+ Inheritance diagram for ns3::OriginatorBlockAckAgreement:
+ Collaboration diagram for ns3::OriginatorBlockAckAgreement:

Public Types

enum  State { PENDING, ESTABLISHED, INACTIVE, UNSUCCESSFUL }

Public Member Functions

 OriginatorBlockAckAgreement ()
 OriginatorBlockAckAgreement (Mac48Address recipient, uint8_t tid)
 ~OriginatorBlockAckAgreement ()
void CompleteExchange (void)
bool IsBlockAckRequestNeeded (void) const
bool IsEstablished (void) const
bool IsInactive (void) const
bool IsPending (void) const
bool IsUnsuccessful (void) const
void NotifyMpduTransmission (uint16_t nextSeqNumber)
void SetState (enum State state)
- Public Member Functions inherited from ns3::BlockAckAgreement
 BlockAckAgreement ()
 BlockAckAgreement (Mac48Address peer, uint8_t tid)
 ~BlockAckAgreement ()
uint16_t GetBufferSize (void) const
Mac48Address GetPeer (void) const
uint16_t GetStartingSequence (void) const
uint16_t GetStartingSequenceControl (void) const
uint8_t GetTid (void) const
uint16_t GetTimeout (void) const
bool IsAmsduSupported (void) const
bool IsImmediateBlockAck (void) const
void SetAmsduSupport (bool supported)
void SetBufferSize (uint16_t bufferSize)
void SetDelayedBlockAck (void)
void SetImmediateBlockAck (void)
void SetStartingSequence (uint16_t seq)
void SetTimeout (uint16_t timeout)

Private Attributes

bool m_needBlockAckReq
uint16_t m_sentMpdus
enum State m_state

Friends

class BlockAckManager

Additional Inherited Members

- Protected Attributes inherited from ns3::BlockAckAgreement
uint8_t m_amsduSupported
uint8_t m_blockAckPolicy
uint16_t m_bufferSize
EventId m_inactivityEvent
Mac48Address m_peer
uint16_t m_startingSeq
uint8_t m_tid
uint16_t m_timeout

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

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.

Enumerator:
PENDING 
ESTABLISHED 
INACTIVE 
UNSUCCESSFUL 

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

Constructor & Destructor Documentation

ns3::OriginatorBlockAckAgreement::OriginatorBlockAckAgreement ( )

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

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

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

ns3::OriginatorBlockAckAgreement::~OriginatorBlockAckAgreement ( )

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

Member Function Documentation

void ns3::OriginatorBlockAckAgreement::CompleteExchange ( void  )

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

References m_needBlockAckReq, and m_sentMpdus.

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

+ Here is the caller graph for this function:

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.

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

References m_needBlockAckReq.

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

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

References ESTABLISHED, and m_state.

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

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

References INACTIVE, and m_state.

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

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

References m_state, and PENDING.

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

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

References m_state, and UNSUCCESSFUL.

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

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

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

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

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

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

References INACTIVE, m_needBlockAckReq, m_sentMpdus, and m_state.

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

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class BlockAckManager
friend

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

Member Data Documentation

bool ns3::OriginatorBlockAckAgreement::m_needBlockAckReq
private
uint16_t ns3::OriginatorBlockAckAgreement::m_sentMpdus
private
enum State ns3::OriginatorBlockAckAgreement::m_state
private

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