#include <epidemic/EpidemicApp.h>


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::Link * | getLink (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. | |
Definition at line 49 of file EpidemicApp.h.
| EpidemicApp::EpidemicApp | ( | EpidemicStore * | es, | |
| DTN::Link * | l, | |||
| const struct timeval & | t | |||
| ) |
Constructor.
| 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.
| void EpidemicApp::newNeighbor | ( | const DTN::ByteString & | addr | ) | [virtual] |
Notify the application of a new neighbor.
| 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.
| addr | The address of a bundle receiver |
NULL Definition at line 232 of file EpidemicApp.cc.
Referenced by Epidemic::EpidemicForwarding::forward(), and Epidemic::EpidemicForwarding::forwardOn().
1.5.4