|
IBR-DTNSuite
0.8
|
#include <ConnectionManager.h>


Classes | |
| class | ShutdownException |
Public Member Functions | |
| ConnectionManager () | |
| virtual | ~ConnectionManager () |
| void | addConnection (const dtn::core::Node &n) |
| void | removeConnection (const dtn::core::Node &n) |
| void | addConvergenceLayer (ConvergenceLayer *cl) |
| void | queue (const dtn::data::EID &eid, const dtn::data::BundleID &b) |
| void | raiseEvent (const dtn::core::Event *evt) |
| void | open (const dtn::core::Node &node) |
| void | queue (const ConvergenceLayer::Job &job) |
| const std::set< dtn::core::Node > | getNeighbors () |
| bool | isNeighbor (const dtn::core::Node &) |
| const dtn::core::Node | getNeighbor (const dtn::data::EID &eid) |
| virtual const std::string | getName () const |
Protected Member Functions | |
| void | discovered (const dtn::core::Node &node) |
| virtual void | componentUp () |
| virtual void | componentDown () |
Definition at line 41 of file ConnectionManager.h.
Definition at line 44 of file ConnectionManager.cpp.
| dtn::net::ConnectionManager::~ConnectionManager | ( | ) | [virtual] |
Definition at line 49 of file ConnectionManager.cpp.
| void dtn::net::ConnectionManager::addConnection | ( | const dtn::core::Node & | n | ) |
Definition at line 165 of file ConnectionManager.cpp.
References dtn::core::Node::getEID(), IBRCOMMON_LOGGER_DEBUG, IBRCOMMON_LOGGER_ENDL, dtn::core::NODE_AVAILABLE, and dtn::core::NodeEvent::raise().
Referenced by dtn::core::BundleCore::addConnection().

Definition at line 198 of file ConnectionManager.cpp.
Referenced by dtn::core::BundleCore::addConvergenceLayer().
| void dtn::net::ConnectionManager::componentDown | ( | ) | [protected, virtual] |
Implements dtn::daemon::IntegratedComponent.
Definition at line 67 of file ConnectionManager.cpp.
References dtn::net::ConnectionEvent::className, and dtn::core::EventReceiver::unbindEvent().

| void dtn::net::ConnectionManager::componentUp | ( | ) | [protected, virtual] |
Implements dtn::daemon::IntegratedComponent.
Definition at line 53 of file ConnectionManager.cpp.
References dtn::core::EventReceiver::bindEvent(), dtn::net::ConnectionEvent::className, dtn::daemon::Configuration::Network::getAutoConnect(), dtn::daemon::Configuration::getInstance(), dtn::daemon::Configuration::getNetwork(), and dtn::utils::Clock::getTime().

| void dtn::net::ConnectionManager::discovered | ( | const dtn::core::Node & | node | ) | [protected] |
trigger for periodical discovery of nodes
| node |
Definition at line 204 of file ConnectionManager.cpp.
References dtn::core::Node::getEID(), IBRCOMMON_LOGGER_DEBUG, IBRCOMMON_LOGGER_ENDL, dtn::core::BundleCore::local, dtn::core::NODE_AVAILABLE, and dtn::core::NodeEvent::raise().
Referenced by raiseEvent().

| const std::string dtn::net::ConnectionManager::getName | ( | ) | const [virtual] |
Implements dtn::daemon::Component.
Definition at line 404 of file ConnectionManager.cpp.
| const dtn::core::Node dtn::net::ConnectionManager::getNeighbor | ( | const dtn::data::EID & | eid | ) |
Get the neighbor with the given EID.
| dtn::net::NeighborNotAvailableException | if the neighbor is not available. |
| eid | The EID of the neighbor. |
Definition at line 376 of file ConnectionManager.cpp.
References dtn::core::Node::getEID(), and dtn::core::Node::isAvailable().
Referenced by dtn::core::BundleCore::getNeighbor().

| const std::set< dtn::core::Node > dtn::net::ConnectionManager::getNeighbors | ( | ) |
get a set with all neighbors
Definition at line 361 of file ConnectionManager.cpp.
References dtn::core::Node::isAvailable().
Referenced by dtn::core::BundleCore::getNeighbors().

| bool dtn::net::ConnectionManager::isNeighbor | ( | const dtn::core::Node & | node | ) |
Checks if a node is already known as neighbor.
| @return |
Definition at line 390 of file ConnectionManager.cpp.
References dtn::core::Node::isAvailable().
Referenced by dtn::core::BundleCore::isNeighbor().

| void dtn::net::ConnectionManager::open | ( | const dtn::core::Node & | node | ) |
Definition at line 285 of file ConnectionManager.cpp.
References dtn::net::ConvergenceLayer::getDiscoveryProtocol(), dtn::core::Node::has(), and dtn::net::ConvergenceLayer::open().
Referenced by raiseEvent().

| void dtn::net::ConnectionManager::queue | ( | const dtn::data::EID & | eid, |
| const dtn::data::BundleID & | b | ||
| ) |
Definition at line 356 of file ConnectionManager.cpp.
Referenced by queue(), and dtn::core::BundleCore::transferTo().
| void dtn::net::ConnectionManager::queue | ( | const ConvergenceLayer::Job & | job | ) |
Definition at line 325 of file ConnectionManager.cpp.
References dtn::net::ConvergenceLayer::Job::_destination, dtn::data::EID::getString(), IBRCOMMON_LOGGER_DEBUG, IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_LEVEL, and queue().

| void dtn::net::ConnectionManager::raiseEvent | ( | const dtn::core::Event * | evt | ) | [virtual] |
method to receive new events from the EventSwitch
Implements dtn::core::EventReceiver.
Definition at line 80 of file ConnectionManager.cpp.
References dtn::net::ConnectionEvent::CONNECTION_DOWN, dtn::net::ConnectionEvent::CONNECTION_UP, discovered(), dtn::core::Node::doConnectImmediately(), dtn::core::TimeEvent::getAction(), dtn::core::NodeEvent::getAction(), dtn::core::NodeEvent::getNode(), IBRCOMMON_LOGGER_DEBUG, IBRCOMMON_LOGGER_ENDL, dtn::net::ConnectionEvent::node, dtn::core::NODE_AVAILABLE, dtn::core::NODE_INFO_UPDATED, open(), dtn::net::ConnectionEvent::peer, dtn::core::NodeEvent::raise(), dtn::net::ConnectionEvent::state, and dtn::core::TIME_SECOND_TICK.

| void dtn::net::ConnectionManager::removeConnection | ( | const dtn::core::Node & | n | ) |
Definition at line 185 of file ConnectionManager.cpp.
References dtn::core::Node::getEID(), IBRCOMMON_LOGGER_DEBUG, and IBRCOMMON_LOGGER_ENDL.
Referenced by dtn::core::BundleCore::removeConnection().
