IBR-DTNSuite
0.12
|
#include <DiscoveryAgent.h>
Public Member Functions | |
DiscoveryAgent () | |
virtual | ~DiscoveryAgent () |
void | raiseEvent (const dtn::core::Event *evt) throw () |
void | onBeaconReceived (const DiscoveryBeacon &beacon) |
void | registerService (const ibrcommon::vinterface &iface, dtn::net::DiscoveryBeaconHandler *handler) |
void | registerService (dtn::net::DiscoveryBeaconHandler *handler) |
void | unregisterService (const ibrcommon::vinterface &iface, const dtn::net::DiscoveryBeaconHandler *handler) |
void | unregisterService (const dtn::net::DiscoveryBeaconHandler *handler) |
DiscoveryBeacon | obtainBeacon () const |
Public Member Functions inherited from dtn::core::EventReceiver | |
virtual | ~EventReceiver ()=0 |
Public Member Functions inherited from dtn::daemon::IntegratedComponent | |
IntegratedComponent () | |
virtual | ~IntegratedComponent () |
virtual void | initialize () throw () |
virtual void | startup () throw () |
virtual void | terminate () throw () |
Public Member Functions inherited from dtn::daemon::Component | |
virtual | ~Component ()=0 |
Protected Member Functions | |
virtual void | componentUp () throw () |
virtual void | componentDown () throw () |
virtual const std::string | getName () const |
Definition at line 42 of file DiscoveryAgent.h.
dtn::net::DiscoveryAgent::DiscoveryAgent | ( | ) |
Definition at line 41 of file DiscoveryAgent.cpp.
|
virtual |
Definition at line 47 of file DiscoveryAgent.cpp.
|
protectedvirtual |
Implements dtn::daemon::IntegratedComponent.
Definition at line 97 of file DiscoveryAgent.cpp.
References dtn::core::EventDispatcher< E >::remove().
|
protectedvirtual |
Implements dtn::daemon::IntegratedComponent.
Definition at line 88 of file DiscoveryAgent.cpp.
References dtn::core::EventDispatcher< E >::add().
|
protectedvirtual |
Return an identifier for this component
Implements dtn::daemon::Component.
Definition at line 51 of file DiscoveryAgent.cpp.
DiscoveryBeacon dtn::net::DiscoveryAgent::obtainBeacon | ( | ) | const |
Definition at line 159 of file DiscoveryAgent.cpp.
References dtn::net::DiscoveryBeacon::DISCO_VERSION_00, dtn::net::DiscoveryBeacon::DISCO_VERSION_01, dtn::net::DiscoveryBeacon::DTND_IPDISCOVERY, IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, ibrcommon::LogLevel::info, dtn::core::BundleCore::local, and dtn::daemon::Configuration::Discovery::version().
Referenced by dtn::net::IPNDAgent::componentRun(), dtn::net::LOWPANConvergenceLayer::componentRun(), and dtn::net::DatagramConvergenceLayer::receive().
void dtn::net::DiscoveryAgent::onBeaconReceived | ( | const DiscoveryBeacon & | beacon) |
Definition at line 184 of file DiscoveryAgent.cpp.
References dtn::daemon::Configuration::Discovery::announce(), dtn::core::Node::CONN_EMAIL, dtn::core::Node::CONN_UNDEFINED, dtn::core::Node::CONN_UNSUPPORTED, dtn::core::BundleCore::getConnectionManager(), dtn::net::DiscoveryBeacon::getEID(), dtn::daemon::Configuration::getEMail(), dtn::core::BundleCore::getInstance(), dtn::daemon::Configuration::getInstance(), dtn::utils::Clock::getMonotonicTimestamp(), dtn::net::DiscoveryService::getName(), dtn::daemon::Configuration::EMail::getNodeAvailableTime(), dtn::net::DiscoveryService::getParameters(), dtn::net::DiscoveryService::getProtocol(), dtn::net::DiscoveryBeacon::getServices(), IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, dtn::core::BundleCore::local, dtn::daemon::Configuration::Discovery::timeout(), and dtn::net::ConnectionManager::updateNeighbor().
Referenced by dtn::net::IPNDAgent::componentRun(), dtn::net::LOWPANConvergenceLayer::componentRun(), and dtn::net::DatagramConvergenceLayer::componentRun().
|
virtual |
method to receive global events
Implements dtn::core::EventReceiver.
Definition at line 56 of file DiscoveryAgent.cpp.
References dtn::core::GlobalEvent::getAction(), dtn::utils::Clock::getMonotonicTimestamp(), dtn::core::GlobalEvent::GLOBAL_START_DISCOVERY, and dtn::core::GlobalEvent::GLOBAL_STOP_DISCOVERY.
void dtn::net::DiscoveryAgent::registerService | ( | const ibrcommon::vinterface & | iface, |
dtn::net::DiscoveryBeaconHandler * | handler | ||
) |
Definition at line 106 of file DiscoveryAgent.cpp.
Referenced by dtn::net::IPNDAgent::componentUp(), dtn::net::UDPConvergenceLayer::componentUp(), dtn::net::LOWPANConvergenceLayer::componentUp(), dtn::net::DatagramConvergenceLayer::componentUp(), dtn::net::EMailConvergenceLayer::componentUp(), dtn::dht::DHTNameService::componentUp(), dtn::daemon::DTNTPWorker::DTNTPWorker(), and dtn::net::IPNDAgent::raiseEvent().
void dtn::net::DiscoveryAgent::registerService | ( | dtn::net::DiscoveryBeaconHandler * | handler) |
Definition at line 113 of file DiscoveryAgent.cpp.
void dtn::net::DiscoveryAgent::unregisterService | ( | const ibrcommon::vinterface & | iface, |
const dtn::net::DiscoveryBeaconHandler * | handler | ||
) |
Definition at line 143 of file DiscoveryAgent.cpp.
Referenced by dtn::net::IPNDAgent::componentDown(), dtn::net::UDPConvergenceLayer::componentDown(), dtn::net::LOWPANConvergenceLayer::componentDown(), dtn::net::DatagramConvergenceLayer::componentDown(), dtn::net::EMailConvergenceLayer::componentDown(), dtn::dht::DHTNameService::componentDown(), dtn::net::IPNDAgent::raiseEvent(), dtn::net::TCPConvergenceLayer::raiseEvent(), dtn::daemon::DTNTPWorker::~DTNTPWorker(), and dtn::net::TCPConvergenceLayer::~TCPConvergenceLayer().
void dtn::net::DiscoveryAgent::unregisterService | ( | const dtn::net::DiscoveryBeaconHandler * | handler) |
Definition at line 120 of file DiscoveryAgent.cpp.