IBR-DTNSuite
0.12
|
This class is a abstract base class for all prophet forwarding strategies. More...
#include <ForwardingStrategy.h>
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 |
This class is a abstract base class for all prophet forwarding strategies.
Definition at line 24 of file ForwardingStrategy.h.
dtn::routing::ForwardingStrategy::ForwardingStrategy | ( | ) |
Definition at line 16 of file ForwardingStrategy.cpp.
|
pure virtual |
Definition at line 20 of file ForwardingStrategy.cpp.
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().
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().
|
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.
neighbor | the neighbor to forward to |
bundle | the bundle that can be forwarded |
prophet_router | Reference to the ProphetRoutingExtension to access its parameters |
Implemented in dtn::routing::ProphetRoutingExtension::GTMX_Strategy, and dtn::routing::ProphetRoutingExtension::GRTR_Strategy.
|
protected |
Definition at line 49 of file ForwardingStrategy.h.
Referenced by neighborDPIsGreater(), and setProphetRouter().