User Manual, Developers Guide and API Documentation

wifimac::lowerMAC::timing::Backoff Class Reference

IEEE 802.11 DCF style backoff, including post-backoff after transmissions. More...

#include <lowerMAC/timing/Backoff.hpp>

Inheritance diagram for wifimac::lowerMAC::timing::Backoff:

Inheritance graph
[legend]
Collaboration diagram for wifimac::lowerMAC::timing::Backoff:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Backoff (BackoffObserver *backoffObserver, const wns::pyconfig::View &config)
wns::simulator::Time finishedAt () const
int getCurrentCW () const
void onChannelBusy ()
 Indicates a channel state transition idle->busy.
void onChannelIdle ()
 Indicates a channel state transition busy->idle.
void onRxEnd ()
void onRxError ()
void onRxStart (wns::simulator::Time expRxTime)
void registerEOBObserver (BackoffObserver *observer)
 notifying observers every time the backoff has finished, wether or not a transmission is waiting
bool transmissionRequest (int transmissionCounter)
 Transmission request by the scheduler.
 ~Backoff ()

Protected Attributes

int counter

Private Member Functions

void channelBusyDelay ()
void onTimeout ()
 implementation of CanTimeout interface
void startNewBackoffCountdown (wns::simulator::Time ifsDuration)
void waitForTimer (const wns::simulator::Time &waitDuration)

Private Attributes

const wns::simulator::Time aifsDuration
wns::simulator::Time aifsStart
bool backoffFinished
BackoffObserverbackoffObserver
bool channelIsBusy
int cw
const int cwMax
const int cwMin
bool duringAIFS
const wns::simulator::Time eifsDuration
std::vector< BackoffObserver * > eobObserver
wns::logger::Logger logger
bool rxError
const wns::simulator::Time slotDuration
bool transmissionWaiting
wns::distribution::Uniform uniform


Detailed Description

Essentially, the backoff in IEEE is very simple: Assure that between every channel busy->idle transition and the node's transmission a backoff is counted to zero.

Definition at line 61 of file Backoff.hpp.


Constructor & Destructor Documentation

Backoff::Backoff ( BackoffObserver backoffObserver,
const wns::pyconfig::View config 
)

Definition at line 36 of file Backoff.cpp.

Backoff::~Backoff (  ) 

Definition at line 62 of file Backoff.cpp.


Member Function Documentation

void Backoff::channelBusyDelay (  )  [private]

Definition at line 239 of file Backoff.cpp.

wns::simulator::Time Backoff::finishedAt (  )  const

time the backoff will be finished at (when called during AIFS the maximum waiting time will be used) wns::simulator::Time() if backoff hasn't started, current time when finished and idle

Definition at line 66 of file Backoff.cpp.

int wifimac::lowerMAC::timing::Backoff::getCurrentCW (  )  const [inline]

Definition at line 93 of file Backoff.hpp.

void Backoff::onChannelBusy (  )  [virtual]

Implements wifimac::convergence::IChannelState.

Definition at line 230 of file Backoff.cpp.

void Backoff::onChannelIdle (  )  [virtual]

Implements wifimac::convergence::IChannelState.

Definition at line 212 of file Backoff.cpp.

void Backoff::onRxEnd (  )  [virtual]

Implements wifimac::convergence::IRxStartEnd.

Definition at line 257 of file Backoff.cpp.

void Backoff::onRxError (  )  [virtual]

Implements wifimac::convergence::IRxStartEnd.

Definition at line 263 of file Backoff.cpp.

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

Implements wifimac::convergence::IRxStartEnd.

Definition at line 251 of file Backoff.cpp.

void Backoff::onTimeout (  )  [private, virtual]

Implements wns::events::CanTimeout.

Definition at line 112 of file Backoff.cpp.

void Backoff::registerEOBObserver ( BackoffObserver observer  ) 

Definition at line 275 of file Backoff.cpp.

void Backoff::startNewBackoffCountdown ( wns::simulator::Time  ifsDuration  )  [private]

Definition at line 99 of file Backoff.cpp.

bool Backoff::transmissionRequest ( int  transmissionCounter  ) 

Definition at line 179 of file Backoff.cpp.

void wifimac::lowerMAC::timing::Backoff::waitForTimer ( const wns::simulator::Time waitDuration  )  [private]


Member Data Documentation

Definition at line 121 of file Backoff.hpp.

Definition at line 134 of file Backoff.hpp.

Definition at line 124 of file Backoff.hpp.

Definition at line 117 of file Backoff.hpp.

Definition at line 135 of file Backoff.hpp.

Definition at line 140 of file Backoff.hpp.

Definition at line 131 of file Backoff.hpp.

Definition at line 130 of file Backoff.hpp.

Definition at line 129 of file Backoff.hpp.

Definition at line 126 of file Backoff.hpp.

Definition at line 122 of file Backoff.hpp.

Definition at line 118 of file Backoff.hpp.

Definition at line 133 of file Backoff.hpp.

Definition at line 127 of file Backoff.hpp.

Definition at line 120 of file Backoff.hpp.

Definition at line 125 of file Backoff.hpp.

Definition at line 132 of file Backoff.hpp.


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

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