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

#include <PrimaryBlock.h>

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

Public Types

enum  PRIORITY { PRIO_LOW = 0, PRIO_MEDIUM = 1, PRIO_HIGH = 2 }
 
enum  FLAGS {
  FRAGMENT = 1 << 0x00, APPDATA_IS_ADMRECORD = 1 << 0x01, DONT_FRAGMENT = 1 << 0x02, CUSTODY_REQUESTED = 1 << 0x03,
  DESTINATION_IS_SINGLETON = 1 << 0x04, ACKOFAPP_REQUESTED = 1 << 0x05, RESERVED_6 = 1 << 0x06, PRIORITY_BIT1 = 1 << 0x07,
  PRIORITY_BIT2 = 1 << 0x08, CLASSOFSERVICE_9 = 1 << 0x09, CLASSOFSERVICE_10 = 1 << 0x0A, CLASSOFSERVICE_11 = 1 << 0x0B,
  CLASSOFSERVICE_12 = 1 << 0x0C, CLASSOFSERVICE_13 = 1 << 0x0D, REQUEST_REPORT_OF_BUNDLE_RECEPTION = 1 << 0x0E, REQUEST_REPORT_OF_CUSTODY_ACCEPTANCE = 1 << 0x0F,
  REQUEST_REPORT_OF_BUNDLE_FORWARDING = 1 << 0x10, REQUEST_REPORT_OF_BUNDLE_DELIVERY = 1 << 0x11, REQUEST_REPORT_OF_BUNDLE_DELETION = 1 << 0x12, STATUS_REPORT_REQUEST_19 = 1 << 0x13,
  STATUS_REPORT_REQUEST_20 = 1 << 0x14, DTNSEC_REQUEST_SIGN = 1 << 0x1A, DTNSEC_REQUEST_ENCRYPT = 1 << 0x1B, DTNSEC_STATUS_VERIFIED = 1 << 0x1C,
  DTNSEC_STATUS_CONFIDENTIAL = 1 << 0x1D, DTNSEC_STATUS_AUTHENTICATED = 1 << 0x1E, IBRDTN_REQUEST_COMPRESSION = 1 << 0x1F
}
 

Public Member Functions

 PrimaryBlock ()
 
virtual ~PrimaryBlock ()
 
bool isExpired () const DEPRECATED
 
std::string toString () const
 
void set (FLAGS flag, bool value)
 
bool get (FLAGS flag) const
 
PRIORITY getPriority () const
 
void setPriority (PRIORITY p)
 
void relabel ()
 
bool operator== (const PrimaryBlock &other) const
 
bool operator!= (const PrimaryBlock &other) const
 
bool operator< (const PrimaryBlock &other) const
 
bool operator> (const PrimaryBlock &other) const
 

Public Attributes

Bitset< FLAGSprocflags
 
Timestamp timestamp
 
Number sequencenumber
 
Number lifetime
 
Number fragmentoffset
 
Number appdatalength
 
EID source
 
EID destination
 
EID reportto
 
EID custodian
 

Detailed Description

Definition at line 46 of file PrimaryBlock.h.

Member Enumeration Documentation

Enumerator
FRAGMENT 
APPDATA_IS_ADMRECORD 
DONT_FRAGMENT 
CUSTODY_REQUESTED 
DESTINATION_IS_SINGLETON 
ACKOFAPP_REQUESTED 
RESERVED_6 
PRIORITY_BIT1 
PRIORITY_BIT2 
CLASSOFSERVICE_9 
CLASSOFSERVICE_10 
CLASSOFSERVICE_11 
CLASSOFSERVICE_12 
CLASSOFSERVICE_13 
REQUEST_REPORT_OF_BUNDLE_RECEPTION 
REQUEST_REPORT_OF_CUSTODY_ACCEPTANCE 
REQUEST_REPORT_OF_BUNDLE_FORWARDING 
REQUEST_REPORT_OF_BUNDLE_DELIVERY 
REQUEST_REPORT_OF_BUNDLE_DELETION 
STATUS_REPORT_REQUEST_19 
STATUS_REPORT_REQUEST_20 
DTNSEC_REQUEST_SIGN 
DTNSEC_REQUEST_ENCRYPT 
DTNSEC_STATUS_VERIFIED 
DTNSEC_STATUS_CONFIDENTIAL 
DTNSEC_STATUS_AUTHENTICATED 
IBRDTN_REQUEST_COMPRESSION 

Definition at line 62 of file PrimaryBlock.h.

Define the Bundle Priorities PRIO_LOW low priority for this bundle PRIO_MEDIUM medium priority for this bundle PRIO_HIGH high priority for this bundle

Enumerator
PRIO_LOW 
PRIO_MEDIUM 
PRIO_HIGH 

Definition at line 55 of file PrimaryBlock.h.

Constructor & Destructor Documentation

dtn::data::PrimaryBlock::PrimaryBlock ( )

Definition at line 35 of file PrimaryBlock.cpp.

References DESTINATION_IS_SINGLETON, and relabel().

Referenced by dtn::data::Bundle::operator!=(), dtn::data::Bundle::operator<(), dtn::data::Bundle::operator==(), and dtn::data::Bundle::operator>().

Here is the call graph for this function:

dtn::data::PrimaryBlock::~PrimaryBlock ( )
virtual

Definition at line 44 of file PrimaryBlock.cpp.

Member Function Documentation

PrimaryBlock::PRIORITY dtn::data::PrimaryBlock::getPriority ( ) const

Definition at line 58 of file PrimaryBlock.cpp.

References PRIO_HIGH, PRIO_LOW, PRIO_MEDIUM, PRIORITY_BIT1, and PRIORITY_BIT2.

bool dtn::data::PrimaryBlock::isExpired ( ) const

This method is deprecated because it does not recognize the AgeBlock as alternative age verification.

Definition at line 141 of file PrimaryBlock.cpp.

References dtn::utils::Clock::isExpired(), lifetime, and timestamp.

Here is the call graph for this function:

bool dtn::data::PrimaryBlock::operator!= ( const PrimaryBlock other) const

Definition at line 95 of file PrimaryBlock.cpp.

bool dtn::data::PrimaryBlock::operator< ( const PrimaryBlock other) const

Definition at line 116 of file PrimaryBlock.cpp.

References FRAGMENT, fragmentoffset, get(), sequencenumber, source, and timestamp.

Here is the call graph for this function:

bool dtn::data::PrimaryBlock::operator== ( const PrimaryBlock other) const

Definition at line 100 of file PrimaryBlock.cpp.

References appdatalength, FRAGMENT, fragmentoffset, get(), sequencenumber, source, and timestamp.

Here is the call graph for this function:

bool dtn::data::PrimaryBlock::operator> ( const PrimaryBlock other) const

Definition at line 136 of file PrimaryBlock.cpp.

void dtn::data::PrimaryBlock::relabel ( )

relabel the primary block with a new sequence number and a timestamp

Definition at line 151 of file PrimaryBlock.cpp.

References dtn::utils::Clock::getTime(), dtn::utils::Clock::isBad(), sequencenumber, and timestamp.

Referenced by dtn::daemon::DTNTPWorker::callbackBundleReceived(), PrimaryBlock(), dtn::api::BinaryStreamClient::run(), and dtn::api::ExtendedApiHandler::run().

Here is the call graph for this function:

void dtn::data::PrimaryBlock::setPriority ( PrimaryBlock::PRIORITY  p)

Definition at line 73 of file PrimaryBlock.cpp.

References PRIO_HIGH, PRIO_LOW, PRIO_MEDIUM, PRIORITY_BIT1, and PRIORITY_BIT2.

Referenced by main().

std::string dtn::data::PrimaryBlock::toString ( ) const

Definition at line 146 of file PrimaryBlock.cpp.

References dtn::data::BundleID::toString().

Referenced by dtn::data::Bundle::toString().

Here is the call graph for this function:

Member Data Documentation


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