IBR-DTNSuite  0.12
dtn::data::EID Class Reference

#include <EID.h>

Collaboration diagram for dtn::data::EID:
Collaboration graph

Public Types

enum  Scheme { SCHEME_DTN = 0, SCHEME_CBHE = 1, SCHEME_EXTENDED = 2 }
 
typedef std::pair< Number, NumberCompressed
 

Public Member Functions

 EID ()
 
 EID (const std::string &scheme, const std::string &ssp)
 
 EID (const std::string &value)
 
 EID (const dtn::data::Number &node, const dtn::data::Number &application)
 
virtual ~EID ()
 
bool operator== (const EID &other) const
 
bool operator== (const std::string &other) const
 
bool operator!= (const EID &other) const
 
bool sameHost (const std::string &other) const
 
bool sameHost (const EID &other) const
 
bool operator< (const EID &other) const
 
bool operator> (const EID &other) const
 
std::string getString () const
 
void setApplication (const dtn::data::Number &app) throw ()
 
void setApplication (const std::string &app) throw ()
 
std::string getApplication () const throw ()
 
bool isApplication (const dtn::data::Number &app) const throw ()
 
bool isApplication (const std::string &app) const throw ()
 
std::string getHost () const throw ()
 
const std::string getScheme () const
 
const std::string getSSP () const
 
std::string getDelimiter () const
 
EID getNode () const throw ()
 
bool hasApplication () const
 
bool isCompressable () const
 
bool isNone () const
 
Compressed getCompressed () const
 

Static Public Member Functions

static Scheme resolveScheme (const std::string &s)
 
static const std::string getSchemeName (const Scheme s)
 
static Number getApplicationNumber (const std::string &app)
 

Detailed Description

Definition at line 34 of file EID.h.

Member Typedef Documentation

Get the compressed EID as two numeric values. Both values are set to zero if the EID is not compressable.

Returns
A pair of two numeric values.

Definition at line 123 of file EID.h.

Member Enumeration Documentation

Enumerator
SCHEME_DTN 
SCHEME_CBHE 
SCHEME_EXTENDED 

Definition at line 37 of file EID.h.

Constructor & Destructor Documentation

dtn::data::EID::EID ( )

Definition at line 184 of file EID.cpp.

Referenced by getNode(), operator==(), and sameHost().

dtn::data::EID::EID ( const std::string &  scheme,
const std::string &  ssp 
)

Definition at line 197 of file EID.cpp.

References resolveScheme(), SCHEME_CBHE, and SCHEME_DTN.

Here is the call graph for this function:

dtn::data::EID::EID ( const std::string &  value)

Definition at line 223 of file EID.cpp.

References resolveScheme(), SCHEME_CBHE, SCHEME_DTN, and dtn::utils::Utils::trim().

Here is the call graph for this function:

dtn::data::EID::EID ( const dtn::data::Number node,
const dtn::data::Number application 
)

Constructor for CBHE EIDs.

Parameters
nodeNode number.
applicationApplication number.

Definition at line 282 of file EID.cpp.

References SCHEME_DTN.

dtn::data::EID::~EID ( )
virtual

Definition at line 292 of file EID.cpp.

Member Function Documentation

std::string dtn::data::EID::getApplication ( ) const
throw (
)

Definition at line 438 of file EID.cpp.

References SCHEME_CBHE, SCHEME_DTN, and dtn::data::SDNV< E >::toString().

Here is the call graph for this function:

Number dtn::data::EID::getApplicationNumber ( const std::string &  app)
static

Map an application string to a CBHE number

Definition at line 135 of file EID.cpp.

References GUINT32_TO_BE, and dtn::data::SDNV< E >::read().

Referenced by setApplication().

Here is the call graph for this function:

EID::Compressed dtn::data::EID::getCompressed ( ) const

Definition at line 571 of file EID.cpp.

References isCompressable().

Referenced by dtn::data::DefaultSerializer::getLength(), and dtn::data::DefaultSerializer::operator<<().

Here is the call graph for this function:

std::string dtn::data::EID::getDelimiter ( ) const

Definition at line 562 of file EID.cpp.

References SCHEME_CBHE.

std::string dtn::data::EID::getHost ( ) const
throw (
)

Definition at line 475 of file EID.cpp.

References SCHEME_CBHE, SCHEME_DTN, and dtn::data::SDNV< E >::toString().

Referenced by dtn::net::TCPConnection::initiateExtendedHandshake().

Here is the call graph for this function:

const std::string dtn::data::EID::getScheme ( ) const

Definition at line 487 of file EID.cpp.

References getSchemeName(), SCHEME_CBHE, and SCHEME_DTN.

Referenced by dtn::net::ConnectionManager::add(), dtn::data::Dictionary::add(), and dtn::data::Dictionary::getRef().

Here is the call graph for this function:

const std::string dtn::data::EID::getSchemeName ( const Scheme  s)
static

Returns the name of a scheme

Definition at line 57 of file EID.cpp.

References SCHEME_CBHE, and SCHEME_DTN.

Referenced by getScheme(), and getString().

const std::string dtn::data::EID::getSSP ( ) const

Definition at line 499 of file EID.cpp.

References dtn::data::SDNV< E >::get(), SCHEME_CBHE, and SCHEME_DTN.

Referenced by dtn::data::Dictionary::add(), and dtn::data::Dictionary::getRef().

Here is the call graph for this function:

std::string dtn::data::EID::getString ( ) const

Definition at line 374 of file EID.cpp.

References dtn::data::SDNV< E >::get(), getSchemeName(), SCHEME_CBHE, and SCHEME_DTN.

Referenced by dtn::daemon::Debugger::callbackBundleReceived(), dtn::daemon::DTNTPWorker::callbackBundleReceived(), dtn::net::HTTPConvergenceLayer::componentRun(), dtn::api::Client::connect(), dtn::api::OrderedStreamHandler::get(), dtn::security::MutableSerializer::getLength(), dtn::daemon::NativeDaemon::getLocalUri(), dtn::net::TransferCompletedEvent::getMessage(), dtn::routing::NodeHandshakeEvent::getMessage(), dtn::net::ConnectionEvent::getMessage(), dtn::routing::StaticRouteChangeEvent::getMessage(), dtn::net::TransferAbortedEvent::getMessage(), dtn::daemon::NativeDaemon::getNeighbors(), dtn::net::TCPConnection::initiateExtendedHandshake(), dtn::security::SecurityBlock::isSecurityDestination(), dtn::security::SecurityBlock::isSecuritySource(), main(), dtn::routing::StaticRegexRoute::match(), dtn::api::PlainSerializer::operator<<(), dtn::streams::operator<<(), dtn::security::MutableSerializer::operator<<(), dtn::net::operator<<(), dtn::data::operator<<(), dtn::core::operator<<(), print_summary(), dtn::routing::NodeHandshakeExtension::processHandshake(), dtn::routing::ProphetRoutingExtension::processHandshake(), dtn::net::DatagramConvergenceLayer::queue(), dtn::net::HTTPConvergenceLayer::queue(), dtn::net::DatagramConnection::queue(), dtn::net::EMailConvergenceLayer::queue(), dtn::net::ConnectionManager::queue(), dtn::api::EventConnection::raiseEvent(), dtn::daemon::NativeDaemon::raiseEvent(), dtn::data::BundleID::raw(), dtn::api::NativeSession::resetEndpoint(), dtn::api::ExtendedApiHandler::run(), dtn::data::BundleID::toString(), dtn::routing::StaticRegexRoute::toString(), dtn::net::DiscoveryBeacon::toString(), dtn::core::Node::toString(), dtn::routing::RoutingExtension::transferTo(), dtn::data::CustodySignalBlock::write(), and dtn::data::StatusReportBlock::write().

Here is the call graph for this function:

bool dtn::data::EID::hasApplication ( ) const

Definition at line 540 of file EID.cpp.

References SCHEME_CBHE, and SCHEME_DTN.

bool dtn::data::EID::isApplication ( const dtn::data::Number app) const
throw (
)

Definition at line 455 of file EID.cpp.

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

bool dtn::data::EID::isApplication ( const std::string &  app) const
throw (
)

Definition at line 461 of file EID.cpp.

bool dtn::data::EID::isCompressable ( ) const

check if a EID is compressable.

Returns
True, if the EID is compressable.

Definition at line 552 of file EID.cpp.

References SCHEME_CBHE, and SCHEME_DTN.

Referenced by dtn::data::Bundle::allEIDsInCBHE(), getCompressed(), and dtn::data::DefaultSerializer::isCompressable().

bool dtn::data::EID::isNone ( ) const

Determine if this EID is null

Returns
True, if the EID is null

Definition at line 557 of file EID.cpp.

References SCHEME_DTN.

Referenced by dtn::api::Client::connect(), dtn::security::SecurityBlock::getSecurityDestination(), and dtn::security::SecurityBlock::getSecuritySource().

bool dtn::data::EID::operator!= ( const EID other) const

Definition at line 317 of file EID.cpp.

bool dtn::data::EID::operator< ( const EID other) const

Definition at line 343 of file EID.cpp.

References SCHEME_CBHE, and SCHEME_DTN.

bool dtn::data::EID::operator== ( const EID other) const

Definition at line 296 of file EID.cpp.

References SCHEME_CBHE, and SCHEME_DTN.

bool dtn::data::EID::operator== ( const std::string &  other) const

Definition at line 312 of file EID.cpp.

References EID().

Here is the call graph for this function:

bool dtn::data::EID::operator> ( const EID other) const

Definition at line 369 of file EID.cpp.

EID::Scheme dtn::data::EID::resolveScheme ( const std::string &  s)
static

Resolves a scheme in a string to the corresponding enum

Definition at line 69 of file EID.cpp.

References SCHEME_CBHE, SCHEME_DTN, and SCHEME_EXTENDED.

Referenced by EID().

bool dtn::data::EID::sameHost ( const EID other) const

Definition at line 327 of file EID.cpp.

References SCHEME_CBHE, and SCHEME_DTN.

void dtn::data::EID::setApplication ( const std::string &  app)
throw (
)

Definition at line 420 of file EID.cpp.

References getApplicationNumber().

Here is the call graph for this function:


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