|
IBR-DTNSuite 0.6
|
#include <Node.h>

Classes | |
| class | Attribute |
| class | URI |
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 (const dtn::data::EID &id, Node::Type type=NODE_PERMANENT, unsigned int rtt=2700) | |
| virtual | ~Node () |
| Node::Type | getType () const |
| void | setType (Node::Type type) |
| bool | has (Node::Protocol proto) const |
| bool | has (const std::string &name) const |
| void | add (const URI &u) |
| void | add (const Attribute &attr) |
| void | remove (const URI &u) |
| void | remove (const Attribute &attr) |
| void | clear () |
| std::list< URI > | get (Node::Protocol proto) const |
| std::list< Attribute > | get (const std::string &name) const |
| void | setDescription (std::string description) |
| std::string | getDescription () 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) |
| dtn::core::Node::Node | ( | Node::Type | type = NODE_PERMANENT, |
| unsigned int | rtt = 2700 |
||
| ) |
| dtn::core::Node::Node | ( | const dtn::data::EID & | id, |
| Node::Type | type = NODE_PERMANENT, |
||
| unsigned int | rtt = 2700 |
||
| ) |
| void dtn::core::Node::add | ( | const URI & | u | ) |
Add a URI to this node.
| u |
Definition at line 184 of file Node.cpp.
Referenced by dtn::daemon::Configuration::Network::load(), dtn::net::DiscoveryAgent::received(), and dtn::net::TCPConnection::TCPConnection().
| void dtn::core::Node::clear | ( | ) |
| bool dtn::core::Node::decrementTimeout | ( | int | step | ) |
Decrement the timeout by <step>.
| step | Decrement the timeout by this value. |
Definition at line 265 of file Node.cpp.
References NODE_PERMANENT.
Referenced by dtn::net::ConnectionManager::check_discovered().
| bool dtn::core::Node::doConnectImmediately | ( | ) | const |
Definition at line 292 of file Node.cpp.
Referenced by dtn::net::ConnectionManager::raiseEvent().
| std::list< Node::URI > dtn::core::Node::get | ( | Node::Protocol | proto | ) | const |
Returns a list of URIs matching the given protocol
| proto |
Definition at line 210 of file Node.cpp.
Referenced by dtn::net::UDPConvergenceLayer::queue(), dtn::net::LOWPANConvergenceLayer::queue(), and dtn::net::TCPConnection::setup().
| std::list< Node::Attribute > dtn::core::Node::get | ( | const std::string & | name | ) | const |
| string dtn::core::Node::getDescription | ( | ) | const |
| const dtn::data::EID & dtn::core::Node::getEID | ( | ) | const |
Return the EID of this node.
Definition at line 245 of file Node.cpp.
Referenced by dtn::net::ConnectionManager::discovered(), dtn::net::TCPConnection::eventBundleForwarded(), dtn::net::TCPConnection::eventBundleRefused(), dtn::daemon::Configuration::Network::load(), dtn::routing::StaticRoutingExtension::notify(), dtn::routing::NeighborRoutingExtension::notify(), dtn::routing::FloodRoutingExtension::notify(), dtn::routing::EpidemicRoutingExtension::notify(), dtn::net::UDPConvergenceLayer::queue(), dtn::net::LOWPANConvergenceLayer::queue(), dtn::net::HTTPConvergenceLayer::queue(), dtn::routing::NeighborRoutingExtension::run(), dtn::routing::FloodRoutingExtension::run(), and toString().
| std::string dtn::core::Node::getProtocolName | ( | Node::Protocol | proto | ) | [static] |
Definition at line 127 of file Node.cpp.
References CONN_BLUETOOTH, CONN_HTTP, CONN_TCPIP, CONN_UDPIP, CONN_UNDEFINED, CONN_UNSUPPORTED, and CONN_ZIGBEE.
| 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 156 of file Node.cpp.
Referenced by toString().
| std::string dtn::core::Node::getTypeName | ( | Node::Type | type | ) | [static] |
Definition at line 110 of file Node.cpp.
References NODE_CONNECTED, NODE_FLOATING, and NODE_PERMANENT.
Referenced by toString().
| bool dtn::core::Node::has | ( | const std::string & | name | ) | const |
| bool dtn::core::Node::has | ( | Node::Protocol | proto | ) | const |
Check if the protocol is available for this node.
| proto |
Definition at line 166 of file Node.cpp.
Referenced by dtn::net::ConnectionManager::open().
| bool dtn::core::Node::operator< | ( | const Node & | other | ) | const |
| bool dtn::core::Node::operator== | ( | const Node & | other | ) | const |
| void dtn::core::Node::remove | ( | const URI & | u | ) |
| void dtn::core::Node::setConnectImmediately | ( | bool | val | ) |
Definition at line 297 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 240 of file Node.cpp.
Referenced by dtn::net::TCPConnection::eventConnectionUp(), dtn::daemon::Configuration::Network::load(), and dtn::net::DiscoveryAgent::received().
| 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 250 of file Node.cpp.
Referenced by dtn::net::DiscoveryAgent::received().
| void dtn::core::Node::setType | ( | Node::Type | type | ) |
| std::string dtn::core::Node::toString | ( | ) | const |
Definition at line 286 of file Node.cpp.
References getEID(), dtn::data::EID::getString(), getType(), and getTypeName().
Referenced by dtn::net::TCPConvergenceLayer::queue(), dtn::net::ConnectionManager::queue(), dtn::daemon::Notifier::raiseEvent(), dtn::core::EventDebugger::raiseEvent(), and dtn::net::TCPConnection::setup().
