prophet::BundleImpl Class Reference

Facade interface between Prophet router and host implmentation's Bundle representation. More...

#include <BundleImpl.h>

Inheritance diagram for prophet::BundleImpl:
prophet::Bundle

List of all members.

Public Member Functions

 BundleImpl ()
 Default constructor.
 BundleImpl (const std::string &destination_id, u_int32_t creation_ts=0, u_int32_t sequence_num=0, u_int32_t expiration_ts=0, u_int size=0, u_int num_forward=0, bool custody_requested=false)
 Constructor.
 BundleImpl (const std::string &source_id, const std::string &destination_id, u_int32_t creation_ts=0, u_int32_t sequence_num=0, u_int32_t expiration_ts=0, u_int size=0, u_int num_forward=0, bool custody_requested=false)
 Constructor.
 BundleImpl (const BundleImpl &b)
 Copy constructor.
virtual ~BundleImpl ()
 Destructor.

virtual const std::string & destination_id () const
 Virtual from Bundle.
virtual const std::string & source_id () const
 Virtual from Bundle.
virtual u_int32_t creation_ts () const
 Virtual from Bundle.
virtual u_int32_t sequence_num () const
 Virtual from Bundle.
virtual u_int32_t expiration_ts () const
 Virtual from Bundle.
virtual u_int size () const
 Virtual from Bundle.
virtual u_int num_forward () const
 Virtual from Bundle.
virtual bool custody_requested () const
 Virtual from Bundle.

virtual void set_destination_id (const std::string &id)
 Mutators.
virtual void set_source_id (const std::string &id)
 Mutators.
virtual void set_creation_ts (u_int32_t cts)
 Mutators.
virtual void set_sequence_num (u_int32_t seq)
 Mutators.
virtual void set_expiration_ts (u_int32_t ets)
 Mutators.
virtual void set_size (u_int sz)
 Mutators.
virtual void set_num_forward (u_int nf)
 Mutators.
virtual void set_custody_requested (bool c)
 Mutators.

virtual BundleImploperator= (const BundleImpl &b)
 Operators.

Protected Attributes

std::string dest_id_
 string representation of route to destination
std::string src_id_
 string rep of bundle source
u_int32_t cts_
 creation timestamp (epoch since 2000/01/01)
u_int32_t seq_
 subsecond sequence number
u_int32_t ets_
 expiration offset (in seconds)
u_int size_
 size of Bundle payload
u_int num_fwd_
 number of times this Bundle has been forwarded
bool custody_requested_
 whether to request custody on this bundle

Detailed Description

Facade interface between Prophet router and host implmentation's Bundle representation.

Rather than duplicate the extensive Bundle API, this facade is only interested in a subset of the metadata.

Definition at line 31 of file BundleImpl.h.


Constructor & Destructor Documentation

prophet::BundleImpl::BundleImpl (  )  [inline]

Default constructor.

Definition at line 37 of file BundleImpl.h.

prophet::BundleImpl::BundleImpl ( const std::string &  destination_id,
u_int32_t  creation_ts = 0,
u_int32_t  sequence_num = 0,
u_int32_t  expiration_ts = 0,
u_int  size = 0,
u_int  num_forward = 0,
bool  custody_requested = false 
) [inline]

Constructor.

Definition at line 52 of file BundleImpl.h.

prophet::BundleImpl::BundleImpl ( const std::string &  source_id,
const std::string &  destination_id,
u_int32_t  creation_ts = 0,
u_int32_t  sequence_num = 0,
u_int32_t  expiration_ts = 0,
u_int  size = 0,
u_int  num_forward = 0,
bool  custody_requested = false 
) [inline]

Constructor.

Definition at line 73 of file BundleImpl.h.

prophet::BundleImpl::BundleImpl ( const BundleImpl b  )  [inline]

Copy constructor.

Definition at line 95 of file BundleImpl.h.

virtual prophet::BundleImpl::~BundleImpl (  )  [inline, virtual]

Destructor.

Definition at line 107 of file BundleImpl.h.


Member Function Documentation

virtual u_int32_t prophet::BundleImpl::creation_ts (  )  const [inline, virtual]

Virtual from Bundle.

Implements prophet::Bundle.

Definition at line 112 of file BundleImpl.h.

References cts_.

virtual bool prophet::BundleImpl::custody_requested (  )  const [inline, virtual]

Virtual from Bundle.

Implements prophet::Bundle.

Definition at line 117 of file BundleImpl.h.

References custody_requested_.

virtual const std::string& prophet::BundleImpl::destination_id (  )  const [inline, virtual]

Virtual from Bundle.

Implements prophet::Bundle.

Definition at line 110 of file BundleImpl.h.

References dest_id_.

virtual u_int32_t prophet::BundleImpl::expiration_ts (  )  const [inline, virtual]

Virtual from Bundle.

Implements prophet::Bundle.

Definition at line 114 of file BundleImpl.h.

References ets_.

virtual u_int prophet::BundleImpl::num_forward (  )  const [inline, virtual]

Virtual from Bundle.

Implements prophet::Bundle.

Definition at line 116 of file BundleImpl.h.

References num_fwd_.

virtual BundleImpl& prophet::BundleImpl::operator= ( const BundleImpl b  )  [inline, virtual]

Operators.

Definition at line 132 of file BundleImpl.h.

References cts_, dest_id_, ets_, num_fwd_, seq_, size_, and src_id_.

virtual u_int32_t prophet::BundleImpl::sequence_num (  )  const [inline, virtual]

Virtual from Bundle.

Implements prophet::Bundle.

Definition at line 113 of file BundleImpl.h.

References seq_.

virtual void prophet::BundleImpl::set_creation_ts ( u_int32_t  cts  )  [inline, virtual]

Mutators.

Definition at line 123 of file BundleImpl.h.

References cts_.

virtual void prophet::BundleImpl::set_custody_requested ( bool  c  )  [inline, virtual]

Mutators.

Definition at line 128 of file BundleImpl.h.

References custody_requested_.

virtual void prophet::BundleImpl::set_destination_id ( const std::string &  id  )  [inline, virtual]

Mutators.

Definition at line 121 of file BundleImpl.h.

References dest_id_.

virtual void prophet::BundleImpl::set_expiration_ts ( u_int32_t  ets  )  [inline, virtual]

Mutators.

Definition at line 125 of file BundleImpl.h.

References ets_.

virtual void prophet::BundleImpl::set_num_forward ( u_int  nf  )  [inline, virtual]

Mutators.

Definition at line 127 of file BundleImpl.h.

References num_fwd_.

virtual void prophet::BundleImpl::set_sequence_num ( u_int32_t  seq  )  [inline, virtual]

Mutators.

Definition at line 124 of file BundleImpl.h.

References seq_.

virtual void prophet::BundleImpl::set_size ( u_int  sz  )  [inline, virtual]

Mutators.

Definition at line 126 of file BundleImpl.h.

References size_.

virtual void prophet::BundleImpl::set_source_id ( const std::string &  id  )  [inline, virtual]

Mutators.

Definition at line 122 of file BundleImpl.h.

References src_id_.

virtual u_int prophet::BundleImpl::size (  )  const [inline, virtual]

Virtual from Bundle.

Implements prophet::Bundle.

Definition at line 115 of file BundleImpl.h.

References size_.

virtual const std::string& prophet::BundleImpl::source_id (  )  const [inline, virtual]

Virtual from Bundle.

Implements prophet::Bundle.

Definition at line 111 of file BundleImpl.h.

References src_id_.


Member Data Documentation

u_int32_t prophet::BundleImpl::cts_ [protected]

creation timestamp (epoch since 2000/01/01)

Definition at line 148 of file BundleImpl.h.

Referenced by creation_ts(), operator=(), and set_creation_ts().

whether to request custody on this bundle

Definition at line 153 of file BundleImpl.h.

Referenced by custody_requested(), and set_custody_requested().

std::string prophet::BundleImpl::dest_id_ [protected]

string representation of route to destination

Definition at line 146 of file BundleImpl.h.

Referenced by destination_id(), operator=(), and set_destination_id().

u_int32_t prophet::BundleImpl::ets_ [protected]

expiration offset (in seconds)

Definition at line 150 of file BundleImpl.h.

Referenced by expiration_ts(), operator=(), and set_expiration_ts().

u_int prophet::BundleImpl::num_fwd_ [protected]

number of times this Bundle has been forwarded

Definition at line 152 of file BundleImpl.h.

Referenced by num_forward(), operator=(), and set_num_forward().

u_int32_t prophet::BundleImpl::seq_ [protected]

subsecond sequence number

Definition at line 149 of file BundleImpl.h.

Referenced by operator=(), sequence_num(), and set_sequence_num().

u_int prophet::BundleImpl::size_ [protected]

size of Bundle payload

Definition at line 151 of file BundleImpl.h.

Referenced by operator=(), set_size(), and size().

std::string prophet::BundleImpl::src_id_ [protected]

string rep of bundle source

Definition at line 147 of file BundleImpl.h.

Referenced by operator=(), set_source_id(), and source_id().


The documentation for this class was generated from the following file:
Generated on Sun Nov 21 11:41:15 2010 for DTN Reference Implementation by  doxygen 1.6.3