User Manual, Developers Guide and API Documentation

wifimac::pathselection::VirtualPathSelection Class Reference

The Virtual Path Selection implements a perfect path selection protocol without overhead. More...

#include <pathselection/VirtualPathSelection.hpp>

Inheritance diagram for wifimac::pathselection::VirtualPathSelection:

Inheritance graph
[legend]
Collaboration diagram for wifimac::pathselection::VirtualPathSelection:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void closePeerLink (const wns::service::dll::UnicastAddress myself, const wns::service::dll::UnicastAddress peer)
 Closes an existing link.
virtual void createPeerLink (const wns::service::dll::UnicastAddress myself, const wns::service::dll::UnicastAddress peer, const Metric linkMetric=Metric(1))
 Initializes a new link with cost linkMetric between the addresses myself and peer.
virtual void deRegisterProxy (const wns::service::dll::UnicastAddress proxy, const wns::service::dll::UnicastAddress client)
 Removes the proxy from the clients to proxy mapping.
virtual void doStartup ()
 Startup routine of virtual node, does nothing.
virtual
wns::service::dll::UnicastAddress 
getNextHop (const wns::service::dll::UnicastAddress current, const wns::service::dll::UnicastAddress finalDestination)
 Returns the next hop from current to finalDestination.
virtual
wns::service::dll::UnicastAddress 
getPortalFor (const wns::service::dll::UnicastAddress clientAddress)
 Returns the Portal for a address.
virtual
wns::service::dll::UnicastAddress 
getProxyFor (const wns::service::dll::UnicastAddress clientAddress)
 Returns the proxy of a address.
virtual bool isMeshPoint (const wns::service::dll::UnicastAddress address) const
 Returns if address is inside the list of known MPs.
virtual bool isPortal (const wns::service::dll::UnicastAddress address) const
 Returns if address is inside the list of known Portals.
virtual void onNodeCreated ()
 Find partner components within your node as given by the configuration.
virtual void onShutdown ()
 Called when the simulator is shutdown. Does nothing.
virtual void onWorldCreated ()
 Find peer components in other nodes.
void registerMP (const wns::service::dll::UnicastAddress mpAddress)
 Register an address as a Mesh Point.
void registerPortal (const wns::service::dll::UnicastAddress portalAddress, dll::APUpperConvergence *apUC)
 Register a Portal.
virtual void registerProxy (const wns::service::dll::UnicastAddress proxy, const wns::service::dll::UnicastAddress client)
 Registers a proxy for a client address.
virtual void updatePeerLink (const wns::service::dll::UnicastAddress myself, const wns::service::dll::UnicastAddress peer, const Metric linkMetric=Metric(1))
 Updates the cost of an already existing link.
 VirtualPathSelection (wns::node::Interface *_node, const wns::pyconfig::View &_config)
 Constructor of virtual node.
virtual ~VirtualPathSelection ()
 Destructor, does nothing.

Private Types

typedef std::list< intaddressList
 List of addressed.
typedef std::map< int, intaddressMap
 Map one id to another.
typedef wns::container::Matrix
< int, 2 > 
addressMatrix
 2-dim Matrix of ids
typedef std::map< int,
dll::APUpperConvergence * > 
adr2ucMap
 Map an id to a dll::APUpperConvergence, required by the RANG.
typedef wns::container::Matrix
< Metric, 2 > 
metricMatrix
 2-dim Matrix of path/link costs

Private Member Functions

void onNewPathSelectionEntry ()
 (re)compute the path/cost matrix
void printPathSelectionLine (const wns::service::dll::UnicastAddress source) const
 Helper routine for printPathSelectionTable().
void printPathSelectionTable () const
 Output the pathselection table for debug info.
void printPortalInformation (const wns::service::dll::UnicastAddress portal) const
 Helper routine for printPathSelectionTable().
void printProxyInformation (const wns::service::dll::UnicastAddress proxy) const
 Helper routine for printPathSelectionTable().

Private Attributes

addressMap clients2portals
 Maps client ids to portals.
addressMap clients2proxies
 Maps client ids to proxies.
metricMatrix linkCosts
 NxN Matrix of link costs.
wns::logger::Logger logger
 the logger
AddressStorage mapper
 Mapping of wns::service::dll::UnicastAddress to (internal) ids.
addressList mps
 Stores all known MPs.
const int numNodes
 Maximum number of nodes, important for the creating of all matrices.
metricMatrix pathCosts
 NxN Matrix of path cost.
bool pathMatrixIsConsistent
 Lazy computation of the path selection matrices.
addressMatrix paths
 Next hop matrix of the optimal path.
adr2ucMap portals
 Maps the address to the upper convergence entry of a portal.
double preKnowledgeAlpha
 Weight parameter of the given link costs.
metricMatrix preKnowledgeCosts
 Matrix of given (configured) link costs which allow (partial) overriding of measured link costs.
wns::simulator::Time staticPSsnapshotTimeout
 time from which on changes to mesh topology or link costs will be ignored
bool useStaticPS
 set True in order to keep network topology fixed

Classes

class  AddressStorage
 AddresStorage provides a mapping from wns::service::dll::UnicastAddress to a (internal) id. More...


Detailed Description

The VirtualPathSelection allows for a path-selection which is based on global information, i.e. a theoretical, simulator-only blackboard with r/w access for all nodes. Hence, all control messages of the path-selection protocol are performed without any transmission costs and delays. This simulates a perfect path-selection whose performance depends on the (imperfect) link quality measurement only. Therfore, it can be used to

Definition at line 66 of file VirtualPathSelection.hpp.


Member Typedef Documentation

Definition at line 347 of file VirtualPathSelection.hpp.

Definition at line 339 of file VirtualPathSelection.hpp.

Definition at line 331 of file VirtualPathSelection.hpp.

Definition at line 343 of file VirtualPathSelection.hpp.

Definition at line 335 of file VirtualPathSelection.hpp.


Constructor & Destructor Documentation

VirtualPathSelection::VirtualPathSelection ( wns::node::Interface _node,
const wns::pyconfig::View _config 
)

Definition at line 68 of file VirtualPathSelection.cpp.

virtual wifimac::pathselection::VirtualPathSelection::~VirtualPathSelection (  )  [inline, virtual]

Definition at line 159 of file VirtualPathSelection.hpp.


Member Function Documentation

void VirtualPathSelection::closePeerLink ( const wns::service::dll::UnicastAddress  myself,
const wns::service::dll::UnicastAddress  peer 
) [virtual]

Implements wifimac::pathselection::IPathSelection.

Definition at line 531 of file VirtualPathSelection.cpp.

void VirtualPathSelection::createPeerLink ( const wns::service::dll::UnicastAddress  myself,
const wns::service::dll::UnicastAddress  peer,
const Metric  linkMetric = Metric(1) 
) [virtual]

Implements wifimac::pathselection::IPathSelection.

Definition at line 430 of file VirtualPathSelection.cpp.

void VirtualPathSelection::deRegisterProxy ( const wns::service::dll::UnicastAddress  proxy,
const wns::service::dll::UnicastAddress  client 
) [virtual]

Implements wifimac::pathselection::IPathSelection.

Definition at line 399 of file VirtualPathSelection.cpp.

virtual void wifimac::pathselection::VirtualPathSelection::doStartup (  )  [inline, virtual]

Implements wns::node::component::Interface.

Definition at line 153 of file VirtualPathSelection.hpp.

wns::service::dll::UnicastAddress VirtualPathSelection::getNextHop ( const wns::service::dll::UnicastAddress  current,
const wns::service::dll::UnicastAddress  finalDestination 
) [virtual]

getNextHop is the most important function in the path selection interface. In a first (optional) step, the finalDestination is exchanged by its mesh proxy, which is a Portal or a MP. Then, the forwarding matrix, as calculated by onNewPathSelectionEntry(), is asked for the next hop to this proxy.

Implements wifimac::pathselection::IPathSelection.

Definition at line 178 of file VirtualPathSelection.cpp.

wns::service::dll::UnicastAddress VirtualPathSelection::getPortalFor ( const wns::service::dll::UnicastAddress  clientAddress  )  [virtual]

Any node in the mesh has exactly one portal, the gateway to the Internet. All data addressed to the Internet is send to this portal.

Implements wifimac::pathselection::IPathSelection.

Definition at line 269 of file VirtualPathSelection.cpp.

wns::service::dll::UnicastAddress VirtualPathSelection::getProxyFor ( const wns::service::dll::UnicastAddress  clientAddress  )  [virtual]

Every STA in a mesh network, has a proxy which is responsible for the forwarding of packets to/from this STA. The Proxy acts instead of the STA, which is not able to participate in the mesh; hence, the proxy must be a known MP.

Implements wifimac::pathselection::IPathSelection.

Definition at line 305 of file VirtualPathSelection.cpp.

bool VirtualPathSelection::isMeshPoint ( const wns::service::dll::UnicastAddress  address  )  const [virtual]

Implements wifimac::pathselection::IPathSelection.

Definition at line 223 of file VirtualPathSelection.cpp.

bool VirtualPathSelection::isPortal ( const wns::service::dll::UnicastAddress  address  )  const [virtual]

Implements wifimac::pathselection::IPathSelection.

Definition at line 246 of file VirtualPathSelection.cpp.

void VirtualPathSelection::onNewPathSelectionEntry (  )  [private]

Definition at line 567 of file VirtualPathSelection.cpp.

virtual void wifimac::pathselection::VirtualPathSelection::onNodeCreated (  )  [inline, virtual]

Implements wns::node::component::Interface.

Definition at line 167 of file VirtualPathSelection.hpp.

virtual void wifimac::pathselection::VirtualPathSelection::onShutdown (  )  [inline, virtual]

Implements wns::node::component::Interface.

Definition at line 181 of file VirtualPathSelection.hpp.

virtual void wifimac::pathselection::VirtualPathSelection::onWorldCreated (  )  [inline, virtual]

Implements wns::node::component::Interface.

Definition at line 174 of file VirtualPathSelection.hpp.

void VirtualPathSelection::printPathSelectionLine ( const wns::service::dll::UnicastAddress  source  )  const [private]

Definition at line 710 of file VirtualPathSelection.cpp.

void VirtualPathSelection::printPathSelectionTable (  )  const [private]

Definition at line 689 of file VirtualPathSelection.cpp.

void VirtualPathSelection::printPortalInformation ( const wns::service::dll::UnicastAddress  portal  )  const [private]

Definition at line 747 of file VirtualPathSelection.cpp.

void VirtualPathSelection::printProxyInformation ( const wns::service::dll::UnicastAddress  proxy  )  const [private]

Definition at line 734 of file VirtualPathSelection.cpp.

void VirtualPathSelection::registerMP ( const wns::service::dll::UnicastAddress  mpAddress  )  [virtual]

The address is stored in the list of MPs and the link cost to itself is set to zero. Calling this member is the initial step for any node in the mesh.

Implements wifimac::pathselection::IPathSelection.

Definition at line 119 of file VirtualPathSelection.cpp.

void VirtualPathSelection::registerPortal ( const wns::service::dll::UnicastAddress  portalAddress,
dll::APUpperConvergence apUC 
) [virtual]

The portal is a node which

  • participates in the mesh, i.e. is able to forward frames
  • is connected to the Internet (i.e. the Radio Access Network Gateway node) When called, the address is stored in the list of MPs and Portals. Also, the link cost to any other portal is set to zero (as the wired backbone can be used).

Implements wifimac::pathselection::IPathSelection.

Definition at line 143 of file VirtualPathSelection.cpp.

void VirtualPathSelection::registerProxy ( const wns::service::dll::UnicastAddress  proxy,
const wns::service::dll::UnicastAddress  client 
) [virtual]

Besides adding the client to the list of clients proxied by the proxy, also the best portal for the client is calculated and told to the RANG: If the proxy is a portal, this is the best one; otherwise, the best portal for the new client is searched by the help of the path selection matrix: The cost for portal->portal is zero. Hence, the one portal is searched for which the cost portal->proxy is > zero.

Implements wifimac::pathselection::IPathSelection.

Definition at line 339 of file VirtualPathSelection.cpp.

void VirtualPathSelection::updatePeerLink ( const wns::service::dll::UnicastAddress  myself,
const wns::service::dll::UnicastAddress  peer,
const Metric  linkMetric = Metric(1) 
) [virtual]

Implements wifimac::pathselection::IPathSelection.

Definition at line 476 of file VirtualPathSelection.cpp.


Member Data Documentation

Definition at line 385 of file VirtualPathSelection.hpp.

Definition at line 381 of file VirtualPathSelection.hpp.

Definition at line 369 of file VirtualPathSelection.hpp.

Definition at line 326 of file VirtualPathSelection.hpp.

Definition at line 390 of file VirtualPathSelection.hpp.

Definition at line 352 of file VirtualPathSelection.hpp.

Definition at line 396 of file VirtualPathSelection.hpp.

Definition at line 373 of file VirtualPathSelection.hpp.

Definition at line 401 of file VirtualPathSelection.hpp.

Definition at line 377 of file VirtualPathSelection.hpp.

Definition at line 365 of file VirtualPathSelection.hpp.

Definition at line 406 of file VirtualPathSelection.hpp.

Definition at line 411 of file VirtualPathSelection.hpp.

Definition at line 361 of file VirtualPathSelection.hpp.

Definition at line 357 of file VirtualPathSelection.hpp.


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

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