dtn::core::BundleCore Class Reference

#include <BundleCore.h>

Inheritance diagram for dtn::core::BundleCore:

dtn::utils::Service dtn::core::BundleReceiver dtn::core::EventReceiver

List of all members.

Public Member Functions

void setConvergenceLayer (ConvergenceLayer *cl)
ConvergenceLayergetConvergenceLayer ()
CustodyManagergetCustodyManager ()
void registerSubNode (string eid, AbstractWorker *node)
void unregisterSubNode (string eid)
virtual void received (const ConvergenceLayer &cl, const Bundle &b)
string getLocalURI () const
void raiseEvent (const Event *evt)
void transmit (const Node &n, const Bundle &b)
void deliver (const Bundle &b)

Static Public Member Functions

static BundleCoregetInstance (string eid)
static BundleCoregetInstance ()

Protected Member Functions

void tick ()

Private Member Functions

 BundleCore ()
virtual ~BundleCore ()
void transmit (const Bundle &b)
BundleCore operator= (const BundleCore &k)
void setLocalEID (string eid)
void transmitCustody (bool accept, const Bundle &b)
Bundle createStatusReport (const Bundle &b, StatusReportType type, StatusReportReasonCode reason=NO_ADDITIONAL_INFORMATION)
Bundle createCustodySignal (const Bundle &b, bool accepted)

Private Attributes

ConvergenceLayerm_clayer
map< string, AbstractWorker * > m_worker
string m_localeid
CustodyManager m_cm
unsigned int m_dtntime


Detailed Description

The BundleCore manage the Bundle Protocol basics

Constructor & Destructor Documentation

dtn::core::BundleCore::BundleCore (  )  [private]

dtn::core::BundleCore::~BundleCore (  )  [private, virtual]


Member Function Documentation

BundleCore & dtn::core::BundleCore::getInstance ( string  eid  )  [static]

References getInstance(), and setLocalEID().

BundleCore & dtn::core::BundleCore::getInstance (  )  [static]

void dtn::core::BundleCore::setConvergenceLayer ( ConvergenceLayer cl  ) 

Set a ConvergenceLayer Object which is used to send and receive bundles. If you want to use more than only one ConvergenceLayer the MultiplexCongerenceLayer is needed.

Parameters:
cl A instance of a ConvergenceLayer class.

References m_clayer, and dtn::core::ConvergenceLayer::setBundleReceiver().

Referenced by main().

ConvergenceLayer * dtn::core::BundleCore::getConvergenceLayer (  ) 

Get the currently used ConvergenceLayer instance.

Returns:
The currently used ConvergenceLayer or NULL if nothing is assigned.

References m_clayer.

CustodyManager & dtn::core::BundleCore::getCustodyManager (  ) 

get the current custody manager

References m_cm.

void dtn::core::BundleCore::registerSubNode ( string  eid,
AbstractWorker node 
)

void dtn::core::BundleCore::unregisterSubNode ( string  eid  ) 

void dtn::core::BundleCore::received ( const ConvergenceLayer cl,
const Bundle b 
) [virtual]

string dtn::core::BundleCore::getLocalURI (  )  const

void dtn::core::BundleCore::raiseEvent ( const Event evt  )  [virtual]

void dtn::core::BundleCore::transmit ( const Node n,
const Bundle b 
)

void dtn::core::BundleCore::deliver ( const Bundle b  ) 

void dtn::core::BundleCore::tick (  )  [protected, virtual]

overload this method to do your own stuff.

Implements dtn::utils::Service.

References m_dtntime, dtn::core::EventSwitch::raiseEvent(), and dtn::core::TIME_SECOND_TICK.

void dtn::core::BundleCore::transmit ( const Bundle b  )  [private]

BundleCore dtn::core::BundleCore::operator= ( const BundleCore k  )  [inline, private]

Forbidden copy constructor

void dtn::core::BundleCore::setLocalEID ( string  eid  )  [private]

References m_localeid.

Referenced by getInstance().

void dtn::core::BundleCore::transmitCustody ( bool  accept,
const Bundle b 
) [private]

Bundle dtn::core::BundleCore::createStatusReport ( const Bundle b,
StatusReportType  type,
StatusReportReasonCode  reason = NO_ADDITIONAL_INFORMATION 
) [private]

Bundle dtn::core::BundleCore::createCustodySignal ( const Bundle b,
bool  accepted 
) [private]


Member Data Documentation

unsigned int dtn::core::BundleCore::m_dtntime [private]

Referenced by tick().


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

Generated on Wed Mar 25 12:41:34 2009 for IBR-DTN by  doxygen 1.5.6