Mobility::MockLink Class Reference
[pydtn.mobility]

Shadows a broadcast link as a point-to-point link. More...

#include <mobility/MockLink.h>

Inheritance diagram for Mobility::MockLink:

Inheritance graph
[legend]
Collaboration diagram for Mobility::MockLink:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 MockLink (DTN::Link *l, const DTN::ByteString &addr)
 Constructor.
virtual ~MockLink ()
 Virtual destructor. Does nothing, since we own no memory.
void send (DTN::Bundle *b)
 Process a Bundle, passing it through to the other end of the link.
const DTN::ByteString & remoteAddr () const
 
Returns:
the address of the other end of the link


Detailed Description

Shadows a broadcast link as a point-to-point link.

This is used for links such as omnidirectional antennae. Since the underlying architecture expects links with resolvable remote addresses, we provide this in a light-weight aliasing link that passes Bundles along to the shadowed Link.

Definition at line 48 of file MockLink.h.


Constructor & Destructor Documentation

Mobility::MockLink::MockLink ( DTN::Link l,
const DTN::ByteString &  addr 
) [inline]

Constructor.

Parameters:
l The actual link that we're shadowing
addr The remote address for which we're pretending to have a point-to-point link

Definition at line 55 of file MockLink.h.


Member Function Documentation

void Mobility::MockLink::send ( DTN::Bundle b  )  [inline, virtual]

Process a Bundle, passing it through to the other end of the link.

Parameters:
b The data to forward; passing ownership

Implements DTN::Link.

Definition at line 63 of file MockLink.h.

References DTN::Link::send().


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