User Manual, Developers Guide and API Documentation

wifimac::management::Beacon Class Reference

Beacon transmission and reception. More...

#include <management/Beacon.hpp>

Inheritance diagram for wifimac::management::Beacon:

Inheritance graph
[legend]
Collaboration diagram for wifimac::management::Beacon:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Beacon (wns::ldk::fun::FUN *fun, const wns::pyconfig::View &config)
wns::ldk::CompoundPtr getSomethingToSend ()
 Return the PDU that is ready to be sent.
bool hasCapacity () const
 Return true, if the FunctionalUnit is still accepting compounds.
const wns::ldk::CompoundPtr hasSomethingToSend () const
 Return a PDU that is ready to be sent or NULL, if none available.
void processIncoming (const wns::ldk::CompoundPtr &compound)
 Delayed interface realization.
void processOutgoing (const wns::ldk::CompoundPtr &compound)
 Process compounds on downlink.
virtual ~Beacon ()

Private Types

typedef std::map
< wns::service::dll::UnicastAddress,
double
adr2frequencyMap
typedef std::map< wns::Power,
wns::service::dll::UnicastAddress
power2adrMap
 Remember the reception strength of received beacons.

Private Member Functions

void calculateSizes (const wns::ldk::CommandPool *commandPool, Bit &commandPoolSize, Bit &dataSize) const
 SDU and PCI size calculation for beacons.
virtual void onFUNCreated ()
 FunctionalUnit / CompoundHandlerInterface.
virtual void onTimeout ()
 CanTimeout realisation, performs the association to the beacon with the highest RSS.
virtual void periodically ()
 PeriodicTimeout realisation, initiating a beacon transmission.

Private Attributes

const wifimac::convergence::PhyMode beaconPhyMode
power2adrMap beaconRxStrength
adr2frequencyMap bssFrequencies
const std::string bssId
 APs transmit beacons to bssId, STAs only associate to APs with 'their' bssId.
wns::pyconfig::View config
wns::ldk::CompoundPtr currentBeacon
wns::pyconfig::Sequence::iterator
< double
freqIter
struct
wifimac::management::Beacon::Friends 
friends
wns::logger::Logger logger
const std::string phyUserCommandName
wns::simulator::Time scanDuration
 How long shall a STA scan for beacons before it associates to one?
wns::pyconfig::Sequence scanFrequencies

Classes

struct  Friends


Detailed Description

The periodical beacon transmission and reception is required for several functions

Definition at line 70 of file Beacon.hpp.


Member Typedef Documentation

Definition at line 146 of file Beacon.hpp.

Definition at line 144 of file Beacon.hpp.


Constructor & Destructor Documentation

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

Definition at line 44 of file Beacon.cpp.

Beacon::~Beacon (  )  [virtual]

Definition at line 60 of file Beacon.cpp.


Member Function Documentation

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

Implements wns::ldk::CommandTypeSpecifierInterface.

Definition at line 219 of file Beacon.cpp.

wns::ldk::CompoundPtr Beacon::getSomethingToSend (  )  [virtual]

This method must never return NULL. This method will only be called after a call to hasSomethingToSend returned a non-null value. The FunctionalUnit must return the same PDU as returned by hasSomethingToSend.

Implements wns::ldk::DelayedInterface.

Definition at line 152 of file Beacon.cpp.

bool Beacon::hasCapacity (  )  const [virtual]

While hasCapacity returns false, processIncoming will never be called.

Implements wns::ldk::DelayedInterface.

Definition at line 142 of file Beacon.cpp.

const wns::ldk::CompoundPtr Beacon::hasSomethingToSend (  )  const [virtual]

Implements wns::ldk::DelayedInterface.

Definition at line 147 of file Beacon.cpp.

void Beacon::onFUNCreated (  )  [private, virtual]

Reimplemented from wns::ldk::FunctionalUnit.

Definition at line 66 of file Beacon.cpp.

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

Note: Only used by STAs

Implements wns::events::CanTimeout.

Definition at line 170 of file Beacon.cpp.

void Beacon::periodically (  )  [private, virtual]

Note: Not used by STAs

Implements wns::events::PeriodicTimeout.

Definition at line 160 of file Beacon.cpp.

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

Implements wns::ldk::DelayedInterface.

Definition at line 95 of file Beacon.cpp.

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

Override this method to handle outgoing compounds.

Implements wns::ldk::DelayedInterface.

Definition at line 137 of file Beacon.cpp.


Member Data Documentation

Definition at line 132 of file Beacon.hpp.

Definition at line 145 of file Beacon.hpp.

Definition at line 147 of file Beacon.hpp.

const std::string wifimac::management::Beacon::bssId [private]

Definition at line 139 of file Beacon.hpp.

Definition at line 118 of file Beacon.hpp.

Definition at line 121 of file Beacon.hpp.

Definition at line 130 of file Beacon.hpp.

Definition at line 119 of file Beacon.hpp.

Definition at line 123 of file Beacon.hpp.

Definition at line 128 of file Beacon.hpp.

Definition at line 129 of file Beacon.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