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

#include <DiscoveryBeacon.h>

Collaboration diagram for dtn::net::DiscoveryBeacon:
Collaboration graph

Public Types

enum  Protocol { DTND_IPDISCOVERY = 0x00, DISCO_VERSION_00 = 0x01, DISCO_VERSION_01 = 0x02 }
 
typedef std::list
< DiscoveryService
service_list
 

Public Member Functions

 DiscoveryBeacon (const Protocol version=DISCO_VERSION_00, const dtn::data::EID &eid=dtn::data::EID())
 
virtual ~DiscoveryBeacon ()
 
void setEID (const dtn::data::EID &eid)
 
const dtn::data::EIDgetEID () const
 
service_listgetServices ()
 
const service_listgetServices () const
 
void clearServices ()
 
void addService (const DiscoveryService &service)
 
const DiscoveryServicegetService (const std::string &name) const
 
DiscoveryServicegetService (const std::string &name)
 
std::string toString () const
 
void setSequencenumber (uint16_t sequence)
 
bool isShort () const
 

Friends

std::ostream & operator<< (std::ostream &stream, const DiscoveryBeacon &announcement)
 
std::istream & operator>> (std::istream &stream, DiscoveryBeacon &announcement)
 

Detailed Description

Definition at line 36 of file DiscoveryBeacon.h.

Member Typedef Documentation

Definition at line 63 of file DiscoveryBeacon.h.

Member Enumeration Documentation

Enumerator
DTND_IPDISCOVERY 
DISCO_VERSION_00 
DISCO_VERSION_01 

Definition at line 52 of file DiscoveryBeacon.h.

Constructor & Destructor Documentation

dtn::net::DiscoveryBeacon::DiscoveryBeacon ( const Protocol  version = DISCO_VERSION_00,
const dtn::data::EID eid = dtn::data::EID() 
)

Definition at line 41 of file DiscoveryBeacon.cpp.

dtn::net::DiscoveryBeacon::~DiscoveryBeacon ( )
virtual

Definition at line 46 of file DiscoveryBeacon.cpp.

Member Function Documentation

void dtn::net::DiscoveryBeacon::addService ( const DiscoveryService service)

Definition at line 115 of file DiscoveryBeacon.cpp.

Referenced by dtn::net::DatagramConvergenceLayer::receive().

void dtn::net::DiscoveryBeacon::clearServices ( )

Definition at line 84 of file DiscoveryBeacon.cpp.

const dtn::data::EID & dtn::net::DiscoveryBeacon::getEID ( ) const

Definition at line 69 of file DiscoveryBeacon.cpp.

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

const DiscoveryService & dtn::net::DiscoveryBeacon::getService ( const std::string &  name) const

Definition at line 89 of file DiscoveryBeacon.cpp.

DiscoveryService & dtn::net::DiscoveryBeacon::getService ( const std::string &  name)

Definition at line 102 of file DiscoveryBeacon.cpp.

DiscoveryBeacon::service_list & dtn::net::DiscoveryBeacon::getServices ( )

Definition at line 74 of file DiscoveryBeacon.cpp.

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

const DiscoveryBeacon::service_list & dtn::net::DiscoveryBeacon::getServices ( ) const

Definition at line 79 of file DiscoveryBeacon.cpp.

bool dtn::net::DiscoveryBeacon::isShort ( ) const

Definition at line 50 of file DiscoveryBeacon.cpp.

References DISCO_VERSION_00, and DISCO_VERSION_01.

void dtn::net::DiscoveryBeacon::setEID ( const dtn::data::EID eid)

Definition at line 64 of file DiscoveryBeacon.cpp.

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

void dtn::net::DiscoveryBeacon::setSequencenumber ( uint16_t  sequence)

Definition at line 120 of file DiscoveryBeacon.cpp.

std::string dtn::net::DiscoveryBeacon::toString ( ) const

Definition at line 408 of file DiscoveryBeacon.cpp.

References dtn::data::EID::getString().

Here is the call graph for this function:

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const DiscoveryBeacon announcement 
)
friend

Definition at line 125 of file DiscoveryBeacon.cpp.

std::istream& operator>> ( std::istream &  stream,
DiscoveryBeacon announcement 
)
friend

Definition at line 250 of file DiscoveryBeacon.cpp.


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