![]() |
User Manual, Developers Guide and API Documentation |
![]() |
#include <pathselection/VirtualPathSelection.hpp>


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< int > | addressList |
| List of addressed. | |
| typedef std::map< int, int > | addressMap |
| 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... | |
Definition at line 66 of file VirtualPathSelection.hpp.
typedef std::list<int> wifimac::pathselection::VirtualPathSelection::addressList [private] |
Definition at line 347 of file VirtualPathSelection.hpp.
typedef std::map<int, int> wifimac::pathselection::VirtualPathSelection::addressMap [private] |
Definition at line 339 of file VirtualPathSelection.hpp.
typedef wns::container::Matrix<int, 2> wifimac::pathselection::VirtualPathSelection::addressMatrix [private] |
Definition at line 331 of file VirtualPathSelection.hpp.
typedef std::map<int, dll::APUpperConvergence*> wifimac::pathselection::VirtualPathSelection::adr2ucMap [private] |
Definition at line 343 of file VirtualPathSelection.hpp.
typedef wns::container::Matrix<Metric, 2> wifimac::pathselection::VirtualPathSelection::metricMatrix [private] |
Definition at line 335 of file VirtualPathSelection.hpp.
| 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.
| 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
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.
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.
const int wifimac::pathselection::VirtualPathSelection::numNodes [private] |
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.
wns::simulator::Time wifimac::pathselection::VirtualPathSelection::staticPSsnapshotTimeout [private] |
Definition at line 361 of file VirtualPathSelection.hpp.
Definition at line 357 of file VirtualPathSelection.hpp.
1.5.5