IBR-DTNSuite
0.8
|
#include <DiscoveryAgent.h>
Public Member Functions | |
DiscoveryAgent (const dtn::daemon::Configuration::Discovery &config) | |
virtual | ~DiscoveryAgent ()=0 |
void | received (const dtn::net::DiscoveryAnnouncement &announcement, size_t timeout=0) |
void | addService (string name, string parameters) |
void | addService (dtn::net::DiscoveryServiceProvider *provider) |
Protected Member Functions | |
virtual void | sendAnnoucement (const u_int16_t &sn, std::list< dtn::net::DiscoveryService > &services)=0 |
void | timeout () |
Protected Attributes | |
const dtn::daemon::Configuration::Discovery & | _config |
Definition at line 23 of file DiscoveryAgent.h.
Definition at line 24 of file DiscoveryAgent.cpp.
dtn::net::DiscoveryAgent::~DiscoveryAgent | ( | ) | [pure virtual] |
Definition at line 29 of file DiscoveryAgent.cpp.
void dtn::net::DiscoveryAgent::addService | ( | string | name, |
string | parameters | ||
) |
Referenced by __daemon_run(), dtn::net::LOWPANConvergenceLayer::componentUp(), and createConvergenceLayers().
void dtn::net::DiscoveryAgent::addService | ( | dtn::net::DiscoveryServiceProvider * | provider | ) |
Definition at line 39 of file DiscoveryAgent.cpp.
void dtn::net::DiscoveryAgent::received | ( | const dtn::net::DiscoveryAnnouncement & | announcement, |
size_t | timeout = 0 |
||
) |
Definition at line 45 of file DiscoveryAgent.cpp.
References _config, dtn::daemon::Configuration::Discovery::announce(), dtn::net::DiscoveryAnnouncement::getEID(), dtn::net::DiscoveryService::getName(), dtn::net::DiscoveryService::getParameters(), dtn::net::DiscoveryAnnouncement::getServices(), dtn::utils::Clock::getTime(), IBRCOMMON_LOGGER_DEBUG, IBRCOMMON_LOGGER_ENDL, dtn::core::NODE_INFO_UPDATED, dtn::core::NodeEvent::raise(), sendAnnoucement(), timeout(), and dtn::daemon::Configuration::Discovery::timeout().
Referenced by dtn::net::IPNDAgent::componentRun(), and dtn::net::LOWPANConvergenceLayer::componentRun().
virtual void dtn::net::DiscoveryAgent::sendAnnoucement | ( | const u_int16_t & | sn, |
std::list< dtn::net::DiscoveryService > & | services | ||
) | [protected, pure virtual] |
Implemented in dtn::net::LOWPANConvergenceLayer.
Referenced by received(), and timeout().
void dtn::net::DiscoveryAgent::timeout | ( | ) | [protected] |
Definition at line 97 of file DiscoveryAgent.cpp.
References _config, dtn::daemon::Configuration::Discovery::announce(), IBRCOMMON_LOGGER_DEBUG, IBRCOMMON_LOGGER_ENDL, and sendAnnoucement().
Referenced by dtn::net::IPNDAgent::componentRun(), dtn::net::LOWPANConvergenceLayer::raiseEvent(), and received().
const dtn::daemon::Configuration::Discovery& dtn::net::DiscoveryAgent::_config [protected] |
Definition at line 39 of file DiscoveryAgent.h.
Referenced by dtn::net::IPNDAgent::IPNDAgent(), received(), dtn::net::IPNDAgent::sendAnnoucement(), and timeout().