IBR-DTN
1.0.0
|
#include <FragmentManager.h>
Public Member Functions | |
FragmentManager () | |
virtual | ~FragmentManager () |
void | __cancellation () throw () |
void | componentUp () throw () |
void | componentRun () throw () |
void | componentDown () throw () |
void | raiseEvent (const dtn::routing::QueueBundleEvent &evt) throw () |
const std::string | getName () const |
![]() | |
IndependentComponent () | |
virtual | ~IndependentComponent () |
virtual void | initialize () throw () |
virtual void | startup () throw () |
virtual void | terminate () throw () |
![]() | |
virtual | ~Component ()=0 |
![]() | |
virtual | ~EventReceiver () |
Static Public Member Functions | |
static void | setOffset (const dtn::data::EID &peer, const dtn::data::BundleID &id, const dtn::data::Length &abs_offset, const dtn::data::Length &frag_offset) throw () |
static dtn::data::Length | getOffset (const dtn::data::EID &peer, const dtn::data::BundleID &id) throw () |
static void | split (const dtn::data::Bundle &bundle, const dtn::data::Length &maxPayloadLength, std::list< dtn::data::Bundle > &fragments) throw (FragmentationAbortedException) |
Additional Inherited Members | |
![]() | |
void | run () throw () |
Definition at line 63 of file FragmentManager.h.
dtn::core::FragmentManager::FragmentManager | ( | ) |
Definition at line 48 of file FragmentManager.cpp.
|
virtual |
Definition at line 53 of file FragmentManager.cpp.
|
virtual |
This method is called after componentDown() and should should guarantee that blocking calls in componentRun() will unblock.
Implements dtn::daemon::IndependentComponent.
Definition at line 62 of file FragmentManager.cpp.
|
virtual |
This method is called if the component should stop. Clean-up code should be inserted here.
Implements dtn::daemon::IndependentComponent.
Definition at line 169 of file FragmentManager.cpp.
References dtn::core::EventDispatcher< E >::remove().
|
virtual |
This is the run method. The component should loop in there until componentDown() or __cancellation() is called.
Implements dtn::daemon::IndependentComponent.
Definition at line 75 of file FragmentManager.cpp.
References dtn::core::BundleFilter::ACCEPT, dtn::data::MetaBundle::appdatalength, dtn::storage::BundleStorage::contains(), dtn::data::PrimaryBlock::DESTINATION_IS_SINGLETON, dtn::data::BundleID::fragmentoffset, dtn::storage::BundleStorage::get(), dtn::data::PrimaryBlock::get(), dtn::data::SDNV< E >::get(), dtn::data::BundleMerger::Container::getBundle(), dtn::data::BundleMerger::getContainer(), dtn::core::BundleCore::getInstance(), dtn::data::BundleID::getPayloadLength(), dtn::core::BundleCore::getStorage(), dtn::core::BundleFilter::INPUT, dtn::data::BundleMerger::Container::isComplete(), dtn::core::BundleCore::local, dtn::net::BundleReceivedEvent::raise(), dtn::core::BundlePurgeEvent::raise(), dtn::core::FilterContext::setBundle(), dtn::data::BundleID::setFragment(), and dtn::data::BundleID::toString().
|
virtual |
Is called in preparation of the component. Before componentRun() is called.
Implements dtn::daemon::IndependentComponent.
Definition at line 68 of file FragmentManager.cpp.
References dtn::core::EventDispatcher< E >::add().
|
virtual |
Return an identifier for this component
Implements dtn::daemon::Component.
Definition at line 57 of file FragmentManager.cpp.
|
static |
Get the offset of a transmission
peer | |
id |
Definition at line 257 of file FragmentManager.cpp.
|
virtual |
Implements dtn::core::EventReceiver< dtn::routing::QueueBundleEvent >.
Definition at line 177 of file FragmentManager.cpp.
References dtn::data::PrimaryBlock::DESTINATION_IS_SINGLETON, and dtn::core::BundleCore::local.
|
static |
Updates the offset of a transmission
peer | |
id | |
offset |
Definition at line 235 of file FragmentManager.cpp.
References dtn::storage::BundleStorage::get(), dtn::utils::Clock::getExpireTime(), dtn::core::BundleCore::getInstance(), and dtn::core::BundleCore::getStorage().
Referenced by dtn::net::TCPConnection::clearQueue().
|
static |
Split-up a bundle into several pieces
bundle | the original bundle |
maxPayloadLength | payload length maximum per fragment |
fragments | list of all fragments |
Definition at line 323 of file FragmentManager.cpp.
References dtn::data::PrimaryBlock::appdatalength, dtn::data::Bundle::clear(), dtn::data::PrimaryBlock::DONT_FRAGMENT, dtn::data::PrimaryBlock::FRAGMENT, dtn::data::BundleID::fragmentoffset, dtn::data::PayloadBlock::getBLOB(), dtn::data::PayloadBlock::getLength(), dtn::data::Bundle::push_back(), dtn::data::PrimaryBlock::set(), and dtn::data::BundleID::toString().
Referenced by dtn::core::BundleCore::inject().