|
INET Framework for OMNeT++/OMNEST
|
Supporting class for Topology, represents a node in the graph. More...
#include <Topology.h>
Public Member Functions | |
| Node (int moduleId=-1) | |
| Constructor. More... | |
| virtual | ~Node () |
Node attributes: weight, enabled state, correspondence to modules. | |
| int | getModuleId () const |
| Returns the ID of the network module to which this node corresponds. More... | |
| cModule * | getModule () const |
| Returns the pointer to the network module to which this node corresponds. More... | |
| double | getWeight () const |
| Returns the weight of this node. More... | |
| void | setWeight (double d) |
| Sets the weight of this node. More... | |
| double | getNetworkId () const |
| Returns the ID of the network to which this node corresponds. More... | |
| void | setNetworkId (int g) |
| Sets the ID of the network to which this node corresponds. More... | |
| bool | isVisited () const |
| Returns true if the node has been visited before in a traversal,. More... | |
| void | setVisited (bool v) |
| Marks this node as visited or not visited in a traversal. More... | |
| bool | isEnabled () const |
| Returns true of this node is enabled. More... | |
| void | enable () |
| Enable this node. More... | |
| void | disable () |
| Disable this node. More... | |
Node connectivity. | |
| int | getNumInLinks () const |
| Returns the number of incoming links to this graph node. More... | |
| Link * | getLinkIn (int i) const |
| Returns ith incoming link of graph node. More... | |
| int | getNumOutLinks () const |
| Returns the number of outgoing links from this graph node. More... | |
| Link * | getLinkOut (int i) const |
| Returns ith outgoing link of graph node. More... | |
Result of shortest path extraction. | |
| double | getDistanceToTarget () const |
| Returns the distance of this node to the target node. More... | |
| int | getNumPaths () const |
| Returns the number of shortest paths towards the target node. More... | |
| Link * | getPath (int i) const |
| Returns the next link in the ith shortest paths towards the target node. More... | |
Protected Attributes | |
| int | moduleId |
| double | weight |
| bool | enabled |
| bool | visited |
| int | networkId |
| std::vector< Link * > | inLinks |
| std::vector< Link * > | outLinks |
| double | dist |
| std::vector< Link * > | outPaths |
Friends | |
| class | Topology |
Supporting class for Topology, represents a node in the graph.
|
inline |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
Returns the distance of this node to the target node.
Referenced by inet::NextHopNetworkConfigurator::addStaticRoutes(), and inet::Ipv4NetworkConfigurator::addStaticRoutes().
| Topology::Link * inet::Topology::Node::getLinkIn | ( | int | i | ) | const |
Returns ith incoming link of graph node.
Referenced by inet::Ipv4NetworkConfigurator::addStaticRoutes(), inet::Topology::calculateWeightedSingleShortestPathsTo(), inet::L3NetworkConfiguratorBase::dumpTopology(), inet::MacForwardingTableConfigurator::extendConfiguration(), and inet::NetworkConfiguratorBase::findLinkIn().
| Topology::Link * inet::Topology::Node::getLinkOut | ( | int | i | ) | const |
Returns ith outgoing link of graph node.
Referenced by inet::StpTester::dfsVisit(), inet::L3NetworkConfiguratorBase::dumpTopology(), inet::L3NetworkConfiguratorBase::extractDeviceNeighbors(), inet::NetworkConfiguratorBase::extractTopology(), inet::L3NetworkConfiguratorBase::extractTopology(), inet::FailureProtectionConfigurator::findConnectedNode(), inet::NetworkConfiguratorBase::findLinkOut(), inet::L2NetworkConfigurator::findLinkOut(), and inet::L3NetworkConfiguratorBase::findLinkOut().
|
inline |
Returns the pointer to the network module to which this node corresponds.
Referenced by inet::Ipv4NetworkConfigurator::addStaticRoutes(), inet::Ipv4NetworkConfigurator::configureRoutingTable(), inet::StpTester::dfsVisit(), inet::NetworkConfiguratorBase::extractTopology(), inet::L2NetworkConfigurator::extractTopology(), inet::L3NetworkConfiguratorBase::extractTopology(), inet::NetworkConfiguratorBase::findLinkIn(), inet::NetworkConfiguratorBase::findLinkOut(), inet::Topology::Link::getLinkInLocalGate(), inet::Topology::Link::getLinkInRemoteGate(), inet::Topology::Link::getLinkOutLocalGate(), inet::Topology::Link::getLinkOutRemoteGate(), and inet::StpTester::isForwarding().
|
inline |
Returns the ID of the network module to which this node corresponds.
|
inline |
Returns the ID of the network to which this node corresponds.
All nodes that belong to a connected network have the same network id.
Referenced by inet::L3NetworkConfiguratorBase::extractTopology(), and inet::Topology::findNetworks().
|
inline |
Returns the number of incoming links to this graph node.
Referenced by inet::Ipv4NetworkConfigurator::addStaticRoutes(), inet::Topology::calculateWeightedSingleShortestPathsTo(), inet::L3NetworkConfiguratorBase::dumpTopology(), inet::MacForwardingTableConfigurator::extendConfiguration(), and inet::NetworkConfiguratorBase::findLinkIn().
|
inline |
Returns the number of outgoing links from this graph node.
Referenced by inet::StpTester::dfsVisit(), inet::L3NetworkConfiguratorBase::dumpTopology(), inet::L3NetworkConfiguratorBase::extractDeviceNeighbors(), inet::NetworkConfiguratorBase::extractTopology(), inet::L3NetworkConfiguratorBase::extractTopology(), inet::NetworkConfiguratorBase::findLinkOut(), inet::L2NetworkConfigurator::findLinkOut(), and inet::L3NetworkConfiguratorBase::findLinkOut().
|
inline |
Returns the number of shortest paths towards the target node.
(There may be several paths with the same length.)
Referenced by inet::NextHopNetworkConfigurator::addStaticRoutes(), inet::Ipv4NetworkConfigurator::addStaticRoutes(), inet::FailureProtectionConfigurator::collectAllPaths(), and inet::MacForwardingTableConfigurator::extendConfiguration().
|
inline |
Returns the next link in the ith shortest paths towards the target node.
(There may be several paths with the same length.)
Referenced by inet::NextHopNetworkConfigurator::addStaticRoutes(), inet::Ipv4NetworkConfigurator::addStaticRoutes(), inet::FailureProtectionConfigurator::collectAllPaths(), inet::NetworkConfiguratorBase::computeShortestLinkPath(), inet::NetworkConfiguratorBase::computeShortestNodePath(), and inet::MacForwardingTableConfigurator::extendConfiguration().
|
inline |
Returns the weight of this node.
Weight is used with the weighted shortest path finder methods of Topology.
Referenced by inet::Topology::calculateWeightedSingleShortestPathsTo().
|
inline |
Returns true of this node is enabled.
This has significance with the shortest path finder methods of Topology.
Referenced by inet::Topology::calculateWeightedSingleShortestPathsTo().
|
inline |
Returns true if the node has been visited before in a traversal,.
Referenced by inet::Topology::findNetworks().
|
inline |
Sets the ID of the network to which this node corresponds.
All nodes that belong to a connected network have the same network id.
Referenced by inet::Topology::extractFromNetwork(), and inet::Topology::findNetworks().
|
inline |
Marks this node as visited or not visited in a traversal.
Referenced by inet::Topology::findNetworks().
|
inline |
Sets the weight of this node.
Weight is used with the weighted shortest path finder methods of Topology.
Referenced by inet::Ipv4NetworkConfigurator::addStaticRoutes().
|
friend |
|
protected |
|
protected |
Referenced by inet::Topology::calculateUnweightedSingleShortestPathsTo().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |