StoreTracer Class Reference
[pydtn.storetrace]

Generates storage trace information. More...

#include <storetrace/StoreTracer.h>

Inheritance diagram for StoreTracer:

Inheritance graph
[legend]
Collaboration diagram for StoreTracer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 StoreTracer (std::ostream &s)
 Constructor.
virtual ~StoreTracer ()
 Virtual destructor.
void node (const WrapNode &wn)
 Create a trace entry for a WrapNode.
void link (const WrapLink &wl)
 Create a trace entry for a WrapLink.
void enqueue (const DTN::Bundle &b, const DTN::Node *n)
 Create a trace entry for an enqueued bundle.
void dequeue (const DTN::Bundle &b, const DTN::Node *n)
 Create a trace entry for a dequeued bundle.
void send (const DTN::Bundle &b, const DTN::Node *n)
 Create a trace entry for a bundle send.
void receive (const DTN::Bundle &b, const DTN::Node *n)
 Create a trace entry for a received bundle.
void drop (const DTN::Bundle &b, const DTN::DropCause &c, const DTN::Node *n)
 Create a trace entry for a dropped bundle.

Protected Member Functions

void trace (const DTN::Node &n)
 Generate the trace.
std::string stringify (const DTN::ByteString &b) const
 Create a printable version of a ByteString.


Detailed Description

Generates storage trace information.

Definition at line 44 of file StoreTracer.h.


Constructor & Destructor Documentation

StoreTracer::StoreTracer ( std::ostream &  s  ) 

Constructor.

Parameters:
s Stream on which trace should be written

Definition at line 41 of file StoreTracer.cc.


Member Function Documentation

void StoreTracer::node ( const WrapNode wn  )  [virtual]

Create a trace entry for a WrapNode.

Parameters:
wn The node to record

Implements Tracer.

Definition at line 52 of file StoreTracer.cc.

void StoreTracer::link ( const WrapLink wl  )  [virtual]

Create a trace entry for a WrapLink.

Parameters:
wl The link to record

Implements Tracer.

Definition at line 57 of file StoreTracer.cc.

void StoreTracer::enqueue ( const DTN::Bundle b,
const DTN::Node n 
) [virtual]

Create a trace entry for an enqueued bundle.

Parameters:
b The bundle being enqueued
n The node at which the bundle is enqueued

Implements Tracer.

Definition at line 62 of file StoreTracer.cc.

References trace().

void StoreTracer::dequeue ( const DTN::Bundle b,
const DTN::Node n 
) [virtual]

Create a trace entry for a dequeued bundle.

Parameters:
b The bundle being dequeued
n The node at which the bundle is dequeued

Implements Tracer.

Definition at line 69 of file StoreTracer.cc.

References trace().

void StoreTracer::send ( const DTN::Bundle b,
const DTN::Node n 
) [virtual]

Create a trace entry for a bundle send.

Parameters:
b The bundle being sent
n The node from which the bundle is sent

Implements Tracer.

Definition at line 76 of file StoreTracer.cc.

void StoreTracer::receive ( const DTN::Bundle b,
const DTN::Node n 
) [virtual]

Create a trace entry for a received bundle.

Parameters:
b The bundle being received
n The node at which the bundle is received

Implements Tracer.

Definition at line 81 of file StoreTracer.cc.

void StoreTracer::drop ( const DTN::Bundle b,
const DTN::DropCause c,
const DTN::Node n 
) [virtual]

Create a trace entry for a dropped bundle.

Parameters:
b The bundle being dropped
c The reason for dropping the bundle
n The node at which the drop occurs

Implements Tracer.

Definition at line 86 of file StoreTracer.cc.

void StoreTracer::trace ( const DTN::Node n  )  [protected]

Generate the trace.

Parameters:
n The node at which the storage changes

Definition at line 93 of file StoreTracer.cc.

References DTN::Node::addr(), DTN::Node::persistentBundles(), DTN::Node::persistentCap(), stringify(), Clock::time(), Time::tv, and DTN::Node::usedPersistentCap().

Referenced by dequeue(), and enqueue().

std::string StoreTracer::stringify ( const DTN::ByteString &  b  )  const [protected]

Create a printable version of a ByteString.

If b is comprised entirely of printable ASCII characters, we convert directly. If not, we represent it as a hex string of the form "0x...".

Parameters:
b The string of bytes to be printed
Returns:
the printable form of b

Definition at line 106 of file StoreTracer.cc.

Referenced by trace().


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