#include <flowtrace/FlowTracer.h>


Public Member Functions | |
| FlowTracer (std::ostream &s) | |
| Constructor. | |
| virtual | ~FlowTracer () |
| 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 | traceBundle (const DTN::Bundle &b, const std::string &func, const DTN::Node &n, const std::string &xtra="") |
| Generate the trace for a bundle. | |
| std::string | stringify (const DTN::ByteString &b) const |
| Create a printable version of a ByteString. | |
Definition at line 44 of file FlowTracer.h.
| FlowTracer::FlowTracer | ( | std::ostream & | s | ) |
Constructor.
| s | Stream on which trace should be written |
Definition at line 41 of file FlowTracer.cc.
| void FlowTracer::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 FlowTracer.cc.
| void FlowTracer::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 FlowTracer.cc.
| void FlowTracer::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 FlowTracer.cc.
| void FlowTracer::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 67 of file FlowTracer.cc.
| void FlowTracer::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 72 of file FlowTracer.cc.
References DTN::Node::addr(), DTN::Bundle::source(), and traceBundle().
| void FlowTracer::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 80 of file FlowTracer.cc.
References DTN::Node::addr(), DTN::Bundle::destination(), and traceBundle().
| void FlowTracer::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 88 of file FlowTracer.cc.
References DTN::NoRouteDrop::inst, DTN::LinkFailureDrop::inst, DTN::FullQueueDrop::inst, DTN::ExpiryDrop::inst, DTN::CustodyPolicyDrop::inst, DTN::BitErrorDrop::inst, and traceBundle().
| void FlowTracer::traceBundle | ( | const DTN::Bundle & | b, | |
| const std::string & | func, | |||
| const DTN::Node & | n, | |||
| const std::string & | xtra = "" | |||
| ) | [protected] |
Generate the trace for a bundle.
| b | The bundle to record | |
| func | The function being recorded | |
| n | The node at which the function occurs | |
| xtra | Extra trace information to append |
Definition at line 122 of file FlowTracer.cc.
References DTN::Node::addr(), DTN::Bundle::app(), DTN::Bundle::destination(), DTN::Bundle::hopCount(), DTN::Bundle::kACK, DTN::Bundle::seqNum(), DTN::Bundle::size(), DTN::Bundle::source(), stringify(), Clock::time(), Time::tv, and DTN::Bundle::type().
| std::string FlowTracer::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 146 of file FlowTracer.cc.
Referenced by traceBundle().
1.5.4