IBR-DTN  1.0.0
dtn::core::FragmentManager Class Reference

#include <FragmentManager.h>

Inheritance diagram for dtn::core::FragmentManager:
Inheritance graph
Collaboration diagram for dtn::core::FragmentManager:
Collaboration graph

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
 
- 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< dtn::routing::QueueBundleEvent >
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

- Protected Member Functions inherited from dtn::daemon::IndependentComponent
void run () throw ()
 

Detailed Description

Definition at line 63 of file FragmentManager.h.

Constructor & Destructor Documentation

dtn::core::FragmentManager::FragmentManager ( )

Definition at line 48 of file FragmentManager.cpp.

dtn::core::FragmentManager::~FragmentManager ( )
virtual

Definition at line 53 of file FragmentManager.cpp.

Member Function Documentation

void dtn::core::FragmentManager::__cancellation ( )
throw (
)
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.

void dtn::core::FragmentManager::componentDown ( )
throw (
)
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().

Here is the call graph for this function:

void dtn::core::FragmentManager::componentUp ( )
throw (
)
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().

Here is the call graph for this function:

const std::string dtn::core::FragmentManager::getName ( ) const
virtual

Return an identifier for this component

Returns

Implements dtn::daemon::Component.

Definition at line 57 of file FragmentManager.cpp.

dtn::data::Length dtn::core::FragmentManager::getOffset ( const dtn::data::EID peer,
const dtn::data::BundleID id 
)
throw (
)
static

Get the offset of a transmission

Parameters
peer
id
Returns

Definition at line 257 of file FragmentManager.cpp.

void dtn::core::FragmentManager::raiseEvent ( const dtn::routing::QueueBundleEvent evt)
throw (
)
virtual
void dtn::core::FragmentManager::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

Updates the offset of a transmission

Parameters
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().

Here is the call graph for this function:

void dtn::core::FragmentManager::split ( const dtn::data::Bundle bundle,
const dtn::data::Length maxPayloadLength,
std::list< dtn::data::Bundle > &  fragments 
)
throw (FragmentationAbortedException
)
static

Split-up a bundle into several pieces

Parameters
bundlethe original bundle
maxPayloadLengthpayload length maximum per fragment
fragmentslist 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().

Here is the call graph for this function:


The documentation for this class was generated from the following files: