IBR-DTNSuite
0.8
|
This class is a abstract base class for all prophet forwarding strategies. More...
#include <ProphetRoutingExtension.h>
Public Member Functions | |
ForwardingStrategy () | |
virtual | ~ForwardingStrategy ()=0 |
virtual bool | shallForward (const dtn::data::EID &neighbor, const dtn::data::MetaBundle &bundle) const =0 |
bool | neighborDPIsGreater (const dtn::data::EID &neighbor, 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 56 of file ProphetRoutingExtension.h.
Definition at line 878 of file ProphetRoutingExtension.cpp.
Definition at line 882 of file ProphetRoutingExtension.cpp.
bool dtn::routing::ProphetRoutingExtension::ForwardingStrategy::neighborDPIsGreater | ( | const dtn::data::EID & | neighbor, |
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 885 of file ProphetRoutingExtension.cpp.
void dtn::routing::ProphetRoutingExtension::ForwardingStrategy::setProphetRouter | ( | ProphetRoutingExtension * | router | ) |
Set back-reference to the prophet router
Definition at line 906 of file ProphetRoutingExtension.cpp.
Referenced by dtn::routing::ProphetRoutingExtension::ProphetRoutingExtension().
virtual bool dtn::routing::ProphetRoutingExtension::ForwardingStrategy::shallForward | ( | const dtn::data::EID & | neighbor, |
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.
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.
ProphetRoutingExtension* dtn::routing::ProphetRoutingExtension::ForwardingStrategy::_prophet_router [protected] |
Definition at line 81 of file ProphetRoutingExtension.h.