SampleAppNS::SampleApp Class Reference
[pydtn.sampleapp]

Simple example application. More...

#include <sampleapp/SampleApp.h>

Inheritance diagram for SampleAppNS::SampleApp:

Inheritance graph
[legend]
Collaboration diagram for SampleAppNS::SampleApp:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SampleApp (Manager *m)
 Constructor.
virtual ~SampleApp ()
 Virtual destructor.
void send (const DTN::ByteString &dest, const DTN::ByteString &data, const Time &when)
 Send data to an application on another node.

Protected Member Functions

const DTN::ByteString & appID () const
 
Returns:
the application ID

void process (const DTN::Bundle &b)
 Process application data.

Static Protected Member Functions

static const DTN::ByteString & id ()
 
Returns:
the application ID without needing an instance


Detailed Description

Simple example application.

Definition at line 48 of file SampleApp.h.


Member Function Documentation

void SampleApp::send ( const DTN::ByteString &  dest,
const DTN::ByteString &  data,
const Time when 
)

Send data to an application on another node.

Parameters:
dest The address of the destination
data The application data
when The time at which to send the data

Definition at line 57 of file SampleApp.cc.

References WrapNode::bundleLifetime(), DTN::Bundle::kCustodial, DTN::Bundle::kData, SampleAppNS::Manager::lookup(), DTN::Consumer::m_owner, Clock::schedule(), and Time::tv.

Referenced by sampleapp_send().

void SampleApp::process ( const DTN::Bundle b  )  [protected, virtual]

Process application data.

Parameters:
b The bundle containing the application data

Implements DTN::Application.

Definition at line 78 of file SampleApp.cc.

References DTN::Bundle::size().


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