DTN::RoutedForwarding Class Reference

ForwardingPolicy subclass that uses a routing table. More...

#include <dtn/RoutedForwarding.h>

Inheritance diagram for DTN::RoutedForwarding:

Inheritance graph
[legend]
Collaboration diagram for DTN::RoutedForwarding:

Collaboration graph
[legend]

List of all members.

Public Types

typedef std::list< BundlePointerBundlePointerList
 A collection of BundlePointers queued up for a Link.
typedef std::map< const Link *,
BundlePointerList
BundleCache
 A mapping between Links and their BundlePointer queues.

Public Member Functions

 RoutedForwarding (Node *owner)
 Constructor.
virtual ~RoutedForwarding ()
 Virtual destructor.
void cache (BundlePointer &p)
 Cache information about a newly stored Bundle for faster access.
bool forward (Bundle *b)
 Attepmt to forward a Bundle.
BundleforwardOn (const Link &l)
 Attepmt to forward along a Link that has become available.
virtual void addRouting (RoutingTable *table)
 Add a routing table to the forwarding policy.

Protected Member Functions

virtual Linktarget (const Bundle &b)
 Find the appropriate route to reach a given destination.
virtual void protected_set ()
 If the policy object needs to do anything when a BundleStore changes, this should be overridden.


Detailed Description

ForwardingPolicy subclass that uses a routing table.

It employs simple FIFO scheduling.

Definition at line 46 of file RoutedForwarding.h.


Member Function Documentation

void RoutedForwarding::cache ( BundlePointer p  )  [virtual]

Cache information about a newly stored Bundle for faster access.

By default, nothing is done. Derived classes may override this.

Parameters:
p A reference to a Bundle in the BundleStore

Reimplemented from DTN::ForwardingPolicy.

Definition at line 44 of file RoutedForwarding.cc.

References DTN::BundlePointerRepr::bundle(), DTN::BundlePointer::repr(), and target().

bool RoutedForwarding::forward ( 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 60 of file RoutedForwarding.cc.

References DTN::Link::available(), DTN::NodePolicy::m_owner, DTN::Node::send(), and target().

Bundle * RoutedForwarding::forwardOn ( const 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 RoutedForwarding.cc.

References DTN::BundlePointerRepr::bundle(), DTN::NodePolicy::m_owner, DTN::Node::remove(), DTN::BundlePointer::repr(), and DTN::Node::validate().

void RoutedForwarding::addRouting ( RoutingTable table  )  [virtual]

Add a routing table to the forwarding policy.

If there is an existing table, it is replaced with the new one. The policy does not take ownership of the table

Parameters:
table The new routing table

Definition at line 113 of file RoutedForwarding.cc.

Referenced by RoutingEntity::generatePolicy().

Link & RoutedForwarding::target ( const Bundle b  )  [protected, virtual]

Find the appropriate route to reach a given destination.

Parameters:
b The Bundle is being sent
Returns:
the link on which to forward the Bundle

Definition at line 120 of file RoutedForwarding.cc.

References DTN::RoutingTable::target().

Referenced by cache(), and forward().

void RoutedForwarding::protected_set (  )  [protected, virtual]

If the policy object needs to do anything when a BundleStore changes, this should be overridden.

Reimplemented from DTN::NodePolicy.

Definition at line 133 of file RoutedForwarding.cc.


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