IBR-DTNSuite  0.10
dtn::routing::ForwardingStrategy Class Referenceabstract

This class is a abstract base class for all prophet forwarding strategies. More...

#include <ForwardingStrategy.h>

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

Public Member Functions

 ForwardingStrategy ()
 
virtual ~ForwardingStrategy ()=0
 
virtual bool shallForward (const DeliveryPredictabilityMap &neighbor_dpm, const dtn::data::MetaBundle &bundle) const =0
 
bool neighborDPIsGreater (const DeliveryPredictabilityMap &neighbor_dpm, const dtn::data::EID &destination) const
 
void setProphetRouter (ProphetRoutingExtension *router)
 

Protected Attributes

ProphetRoutingExtension_prophet_router
 

Detailed Description

This class is a abstract base class for all prophet forwarding strategies.

Definition at line 24 of file ForwardingStrategy.h.

Constructor & Destructor Documentation

dtn::routing::ForwardingStrategy::ForwardingStrategy ( )

Definition at line 16 of file ForwardingStrategy.cpp.

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

Definition at line 20 of file ForwardingStrategy.cpp.

Member Function Documentation

bool dtn::routing::ForwardingStrategy::neighborDPIsGreater ( const DeliveryPredictabilityMap neighbor_dpm,
const dtn::data::EID destination 
) const

checks if the deliveryPredictability of the neighbor is higher than that of the destination of the bundle.

Definition at line 23 of file ForwardingStrategy.cpp.

References _prophet_router, dtn::routing::DeliveryPredictabilityMap::get(), and dtn::data::EID::getNode().

Here is the call graph for this function:

void dtn::routing::ForwardingStrategy::setProphetRouter ( ProphetRoutingExtension router)

Set back-reference to the prophet router

Definition at line 54 of file ForwardingStrategy.cpp.

References _prophet_router.

Referenced by dtn::routing::ProphetRoutingExtension::ProphetRoutingExtension().

virtual bool dtn::routing::ForwardingStrategy::shallForward ( const DeliveryPredictabilityMap neighbor_dpm,
const dtn::data::MetaBundle bundle 
) const
pure virtual

The prophetRoutingExtension calls this function for every bundle that can be forwarded to a neighbor and forwards it depending on the return value.

Parameters
neighborthe neighbor to forward to
bundlethe bundle that can be forwarded
prophet_routerReference to the ProphetRoutingExtension to access its parameters
Returns
true if the bundle should be forwarded

Implemented in dtn::routing::ProphetRoutingExtension::GTMX_Strategy, and dtn::routing::ProphetRoutingExtension::GRTR_Strategy.

Member Data Documentation

ProphetRoutingExtension* dtn::routing::ForwardingStrategy::_prophet_router
protected

Definition at line 49 of file ForwardingStrategy.h.

Referenced by neighborDPIsGreater(), and setProphetRouter().


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