User Manual, Developers Guide and API Documentation

wifimac::draftn::ReceptionQueue Class Reference

Queue that stores received compounds that cannot be delivered (yet). More...

#include <draftn/ReceptionQueue.hpp>

Collaboration diagram for wifimac::draftn::ReceptionQueue:

Collaboration graph
[legend]

List of all members.

Public Member Functions

wns::ldk::CompoundPtr getACK ()
 Returns the pending Block ACK.
const wns::ldk::CompoundPtr hasACK () const
 Indicates that an Block ACK reply is pending.
const size_t numPDUs () const
void processIncomingACKreq (const wns::ldk::CompoundPtr &compound)
 Process the incoming BlockACK request and create the BlockACK reply.
void processIncomingData (const wns::ldk::CompoundPtr &compound, const unsigned int size)
 Processes the incoming compound and delivers it if it is in-order.
 ReceptionQueue (BlockACK *parent_, BlockACKCommand::SequenceNumber firstSN_, wns::service::dll::UnicastAddress adr_)
const unsigned int storageSize () const
 ~ReceptionQueue ()

Private Types

typedef std::pair
< wns::ldk::CompoundPtr,
unsigned int
CompoundPtrWithSize
 Store each compound together with its computed size.

Private Member Functions

void purgeRxStorage ()

Private Attributes

const
wns::service::dll::UnicastAddress 
adr
wns::ldk::CompoundPtr blockACK
const BlockACKparent
std::set
< BlockACKCommand::SequenceNumber
rxSNs
std::map
< BlockACKCommand::SequenceNumber,
CompoundPtrWithSize
rxStorage
BlockACKCommand::SequenceNumber waitingForSN


Detailed Description

The reception queue implements, for each transmitter, the handling of received compounds. Compounds stored due to out-of-order delivery in case of packet errors, until they can be delivered in order or until the transceiver signals that the missing frames are discarded.

Hence, the reception queue implements the receiver functions of the BlockACK FU: processIncoming[Data|ACK] and [has|get]ACK

Definition at line 56 of file ReceptionQueue.hpp.


Member Typedef Documentation

Definition at line 61 of file ReceptionQueue.hpp.


Constructor & Destructor Documentation

ReceptionQueue::ReceptionQueue ( BlockACK parent_,
BlockACKCommand::SequenceNumber  firstSN_,
wns::service::dll::UnicastAddress  adr_ 
)

Definition at line 34 of file ReceptionQueue.cpp.

wifimac::draftn::ReceptionQueue::~ReceptionQueue (  ) 


Member Function Documentation

wns::ldk::CompoundPtr ReceptionQueue::getACK (  ) 

Definition at line 219 of file ReceptionQueue.cpp.

const wns::ldk::CompoundPtr ReceptionQueue::hasACK (  )  const

Definition at line 213 of file ReceptionQueue.cpp.

const size_t wifimac::draftn::ReceptionQueue::numPDUs (  )  const [inline]

Definition at line 105 of file ReceptionQueue.hpp.

void ReceptionQueue::processIncomingACKreq ( const wns::ldk::CompoundPtr compound  ) 

The BlockACK request contains a SN which indicates the start of the SNs that need to be ack'ed. If compounds are discarded by the transmitter (due to lifetime), this SN is higher than the current waitingSN, and pending frames in the rxQueue can be delivered.

Of course, as a reply the Block ACK reply is created, containing a set of successfully received compound SNs.

Definition at line 136 of file ReceptionQueue.cpp.

void ReceptionQueue::processIncomingData ( const wns::ldk::CompoundPtr compound,
const unsigned int  size 
)

If the compound's SN matches the current waiting SN, the compound is delivered. Otherwise, either the compound was already received before (SN < waitingSN) or intermediate compounds are missing and the compound has to be stored until they are received successfully (SN > waitingSN). In both cases, the SN is added to the set of received SNs for the next BlockACK reply.

Definition at line 60 of file ReceptionQueue.cpp.

void ReceptionQueue::purgeRxStorage (  )  [private]

Definition at line 112 of file ReceptionQueue.cpp.

const unsigned int ReceptionQueue::storageSize (  )  const

Definition at line 46 of file ReceptionQueue.cpp.


Member Data Documentation

Definition at line 113 of file ReceptionQueue.hpp.

Definition at line 117 of file ReceptionQueue.hpp.

Definition at line 112 of file ReceptionQueue.hpp.

Definition at line 116 of file ReceptionQueue.hpp.

Definition at line 115 of file ReceptionQueue.hpp.

Definition at line 114 of file ReceptionQueue.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