Facade interface between Prophet router and host implmentation's Bundle representation. More...
#include <BundleImpl.h>
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 BundleImpl & | operator= (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 | |
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.
| 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.
| 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] |
| 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] |
| virtual void prophet::BundleImpl::set_custody_requested | ( | bool | c | ) | [inline, virtual] |
| virtual void prophet::BundleImpl::set_destination_id | ( | const std::string & | id | ) | [inline, virtual] |
| virtual void prophet::BundleImpl::set_expiration_ts | ( | u_int32_t | ets | ) | [inline, virtual] |
| virtual void prophet::BundleImpl::set_num_forward | ( | u_int | nf | ) | [inline, virtual] |
| virtual void prophet::BundleImpl::set_sequence_num | ( | u_int32_t | seq | ) | [inline, virtual] |
| virtual void prophet::BundleImpl::set_size | ( | u_int | sz | ) | [inline, virtual] |
| virtual void prophet::BundleImpl::set_source_id | ( | const std::string & | id | ) | [inline, virtual] |
| 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_.
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().
bool prophet::BundleImpl::custody_requested_ [protected] |
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().
1.6.3