IBR-DTN  1.0.0
dtn::routing::RoutingExtension Class Referenceabstract

#include <RoutingExtension.h>

Inheritance diagram for dtn::routing::RoutingExtension:
Inheritance graph
Collaboration diagram for dtn::routing::RoutingExtension:
Collaboration graph

Public Member Functions

 RoutingExtension ()
 
virtual ~RoutingExtension ()=0
 
virtual void componentUp ()=0 throw ()
 
virtual void componentDown ()=0 throw ()
 
virtual const std::string getTag () const throw ()
 
virtual void eventDataChanged (const dtn::data::EID &peer) throw ()
 
virtual void eventTransferCompleted (const dtn::data::EID &peer, const dtn::data::MetaBundle &meta) throw ()
 
virtual void eventBundleQueued (const dtn::data::EID &peer, const dtn::data::MetaBundle &meta) throw ()
 
virtual void requestHandshake (const dtn::data::EID &, NodeHandshake &) const
 
virtual void responseHandshake (const dtn::data::EID &, const NodeHandshake &, NodeHandshake &)
 
virtual void processHandshake (const dtn::data::EID &, NodeHandshake &)
 

Protected Member Functions

void transferTo (const dtn::data::EID &destination, const dtn::data::MetaBundle &meta, const dtn::core::Node::Protocol)
 
BaseRouteroperator* ()
 

Detailed Description

Definition at line 50 of file RoutingExtension.h.

Constructor & Destructor Documentation

dtn::routing::RoutingExtension::RoutingExtension ( )

base implementation of the Extension class

Definition at line 54 of file RoutingExtension.cpp.

dtn::routing::RoutingExtension::~RoutingExtension ( )
pure virtual

Definition at line 57 of file RoutingExtension.cpp.

Member Function Documentation

virtual void dtn::routing::RoutingExtension::eventBundleQueued ( const dtn::data::EID peer,
const dtn::data::MetaBundle meta 
)
throw (
)
inlinevirtual
virtual void dtn::routing::RoutingExtension::eventDataChanged ( const dtn::data::EID peer)
throw (
)
inlinevirtual

This method is called every time something has changed. The module should search again for bundles to transfer to the given peer.

Reimplemented in dtn::routing::ProphetRoutingExtension, dtn::routing::EpidemicRoutingExtension, dtn::routing::StaticRoutingExtension, dtn::routing::FloodRoutingExtension, and dtn::routing::NeighborRoutingExtension.

Definition at line 70 of file RoutingExtension.h.

virtual void dtn::routing::RoutingExtension::eventTransferCompleted ( const dtn::data::EID peer,
const dtn::data::MetaBundle meta 
)
throw (
)
inlinevirtual

This method is called every time a bundle has been completed successfully

Reimplemented in dtn::routing::ProphetRoutingExtension, and dtn::routing::RetransmissionExtension.

Definition at line 75 of file RoutingExtension.h.

virtual const std::string dtn::routing::RoutingExtension::getTag ( ) const
throw (
)
inlinevirtual
BaseRouter & dtn::routing::RoutingExtension::operator* ( )
protected

Definition at line 60 of file RoutingExtension.cpp.

References dtn::core::BundleCore::getInstance(), and dtn::core::BundleCore::getRouter().

Here is the call graph for this function:

virtual void dtn::routing::RoutingExtension::processHandshake ( const dtn::data::EID ,
NodeHandshake  
)
inlinevirtual

After a handshake has been completed every module can process the handshake response.

Parameters
TheEID of the other node.
Thereceived handshake object.

Reimplemented in dtn::routing::ProphetRoutingExtension, and dtn::routing::NodeHandshakeExtension.

Definition at line 104 of file RoutingExtension.h.

Referenced by dtn::routing::BaseRouter::processHandshake().

virtual void dtn::routing::RoutingExtension::requestHandshake ( const dtn::data::EID ,
NodeHandshake  
) const
inlinevirtual

If some data of another node is required. These method is called to collect all necessary identifier of data items.

Parameters
TheEID of the other node.
Theobject to put the requested identifier into.

Reimplemented in dtn::routing::ProphetRoutingExtension, dtn::routing::EpidemicRoutingExtension, and dtn::routing::NodeHandshakeExtension.

Definition at line 88 of file RoutingExtension.h.

Referenced by dtn::routing::BaseRouter::requestHandshake().

virtual void dtn::routing::RoutingExtension::responseHandshake ( const dtn::data::EID ,
const NodeHandshake ,
NodeHandshake  
)
inlinevirtual

If a handshake message is received, this method is called to collect the different data items generated by the router extensions.

Parameters
TheEID of the other node.
Thereceived handshake object.
Theresponse for the received handshake.

Reimplemented in dtn::routing::ProphetRoutingExtension, and dtn::routing::NodeHandshakeExtension.

Definition at line 97 of file RoutingExtension.h.

Referenced by dtn::routing::BaseRouter::responseHandshake().

void dtn::routing::RoutingExtension::transferTo ( const dtn::data::EID destination,
const dtn::data::MetaBundle meta,
const dtn::core::Node::Protocol  p 
)
protected

Transfer one bundle to another node.

Exceptions
BundleNotFoundExceptionif the bundle do not exist.
Parameters
destinationThe EID of the other node.
idThe ID of the bundle to transfer. This bundle must be stored in the storage.

Transfer one bundle to another node.

Parameters
destinationThe EID of the other node.
idThe ID of the bundle to transfer. This bundle must be stored in the storage.

Definition at line 70 of file RoutingExtension.cpp.

References dtn::routing::NeighborDatabase::NeighborEntry::acquireTransfer(), dtn::core::BundleCore::getConnectionManager(), dtn::core::BundleCore::getInstance(), dtn::data::EID::getString(), getTag(), dtn::net::ConnectionManager::queue(), dtn::data::BundleID::toString(), and dtn::core::Node::toString().

Referenced by dtn::routing::NeighborRoutingExtension::run(), dtn::routing::FloodRoutingExtension::run(), dtn::routing::StaticRoutingExtension::run(), and dtn::routing::EpidemicRoutingExtension::run().

Here is the call graph for this function:


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