User Manual, Developers Guide and API Documentation

wifimac::draftn::TransmissionQueue Class Reference

Queue for outgoing compounds. More...

#include <draftn/TransmissionQueue.hpp>

Collaboration diagram for wifimac::draftn::TransmissionQueue:

Collaboration graph
[legend]

List of all members.

Public Member Functions

std::list< wns::ldk::CompoundPtrgetAirableCompounds ()
wns::ldk::CompoundPtr getData ()
 Returns the compound as selected by the hasData() function.
const
BlockACKCommand::SequenceNumber 
getNextSN () const
const size_t getNumOnAirPDUs () const
const size_t getNumWaitingPDUs () const
wns::simulator::Time getOldestTimestamp ()
const
wns::service::dll::UnicastAddress 
getReceiver ()
wns::ldk::CompoundPtr getTxFront ()
const wns::ldk::CompoundPtr hasData () const
 Gets next compound for transmission or NULL.
const size_t maxAirSize ()
const unsigned int onAirQueueSize () const
void processIncomingACK (std::set< BlockACKCommand::SequenceNumber > ackSNs)
 Iterate, using two iterators, over the onAirQueue and the SNs indicated in the ACK to identify packet losses.
void processOutgoing (const wns::ldk::CompoundPtr &compound)
 Append outgoing compound to the txQueue.
void setMaxDelay (wns::simulator::Time delay)
void setMaxOnAir (size_t maxAir)
const unsigned int storageSize () const
 TransmissionQueue (BlockACK *parent_, size_t maxOnAir_, wns::simulator::Time maxDelay, wns::service::dll::UnicastAddress adr_, BlockACKCommand::SequenceNumber sn_, wifimac::management::PERInformationBase *perMIB_, std::auto_ptr< wns::ldk::buffer::SizeCalculator > *sizeCalculator)
const unsigned int txQueueSize () const
const bool waitsForACK () const
 ~TransmissionQueue ()

Private Types

typedef std::pair
< wns::ldk::CompoundPtr,
wns::simulator::Time
CompoundPtrWithTime
 Store each compound together with its expiration time.

Private Member Functions

bool isSortedBySN (const std::deque< CompoundPtrWithTime > q) const

Private Attributes

const
wns::service::dll::UnicastAddress 
adr
wns::ldk::CompoundPtr baREQ
bool baReqRequired
wns::simulator::Time maxDelay
size_t maxOnAir
BlockACKCommand::SequenceNumber nextSN
wns::simulator::Time oldestTimestamp
std::deque< CompoundPtrWithTimeonAirQueue
const BlockACKparent
wifimac::management::PERInformationBaseperMIB
std::auto_ptr
< wns::ldk::buffer::SizeCalculator > * 
sizeCalculator
std::deque< CompoundPtrWithTimetxQueue
bool waitForACK


Detailed Description

The transmission queue implements the storage and access functions of the BlockACK FU for outgoing compounds, most importantly the processOutgoing, has|getData and processIncomingACK functions. A transmission queue is only valid for a single receiver.

Two queues are inside the transmission queue: One for the compounds waiting to be transmitted (txQueue), and the other for compounds already transmitted, but not acknowledged (onAirQueue). The onAirQueue cannot exceed the maxOnAir limitation.

Definition at line 57 of file TransmissionQueue.hpp.


Member Typedef Documentation

Definition at line 63 of file TransmissionQueue.hpp.


Constructor & Destructor Documentation

TransmissionQueue::TransmissionQueue ( BlockACK parent_,
size_t  maxOnAir_,
wns::simulator::Time  maxDelay,
wns::service::dll::UnicastAddress  adr_,
BlockACKCommand::SequenceNumber  sn_,
wifimac::management::PERInformationBase perMIB_,
std::auto_ptr< wns::ldk::buffer::SizeCalculator > *  sizeCalculator 
)

Definition at line 35 of file TransmissionQueue.cpp.

TransmissionQueue::~TransmissionQueue (  ) 

Definition at line 71 of file TransmissionQueue.cpp.


Member Function Documentation

std::list< wns::ldk::CompoundPtr > TransmissionQueue::getAirableCompounds (  ) 

Definition at line 378 of file TransmissionQueue.cpp.

wns::ldk::CompoundPtr TransmissionQueue::getData (  ) 

Definition at line 175 of file TransmissionQueue.cpp.

const BlockACKCommand::SequenceNumber wifimac::draftn::TransmissionQueue::getNextSN (  )  const [inline]

Definition at line 131 of file TransmissionQueue.hpp.

const size_t wifimac::draftn::TransmissionQueue::getNumOnAirPDUs (  )  const [inline]

Definition at line 112 of file TransmissionQueue.hpp.

const size_t wifimac::draftn::TransmissionQueue::getNumWaitingPDUs (  )  const [inline]

Definition at line 115 of file TransmissionQueue.hpp.

wns::simulator::Time wifimac::draftn::TransmissionQueue::getOldestTimestamp (  )  [inline]

Definition at line 147 of file TransmissionQueue.hpp.

const wns::service::dll::UnicastAddress wifimac::draftn::TransmissionQueue::getReceiver (  )  [inline]

Definition at line 137 of file TransmissionQueue.hpp.

wns::ldk::CompoundPtr TransmissionQueue::getTxFront (  ) 

Definition at line 367 of file TransmissionQueue.cpp.

const wns::ldk::CompoundPtr TransmissionQueue::hasData (  )  const

The availability of the next compound is dependent on many factors:

  • If a BlockACK request was send, but not yet replied, no frames can be send (status waitForACK).
  • If the txQueue is not empty and the next compound fits into the maxOnAir limit, this one is available
  • If a BlockACK request is pending it will be send (also depending on the "impatient" setting of the BlockACK FU

Definition at line 131 of file TransmissionQueue.cpp.

bool TransmissionQueue::isSortedBySN ( const std::deque< CompoundPtrWithTime q  )  const [private]

Definition at line 334 of file TransmissionQueue.cpp.

const size_t wifimac::draftn::TransmissionQueue::maxAirSize (  )  [inline]

Definition at line 159 of file TransmissionQueue.hpp.

const unsigned int TransmissionQueue::onAirQueueSize (  )  const

Definition at line 79 of file TransmissionQueue.cpp.

void TransmissionQueue::processIncomingACK ( std::set< BlockACKCommand::SequenceNumber ackSNs  ) 

Two iterators are used to identify packet losses: One for the onAirQueue and the other on for the SNs in the received ACK. Frames are re-transmitted (by insertion at the head of the txQueue) until their lifetime is exceeded.

Definition at line 221 of file TransmissionQueue.cpp.

void TransmissionQueue::processOutgoing ( const wns::ldk::CompoundPtr compound  ) 

Definition at line 112 of file TransmissionQueue.cpp.

void wifimac::draftn::TransmissionQueue::setMaxDelay ( wns::simulator::Time  delay  )  [inline]

Definition at line 142 of file TransmissionQueue.hpp.

void wifimac::draftn::TransmissionQueue::setMaxOnAir ( size_t  maxAir  )  [inline]

Definition at line 164 of file TransmissionQueue.hpp.

const unsigned int TransmissionQueue::storageSize (  )  const

Definition at line 106 of file TransmissionQueue.cpp.

const unsigned int TransmissionQueue::txQueueSize (  )  const

Definition at line 92 of file TransmissionQueue.cpp.

const bool TransmissionQueue::waitsForACK (  )  const

Definition at line 361 of file TransmissionQueue.cpp.


Member Data Documentation

Definition at line 182 of file TransmissionQueue.hpp.

Definition at line 176 of file TransmissionQueue.hpp.

Definition at line 187 of file TransmissionQueue.hpp.

Definition at line 178 of file TransmissionQueue.hpp.

Definition at line 180 of file TransmissionQueue.hpp.

Definition at line 185 of file TransmissionQueue.hpp.

Definition at line 179 of file TransmissionQueue.hpp.

Definition at line 184 of file TransmissionQueue.hpp.

Definition at line 181 of file TransmissionQueue.hpp.

Definition at line 177 of file TransmissionQueue.hpp.

Definition at line 188 of file TransmissionQueue.hpp.

Definition at line 183 of file TransmissionQueue.hpp.

Definition at line 186 of file TransmissionQueue.hpp.


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

Generated on Sat May 26 03:32:41 2012 for openWNS by  doxygen 1.5.5