IBR-DTNSuite  0.10
dtn::data::TrackingBlock Class Reference

#include <TrackingBlock.h>

Inheritance diagram for dtn::data::TrackingBlock:
Inheritance graph
Collaboration diagram for dtn::data::TrackingBlock:
Collaboration graph

Classes

class  Factory
 
class  TrackingEntry
 

Public Types

typedef std::list< TrackingEntrytracking_list
 
- Public Types inherited from dtn::data::Block
enum  ProcFlags {
  REPLICATE_IN_EVERY_FRAGMENT = 1, TRANSMIT_STATUSREPORT_IF_NOT_PROCESSED = 1 << 0x01, DELETE_BUNDLE_IF_NOT_PROCESSED = 1 << 0x02, LAST_BLOCK = 1 << 0x03,
  DISCARD_IF_NOT_PROCESSED = 1 << 0x04, FORWARDED_WITHOUT_PROCESSED = 1 << 0x05, BLOCK_CONTAINS_EIDS = 1 << 0x06
}
 
typedef std::list< dtn::data::EIDeid_list
 

Public Member Functions

 TrackingBlock ()
 
virtual ~TrackingBlock ()
 
virtual Length getLength () const
 
virtual std::ostream & serialize (std::ostream &stream, Length &length) const
 
virtual std::istream & deserialize (std::istream &stream, const Length &length)
 
virtual std::ostream & serialize_strict (std::ostream &stream, Length &length) const
 
virtual Length getLength_strict () const
 
const tracking_listgetTrack () const
 
void append (const dtn::data::EID &eid)
 
- Public Member Functions inherited from dtn::data::Block
virtual ~Block ()
 
Blockoperator= (const Block &block)
 
bool operator== (const block_t &id) const
 
virtual void addEID (const dtn::data::EID &eid)
 
virtual void clearEIDs ()
 
virtual const eid_listgetEIDList () const
 
const block_tgetType () const
 
void set (ProcFlags flag, const bool &value)
 
bool get (ProcFlags flag) const
 
const Bitset< ProcFlags > & getProcessingFlags () const
 

Static Public Attributes

static const dtn::data::block_t BLOCK_TYPE = 193
 

Additional Inherited Members

- Protected Member Functions inherited from dtn::data::Block
 Block (block_t blocktype)
 
- Protected Attributes inherited from dtn::data::Block
block_t _blocktype
 
eid_list _eids
 

Detailed Description

Definition at line 20 of file TrackingBlock.h.

Member Typedef Documentation

Definition at line 69 of file TrackingBlock.h.

Constructor & Destructor Documentation

dtn::data::TrackingBlock::TrackingBlock ( )

Definition at line 22 of file TrackingBlock.cpp.

Referenced by dtn::data::TrackingBlock::Factory::create().

dtn::data::TrackingBlock::~TrackingBlock ( )
virtual

Definition at line 27 of file TrackingBlock.cpp.

Member Function Documentation

void dtn::data::TrackingBlock::append ( const dtn::data::EID eid)
std::istream & dtn::data::TrackingBlock::deserialize ( std::istream &  stream,
const Length length 
)
virtual

Deserialize the derived block payload.

Parameters
streamA input stream to deserialize from.
Returns
The same reference as given with the stream parameter.

Implements dtn::data::Block.

Definition at line 63 of file TrackingBlock.cpp.

Length dtn::data::TrackingBlock::getLength ( ) const
virtual

Return the length of the payload, if this were an abstract block. It is the length put in the third field, after block type and processing flags.

Implements dtn::data::Block.

Definition at line 31 of file TrackingBlock.cpp.

References dtn::data::TrackingBlock::TrackingEntry::getLength(), and dtn::data::SDNV< E >::getLength().

Referenced by dtn::data::TrackingBlock::TrackingEntry::getLength(), and getLength_strict().

Here is the call graph for this function:

Length dtn::data::TrackingBlock::getLength_strict ( ) const
virtual

Return the length of the payload in strict format

Reimplemented from dtn::data::Block.

Definition at line 80 of file TrackingBlock.cpp.

References getLength().

Here is the call graph for this function:

const TrackingBlock::tracking_list & dtn::data::TrackingBlock::getTrack ( ) const

Definition at line 90 of file TrackingBlock.cpp.

std::ostream & dtn::data::TrackingBlock::serialize ( std::ostream &  stream,
Length length 
) const
virtual

Serialize the derived block payload.

Parameters
streamA output stream to serialize into.
Returns
The same reference as given with the stream parameter.

Implements dtn::data::Block.

Definition at line 48 of file TrackingBlock.cpp.

Referenced by serialize_strict().

std::ostream & dtn::data::TrackingBlock::serialize_strict ( std::ostream &  stream,
Length length 
) const
virtual

Serialize the block in a strict way. Dynamic fields are set to the last deserialized value.

Parameters
streamthe stream to be written into
Returns
the same stream as the parameter for chaining

Reimplemented from dtn::data::Block.

Definition at line 85 of file TrackingBlock.cpp.

References serialize().

Here is the call graph for this function:

Member Data Documentation

const dtn::data::block_t dtn::data::TrackingBlock::BLOCK_TYPE = 193
static

Definition at line 31 of file TrackingBlock.h.


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