#include <Node.h>

Public Types | |
| enum | Type { NODE_FLOATING = 0, NODE_PERMANENT = 1, NODE_CONNECTED = 2 } |
| enum | Protocol { CONN_UNSUPPORTED = -1, CONN_UNDEFINED = 0, CONN_UDPIP = 1, CONN_TCPIP = 2, CONN_ZIGBEE = 3, CONN_BLUETOOTH = 4, CONN_HTTP = 5 } |
Public Member Functions | |
| Node (Node::Type type=NODE_PERMANENT, unsigned int rtt=2700) | |
| Node (dtn::data::EID id, Node::Protocol proto=CONN_UNDEFINED, Node::Type type=NODE_PERMANENT, unsigned int rtt=2700) | |
| virtual | ~Node () |
| Node::Type | getType () const |
| void | setType (Node::Type type) |
| void | setProtocol (Node::Protocol protocol) |
| Node::Protocol | getProtocol () const |
| void | setAddress (std::string address) |
| std::string | getAddress () const |
| void | setPort (unsigned int port) |
| unsigned int | getPort () const |
| void | setDescription (std::string description) |
| std::string | getDescription () const |
| void | setURI (std::string uri) |
| std::string | getURI () const |
| void | setEID (const dtn::data::EID &id) |
| const dtn::data::EID & | getEID () const |
| void | setTimeout (int timeout) |
| int | getTimeout () const |
| unsigned int | getRoundTripTime () const |
| bool | decrementTimeout (int step) |
| bool | operator== (const Node &other) const |
| bool | operator< (const Node &other) const |
| std::string | toString () const |
| bool | doConnectImmediately () const |
| void | setConnectImmediately (bool val) |
Static Public Member Functions | |
| static std::string | getTypeName (Node::Type type) |
| static std::string | getProtocolName (Node::Protocol proto) |
A Node instance holds all informations of a neighboring node.
Definition at line 20 of file Node.h.
| dtn::core::Node::Node | ( | Node::Type | type = NODE_PERMANENT, |
|
| unsigned int | rtt = 2700 | |||
| ) |
| dtn::core::Node::Node | ( | dtn::data::EID | id, | |
| Node::Protocol | proto = CONN_UNDEFINED, |
|||
| Node::Type | type = NODE_PERMANENT, |
|||
| unsigned int | rtt = 2700 | |||
| ) |
| bool dtn::core::Node::decrementTimeout | ( | int | step | ) |
Decrement the timeout by <step>.
| step | Decrement the timeout by this value. |
Definition at line 160 of file Node.cpp.
References NODE_PERMANENT.
Referenced by dtn::net::ConnectionManager::check_discovered().
| bool dtn::core::Node::doConnectImmediately | ( | ) | const |
Definition at line 194 of file Node.cpp.
Referenced by dtn::net::ConnectionManager::raiseEvent().
| string dtn::core::Node::getAddress | ( | ) | const |
Get the address of the node.
Definition at line 99 of file Node.cpp.
Referenced by dtn::net::UDPConvergenceLayer::queue(), dtn::net::LOWPANConvergenceLayer::queue(), dtn::net::TCPConnection::setup(), and toString().
| string dtn::core::Node::getDescription | ( | ) | const |
| const dtn::data::EID & dtn::core::Node::getEID | ( | ) | const |
Return the EID of this node.
Definition at line 140 of file Node.cpp.
Referenced by dtn::routing::StaticRoutingExtension::notify(), dtn::routing::NeighborRoutingExtension::notify(), dtn::routing::FloodRoutingExtension::notify(), dtn::routing::EpidemicRoutingExtension::notify(), dtn::net::TCPConvergenceLayer::queue(), dtn::routing::NeighborRoutingExtension::run(), dtn::routing::FloodRoutingExtension::run(), and dtn::routing::EpidemicRoutingExtension::run().
| unsigned int dtn::core::Node::getPort | ( | ) | const |
Definition at line 109 of file Node.cpp.
Referenced by dtn::net::UDPConvergenceLayer::queue(), dtn::net::LOWPANConvergenceLayer::queue(), dtn::net::TCPConnection::setup(), and toString().
| Node::Protocol dtn::core::Node::getProtocol | ( | ) | const |
Definition at line 89 of file Node.cpp.
Referenced by dtn::net::ConnectionManager::open(), dtn::core::EventDebugger::raiseEvent(), and toString().
| std::string dtn::core::Node::getProtocolName | ( | Node::Protocol | proto | ) | [static] |
Definition at line 45 of file Node.cpp.
References CONN_BLUETOOTH, CONN_HTTP, CONN_TCPIP, CONN_UDPIP, CONN_UNDEFINED, CONN_UNSUPPORTED, and CONN_ZIGBEE.
Referenced by dtn::core::EventDebugger::raiseEvent(), and toString().
| unsigned int dtn::core::Node::getRoundTripTime | ( | ) | const |
| int dtn::core::Node::getTimeout | ( | ) | const |
| Node::Type dtn::core::Node::getType | ( | ) | const |
get the node type.
Definition at line 74 of file Node.cpp.
Referenced by toString().
| std::string dtn::core::Node::getTypeName | ( | Node::Type | type | ) | [static] |
Definition at line 28 of file Node.cpp.
References NODE_CONNECTED, NODE_FLOATING, and NODE_PERMANENT.
Referenced by toString().
| string dtn::core::Node::getURI | ( | ) | const |
Get the URI (EID) of the node.
Definition at line 130 of file Node.cpp.
References dtn::data::EID::getString().
Referenced by dtn::net::TCPConnection::clearQueue(), dtn::net::ConnectionManager::discovered(), dtn::net::TCPConnection::eventBundleForwarded(), dtn::net::TCPConnection::eventBundleRefused(), dtn::net::TCPConnection::match(), dtn::net::UDPConvergenceLayer::queue(), dtn::net::LOWPANConvergenceLayer::queue(), dtn::net::HTTPConvergenceLayer::queue(), dtn::daemon::Notifier::raiseEvent(), dtn::core::EventDebugger::raiseEvent(), dtn::net::TCPConnection::setup(), and toString().

| bool dtn::core::Node::operator< | ( | const Node & | other | ) | const |
| bool dtn::core::Node::operator== | ( | const Node & | other | ) | const |
| void dtn::core::Node::setAddress | ( | std::string | address | ) |
Set the address of the node.
| address | The address of the node. (e.g. 10.0.0.1 for IP) |
Referenced by dtn::daemon::Configuration::Network::load(), and dtn::net::DiscoveryAgent::received().
| void dtn::core::Node::setConnectImmediately | ( | bool | val | ) |
Definition at line 199 of file Node.cpp.
Referenced by dtn::daemon::Configuration::Network::load().
| void dtn::core::Node::setDescription | ( | std::string | description | ) |
| void dtn::core::Node::setEID | ( | const dtn::data::EID & | id | ) |
Set the EID of this Node
| id | The EID to set. |
Definition at line 135 of file Node.cpp.
Referenced by dtn::net::TCPConnection::eventConnectionUp().
| void dtn::core::Node::setPort | ( | unsigned int | port | ) |
Definition at line 104 of file Node.cpp.
Referenced by dtn::daemon::Configuration::Network::load(), and dtn::net::DiscoveryAgent::received().
| void dtn::core::Node::setProtocol | ( | Node::Protocol | protocol | ) |
Definition at line 84 of file Node.cpp.
Referenced by dtn::daemon::Configuration::Network::load(), dtn::net::DiscoveryAgent::received(), dtn::net::TCPConnection::setup(), and dtn::net::TCPConnection::TCPConnection().
| void dtn::core::Node::setTimeout | ( | int | timeout | ) |
Set the timeout of the node. This is only relevant if the node is of type FLOATING. The node get expired if the timeout if count to zero.
| timeout | The timeout in seconds. |
Definition at line 145 of file Node.cpp.
Referenced by dtn::net::DiscoveryAgent::received().
| void dtn::core::Node::setType | ( | Node::Type | type | ) |
| void dtn::core::Node::setURI | ( | std::string | uri | ) |
Set the URI (EID) of the node.
| uri | The URI of the node. |
Referenced by dtn::daemon::Configuration::Network::load(), and dtn::net::DiscoveryAgent::received().
| std::string dtn::core::Node::toString | ( | ) | const |
Definition at line 188 of file Node.cpp.
References getAddress(), getPort(), getProtocol(), getProtocolName(), getType(), getTypeName(), and getURI().
Referenced by dtn::net::ConnectionManager::queue().

1.7.1