utils/tracers: Modifying (simplifying) interface for ndnSIM tracers
Now most of the tracers internally keep created instances in a global
variable. From now on, to start tracing, one needs just install a
necessary tracer, like this:
ndn::L3RateTracer::InstallAll ("rate-trace.txt", Seconds (0.5));
Because of the change, it became possible to use the same tracers inside
python scripts.
Also, this commits contains corresponding documentation updates.
diff --git a/utils/tracers/ndn-cs-tracer.h b/utils/tracers/ndn-cs-tracer.h
index fc8e0fc..0bddfb6 100644
--- a/utils/tracers/ndn-cs-tracer.h
+++ b/utils/tracers/ndn-cs-tracer.h
@@ -80,7 +80,7 @@
* for the lifetime of simulation, otherwise SEGFAULTs are inevitable
*
*/
- static boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<CsTracer> > >
+ static void
InstallAll (const std::string &file, Time averagingPeriod = Seconds (0.5));
/**
@@ -94,7 +94,7 @@
* for the lifetime of simulation, otherwise SEGFAULTs are inevitable
*
*/
- static boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<CsTracer> > >
+ static void
Install (const NodeContainer &nodes, const std::string &file, Time averagingPeriod = Seconds (0.5));
/**
@@ -108,7 +108,7 @@
* for the lifetime of simulation, otherwise SEGFAULTs are inevitable
*
*/
- static boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<CsTracer> > >
+ static void
Install (Ptr<Node> node, const std::string &file, Time averagingPeriod = Seconds (0.5));
/**