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-app-delay-tracer.cc b/examples/ndn-tree-app-delay-tracer.cc
index 0fdffd9..b4563a9 100644
--- a/examples/ndn-tree-app-delay-tracer.cc
+++ b/examples/ndn-tree-app-delay-tracer.cc
@@ -24,9 +24,6 @@
#include "ns3/network-module.h"
#include "ns3/ndnSIM-module.h"
-// for ndn::AppDelayTracer
-#include <ns3/ndnSIM/utils/tracers/ndn-app-delay-tracer.h>
-
using namespace ns3;
/**
@@ -111,8 +108,7 @@
Simulator::Stop (Seconds (20.0));
- boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<ndn::AppDelayTracer> > >
- tracers = ndn::AppDelayTracer::InstallAll ("app-delays-trace.txt");
+ ndn::AppDelayTracer::InstallAll ("app-delays-trace.txt");
Simulator::Run ();
Simulator::Destroy ();