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

Classes | |
| class | Attribute |
| class | URI |
Public Types | |
| enum | Protocol { CONN_UNSUPPORTED = -1, CONN_UNDEFINED = 0, CONN_TCPIP = 1, CONN_UDPIP = 2, CONN_LOWPAN = 3, CONN_BLUETOOTH = 4, CONN_HTTP = 5 } |
| enum | Type { NODE_UNAVAILABLE = 0, NODE_CONNECTED = 1, NODE_DISCOVERED = 2, NODE_STATIC = 3 } |
Public Member Functions | |
| Node (const dtn::data::EID &id) | |
| virtual | ~Node () |
| 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< URI > | get (Node::Type type, Node::Protocol proto) const |
| std::list< Attribute > | get (const std::string &name) const |
| const dtn::data::EID & | getEID () const |
| bool | expire () |
| bool | operator== (const Node &other) const |
| bool | operator< (const Node &other) const |
| bool | operator== (const dtn::data::EID &other) const |
| const Node & | operator+= (const Node &other) |
| const Node & | operator-= (const Node &other) |
| std::string | toString () const |
| bool | doConnectImmediately () const |
| void | setConnectImmediately (bool val) |
| bool | isAvailable () const |
Static Public Member Functions | |
| static std::string | toString (Node::Type type) |
| static std::string | toString (Node::Protocol proto) |
Friends | |
| std::ostream & | operator<< (std::ostream &, const Node &) |
| dtn::core::Node::Node | ( | const dtn::data::EID & | id | ) |
| void dtn::core::Node::add | ( | const URI & | u | ) |
Add a URI to this node.
| u |
Definition at line 192 of file Node.cpp.
Referenced by dtn::daemon::Configuration::Network::load(), operator+=(), and dtn::net::TCPConnection::setup().
| void dtn::core::Node::clear | ( | ) |
Clear all URIs & Attributes contained in this node.
Definition at line 214 of file Node.cpp.
Referenced by dtn::net::TCPConnection::setup().
| bool dtn::core::Node::doConnectImmediately | ( | ) | const |
Definition at line 360 of file Node.cpp.
Referenced by dtn::net::ConnectionManager::raiseEvent().
| bool dtn::core::Node::expire | ( | ) |
remove expired service descriptors
Definition at line 259 of file Node.cpp.
References dtn::core::Node::URI::expire, dtn::core::Node::Attribute::expire, and dtn::utils::Clock::getTime().

| 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 220 of file Node.cpp.
Referenced by dtn::net::UDPConvergenceLayer::queue(), dtn::net::LOWPANConvergenceLayer::queue(), and dtn::net::TCPConnection::setup().
| std::list< Node::URI > dtn::core::Node::get | ( | Node::Type | type, |
| Node::Protocol | proto | ||
| ) | const |
| std::list< Node::Attribute > dtn::core::Node::get | ( | const std::string & | name | ) | const |
| const dtn::data::EID & dtn::core::Node::getEID | ( | ) | const |
Return the EID of this node.
Definition at line 250 of file Node.cpp.
Referenced by dtn::net::ConnectionManager::addConnection(), 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::TCPConvergenceLayer::queue(), dtn::net::LOWPANConvergenceLayer::queue(), dtn::net::HTTPConvergenceLayer::queue(), dtn::net::ConnectionManager::removeConnection(), dtn::routing::NeighborRoutingExtension::run(), dtn::routing::FloodRoutingExtension::run(), and toString().
| bool dtn::core::Node::has | ( | Node::Protocol | proto | ) | const |
Check if the protocol is available for this node.
| proto |
Definition at line 174 of file Node.cpp.
Referenced by dtn::net::ConnectionManager::open().
| bool dtn::core::Node::has | ( | const std::string & | name | ) | const |
| bool dtn::core::Node::isAvailable | ( | ) | const |
returns true, if at least one connection is available
Definition at line 370 of file Node.cpp.
Referenced by dtn::net::ConnectionManager::getNeighbors(), and dtn::net::ConnectionManager::isNeighbor().
| bool dtn::core::Node::operator< | ( | const Node & | other | ) | const |
| bool dtn::core::Node::operator== | ( | const dtn::data::EID & | 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 365 of file Node.cpp.
Referenced by dtn::daemon::Configuration::Network::load().
| std::string dtn::core::Node::toString | ( | Node::Protocol | proto | ) | [static] |
Definition at line 145 of file Node.cpp.
References CONN_BLUETOOTH, CONN_HTTP, CONN_LOWPAN, CONN_TCPIP, CONN_UDPIP, CONN_UNDEFINED, and CONN_UNSUPPORTED.
| std::string dtn::core::Node::toString | ( | Node::Type | type | ) | [static] |
Definition at line 125 of file Node.cpp.
References NODE_CONNECTED, NODE_DISCOVERED, NODE_STATIC, and NODE_UNAVAILABLE.
Referenced by dtn::net::TCPConvergenceLayer::queue(), dtn::daemon::Notifier::raiseEvent(), dtn::core::EventDebugger::raiseEvent(), and dtn::net::TCPConnection::setup().
| std::string dtn::core::Node::toString | ( | ) | const |
Definition at line 354 of file Node.cpp.
References getEID(), and dtn::data::EID::getString().
Referenced by dtn::core::operator<<().

| std::ostream& operator<< | ( | std::ostream & | stream, |
| const Node & | node | ||
| ) | [friend] |