DifferentialForwarding::DFApp Class Reference

Abstract base class for differential forwarding message processing. More...

#include <differential_forwarding/DFApp.h>

Inheritance diagram for DifferentialForwarding::DFApp:

Inheritance graph
[legend]
Collaboration diagram for DifferentialForwarding::DFApp:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DFApp (const struct timeval &timeout, DTN::Link *link)
 Constructor.
virtual ~DFApp ()
 Virtual destructor.
void beacon ()
 Generate and broadcast a beacon message.
virtual DTN::Linklinked (const DTN::ByteString &dest)=0
 Find a node to which we can send data.

Protected Member Functions

virtual DTN::BundlecreateBeacon ()=0
 Generate our beacon to broadcast to neighbors.
struct timeval & timeout () const
 Accessor.
DTN::Linklink ()
 Accessor.


Detailed Description

Abstract base class for differential forwarding message processing.

DTN::Application::process() is left unimplemented in this class, as is Mobility::MobileApp::newNeighbor(). This should be added to a Mobility::MobileNode using addMobileApp(), rather than addApplication(). The former calls the latter, as well as adding the application to a separate list of apps to notify when a new neighbor comes into view.

Definition at line 53 of file DFApp.h.


Constructor & Destructor Documentation

DFApp::DFApp ( const struct timeval &  timeout,
DTN::Link link 
)

Constructor.

Parameters:
timeout The maximum duration without receiving a beacon after which we determine that a node is no longer visible
link The real link on which bundles are sent (not owned)

Definition at line 38 of file DFApp.cc.


Member Function Documentation

virtual DTN::Link* DifferentialForwarding::DFApp::linked ( const DTN::ByteString &  dest  )  [pure virtual]

Find a node to which we can send data.

Parameters:
dest The destination address
Returns:
a link on which to send, or NULL if there is nothing appropriate

Referenced by DifferentialForwarding::DFPolicy::forward(), and DifferentialForwarding::DFPolicy::forwardOn().

virtual DTN::Bundle* DifferentialForwarding::DFApp::createBeacon (  )  [protected, pure virtual]

Generate our beacon to broadcast to neighbors.

Returns:
a new bundle, passing ownership to the caller

Referenced by beacon().


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