IBR-DTNSuite  0.10
dtn::routing::AcknowledgementSet Class Reference

Set of Acknowledgements, that can be serialized in node handshakes. More...

#include <AcknowledgementSet.h>

Inheritance diagram for dtn::routing::AcknowledgementSet:
Inheritance graph
Collaboration diagram for dtn::routing::AcknowledgementSet:
Collaboration graph

Public Types

typedef
dtn::data::BundleList::const_iterator 
const_iterator
 
- Public Types inherited from dtn::routing::NodeHandshakeItem
enum  IDENTIFIER { BLOOM_FILTER_SUMMARY_VECTOR = 1, BLOOM_FILTER_PURGE_VECTOR = 2, DELIVERY_PREDICTABILITY_MAP = 3, PROPHET_ACKNOWLEDGEMENT_SET = 4 }
 
- Public Types inherited from ibrcommon::Mutex
enum  MUTEX_TYPE { MUTEX_NORMAL = PTHREAD_MUTEX_NORMAL, MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE, MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK }
 

Public Member Functions

 AcknowledgementSet ()
 
 AcknowledgementSet (const AcknowledgementSet &)
 
void add (const dtn::data::MetaBundle &bundle) throw ()
 
void expire (const dtn::data::Timestamp &timestamp) throw ()
 
void merge (const AcknowledgementSet &) throw ()
 
bool has (const dtn::data::BundleID &id) const throw ()
 
virtual const dtn::data::NumbergetIdentifier () const
 
virtual dtn::data::Length getLength () const
 
virtual std::ostream & serialize (std::ostream &stream) const
 
virtual std::istream & deserialize (std::istream &stream)
 
const_iterator begin () const
 
const_iterator end () const
 
- Public Member Functions inherited from dtn::routing::NodeHandshakeItem
virtual ~NodeHandshakeItem ()
 
- Public Member Functions inherited from ibrcommon::Mutex
 Mutex (MUTEX_TYPE type=MUTEX_NORMAL)
 
virtual ~Mutex ()
 
virtual void trylock () throw (MutexException)
 
virtual void enter () throw (MutexException)
 
virtual void leave () throw (MutexException)
 
- Public Member Functions inherited from ibrcommon::MutexInterface
virtual ~MutexInterface ()=0
 

Static Public Attributes

static const dtn::data::Number identifier = NodeHandshakeItem::PROPHET_ACKNOWLEDGEMENT_SET
 

Friends

std::ostream & operator<< (std::ostream &, const AcknowledgementSet &)
 
std::istream & operator>> (std::istream &, AcknowledgementSet &)
 

Additional Inherited Members

- Static Public Member Functions inherited from ibrcommon::Mutex
static MutexInterfacedummy ()
 
- Protected Attributes inherited from ibrcommon::Mutex
pthread_mutex_t m_mutex
 
pthread_mutexattr_t m_attr
 

Detailed Description

Set of Acknowledgements, that can be serialized in node handshakes.

Definition at line 24 of file AcknowledgementSet.h.

Member Typedef Documentation

Constructor & Destructor Documentation

dtn::routing::AcknowledgementSet::AcknowledgementSet ( )

Definition at line 18 of file AcknowledgementSet.cpp.

dtn::routing::AcknowledgementSet::AcknowledgementSet ( const AcknowledgementSet other)

Definition at line 22 of file AcknowledgementSet.cpp.

Member Function Documentation

void dtn::routing::AcknowledgementSet::add ( const dtn::data::MetaBundle bundle) throw ()

Add a bundle to the set

Definition at line 27 of file AcknowledgementSet.cpp.

References dtn::core::BundleCore::getInstance(), and dtn::core::BundleCore::validate().

Referenced by dtn::routing::operator>>().

Here is the call graph for this function:

const_iterator dtn::routing::AcknowledgementSet::begin ( ) const
inline

Definition at line 61 of file AcknowledgementSet.h.

References dtn::data::BundleList::begin().

Referenced by dtn::routing::ProphetRoutingExtension::processHandshake().

Here is the call graph for this function:

std::istream & dtn::routing::AcknowledgementSet::deserialize ( std::istream &  stream)
virtual
const_iterator dtn::routing::AcknowledgementSet::end ( ) const
inline

Definition at line 62 of file AcknowledgementSet.h.

References dtn::data::BundleList::end().

Referenced by dtn::routing::ProphetRoutingExtension::processHandshake().

Here is the call graph for this function:

void dtn::routing::AcknowledgementSet::expire ( const dtn::data::Timestamp timestamp) throw ()

Expire outdated entries

Definition at line 40 of file AcknowledgementSet.cpp.

const dtn::data::Number & dtn::routing::AcknowledgementSet::getIdentifier ( ) const
virtual
See Also
NodeHandshakeItem::getIdentifier

Implements dtn::routing::NodeHandshakeItem.

Definition at line 60 of file AcknowledgementSet.cpp.

References identifier.

dtn::data::Length dtn::routing::AcknowledgementSet::getLength ( ) const
virtual
See Also
NodeHandshakeItem::getLength

Implements dtn::routing::NodeHandshakeItem.

Definition at line 65 of file AcknowledgementSet.cpp.

References serialize().

Here is the call graph for this function:

bool dtn::routing::AcknowledgementSet::has ( const dtn::data::BundleID id) const throw ()

Returns true if the given bundleId is in the bundle list

Definition at line 54 of file AcknowledgementSet.cpp.

References dtn::data::MetaBundle::mockUp().

Here is the call graph for this function:

void dtn::routing::AcknowledgementSet::merge ( const AcknowledgementSet other) throw ()

merge the set with a second AcknowledgementSet

Definition at line 45 of file AcknowledgementSet.cpp.

Referenced by dtn::routing::ProphetRoutingExtension::processHandshake().

std::ostream & dtn::routing::AcknowledgementSet::serialize ( std::ostream &  stream) const
virtual
See Also
NodeHandshakeItem::serialize

Implements dtn::routing::NodeHandshakeItem.

Definition at line 72 of file AcknowledgementSet.cpp.

Referenced by getLength().

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const AcknowledgementSet ack_set 
)
friend

Definition at line 84 of file AcknowledgementSet.cpp.

std::istream& operator>> ( std::istream &  stream,
AcknowledgementSet ack_set 
)
friend

Definition at line 98 of file AcknowledgementSet.cpp.

Member Data Documentation


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