IBR-DTNSuite
0.8
|
#include <CustodySignalBlock.h>
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 |
Definition at line 23 of file CustodySignalBlock.h.
Definition at line 26 of file CustodySignalBlock.h.
Definition at line 18 of file CustodySignalBlock.cpp.
dtn::data::CustodySignalBlock::~CustodySignalBlock | ( | ) | [virtual] |
Definition at line 24 of file CustodySignalBlock.cpp.
std::istream & dtn::data::CustodySignalBlock::deserialize | ( | std::istream & | stream, |
const size_t | length | ||
) | [virtual] |
Deserialize the derived block payload.
stream | A input stream to deserialize from. |
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().
bool dtn::data::CustodySignalBlock::match | ( | const Bundle & | other | ) | const |
Definition at line 145 of file CustodySignalBlock.cpp.
References _admfield, dtn::data::PrimaryBlock::_appdatalength, _bundle_sequence, _bundle_timestamp, _fragment_length, _fragment_offset, dtn::data::PrimaryBlock::_fragmentoffset, dtn::data::PrimaryBlock::_sequencenumber, _source, dtn::data::PrimaryBlock::_source, dtn::data::PrimaryBlock::_timestamp, dtn::data::PrimaryBlock::FRAGMENT, and dtn::data::PrimaryBlock::get().
std::ostream & dtn::data::CustodySignalBlock::serialize | ( | std::ostream & | stream, |
size_t & | length | ||
) | const [virtual] |
Serialize the derived block payload.
stream | A output stream to serialize into. |
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().
void dtn::data::CustodySignalBlock::setMatch | ( | const MetaBundle & | other | ) |
Definition at line 113 of file CustodySignalBlock.cpp.
References _admfield, _bundle_sequence, _bundle_timestamp, _fragment_length, _fragment_offset, _source, dtn::data::MetaBundle::appdatalength, dtn::data::PrimaryBlock::FRAGMENT, dtn::data::MetaBundle::get(), dtn::data::BundleID::offset, dtn::data::BundleID::sequencenumber, dtn::data::BundleID::source, and dtn::data::BundleID::timestamp.
Referenced by dtn::storage::BundleStorage::acceptCustody(), and dtn::storage::BundleStorage::rejectCustody().
void dtn::data::CustodySignalBlock::setMatch | ( | const Bundle & | other | ) |
Definition at line 129 of file CustodySignalBlock.cpp.
References _admfield, dtn::data::PrimaryBlock::_appdatalength, _bundle_sequence, _bundle_timestamp, _fragment_length, _fragment_offset, dtn::data::PrimaryBlock::_fragmentoffset, dtn::data::PrimaryBlock::_sequencenumber, _source, dtn::data::PrimaryBlock::_source, dtn::data::PrimaryBlock::_timestamp, dtn::data::PrimaryBlock::FRAGMENT, and dtn::data::PrimaryBlock::get().
Definition at line 50 of file CustodySignalBlock.h.
Referenced by deserialize(), getLength(), match(), serialize(), and setMatch().
Definition at line 58 of file CustodySignalBlock.h.
Referenced by deserialize(), getLength(), match(), dtn::core::BundleCore::raiseEvent(), serialize(), and setMatch().
Definition at line 57 of file CustodySignalBlock.h.
Referenced by deserialize(), getLength(), match(), dtn::core::BundleCore::raiseEvent(), serialize(), and setMatch().
Definition at line 52 of file CustodySignalBlock.h.
Referenced by dtn::storage::BundleStorage::acceptCustody(), deserialize(), and serialize().
Definition at line 55 of file CustodySignalBlock.h.
Referenced by deserialize(), getLength(), match(), dtn::core::BundleCore::raiseEvent(), serialize(), and setMatch().
Definition at line 54 of file CustodySignalBlock.h.
Referenced by deserialize(), getLength(), match(), dtn::core::BundleCore::raiseEvent(), serialize(), and setMatch().
Definition at line 53 of file CustodySignalBlock.h.
Referenced by deserialize(), dtn::storage::BundleStorage::rejectCustody(), and serialize().
Definition at line 59 of file CustodySignalBlock.h.
Referenced by deserialize(), getLength(), match(), dtn::core::BundleCore::raiseEvent(), serialize(), and setMatch().
Definition at line 56 of file CustodySignalBlock.h.
Referenced by deserialize(), getLength(), and serialize().