IBR-DTNSuite  0.8
dtn::data::CustodySignalBlock Class Reference

#include <CustodySignalBlock.h>

Inheritance diagram for dtn::data::CustodySignalBlock:
Collaboration diagram for dtn::data::CustodySignalBlock:

List of all members.

Public Types

enum  REASON_CODE {
  NO_ADDITIONAL_INFORMATION = 0x00, RESERVED_01 = 0x01, RESERVED_02 = 0x02, REDUNDANT_RECEPTION = 0x03,
  DEPLETED_STORAGE = 0x04, DESTINATION_ENDPOINT_ID_UNINTELLIGIBLE = 0x05, NO_KNOWN_ROUTE_TO_DESTINATION_FROM_HERE = 0x06, NO_TIMELY_CONTACT_WITH_NEXT_NODE_ON_ROUTE = 0x07,
  BLOCK_UNINTELLIGIBLE = 0x08
}

Public Member Functions

 CustodySignalBlock ()
virtual ~CustodySignalBlock ()
void setMatch (const MetaBundle &other)
void setMatch (const Bundle &other)
bool match (const Bundle &other) const
virtual size_t getLength () const
virtual std::ostream & serialize (std::ostream &stream, size_t &length) const
virtual std::istream & deserialize (std::istream &stream, const size_t length)

Public Attributes

char _admfield
bool _custody_accepted
REASON_CODE _reason
SDNV _fragment_offset
SDNV _fragment_length
DTNTime _timeofsignal
SDNV _bundle_timestamp
SDNV _bundle_sequence
EID _source

Detailed Description

Definition at line 23 of file CustodySignalBlock.h.


Member Enumeration Documentation

Enumerator:
NO_ADDITIONAL_INFORMATION 
RESERVED_01 
RESERVED_02 
REDUNDANT_RECEPTION 
DEPLETED_STORAGE 
DESTINATION_ENDPOINT_ID_UNINTELLIGIBLE 
NO_KNOWN_ROUTE_TO_DESTINATION_FROM_HERE 
NO_TIMELY_CONTACT_WITH_NEXT_NODE_ON_ROUTE 
BLOCK_UNINTELLIGIBLE 

Definition at line 26 of file CustodySignalBlock.h.


Constructor & Destructor Documentation


Member Function Documentation

std::istream & dtn::data::CustodySignalBlock::deserialize ( std::istream &  stream,
const size_t  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 51 of file CustodySignalBlock.cpp.

References _admfield, _bundle_sequence, _bundle_timestamp, _custody_accepted, _fragment_length, _fragment_offset, _reason, _source, _timeofsignal, and dtn::data::Block::FORWARDED_WITHOUT_PROCESSED.

size_t dtn::data::CustodySignalBlock::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 28 of file CustodySignalBlock.cpp.

References _admfield, _bundle_sequence, _bundle_timestamp, _fragment_length, _fragment_offset, _source, _timeofsignal, dtn::data::BundleString::getLength(), dtn::data::DTNTime::getLength(), dtn::data::SDNV::getLength(), and dtn::data::EID::getString().

Here is the call graph for this function:

std::ostream & dtn::data::CustodySignalBlock::serialize ( std::ostream &  stream,
size_t &  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 83 of file CustodySignalBlock.cpp.

References _admfield, _bundle_sequence, _bundle_timestamp, _custody_accepted, _fragment_length, _fragment_offset, _reason, _source, _timeofsignal, and dtn::data::EID::getString().

Here is the call graph for this function:


Member Data Documentation


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