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

Application to handle epidemic forwarding control messages. More...

#include <epidemic/EpidemicApp.h>

Inheritance diagram for Epidemic::EpidemicApp:

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

Collaboration graph
[legend]

List of all members.

Public Types

typedef std::map
< DTN::ByteString,
Mobility::MockLink * > 
LinkMap
 Type for mapping addresses to mock links.

Public Member Functions

 EpidemicApp (EpidemicStore *es, DTN::Link *l, const struct timeval &t)
 Constructor.
virtual ~EpidemicApp ()
 Virtual destructor.
void newNeighbor (const DTN::ByteString &addr)
 Notify the application of a new neighbor.
DTN::LinkgetLink (const DTN::ByteString &addr)
 Get the mock link for an address.

Static Public Attributes

static DTN::ByteString kIdentifier
 The unique identifier for this application.
static unsigned char kSummaryVector = 0
 One-byte message type for sending a summary vector.
static unsigned char kDataRequest = 1
 One-byte message type for sending a data request.

Protected Member Functions

const DTN::ByteString & appID () const
 Application identifier for Bundles.
void process (const DTN::Bundle &b)
 Call the application on a received Bundle.


Detailed Description

Application to handle epidemic forwarding control messages.

Definition at line 49 of file EpidemicApp.h.


Constructor & Destructor Documentation

EpidemicApp::EpidemicApp ( EpidemicStore es,
DTN::Link l,
const struct timeval &  t 
)

Constructor.

Parameters:
es The persistent store tracking bundles at this node
l The physical link through which bundles are sent
t The lifetime for a bundle

Definition at line 44 of file EpidemicApp.cc.


Member Function Documentation

void EpidemicApp::newNeighbor ( const DTN::ByteString &  addr  )  [virtual]

Notify the application of a new neighbor.

Parameters:
addr The address of the node that has just come into view

Implements Mobility::MobileApp.

Definition at line 68 of file EpidemicApp.cc.

References appID(), Epidemic::EpidemicStore::forwardLastHop(), DTN::Bundle::kData, kSummaryVector, DTN::Consumer::m_owner, DTN::Bundle::recv(), stringify(), Epidemic::EpidemicStore::summaryVector(), and verbosity().

DTN::Link * EpidemicApp::getLink ( const DTN::ByteString &  addr  ) 

Get the mock link for an address.

Parameters:
addr The address of a bundle receiver
Returns:
a pointer to the stored Mobility::MockLink, or NULL

Definition at line 232 of file EpidemicApp.cc.

Referenced by Epidemic::EpidemicForwarding::forward(), and Epidemic::EpidemicForwarding::forwardOn().


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