|
IBR-DTNSuite
0.12
|
#include <FragmentManager.h>


Public Member Functions | |
| FragmentManager () | |
| virtual | ~FragmentManager () |
| void | signal (const dtn::data::MetaBundle &meta) |
| void | __cancellation () throw () |
| void | componentUp () throw () |
| void | componentRun () throw () |
| void | componentDown () throw () |
| void | raiseEvent (const dtn::core::Event *evt) throw () |
| const std::string | getName () const |
Public Member Functions inherited from dtn::daemon::IndependentComponent | |
| IndependentComponent () | |
| virtual | ~IndependentComponent () |
| virtual void | initialize () throw () |
| virtual void | startup () throw () |
| virtual void | terminate () throw () |
Public Member Functions inherited from dtn::daemon::Component | |
| virtual | ~Component ()=0 |
Public Member Functions inherited from dtn::core::EventReceiver | |
| virtual | ~EventReceiver ()=0 |
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 | |
Protected Member Functions inherited from dtn::daemon::IndependentComponent | |
| void | run () throw () |
Definition at line 62 of file FragmentManager.h.
| dtn::core::FragmentManager::FragmentManager | ( | ) |
Definition at line 43 of file FragmentManager.cpp.
|
virtual |
Definition at line 48 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 57 of file FragmentManager.cpp.
References ibrcommon::Queue< T >::abort().

|
virtual | |||||||||||||
This method is called if the component should stop. Clean-up code should be inserted here.
Implements dtn::daemon::IndependentComponent.
Definition at line 158 of file FragmentManager.cpp.
References ibrcommon::JoinableThread::join(), dtn::core::EventDispatcher< E >::remove(), and ibrcommon::JoinableThread::stop().

|
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 70 of file FragmentManager.cpp.
References dtn::data::MetaBundle::appdatalength, dtn::storage::BundleStorage::contains(), dtn::data::PrimaryBlock::DESTINATION_IS_SINGLETON, ibrcommon::LogLevel::error, 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(), ibrcommon::Queue< T >::getnpop(), dtn::data::BundleID::getPayloadLength(), dtn::core::BundleCore::getStorage(), IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, dtn::data::BundleMerger::Container::isComplete(), dtn::core::BundleCore::local, ibrcommon::LogLevel::notice, dtn::net::BundleReceivedEvent::raise(), dtn::core::BundlePurgeEvent::raise(), 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 63 of file FragmentManager.cpp.
References dtn::core::EventDispatcher< E >::add().

|
virtual |
Return an identifier for this component
Implements dtn::daemon::Component.
Definition at line 52 of file FragmentManager.cpp.
|
static | ||||||||||||||||||||
Get the offset of a transmission
| peer | |
| id |
Definition at line 253 of file FragmentManager.cpp.
|
virtual | ||||||||||||||
Implements dtn::core::EventReceiver.
Definition at line 166 of file FragmentManager.cpp.
References dtn::routing::QueueBundleEvent::bundle, and dtn::data::MetaBundle::isFragment().

|
static | ||||||||||||||||||||||||||||
Updates the offset of a transmission
| peer | |
| id | |
| offset |
Definition at line 231 of file FragmentManager.cpp.
References dtn::storage::BundleStorage::get(), dtn::utils::Clock::getExpireTime(), dtn::core::BundleCore::getInstance(), dtn::core::BundleCore::getStorage(), IBRCOMMON_LOGGER_DEBUG_TAG, and IBRCOMMON_LOGGER_ENDL.
Referenced by dtn::net::TCPConnection::clearQueue().

| void dtn::core::FragmentManager::signal | ( | const dtn::data::MetaBundle & | meta) |
Definition at line 176 of file FragmentManager.cpp.
References dtn::data::MetaBundle::destination, dtn::data::PrimaryBlock::DESTINATION_IS_SINGLETON, dtn::data::MetaBundle::get(), dtn::core::BundleCore::local, ibrcommon::Queue< T >::push(), and dtn::data::EID::sameHost().

|
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 319 of file FragmentManager.cpp.
References dtn::data::PrimaryBlock::appdatalength, dtn::data::Bundle::clear(), ibrcommon::BLOB::copy(), ibrcommon::BLOB::create(), dtn::data::PrimaryBlock::DONT_FRAGMENT, ibrcommon::LogLevel::error, dtn::data::PrimaryBlock::FRAGMENT, dtn::data::BundleID::fragmentoffset, dtn::data::PayloadBlock::getBLOB(), dtn::data::PayloadBlock::getLength(), IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, ibrcommon::BLOB::Reference::iostream(), dtn::data::Bundle::push_back(), dtn::data::PrimaryBlock::set(), ibrcommon::BLOB::iostream::size(), dtn::data::BundleID::toString(), and ibrcommon::Exception::what().
Referenced by dtn::api::Registration::processIncomingBundle().
