#include <storetrace/StoreTracer.h>


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. | |
Definition at line 44 of file StoreTracer.h.
| StoreTracer::StoreTracer | ( | std::ostream & | s | ) |
Constructor.
| s | Stream on which trace should be written |
Definition at line 41 of file StoreTracer.cc.
| void StoreTracer::node | ( | const WrapNode & | wn | ) | [virtual] |
Create a trace entry for a WrapNode.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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().
| 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...".
| b | The string of bytes to be printed |
Definition at line 106 of file StoreTracer.cc.
Referenced by trace().
1.5.4