IBR-DTNSuite  0.12
dtn::net::DiscoveryService Class Reference

#include <DiscoveryService.h>

Collaboration diagram for dtn::net::DiscoveryService:
Collaboration graph

Public Member Functions

 DiscoveryService ()
 
 DiscoveryService (const dtn::core::Node::Protocol p, const std::string &parameters)
 
 DiscoveryService (const std::string &name, const std::string &parameters)
 
virtual ~DiscoveryService ()
 
dtn::data::Length getLength () const
 
dtn::core::Node::Protocol getProtocol () const
 
const std::string & getName () const
 
const std::string & getParameters () const
 
void update (const std::string &parameters)
 

Static Public Member Functions

static std::string asTag (const dtn::core::Node::Protocol proto)
 
static dtn::core::Node::Protocol asProtocol (const std::string &tag)
 

Protected Attributes

dtn::core::Node::Protocol _service_protocol
 
std::string _service_name
 
std::string _service_parameters
 

Friends

std::ostream & operator<< (std::ostream &stream, const DiscoveryService &service)
 
std::istream & operator>> (std::istream &stream, DiscoveryService &service)
 

Detailed Description

Definition at line 34 of file DiscoveryService.h.

Constructor & Destructor Documentation

dtn::net::DiscoveryService::DiscoveryService ( )

Definition at line 33 of file DiscoveryService.cpp.

dtn::net::DiscoveryService::DiscoveryService ( const dtn::core::Node::Protocol  p,
const std::string &  parameters 
)

Definition at line 38 of file DiscoveryService.cpp.

dtn::net::DiscoveryService::DiscoveryService ( const std::string &  name,
const std::string &  parameters 
)

Definition at line 43 of file DiscoveryService.cpp.

dtn::net::DiscoveryService::~DiscoveryService ( )
virtual

Definition at line 48 of file DiscoveryService.cpp.

Member Function Documentation

dtn::data::Length dtn::net::DiscoveryService::getLength ( ) const

Definition at line 52 of file DiscoveryService.cpp.

References _service_name, _service_parameters, and dtn::data::BundleString::getLength().

Here is the call graph for this function:

const std::string & dtn::net::DiscoveryService::getName ( ) const

Definition at line 65 of file DiscoveryService.cpp.

References _service_name.

Referenced by dtn::net::DiscoveryAgent::onBeaconReceived().

const std::string & dtn::net::DiscoveryService::getParameters ( ) const
dtn::core::Node::Protocol dtn::net::DiscoveryService::getProtocol ( ) const

Definition at line 60 of file DiscoveryService.cpp.

References _service_protocol.

Referenced by dtn::net::DiscoveryAgent::onBeaconReceived().

void dtn::net::DiscoveryService::update ( const std::string &  parameters)

Update the parameters of this service

Definition at line 75 of file DiscoveryService.cpp.

References _service_parameters.

Referenced by dtn::net::IPNDAgent::componentRun().

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const DiscoveryService service 
)
friend

Definition at line 175 of file DiscoveryService.cpp.

std::istream& operator>> ( std::istream &  stream,
DiscoveryService service 
)
friend

Definition at line 185 of file DiscoveryService.cpp.

Member Data Documentation

std::string dtn::net::DiscoveryService::_service_name
protected

Definition at line 61 of file DiscoveryService.h.

Referenced by getLength(), getName(), dtn::net::operator<<(), and dtn::net::operator>>().

std::string dtn::net::DiscoveryService::_service_parameters
protected
dtn::core::Node::Protocol dtn::net::DiscoveryService::_service_protocol
protected

Definition at line 60 of file DiscoveryService.h.

Referenced by getProtocol(), and dtn::net::operator>>().


The documentation for this class was generated from the following files: