dtn::BundleOffer Class Reference

#include <ProphetNode.h>

Inheritance diagram for dtn::BundleOffer:

oasys::Logger

List of all members.


Detailed Description

BundleOffer represents an entry from a BundleOfferTLV.

Definition at line 175 of file ProphetNode.h.


Public Types

enum  bundle_offer_t { UNDEFINED = 0, OFFER, RESPONSE }

Public Member Functions

 BundleOffer (bundle_offer_t type=UNDEFINED)
 BundleOffer (const BundleOffer &b)
 BundleOffer (u_int32_t cts, u_int16_t sid, bool custody=false, bool accept=false, bool ack=false, bundle_offer_t type=UNDEFINED)
BundleOfferoperator= (const BundleOffer &b)
bool operator< (const BundleOffer &b) const
u_int32_t creation_ts () const
u_int16_t sid () const
bool custody () const
bool accept () const
bool ack () const
bundle_offer_t type () const
void dump (oasys::StringBuffer *buf)

Static Public Member Functions

static const char * type_to_str (bundle_offer_t type)

Protected Attributes

u_int32_t cts_
 Creation timestamp.
u_int16_t sid_
 string id of bundle destination
bool custody_
bool accept_
bool ack_
bundle_offer_t type_
 indicates whether offer or response TLV

Member Enumeration Documentation

enum dtn::BundleOffer::bundle_offer_t

Enumerator:
UNDEFINED 
OFFER 
RESPONSE 

Definition at line 178 of file ProphetNode.h.


Constructor & Destructor Documentation

dtn::BundleOffer::BundleOffer ( bundle_offer_t  type = UNDEFINED  )  [inline]

Definition at line 195 of file ProphetNode.h.

dtn::BundleOffer::BundleOffer ( const BundleOffer b  )  [inline]

Definition at line 202 of file ProphetNode.h.

References OFFER, RESPONSE, and type_.

dtn::BundleOffer::BundleOffer ( u_int32_t  cts,
u_int16_t  sid,
bool  custody = false,
bool  accept = false,
bool  ack = false,
bundle_offer_t  type = UNDEFINED 
) [inline]

Definition at line 212 of file ProphetNode.h.

References OFFER, RESPONSE, and type_.


Member Function Documentation

static const char* dtn::BundleOffer::type_to_str ( bundle_offer_t  type  )  [inline, static]

Definition at line 184 of file ProphetNode.h.

References OFFER, RESPONSE, and UNDEFINED.

Referenced by dtn::BundleTLV::deserialize(), dtn::BundleTLV::dump(), and dump().

BundleOffer& dtn::BundleOffer::operator= ( const BundleOffer b  )  [inline]

Definition at line 224 of file ProphetNode.h.

References accept_, ack_, cts_, custody_, OFFER, RESPONSE, sid_, and type_.

bool dtn::BundleOffer::operator< ( const BundleOffer b  )  const [inline]

Definition at line 236 of file ProphetNode.h.

References cts_, and sid_.

u_int32_t dtn::BundleOffer::creation_ts (  )  const [inline]

Definition at line 242 of file ProphetNode.h.

References cts_.

Referenced by dtn::BundleTLV::serialize().

u_int16_t dtn::BundleOffer::sid (  )  const [inline]

Definition at line 243 of file ProphetNode.h.

References sid_.

Referenced by dtn::BundleOfferSIDComp::operator()(), dtn::BundleOfferComp::operator()(), and dtn::BundleTLV::serialize().

bool dtn::BundleOffer::custody (  )  const [inline]

Definition at line 244 of file ProphetNode.h.

References custody_.

Referenced by dtn::BundleTLV::serialize().

bool dtn::BundleOffer::accept (  )  const [inline]

Definition at line 245 of file ProphetNode.h.

References accept_.

Referenced by dtn::BundleTLV::serialize().

bool dtn::BundleOffer::ack (  )  const [inline]

Definition at line 246 of file ProphetNode.h.

References ack_.

Referenced by dtn::BundleTLV::serialize().

bundle_offer_t dtn::BundleOffer::type (  )  const [inline]

Definition at line 247 of file ProphetNode.h.

References type_.

Referenced by dtn::BundleOfferList::add_offer(), and dtn::BundleTLV::serialize().

void dtn::BundleOffer::dump ( oasys::StringBuffer buf  ) 

Definition at line 66 of file ProphetNode.cc.

References accept_, ack_, oasys::StringBuffer::appendf(), cts_, custody_, sid_, type_, and type_to_str().


Member Data Documentation

u_int32_t dtn::BundleOffer::cts_ [protected]

Creation timestamp.

Definition at line 253 of file ProphetNode.h.

Referenced by creation_ts(), dump(), operator<(), and operator=().

u_int16_t dtn::BundleOffer::sid_ [protected]

string id of bundle destination

Definition at line 254 of file ProphetNode.h.

Referenced by dump(), operator<(), operator=(), and sid().

bool dtn::BundleOffer::custody_ [protected]

Definition at line 255 of file ProphetNode.h.

Referenced by custody(), dump(), and operator=().

bool dtn::BundleOffer::accept_ [protected]

Definition at line 256 of file ProphetNode.h.

Referenced by accept(), dump(), and operator=().

bool dtn::BundleOffer::ack_ [protected]

Definition at line 257 of file ProphetNode.h.

Referenced by ack(), dump(), and operator=().

bundle_offer_t dtn::BundleOffer::type_ [protected]

indicates whether offer or response TLV

Definition at line 258 of file ProphetNode.h.

Referenced by BundleOffer(), dump(), operator=(), and type().


The documentation for this class was generated from the following files:
Generated on Sat Sep 8 08:43:48 2007 for DTN Reference Implementation by  doxygen 1.5.3