User Manual, Developers Guide and API Documentation

wifimac::draftn::BlockACK Class Reference

Block ACK according to IEEE 802.11n Draft 8.0 / IEEE 802.11-2007. More...

#include <draftn/BlockACK.hpp>

Inheritance diagram for wifimac::draftn::BlockACK:

Inheritance graph
[legend]
Collaboration diagram for wifimac::draftn::BlockACK:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 BlockACK (const BlockACK &other)
 Copy Constructor, required when std::auto_ptr is used.
 BlockACK (wns::ldk::fun::FUN *fun, const wns::pyconfig::View &config)
 Regular FU Constructor.
virtual void calculateSizes (const wns::ldk::CommandPool *commandPool, Bit &commandPoolSize, Bit &dataSize) const
 SDU and PCI size calculation.
virtual void copyTransmissionCounter (const wns::ldk::CompoundPtr &src, const wns::ldk::CompoundPtr &dst)
 Copy the tx counter to anther FU.
virtual bool doIsAccepting (const wns::ldk::CompoundPtr &compound) const
virtual wns::ldk::CompoundPtr getACK ()
 Returns the pending BlockACK reply.
virtual wns::ldk::CompoundPtr getData ()
 Returns the currently pending compound.
wifimac::lowerMAC::ManagergetManager () const
 Returns the pointer to the wifimac::lowerMAC::Manager FU.
const size_t getMaxOnAir ()
wifimac::management::PERInformationBasegetPERMIB ()
virtual unsigned int getTransmissionCounter (const wns::ldk::CompoundPtr &compound) const
 Read the tx counter.
virtual const wns::ldk::CompoundPtr hasACK () const
 Queries the rxQueue for which a BlockACK request has been received for the BlockACK reply.
virtual bool hasCapacity () const
 Sets the conditions to accept a new compound to transmit.
virtual const wns::ldk::CompoundPtr hasData () const
 Checks if the current txQueue has pending compounds.
virtual void onFUNCreated ()
 Initialization.
virtual void onRxEnd ()
 Observe rxEnd to signal the upcoming ACK reception.
virtual void onRxError ()
 Does nothing, required by IRxStartEnd interface.
virtual void onRxStart (wns::simulator::Time expRxTime)
 Observe rxStart to stop the timeout for ACK reception.
virtual void onTimeout ()
 CanTimeout interface realization, required for missing ACKs.
virtual void onTransmissionHasFailed (const wns::ldk::CompoundPtr &compound)
 Signal from RTS/CTS that the transmission has failed.
virtual void onTxEnd (const wns::ldk::CompoundPtr &compound)
 Signals end of own transmission -> set timeout for ACK.
virtual void onTxStart (const wns::ldk::CompoundPtr &compound)
 Signals start of transmission.
virtual void processIncoming (const wns::ldk::CompoundPtr &compound)
 Processing of incoming (received) compounds.
virtual void processOutgoing (const wns::ldk::CompoundPtr &compound)
 Processing of outgoing (to be transmitted) compounds.
virtual void registerObserver (IBlockACKObserver *o)
 observers get called after an (un)successful transmission
virtual ~BlockACK ()
 Destructor.

Protected Types

enum  BAState { idle, waitForACK, receiving, receptionFinished }
 BlockACK state can be * idle: No ongoing transmission * waitForACK: Compound is send, waiting for beginning of reception of ACK * receiving: Reception has started, not sure if it is the (Block)ACK * receptionFinished: Got RxEndIndication and waiting for PHY to deliver the frame. More...

Protected Member Functions

virtual void processIncomingACKSNs (std::set< BlockACKCommand::SequenceNumber > ackSNs)
 Manages an incoming ACK (or rather the set of SNs).
virtual unsigned int storageSize () const
 Compute storage size (txQueue + sum(rxQueues).

Protected Attributes

enum
wifimac::draftn::BlockACK::BAState 
baState
const Bit capacity
 Maximum number of stored bits (rx+tx+air).
TransmissionQueuecurrentTxQueue
 Storage of outgoing, non-ack'ed frames.
wns::logger::Logger logger
 Logger.
const size_t maxOnAir
 Window size of a link.
std::auto_ptr
< wns::ldk::buffer::SizeCalculator
sizeCalculator
 calculation of size (e.g. by bits or pdus)

Private Types

typedef
wns::container::Registry
< wns::service::dll::UnicastAddress,
BlockACKCommand::SequenceNumber
AddrSNMap

Private Member Functions

bool isAccepting (const wns::ldk::CompoundPtr &compound) const
void printTxQueueStatus () const
 Debug helper function.

Private Attributes

const wns::simulator::Time ackTimeout
 Duration between start of preamble and rx indication.
const Bit baBits
 size of BlockACK
const Bit baReqBits
 size of BlockACKReques
const wifimac::convergence::PhyMode blockACKPhyMode
struct
wifimac::draftn::BlockACK::Friends 
friends
wns::service::dll::UnicastAddress hasACKfor
 indication that ACK must be transmitted
const bool impatientBAreqTransmission
 transmit as BAreq as early as possible without reaching maxOnAir
const std::string managerName
const wns::simulator::Time maximumACKDuration
 Maximum expected duration of BlockACK.
const size_t maximumTransmissions
 maximum number of transmissions before drop
AddrSNMap nextTransmissionSN
wns::probe::bus::ContextCollectorPtr numTxAttemptsProbe
std::vector< IBlockACKObserver * > observers
wifimac::management::PERInformationBaseperMIB
const std::string perMIBServiceName
wns::container::Registry
< wns::service::dll::UnicastAddress,
ReceptionQueue * > 
rxQueues
 Storage of incoming, non-ordered frames.
const std::string rxStartEndName
const std::string sendBufferName
const wns::simulator::Time sifsDuration
 Duration of the Short InterFrame Space.
const std::string txStartEndName

Friends

class ReceptionQueue
class TransmissionQueue

Classes

struct  Friends


Detailed Description

This FU implements the block acknowledgement with direct BlockACK as described int IEEE 802.11-2007 and refined in IEEE 802.11n Draft 8.0. The Block ACK message sequence chart for an error-free channel is the following (assuming maxOnAir is given in number of frames):
inline_mscgraph_3

Thus, the block ack decreases the overhead of IEEE 802.11 by reducing the multiple neccessary ACKs for each frame to one block ack request / reply for each maxOnAir frames. Furthermore, the BlockACK can be easily combined with a frame aggregation FU to further improve the efficiency, reducing the number of backoff attempts.

The BlockACK FU implementation follows the design of ARQs in the ldk by deriving from wns::ldk::arq::ARQ, but enhances it with the neccessary functionality for IEEE 802.11-style (i.e. immediate) ARQ, based on wifimac::convergence::ITxStartEnd and wifimac::convergence::IRxStartEnd. This is similar to the much simpler wifimac::lowerMAC::StopAndWaitARQ.

To handle outgoing and incoming compounds, the BlockACK uses the two classes wifimac::draftN::TransmissionQueue and wifimac::draftN::ReceptionQueue:

A BlockACK FU can be set to patient or impatient:

Definition at line 113 of file BlockACK.hpp.


Member Typedef Documentation

Definition at line 126 of file BlockACK.hpp.


Member Enumeration Documentation

Enumerator:
idle 
waitForACK 
receiving 
receptionFinished 

Definition at line 319 of file BlockACK.hpp.


Constructor & Destructor Documentation

BlockACK::BlockACK ( wns::ldk::fun::FUN fun,
const wns::pyconfig::View config 
)

Definition at line 48 of file BlockACK.cpp.

BlockACK::BlockACK ( const BlockACK other  ) 

Definition at line 93 of file BlockACK.cpp.

BlockACK::~BlockACK (  )  [virtual]

Definition at line 125 of file BlockACK.cpp.


Member Function Documentation

void BlockACK::calculateSizes ( const wns::ldk::CommandPool commandPool,
Bit commandPoolSize,
Bit dataSize 
) const [virtual]

Implements wns::ldk::CommandTypeSpecifierInterface.

Definition at line 484 of file BlockACK.cpp.

void BlockACK::copyTransmissionCounter ( const wns::ldk::CompoundPtr src,
const wns::ldk::CompoundPtr dst 
) [virtual]

Implements wifimac::lowerMAC::ITransmissionCounter.

Definition at line 529 of file BlockACK.cpp.

bool BlockACK::doIsAccepting ( const wns::ldk::CompoundPtr  )  const [virtual]

Part of CompoundHandlerInterface implementation.

Reimplemented from wns::ldk::Delayed< USER >.

Definition at line 177 of file BlockACK.cpp.

wns::ldk::CompoundPtr BlockACK::getACK (  )  [virtual]

Implements wns::ldk::arq::ARQ.

Definition at line 331 of file BlockACK.cpp.

wns::ldk::CompoundPtr BlockACK::getData (  )  [virtual]

Implements wns::ldk::arq::ARQ.

Definition at line 362 of file BlockACK.cpp.

wifimac::lowerMAC::Manager* wifimac::draftn::BlockACK::getManager (  )  const [inline]

Definition at line 269 of file BlockACK.hpp.

const size_t wifimac::draftn::BlockACK::getMaxOnAir (  )  [inline]

Definition at line 278 of file BlockACK.hpp.

wifimac::management::PERInformationBase* wifimac::draftn::BlockACK::getPERMIB (  )  [inline]

Definition at line 284 of file BlockACK.hpp.

unsigned int BlockACK::getTransmissionCounter ( const wns::ldk::CompoundPtr compound  )  const [virtual]

Implements wifimac::lowerMAC::ITransmissionCounter.

Definition at line 516 of file BlockACK.cpp.

const wns::ldk::CompoundPtr BlockACK::hasACK (  )  const [virtual]

Implements wns::ldk::arq::ARQ.

Definition at line 318 of file BlockACK.cpp.

bool BlockACK::hasCapacity (  )  const [virtual]

These conditions are #- The storage capacity of the FU (size txQueue + sizes rxQueues) is not exhausted. #- The last compound accepted has the same receiver as the current transmission queue #- The transmission queue does not wait for an ACK, i.e. there are no frames on the air. #- The number of frames in the txQueue is below the number which can be send in the next round.

Implements wns::ldk::DelayedInterface.

Definition at line 186 of file BlockACK.cpp.

const wns::ldk::CompoundPtr BlockACK::hasData (  )  const [virtual]

Implements wns::ldk::arq::ARQ.

Definition at line 339 of file BlockACK.cpp.

bool wifimac::draftn::BlockACK::isAccepting ( const wns::ldk::CompoundPtr compound  )  const [private]

void BlockACK::onFUNCreated (  )  [virtual]

Reimplemented from wns::ldk::FunctionalUnit.

Definition at line 136 of file BlockACK.cpp.

void BlockACK::onRxEnd (  )  [virtual]

Implements wifimac::convergence::IRxStartEnd.

Definition at line 455 of file BlockACK.cpp.

void BlockACK::onRxError (  )  [virtual]

Implements wifimac::convergence::IRxStartEnd.

Definition at line 469 of file BlockACK.cpp.

void BlockACK::onRxStart ( wns::simulator::Time  expRxTime  )  [virtual]

Implements wifimac::convergence::IRxStartEnd.

Definition at line 444 of file BlockACK.cpp.

void BlockACK::onTimeout (  )  [virtual]

Implements wns::events::CanTimeout.

Definition at line 399 of file BlockACK.cpp.

void BlockACK::onTransmissionHasFailed ( const wns::ldk::CompoundPtr compound  )  [virtual]

A failed CTS is handled in the same way as a missing ACK or a BlockACK reply with an empty SN-set

Implements wifimac::lowerMAC::ITransmissionCounter.

Definition at line 423 of file BlockACK.cpp.

void BlockACK::onTxEnd ( const wns::ldk::CompoundPtr compound  )  [virtual]

Implements wifimac::convergence::ITxStartEnd.

Definition at line 380 of file BlockACK.cpp.

void BlockACK::onTxStart ( const wns::ldk::CompoundPtr compound  )  [virtual]

Implements wifimac::convergence::ITxStartEnd.

Definition at line 374 of file BlockACK.cpp.

void BlockACK::printTxQueueStatus (  )  const [private]

Definition at line 503 of file BlockACK.cpp.

void BlockACK::processIncoming ( const wns::ldk::CompoundPtr compound  )  [virtual]

Depending on the compound type and its transmitter, the correct function is applied:

  • processIncomingACKSNs in case of a received ACK
  • processIncomingACKreq of the matching rxQueue in case of ACKreq
  • processIncomingData of the matching rxQueue otherwise

Implements wns::ldk::DelayedInterface.

Definition at line 237 of file BlockACK.cpp.

void BlockACK::processIncomingACKSNs ( std::set< BlockACKCommand::SequenceNumber ackSNs  )  [protected, virtual]

After the forwarding of the set of SNs to the current txQueue with processIncomingACK(), the function checks if the txQueue has finished processing the current row of frames. If yes, it is deleted and the current receiver is reset, so that a new round of transmissions can start (possible with the one compound for a different receiver that has been stored temporarily)

Definition at line 286 of file BlockACK.cpp.

void BlockACK::processOutgoing ( const wns::ldk::CompoundPtr compound  )  [virtual]

The BlockACK FU owns only one transmission queue which is operated on until all compounds are either successfully transmitted or discarded. Hence, if a compound for a different receiving peer node arrives, it is temporary stored until the current txQueue has finished operation.

As speciallity, the function tries to get as much frames as possible from the upper FU before starting the transmission using a getReceptor()->wakeup() recursion.

Implements wns::ldk::DelayedInterface.

Definition at line 196 of file BlockACK.cpp.

virtual void wifimac::draftn::BlockACK::registerObserver ( IBlockACKObserver o  )  [inline, virtual]

Definition at line 145 of file BlockACK.hpp.

unsigned int BlockACK::storageSize (  )  const [protected, virtual]

Definition at line 156 of file BlockACK.cpp.


Friends And Related Function Documentation

friend class ReceptionQueue [friend]

Definition at line 124 of file BlockACK.hpp.

friend class TransmissionQueue [friend]

Definition at line 123 of file BlockACK.hpp.


Member Data Documentation

Definition at line 360 of file BlockACK.hpp.

Definition at line 363 of file BlockACK.hpp.

Definition at line 365 of file BlockACK.hpp.

Definition at line 353 of file BlockACK.hpp.

Definition at line 301 of file BlockACK.hpp.

Definition at line 294 of file BlockACK.hpp.

Definition at line 377 of file BlockACK.hpp.

Definition at line 371 of file BlockACK.hpp.

Definition at line 291 of file BlockACK.hpp.

const std::string wifimac::draftn::BlockACK::managerName [private]

Definition at line 347 of file BlockACK.hpp.

Definition at line 358 of file BlockACK.hpp.

Definition at line 368 of file BlockACK.hpp.

const size_t wifimac::draftn::BlockACK::maxOnAir [protected]

Definition at line 307 of file BlockACK.hpp.

mapping from unicast addresses to compound transmission SNs for each link (receiver), the first SN of the next transmission round is stored

Definition at line 382 of file BlockACK.hpp.

probing the number of tx attempts until successfull transmission or retry abort

Definition at line 398 of file BlockACK.hpp.

Definition at line 400 of file BlockACK.hpp.

Signalling successfull/failed transmission attempts to the management information base

Definition at line 394 of file BlockACK.hpp.

const std::string wifimac::draftn::BlockACK::perMIBServiceName [private]

Definition at line 351 of file BlockACK.hpp.

Definition at line 374 of file BlockACK.hpp.

const std::string wifimac::draftn::BlockACK::rxStartEndName [private]

Definition at line 348 of file BlockACK.hpp.

const std::string wifimac::draftn::BlockACK::sendBufferName [private]

Definition at line 350 of file BlockACK.hpp.

Definition at line 356 of file BlockACK.hpp.

Definition at line 304 of file BlockACK.hpp.

const std::string wifimac::draftn::BlockACK::txStartEndName [private]

Definition at line 349 of file BlockACK.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