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/examples/ndn-tree-with-l2tracer.cc b/examples/ndn-tree-with-l2tracer.cc
index d3e262e..19ba3a2 100644
--- a/examples/ndn-tree-with-l2tracer.cc
+++ b/examples/ndn-tree-with-l2tracer.cc
@@ -4,9 +4,6 @@
#include "ns3/network-module.h"
#include "ns3/ndnSIM-module.h"
-// for ndn::L2RateTracer
-#include <ns3/ndnSIM/utils/tracers/l2-rate-tracer.h>
-
using namespace ns3;
int
@@ -135,8 +132,7 @@
/****************************************************************************/
//Tracer:
- boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<L2RateTracer> > >
- l2tracers = L2RateTracer::InstallAll ("drop-trace.txt", Seconds (0.5));
+ L2RateTracer::InstallAll ("drop-trace.txt", Seconds (0.5));
Simulator::Run ();
Simulator::Destroy ();