#include <Topology.h>
Classes | |
class | AdjList |
class that represents the adjacency list of the topology graph More... | |
class | LinkList |
list of neigbours More... | |
class | LinkQuality |
class that describes a link in the topology More... | |
struct | NDescr |
Struct that contains all information about a node in the topology. More... | |
Public Types | |
typedef uint16_t | link_quality_t |
typedef std::vector < AdjList::iterator > | ToDo |
Public Member Functions | |
void | enumerateNodes () |
int | addTopoCmd () |
RTopology (NodeId id, Routing *routing) | |
void | setLocked (bool t) |
bool | getLocked () const |
virtual void | reset () |
virtual bool | hasNode (const NodeId &node) const |
virtual bool | hasLink (const NodeId &from, const NodeId &to) const |
void | feed (const TopoPacket &p) |
virtual std::string | getNameOfNode (const NodeId &id) const |
virtual bool | getNodeByName (NodeId &id, const char *name) const |
std::string | getNameList () const |
int | getNumNodes () const |
gea::AbsTime | removeOldNodes () |
void | createRemoveMessages (const NodeId &node, const NDescr &nDescr) |
AdjList::iterator | getNodeEntry (const NodeId &id, gea::AbsTime t) |
void | getNextHop (const NodeId &dest, NodeId &nextHop, bool &found) |
void | calcNextHop (const NodeId &id) |
void | calcRoutes () |
void | print () |
void | dumpNextHops (std::ostream &os) |
virtual std::string | getDotString () const |
virtual std::string | getAdjString () const |
virtual std::string | getXmlString () const |
Static Public Member Functions | |
static void | cleanup_nodes (gea::Handle *h, gea::AbsTime t, void *data) |
static link_quality_t | max_quality () |
Public Attributes | |
bool | verbose |
Metric * | metric |
char | nodeName [32] |
linuxbasic_cb * | linux_cb |
AdjList | adjList |
bool | dirty |
bool | locked |
const NodeId | myNodeId |
Callback< std::string & > | newDotTopology |
Callback< std::string & > | newXmlTopologyDelta |
struct awds::Routing::NodesObserver * | nodeObservers |
struct awds::Routing::LinksObserver * | linkObserver |
ToDo | todo |
Protected Member Functions | |
void | sendNodesChanged () const |
void | sendNodeAdded (const NodeId &id) const |
void | sendNodeRemoved (const NodeId &id) const |
void | sendLinksChanged () const |
void | sendLinkAdded (const NodeId &from, const NodeId &to) const |
void | sendLinkRemoved (const NodeId &from, const NodeId &to) const |
void | updateTopology () |
void RTopology::feed | ( | const TopoPacket & | p | ) |
feed a topology update in the internal topology representation
References awds::Metric::addNode(), awds::Metric::begin_update(), awds::BasePacket::buffer, awds::Metric::calculate(), awds::Metric::delNode(), dirty, awds::Metric::end_update(), awds::RTopology::RTopology::NDescr::findLinkQuality(), AbstractID< 6 >::fromArray(), awds::TopoPacket::getNumLinks(), awds::SrcPacket::getSrc(), awds::TopoPacket::getValidity(), locked, myNodeId, awds::SrcPacket::packet, awds::RTopology::RTopology::LinkQuality::set_counterpart(), awds::BasePacket::size, and awds::RTopology::RTopology::NDescr::update_nodeValidity().
get next hop for a given destination
dest | the destination of the route. | |
nextHop | the next Hop is stored in the reference. | |
found | true, iff the destination is reachable. |
References dirty, and awds::RTopology::RTopology::AdjList::find().
int awds::RTopology::getNumNodes | ( | ) | const [inline] |
get the number of nodes in the topology
References adjList.
Referenced by awds::AwdsRouting::send_topo().
gea::AbsTime RTopology::removeOldNodes | ( | ) |
try to find node entries in the topology and remove them.
References locked.
the adjacency list of the graph
Referenced by awds::AwdsRouting::foreachEdge(), awds::AwdsRouting::foreachNode(), and getNumNodes().
is the routing information outdated?
Referenced by feed(), and getNextHop().
When true, now topology updates are accepted
Referenced by feed(), and removeOldNodes().
the node identifier of this instance
Referenced by feed().