NDN tracer for cache performance (hits and misses) More...
#include <ndn-cs-tracer.hpp>
Public Member Functions | |
CsTracer (shared_ptr< std::ostream > os, Ptr< Node > node) | |
Trace constructor that attaches to the node using node pointer. More... | |
CsTracer (shared_ptr< std::ostream > os, const std::string &node) | |
Trace constructor that attaches to the node using node name. More... | |
~CsTracer () | |
Destructor. More... | |
void | PrintHeader (std::ostream &os) const |
Print head of the trace (e.g., for post-processing) More... | |
void | Print (std::ostream &os) const |
Print current trace data. More... | |
Static Public Member Functions | |
static void | InstallAll (const std::string &file, Time averagingPeriod=Seconds(0.5)) |
Helper method to install tracers on all simulation nodes. More... | |
static void | Install (const NodeContainer &nodes, const std::string &file, Time averagingPeriod=Seconds(0.5)) |
Helper method to install tracers on the selected simulation nodes. More... | |
static void | Install (Ptr< Node > node, const std::string &file, Time averagingPeriod=Seconds(0.5)) |
Helper method to install tracers on a specific simulation node. More... | |
static Ptr< CsTracer > | Install (Ptr< Node > node, shared_ptr< std::ostream > outputStream, Time averagingPeriod=Seconds(0.5)) |
Helper method to install tracers on a specific simulation node. More... | |
static void | Destroy () |
Explicit request to remove all statically created tracers. More... | |
NDN tracer for cache performance (hits and misses)
Definition at line 62 of file ndn-cs-tracer.hpp.
ns3::ndn::CsTracer::CsTracer | ( | shared_ptr< std::ostream > | os, |
Ptr< Node > | node | ||
) |
Trace constructor that attaches to the node using node pointer.
os | reference to the output stream |
node | pointer to the node |
Definition at line 177 of file ndn-cs-tracer.cpp.
ns3::ndn::CsTracer::CsTracer | ( | shared_ptr< std::ostream > | os, |
const std::string & | node | ||
) |
Trace constructor that attaches to the node using node name.
os | reference to the output stream |
nodeName | name of the node registered using Names::Add |
Definition at line 191 of file ndn-cs-tracer.cpp.
ns3::ndn::CsTracer::~CsTracer | ( | ) |
Destructor.
Definition at line 198 of file ndn-cs-tracer.cpp.
|
static |
Explicit request to remove all statically created tracers.
This method can be helpful if simulation scenario contains several independent run, or if it is desired to do a postprocessing of the resulting data
Definition at line 45 of file ndn-cs-tracer.cpp.
References ns3::ndn::g_tracers.
|
static |
Helper method to install tracers on the selected simulation nodes.
nodes | Nodes on which to install tracer |
file | File to which traces will be written. If filename is -, then std::out is used |
averagingPeriod | How often data will be written into the trace file (default, every half second) |
Definition at line 88 of file ndn-cs-tracer.cpp.
References ns3::ndn::g_tracers.
Referenced by Install(), and InstallAll().
|
static |
Helper method to install tracers on a specific simulation node.
nodes | Nodes on which to install tracer |
file | File to which traces will be written. If filename is -, then std::out is used |
averagingPeriod | How often data will be written into the trace file (default, every half second) |
Definition at line 126 of file ndn-cs-tracer.cpp.
References ns3::ndn::g_tracers, and Install().
|
static |
Helper method to install tracers on a specific simulation node.
nodes | Nodes on which to install tracer |
outputStream | Smart pointer to a stream |
averagingPeriod | How often data will be written into the trace file (default, every half second) |
Definition at line 162 of file ndn-cs-tracer.cpp.
|
static |
Helper method to install tracers on all simulation nodes.
file | File to which traces will be written. If filename is -, then std::out is used |
averagingPeriod | How often data will be written into the trace file (default, every half second) |
Definition at line 51 of file ndn-cs-tracer.cpp.
References ns3::ndn::g_tracers, and Install().
void ns3::ndn::CsTracer::Print | ( | std::ostream & | os | ) | const |
Print current trace data.
os | reference to output stream |
Definition at line 253 of file ndn-cs-tracer.cpp.
References PRINTER.
Referenced by ns3::ndn::operator<<().
void ns3::ndn::CsTracer::PrintHeader | ( | std::ostream & | os | ) | const |
Print head of the trace (e.g., for post-processing)
os | reference to output stream |
Definition at line 228 of file ndn-cs-tracer.cpp.
Referenced by ns3::ndn::operator<<().