IBR-DTNSuite
0.12
|
#include <DiscoveryBeacon.h>
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::EID & | getEID () const |
service_list & | getServices () |
const service_list & | getServices () const |
void | clearServices () |
void | addService (const DiscoveryService &service) |
const DiscoveryService & | getService (const std::string &name) const |
DiscoveryService & | getService (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) |
Definition at line 36 of file DiscoveryBeacon.h.
typedef std::list<DiscoveryService> dtn::net::DiscoveryBeacon::service_list |
Definition at line 63 of file DiscoveryBeacon.h.
Enumerator | |
---|---|
DTND_IPDISCOVERY | |
DISCO_VERSION_00 | |
DISCO_VERSION_01 |
Definition at line 52 of file DiscoveryBeacon.h.
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.
|
virtual |
Definition at line 46 of file DiscoveryBeacon.cpp.
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().
|
friend |
Definition at line 125 of file DiscoveryBeacon.cpp.
|
friend |
Definition at line 250 of file DiscoveryBeacon.cpp.