Epidemic::EpidemicForwarding Class Reference
[pydtn.mobility.epidemic]

Forwarding policy for epidemic routing. More...

#include <epidemic/EpidemicForwarding.h>

Inheritance diagram for Epidemic::EpidemicForwarding:

Inheritance graph
[legend]
Collaboration diagram for Epidemic::EpidemicForwarding:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 EpidemicForwarding (DTN::Node *owner, DTN::Link *link, EpidemicApp *app)
 Constructor.
virtual ~EpidemicForwarding ()
 Virtual destructor.
bool forward (DTN::Bundle *b)
 Attepmt to forward a Bundle.
DTN::BundleforwardOn (const DTN::Link &l)
 Attepmt to forward along a Link that has become available.


Detailed Description

Forwarding policy for epidemic routing.

Definition at line 46 of file EpidemicForwarding.h.


Constructor & Destructor Documentation

EpidemicForwarding::EpidemicForwarding ( DTN::Node owner,
DTN::Link link,
EpidemicApp app 
)

Constructor.

Parameters:
owner The node at which this policy resides
link The physical link for the owner
app The epidemic protocol manager

Definition at line 39 of file EpidemicForwarding.cc.


Member Function Documentation

bool EpidemicForwarding::forward ( DTN::Bundle b  )  [virtual]

Attepmt to forward a Bundle.

Concrete derived classes must implement this.

Parameters:
b A Bundle to forward
Return values:
true b was forwarded
false b was not forwarded and should be considered for local storage

Implements DTN::ForwardingPolicy.

Definition at line 53 of file EpidemicForwarding.cc.

References DTN::Link::available(), Epidemic::EpidemicApp::getLink(), DTN::Bundle::kBcast, DTN::NodePolicy::m_owner, DTN::Bundle::recv(), and DTN::Bundle::type().

DTN::Bundle * EpidemicForwarding::forwardOn ( const DTN::Link l  )  [virtual]

Attepmt to forward along a Link that has become available.

Concrete derived classes must implement this.

Parameters:
l A Link capable of transmitting a new Bundle
Returns:
a Bundle to forward

Implements DTN::ForwardingPolicy.

Definition at line 85 of file EpidemicForwarding.cc.

References Epidemic::EpidemicApp::getLink(), DTN::NoRouteDrop::inst, DTN::BundlePointer::isNull(), DTN::Bundle::kBcast, DTN::NodePolicy::m_owner, DTN::BundlePointer::next(), DTN::Bundle::recv(), DTN::BundlePointer::repr(), and DTN::Bundle::type().


The documentation for this class was generated from the following files:
Generated on Mon Mar 24 11:15:48 2008 for Pydtn Simulator by  doxygen 1.5.4