IBR-DTNSuite
0.12
|
#include <Serializer.h>
Public Member Functions | |
DefaultDeserializer (std::istream &stream) | |
DefaultDeserializer (std::istream &stream, Validator &v) | |
virtual | ~DefaultDeserializer () |
virtual Deserializer & | operator>> (dtn::data::Bundle &obj) |
virtual Deserializer & | operator>> (dtn::data::PrimaryBlock &obj) |
virtual Deserializer & | operator>> (dtn::data::Block &obj) |
virtual Deserializer & | read (const dtn::data::PrimaryBlock &bundle, dtn::data::Block &obj) |
virtual Deserializer & | operator>> (dtn::data::MetaBundle &obj) |
void | setFragmentationSupport (bool val) |
Public Member Functions inherited from dtn::data::Deserializer | |
virtual | ~Deserializer () |
Protected Attributes | |
std::istream & | _stream |
Validator & | _validator |
AcceptValidator | _default_validator |
Definition at line 136 of file Serializer.h.
dtn::data::DefaultDeserializer::DefaultDeserializer | ( | std::istream & | stream) |
Default Deserializer
stream | Stream to read from |
Definition at line 537 of file Serializer.cpp.
dtn::data::DefaultDeserializer::DefaultDeserializer | ( | std::istream & | stream, |
Validator & | v | ||
) |
Initialize the Deserializer The validator can check each block, header or bundle for validity.
stream | Stream to read from |
v | Validator for the bundles and blocks |
Definition at line 542 of file Serializer.cpp.
|
inlinevirtual |
|
virtual |
Implements dtn::data::Deserializer.
Definition at line 552 of file Serializer.cpp.
References _stream, _validator, dtn::data::PrimaryBlock::appdatalength, dtn::data::Block::BLOCK_CONTAINS_EIDS, dtn::data::Bundle::clear(), dtn::data::PrimaryBlock::DONT_FRAGMENT, dtn::data::PrimaryBlock::FRAGMENT, dtn::data::BundleID::fragmentoffset, dtn::data::PrimaryBlock::get(), dtn::data::Block::getLength(), IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, dtn::data::BundleBuilder::insert(), dtn::data::Block::LAST_BLOCK, dtn::PayloadReceptionInterrupted::length, dtn::data::PrimaryBlock::set(), and dtn::data::Validator::validate().
|
virtual |
Definition at line 659 of file Serializer.cpp.
References _stream, _validator, dtn::data::PrimaryBlock::appdatalength, dtn::data::PrimaryBlock::custodian, dtn::data::PrimaryBlock::destination, dtn::data::PrimaryBlock::FRAGMENT, dtn::data::BundleID::fragmentoffset, dtn::data::PrimaryBlock::get(), dtn::data::PrimaryBlock::lifetime, dtn::data::PrimaryBlock::procflags, dtn::data::PrimaryBlock::reportto, dtn::data::BundleID::sequencenumber, dtn::data::BundleID::source, dtn::data::BundleID::timestamp, and dtn::data::Validator::validate().
|
virtual |
Definition at line 723 of file Serializer.cpp.
References _stream, _validator, dtn::data::Block::addEID(), dtn::data::Block::BLOCK_CONTAINS_EIDS, dtn::data::Block::deserialize(), dtn::data::Block::get(), dtn::data::Dictionary::get(), and dtn::data::Validator::validate().
|
virtual |
Definition at line 638 of file Serializer.cpp.
References dtn::data::MetaBundle::appdatalength, dtn::data::MetaBundle::custodian, dtn::data::MetaBundle::destination, dtn::data::MetaBundle::expiretime, dtn::data::BundleID::fragmentoffset, dtn::utils::Clock::getExpireTime(), dtn::data::MetaBundle::hopcount, dtn::data::MetaBundle::lifetime, dtn::data::MetaBundle::procflags, dtn::data::MetaBundle::reportto, dtn::data::BundleID::sequencenumber, dtn::data::BundleID::source, and dtn::data::BundleID::timestamp.
|
virtual |
Definition at line 761 of file Serializer.cpp.
References _stream, _validator, dtn::data::Block::addEID(), dtn::data::Block::BLOCK_CONTAINS_EIDS, dtn::data::Block::deserialize(), dtn::data::Block::get(), dtn::data::Dictionary::get(), and dtn::data::Validator::validate().
void dtn::data::DefaultDeserializer::setFragmentationSupport | ( | bool | val) |
Enable or disable reactive fragmentation support. (Default is disabled.)
val |
Definition at line 547 of file Serializer.cpp.
Referenced by dtn::net::TCPConnection::run().
|
protected |
Definition at line 176 of file Serializer.h.
|
protected |
Definition at line 174 of file Serializer.h.
Referenced by operator>>(), read(), and dtn::data::SeparateDeserializer::readBlock().
|
protected |
Definition at line 175 of file Serializer.h.
Referenced by operator>>(), read(), and dtn::data::SeparateDeserializer::readBlock().