IBR-DTNSuite
0.12
|
#include <PrimaryBlock.h>
Public Member Functions | |
PrimaryBlock (bool zero_timestamp=false) | |
virtual | ~PrimaryBlock () |
void | set (FLAGS flag, bool value) |
bool | get (FLAGS flag) const |
PRIORITY | getPriority () const |
void | setPriority (PRIORITY p) |
bool | isFragment () const |
void | setFragment (bool val) |
void | relabel (bool zero_timestamp=false) |
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 Member Functions inherited from dtn::data::BundleID | |
BundleID () | |
virtual | ~BundleID () |
bool | operator!= (const BundleID &other) const |
bool | operator== (const BundleID &other) const |
bool | operator< (const BundleID &other) const |
bool | operator> (const BundleID &other) const |
BundleID (const BundleID &id) | |
BundleID & | operator= (const BundleID &id) |
std::string | toString () const |
virtual dtn::data::Length | getPayloadLength () const |
virtual void | setPayloadLength (const dtn::data::Length &value) |
void | addTo (ibrcommon::BloomFilter &bf) const |
bool | isIn (const ibrcommon::BloomFilter &bf) const |
size_t | raw (unsigned char *data, size_t len) const |
Public Attributes | |
Bitset< FLAGS > | procflags |
Number | lifetime |
Number | appdatalength |
EID | destination |
EID | reportto |
EID | custodian |
Public Attributes inherited from dtn::data::BundleID | |
dtn::data::EID | source |
dtn::data::Timestamp | timestamp |
dtn::data::Number | sequencenumber |
dtn::data::Number | fragmentoffset |
Definition at line 47 of file PrimaryBlock.h.
Definition at line 63 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 56 of file PrimaryBlock.h.
dtn::data::PrimaryBlock::PrimaryBlock | ( | bool | zero_timestamp = false ) |
Definition at line 36 of file PrimaryBlock.cpp.
References DESTINATION_IS_SINGLETON, relabel(), and set().
|
virtual |
Definition at line 45 of file PrimaryBlock.cpp.
bool dtn::data::PrimaryBlock::get | ( | FLAGS | flag) | const |
Definition at line 54 of file PrimaryBlock.cpp.
References dtn::data::Bitset< E >::getBit(), and procflags.
Referenced by dtn::core::FragmentManager::componentRun(), dtn::utils::Utils::encapsule(), dtn::security::PayloadConfidentialBlock::encrypt(), dtn::data::DefaultSerializer::getLength(), main(), dtn::data::operator<<(), dtn::data::DefaultSerializer::operator<<(), dtn::data::DefaultDeserializer::operator>>(), dtn::api::Registration::processIncomingBundle(), dtn::net::UDPConvergenceLayer::queue(), dtn::api::EventConnection::raiseEvent(), dtn::core::BundleCore::raiseEvent(), BundleStream::received(), and dtn::security::PayloadIntegrityBlock::sign().
PrimaryBlock::PRIORITY dtn::data::PrimaryBlock::getPriority | ( | ) | const |
Definition at line 59 of file PrimaryBlock.cpp.
References PRIO_HIGH, PRIO_LOW, PRIO_MEDIUM, PRIORITY_BIT1, and PRIORITY_BIT2.
|
virtual |
Reimplemented from dtn::data::BundleID.
Definition at line 96 of file PrimaryBlock.cpp.
References FRAGMENT.
bool dtn::data::PrimaryBlock::operator!= | ( | const PrimaryBlock & | other) | const |
Definition at line 106 of file PrimaryBlock.cpp.
bool dtn::data::PrimaryBlock::operator< | ( | const PrimaryBlock & | other) | const |
Definition at line 116 of file PrimaryBlock.cpp.
bool dtn::data::PrimaryBlock::operator== | ( | const PrimaryBlock & | other) | const |
Definition at line 111 of file PrimaryBlock.cpp.
bool dtn::data::PrimaryBlock::operator> | ( | const PrimaryBlock & | other) | const |
Definition at line 121 of file PrimaryBlock.cpp.
void dtn::data::PrimaryBlock::relabel | ( | bool | zero_timestamp = false ) |
relabel the primary block with a new sequence number and a timestamp
Definition at line 126 of file PrimaryBlock.cpp.
References dtn::utils::Clock::getRating(), dtn::utils::Clock::getTime(), dtn::data::BundleID::sequencenumber, and dtn::data::BundleID::timestamp.
Referenced by dtn::daemon::DTNTPWorker::callbackBundleReceived(), PrimaryBlock(), and dtn::api::Registration::processIncomingBundle().
void dtn::data::PrimaryBlock::set | ( | FLAGS | flag, |
bool | value | ||
) |
Definition at line 49 of file PrimaryBlock.cpp.
References procflags, and dtn::data::Bitset< E >::setBit().
Referenced by BundleStreamBuf::__flush(), dtn::storage::BundleStorage::acceptCustody(), dtn::daemon::DTNTPWorker::callbackBundleReceived(), dtn::utils::Utils::encapsule(), main(), dtn::data::operator<<(), dtn::data::DefaultSerializer::operator<<(), dtn::data::DefaultDeserializer::operator>>(), PrimaryBlock(), dtn::routing::NodeHandshakeExtension::processHandshake(), dtn::api::Registration::processIncomingBundle(), dtn::api::OrderedStreamHandler::put(), dtn::storage::BundleStorage::rejectCustody(), setFragment(), setPriority(), and dtn::core::FragmentManager::split().
|
virtual |
Reimplemented from dtn::data::BundleID.
Definition at line 101 of file PrimaryBlock.cpp.
References FRAGMENT, and set().
void dtn::data::PrimaryBlock::setPriority | ( | PrimaryBlock::PRIORITY | p) |
Definition at line 74 of file PrimaryBlock.cpp.
References PRIO_HIGH, PRIO_LOW, PRIO_MEDIUM, PRIORITY_BIT1, PRIORITY_BIT2, and set().
Referenced by main().
Number dtn::data::PrimaryBlock::appdatalength |
Definition at line 120 of file PrimaryBlock.h.
Referenced by dtn::daemon::Debugger::callbackBundleReceived(), dtn::data::DefaultSerializer::getLength(), dtn::api::PlainSerializer::operator<<(), dtn::data::operator<<(), dtn::data::DefaultSerializer::operator<<(), dtn::api::PlainDeserializer::operator>>(), dtn::data::DefaultDeserializer::operator>>(), dtn::api::EventConnection::raiseEvent(), and dtn::core::FragmentManager::split().
EID dtn::data::PrimaryBlock::custodian |
Definition at line 124 of file PrimaryBlock.h.
Referenced by dtn::data::Dictionary::add(), dtn::data::Bundle::allEIDsInCBHE(), dtn::daemon::Debugger::callbackBundleReceived(), dtn::data::DefaultSerializer::getLength(), dtn::data::DefaultSerializer::isCompressable(), main(), dtn::api::PlainSerializer::operator<<(), dtn::data::DefaultSerializer::operator<<(), dtn::api::PlainDeserializer::operator>>(), dtn::data::DefaultDeserializer::operator>>(), dtn::api::Registration::processIncomingBundle(), and dtn::storage::SimpleBundleStorage::store().
EID dtn::data::PrimaryBlock::destination |
Definition at line 122 of file PrimaryBlock.h.
Referenced by dtn::storage::BundleStorage::acceptCustody(), dtn::data::Dictionary::add(), dtn::data::Bundle::allEIDsInCBHE(), dtn::daemon::Debugger::callbackBundleReceived(), dtn::daemon::DTNTPWorker::callbackBundleReceived(), dtn::net::FileConvergenceLayer::componentRun(), dtn::security::PayloadConfidentialBlock::encrypt(), dtn::storage::MemoryBundleStorage::getDistinctDestinations(), dtn::security::MutableSerializer::getLength(), dtn::data::DefaultSerializer::getLength(), dtn::security::SecurityBlock::getSecurityDestination(), dtn::data::DefaultSerializer::isCompressable(), main(), dtn::api::PlainSerializer::operator<<(), dtn::security::MutableSerializer::operator<<(), dtn::data::DefaultSerializer::operator<<(), dtn::api::PlainDeserializer::operator>>(), dtn::data::DefaultDeserializer::operator>>(), dtn::routing::NodeHandshakeExtension::processHandshake(), dtn::api::Registration::processIncomingBundle(), dtn::api::OrderedStreamHandler::put(), dtn::api::EventConnection::raiseEvent(), dtn::storage::BundleStorage::rejectCustody(), and dtn::security::PayloadIntegrityBlock::sign().
Number dtn::data::PrimaryBlock::lifetime |
Definition at line 119 of file PrimaryBlock.h.
Referenced by dtn::daemon::EchoWorker::callbackBundleReceived(), dtn::daemon::Debugger::callbackBundleReceived(), dtn::daemon::DTNTPWorker::callbackBundleReceived(), dtn::utils::Utils::encapsule(), dtn::utils::Clock::getExpireTime(), dtn::data::DefaultSerializer::getLength(), dtn::utils::Clock::isExpired(), main(), dtn::api::PlainSerializer::operator<<(), dtn::security::MutableSerializer::operator<<(), dtn::data::DefaultSerializer::operator<<(), dtn::api::PlainDeserializer::operator>>(), dtn::data::DefaultDeserializer::operator>>(), dtn::routing::NodeHandshakeExtension::processHandshake(), dtn::api::OrderedStreamHandler::put(), and dtn::api::EventConnection::raiseEvent().
Definition at line 118 of file PrimaryBlock.h.
Referenced by dtn::daemon::Debugger::callbackBundleReceived(), get(), dtn::data::DefaultSerializer::getLength(), main(), dtn::api::PlainSerializer::operator<<(), dtn::security::MutableSerializer::operator<<(), dtn::data::DefaultSerializer::operator<<(), dtn::api::PlainDeserializer::operator>>(), dtn::data::DefaultDeserializer::operator>>(), dtn::api::EventConnection::raiseEvent(), and set().
EID dtn::data::PrimaryBlock::reportto |
Definition at line 123 of file PrimaryBlock.h.
Referenced by BundleStreamBuf::__flush(), dtn::data::Dictionary::add(), dtn::data::Bundle::allEIDsInCBHE(), dtn::daemon::Debugger::callbackBundleReceived(), dtn::security::MutableSerializer::getLength(), dtn::data::DefaultSerializer::getLength(), dtn::data::DefaultSerializer::isCompressable(), dtn::api::PlainSerializer::operator<<(), dtn::security::MutableSerializer::operator<<(), dtn::data::DefaultSerializer::operator<<(), dtn::api::PlainDeserializer::operator>>(), dtn::data::DefaultDeserializer::operator>>(), and dtn::api::Registration::processIncomingBundle().