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/l2-rate-tracer.cc b/utils/tracers/l2-rate-tracer.cc
index cf4af72..48d2589 100644
--- a/utils/tracers/l2-rate-tracer.cc
+++ b/utils/tracers/l2-rate-tracer.cc
@@ -38,15 +38,36 @@
namespace ns3 {
-boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<L2RateTracer> > >
+static std::list< boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<L2RateTracer> > > > g_tracers;
+
+template<class T>
+static inline void
+NullDeleter (T *ptr)
+{
+}
+
+void
L2RateTracer::InstallAll (const std::string &file, Time averagingPeriod/* = Seconds (0.5)*/)
{
std::list<Ptr<L2RateTracer> > tracers;
- boost::shared_ptr<std::ofstream> outputStream (new std::ofstream ());
- outputStream->open (file.c_str (), std::ios_base::out | std::ios_base::trunc);
+ boost::shared_ptr<std::ostream> outputStream;
+ if (file != "-")
+ {
+ boost::shared_ptr<std::ofstream> os (new std::ofstream ());
+ os->open (file.c_str (), std::ios_base::out | std::ios_base::trunc);
- if (!outputStream->is_open ())
- return boost::make_tuple (outputStream, tracers);
+ if (!os->is_open ())
+ {
+ NS_LOG_ERROR ("File " << file << " cannot be opened for writing. Tracing disabled");
+ return;
+ }
+
+ outputStream = os;
+ }
+ else
+ {
+ outputStream = boost::shared_ptr<std::ostream> (&std::cout, NullDeleter<std::ostream>);
+ }
for (NodeList::Iterator node = NodeList::Begin ();
node != NodeList::End ();
@@ -66,7 +87,7 @@
*outputStream << "\n";
}
- return boost::make_tuple (outputStream, tracers);
+ g_tracers.push_back (boost::make_tuple (outputStream, tracers));
}
diff --git a/utils/tracers/l2-rate-tracer.h b/utils/tracers/l2-rate-tracer.h
index de6ffcb..8dba680 100644
--- a/utils/tracers/l2-rate-tracer.h
+++ b/utils/tracers/l2-rate-tracer.h
@@ -58,7 +58,7 @@
* for the lifetime of simulation, otherwise SEGFAULTs are inevitable
*
*/
- static boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<L2RateTracer> > >
+ static void
InstallAll (const std::string &file, Time averagingPeriod = Seconds (0.5));
void
diff --git a/utils/tracers/ndn-app-delay-tracer.cc b/utils/tracers/ndn-app-delay-tracer.cc
index 230be84..c0f881d 100644
--- a/utils/tracers/ndn-app-delay-tracer.cc
+++ b/utils/tracers/ndn-app-delay-tracer.cc
@@ -44,13 +44,15 @@
namespace ns3 {
namespace ndn {
+static std::list< boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<AppDelayTracer> > > > g_tracers;
+
template<class T>
static inline void
NullDeleter (T *ptr)
{
}
-boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<AppDelayTracer> > >
+void
AppDelayTracer::InstallAll (const std::string &file)
{
using namespace boost;
@@ -64,7 +66,10 @@
os->open (file.c_str (), std::ios_base::out | std::ios_base::trunc);
if (!os->is_open ())
- return boost::make_tuple (outputStream, tracers);
+ {
+ NS_LOG_ERROR ("File " << file << " cannot be opened for writing. Tracing disabled");
+ return;
+ }
outputStream = os;
}
@@ -88,10 +93,10 @@
*outputStream << "\n";
}
- return boost::make_tuple (outputStream, tracers);
+ g_tracers.push_back (boost::make_tuple (outputStream, tracers));
}
-boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<AppDelayTracer> > >
+void
AppDelayTracer::Install (const NodeContainer &nodes, const std::string &file)
{
using namespace boost;
@@ -105,7 +110,10 @@
os->open (file.c_str (), std::ios_base::out | std::ios_base::trunc);
if (!os->is_open ())
- return boost::make_tuple (outputStream, tracers);
+ {
+ NS_LOG_ERROR ("File " << file << " cannot be opened for writing. Tracing disabled");
+ return;
+ }
outputStream = os;
}
@@ -129,10 +137,10 @@
*outputStream << "\n";
}
- return boost::make_tuple (outputStream, tracers);
+ g_tracers.push_back (boost::make_tuple (outputStream, tracers));
}
-boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<AppDelayTracer> > >
+void
AppDelayTracer::Install (Ptr<Node> node, const std::string &file)
{
using namespace boost;
@@ -146,7 +154,10 @@
os->open (file.c_str (), std::ios_base::out | std::ios_base::trunc);
if (!os->is_open ())
- return boost::make_tuple (outputStream, tracers);
+ {
+ NS_LOG_ERROR ("File " << file << " cannot be opened for writing. Tracing disabled");
+ return;
+ }
outputStream = os;
}
@@ -165,7 +176,7 @@
*outputStream << "\n";
}
- return boost::make_tuple (outputStream, tracers);
+ g_tracers.push_back (boost::make_tuple (outputStream, tracers));
}
diff --git a/utils/tracers/ndn-app-delay-tracer.h b/utils/tracers/ndn-app-delay-tracer.h
index dfbe5ea..d7b1a72 100644
--- a/utils/tracers/ndn-app-delay-tracer.h
+++ b/utils/tracers/ndn-app-delay-tracer.h
@@ -56,7 +56,7 @@
* for the lifetime of simulation, otherwise SEGFAULTs are inevitable
*
*/
- static boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<AppDelayTracer> > >
+ static void
InstallAll (const std::string &file);
/**
@@ -69,7 +69,7 @@
* for the lifetime of simulation, otherwise SEGFAULTs are inevitable
*
*/
- static boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<AppDelayTracer> > >
+ static void
Install (const NodeContainer &nodes, const std::string &file);
/**
@@ -83,7 +83,7 @@
* for the lifetime of simulation, otherwise SEGFAULTs are inevitable
*
*/
- static boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<AppDelayTracer> > >
+ static void
Install (Ptr<Node> node, const std::string &file);
/**
diff --git a/utils/tracers/ndn-cs-tracer.cc b/utils/tracers/ndn-cs-tracer.cc
index 40aed8f..0c1becb 100644
--- a/utils/tracers/ndn-cs-tracer.cc
+++ b/utils/tracers/ndn-cs-tracer.cc
@@ -44,13 +44,15 @@
namespace ns3 {
namespace ndn {
+static std::list< boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<CsTracer> > > > g_tracers;
+
template<class T>
static inline void
NullDeleter (T *ptr)
{
}
-boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<CsTracer> > >
+void
CsTracer::InstallAll (const std::string &file, Time averagingPeriod/* = Seconds (0.5)*/)
{
using namespace boost;
@@ -64,7 +66,10 @@
os->open (file.c_str (), std::ios_base::out | std::ios_base::trunc);
if (!os->is_open ())
- return boost::make_tuple (outputStream, tracers);
+ {
+ NS_LOG_ERROR ("File " << file << " cannot be opened for writing. Tracing disabled");
+ return;
+ }
outputStream = os;
}
@@ -88,10 +93,10 @@
*outputStream << "\n";
}
- return boost::make_tuple (outputStream, tracers);
+ g_tracers.push_back (boost::make_tuple (outputStream, tracers));
}
-boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<CsTracer> > >
+void
CsTracer::Install (const NodeContainer &nodes, const std::string &file, Time averagingPeriod/* = Seconds (0.5)*/)
{
using namespace boost;
@@ -105,7 +110,10 @@
os->open (file.c_str (), std::ios_base::out | std::ios_base::trunc);
if (!os->is_open ())
- return boost::make_tuple (outputStream, tracers);
+ {
+ NS_LOG_ERROR ("File " << file << " cannot be opened for writing. Tracing disabled");
+ return;
+ }
outputStream = os;
}
@@ -129,10 +137,10 @@
*outputStream << "\n";
}
- return boost::make_tuple (outputStream, tracers);
+ g_tracers.push_back (boost::make_tuple (outputStream, tracers));
}
-boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<CsTracer> > >
+void
CsTracer::Install (Ptr<Node> node, const std::string &file, Time averagingPeriod/* = Seconds (0.5)*/)
{
using namespace boost;
@@ -146,7 +154,10 @@
os->open (file.c_str (), std::ios_base::out | std::ios_base::trunc);
if (!os->is_open ())
- return boost::make_tuple (outputStream, tracers);
+ {
+ NS_LOG_ERROR ("File " << file << " cannot be opened for writing. Tracing disabled");
+ return;
+ }
outputStream = os;
}
@@ -165,14 +176,14 @@
*outputStream << "\n";
}
- return boost::make_tuple (outputStream, tracers);
+ g_tracers.push_back (boost::make_tuple (outputStream, tracers));
}
Ptr<CsTracer>
CsTracer::Install (Ptr<Node> node,
- boost::shared_ptr<std::ostream> outputStream,
- Time averagingPeriod/* = Seconds (0.5)*/)
+ boost::shared_ptr<std::ostream> outputStream,
+ Time averagingPeriod/* = Seconds (0.5)*/)
{
NS_LOG_DEBUG ("Node: " << node->GetId ());
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));
/**
diff --git a/utils/tracers/ndn-l3-aggregate-tracer.cc b/utils/tracers/ndn-l3-aggregate-tracer.cc
index e977285..c6fc5e3 100644
--- a/utils/tracers/ndn-l3-aggregate-tracer.cc
+++ b/utils/tracers/ndn-l3-aggregate-tracer.cc
@@ -41,13 +41,15 @@
namespace ns3 {
namespace ndn {
+static std::list< boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<L3AggregateTracer> > > > g_tracers;
+
template<class T>
static inline void
NullDeleter (T *ptr)
{
}
-boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<L3AggregateTracer> > >
+void
L3AggregateTracer::InstallAll (const std::string &file, Time averagingPeriod/* = Seconds (0.5)*/)
{
using namespace boost;
@@ -61,7 +63,10 @@
os->open (file.c_str (), std::ios_base::out | std::ios_base::trunc);
if (!os->is_open ())
- return boost::make_tuple (outputStream, tracers);
+ {
+ NS_LOG_ERROR ("File " << file << " cannot be opened for writing. Tracing disabled");
+ return;
+ }
outputStream = os;
}
@@ -85,10 +90,10 @@
*outputStream << "\n";
}
- return boost::make_tuple (outputStream, tracers);
+ g_tracers.push_back (boost::make_tuple (outputStream, tracers));
}
-boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<L3AggregateTracer> > >
+void
L3AggregateTracer::Install (const NodeContainer &nodes, const std::string &file, Time averagingPeriod/* = Seconds (0.5)*/)
{
using namespace boost;
@@ -102,7 +107,10 @@
os->open (file.c_str (), std::ios_base::out | std::ios_base::trunc);
if (!os->is_open ())
- return boost::make_tuple (outputStream, tracers);
+ {
+ NS_LOG_ERROR ("File " << file << " cannot be opened for writing. Tracing disabled");
+ return;
+ }
outputStream = os;
}
@@ -126,10 +134,10 @@
*outputStream << "\n";
}
- return boost::make_tuple (outputStream, tracers);
+ g_tracers.push_back (boost::make_tuple (outputStream, tracers));
}
-boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<L3AggregateTracer> > >
+void
L3AggregateTracer::Install (Ptr<Node> node, const std::string &file, Time averagingPeriod/* = Seconds (0.5)*/)
{
using namespace boost;
@@ -143,7 +151,10 @@
os->open (file.c_str (), std::ios_base::out | std::ios_base::trunc);
if (!os->is_open ())
- return boost::make_tuple (outputStream, tracers);
+ {
+ NS_LOG_ERROR ("File " << file << " cannot be opened for writing. Tracing disabled");
+ return;
+ }
outputStream = os;
}
@@ -162,7 +173,7 @@
*outputStream << "\n";
}
- return boost::make_tuple (outputStream, tracers);
+ g_tracers.push_back (boost::make_tuple (outputStream, tracers));
}
diff --git a/utils/tracers/ndn-l3-aggregate-tracer.h b/utils/tracers/ndn-l3-aggregate-tracer.h
index ca6b35a..b7d4ce7 100644
--- a/utils/tracers/ndn-l3-aggregate-tracer.h
+++ b/utils/tracers/ndn-l3-aggregate-tracer.h
@@ -43,6 +43,47 @@
{
public:
/**
+ * @brief Helper method to install tracers on all simulation nodes
+ *
+ * @param file File to which traces will be written. If filename is -, then std::out is used
+ * @param averagingPeriod How often data will be written into the trace file (default, every half second)
+ *
+ * @returns a tuple of reference to output stream and list of tracers. !!! Attention !!! This tuple needs to be preserved
+ * for the lifetime of simulation, otherwise SEGFAULTs are inevitable
+ *
+ */
+ static void
+ InstallAll (const std::string &file, Time averagingPeriod = Seconds (0.5));
+
+ /**
+ * @brief Helper method to install tracers on the selected simulation nodes
+ *
+ * @param nodes Nodes on which to install tracer
+ * @param file File to which traces will be written. If filename is -, then std::out is used
+ * @param averagingPeriod How often data will be written into the trace file (default, every half second)
+ *
+ * @returns a tuple of reference to output stream and list of tracers. !!! Attention !!! This tuple needs to be preserved
+ * for the lifetime of simulation, otherwise SEGFAULTs are inevitable
+ *
+ */
+ static void
+ Install (const NodeContainer &nodes, const std::string &file, Time averagingPeriod = Seconds (0.5));
+
+ /**
+ * @brief Helper method to install tracers on a specific simulation node
+ *
+ * @param nodes Nodes on which to install tracer
+ * @param file File to which traces will be written. If filename is -, then std::out is used
+ * @param averagingPeriod How often data will be written into the trace file (default, every half second)
+ *
+ * @returns a tuple of reference to output stream and list of tracers. !!! Attention !!! This tuple needs to be preserved
+ * for the lifetime of simulation, otherwise SEGFAULTs are inevitable
+ *
+ */
+ static void
+ Install (Ptr<Node> node, const std::string &file, Time averagingPeriod = Seconds (0.5));
+
+ /**
* @brief Trace constructor that attaches to the node using node pointer
* @param os reference to the output stream
* @param node pointer to the node
@@ -62,47 +103,6 @@
virtual ~L3AggregateTracer ();
/**
- * @brief Helper method to install tracers on all simulation nodes
- *
- * @param file File to which traces will be written. If filename is -, then std::out is used
- * @param averagingPeriod How often data will be written into the trace file (default, every half second)
- *
- * @returns a tuple of reference to output stream and list of tracers. !!! Attention !!! This tuple needs to be preserved
- * for the lifetime of simulation, otherwise SEGFAULTs are inevitable
- *
- */
- static boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<L3AggregateTracer> > >
- InstallAll (const std::string &file, Time averagingPeriod = Seconds (0.5));
-
- /**
- * @brief Helper method to install tracers on the selected simulation nodes
- *
- * @param nodes Nodes on which to install tracer
- * @param file File to which traces will be written. If filename is -, then std::out is used
- * @param averagingPeriod How often data will be written into the trace file (default, every half second)
- *
- * @returns a tuple of reference to output stream and list of tracers. !!! Attention !!! This tuple needs to be preserved
- * for the lifetime of simulation, otherwise SEGFAULTs are inevitable
- *
- */
- static boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<L3AggregateTracer> > >
- Install (const NodeContainer &nodes, const std::string &file, Time averagingPeriod = Seconds (0.5));
-
- /**
- * @brief Helper method to install tracers on a specific simulation node
- *
- * @param nodes Nodes on which to install tracer
- * @param file File to which traces will be written. If filename is -, then std::out is used
- * @param averagingPeriod How often data will be written into the trace file (default, every half second)
- *
- * @returns a tuple of reference to output stream and list of tracers. !!! Attention !!! This tuple needs to be preserved
- * for the lifetime of simulation, otherwise SEGFAULTs are inevitable
- *
- */
- static boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<L3AggregateTracer> > >
- Install (Ptr<Node> node, const std::string &file, Time averagingPeriod = Seconds (0.5));
-
- /**
* @brief Helper method to install tracers on a specific simulation node
*
* @param nodes Nodes on which to install tracer
diff --git a/utils/tracers/ndn-l3-rate-tracer.cc b/utils/tracers/ndn-l3-rate-tracer.cc
index 43f8f0a..435a652 100644
--- a/utils/tracers/ndn-l3-rate-tracer.cc
+++ b/utils/tracers/ndn-l3-rate-tracer.cc
@@ -44,13 +44,15 @@
namespace ns3 {
namespace ndn {
+static std::list< boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<L3RateTracer> > > > g_tracers;
+
template<class T>
static inline void
NullDeleter (T *ptr)
{
}
-boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<L3RateTracer> > >
+void
L3RateTracer::InstallAll (const std::string &file, Time averagingPeriod/* = Seconds (0.5)*/)
{
std::list<Ptr<L3RateTracer> > tracers;
@@ -61,7 +63,10 @@
os->open (file.c_str (), std::ios_base::out | std::ios_base::trunc);
if (!os->is_open ())
- return boost::make_tuple (outputStream, tracers);
+ {
+ NS_LOG_ERROR ("File " << file << " cannot be opened for writing. Tracing disabled");
+ return;
+ }
outputStream = os;
}
@@ -85,10 +90,10 @@
*outputStream << "\n";
}
- return boost::make_tuple (outputStream, tracers);
+ g_tracers.push_back (boost::make_tuple (outputStream, tracers));
}
-boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<L3RateTracer> > >
+void
L3RateTracer::Install (const NodeContainer &nodes, const std::string &file, Time averagingPeriod/* = Seconds (0.5)*/)
{
using namespace boost;
@@ -102,7 +107,10 @@
os->open (file.c_str (), std::ios_base::out | std::ios_base::trunc);
if (!os->is_open ())
- return boost::make_tuple (outputStream, tracers);
+ {
+ NS_LOG_ERROR ("File " << file << " cannot be opened for writing. Tracing disabled");
+ return;
+ }
outputStream = os;
}
@@ -126,10 +134,10 @@
*outputStream << "\n";
}
- return boost::make_tuple (outputStream, tracers);
+ g_tracers.push_back (boost::make_tuple (outputStream, tracers));
}
-boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<L3RateTracer> > >
+void
L3RateTracer::Install (Ptr<Node> node, const std::string &file, Time averagingPeriod/* = Seconds (0.5)*/)
{
using namespace boost;
@@ -143,7 +151,10 @@
os->open (file.c_str (), std::ios_base::out | std::ios_base::trunc);
if (!os->is_open ())
- return boost::make_tuple (outputStream, tracers);
+ {
+ NS_LOG_ERROR ("File " << file << " cannot be opened for writing. Tracing disabled");
+ return;
+ }
outputStream = os;
}
@@ -162,7 +173,7 @@
*outputStream << "\n";
}
- return boost::make_tuple (outputStream, tracers);
+ g_tracers.push_back (boost::make_tuple (outputStream, tracers));
}
diff --git a/utils/tracers/ndn-l3-rate-tracer.h b/utils/tracers/ndn-l3-rate-tracer.h
index d2f965b..e2931d9 100644
--- a/utils/tracers/ndn-l3-rate-tracer.h
+++ b/utils/tracers/ndn-l3-rate-tracer.h
@@ -43,6 +43,36 @@
{
public:
/**
+ * @brief Helper method to install tracers on all simulation nodes
+ *
+ * @param file File to which traces will be written. If filename is -, then std::out is used
+ * @param averagingPeriod Defines averaging period for the rate calculation,
+ * as well as how often data will be written into the trace file (default, every half second)
+ */
+ static void
+ InstallAll (const std::string &file, Time averagingPeriod = Seconds (0.5));
+
+ /**
+ * @brief Helper method to install tracers on the selected simulation nodes
+ *
+ * @param nodes Nodes on which to install tracer
+ * @param file File to which traces will be written. If filename is -, then std::out is used
+ * @param averagingPeriod How often data will be written into the trace file (default, every half second)
+ */
+ static void
+ Install (const NodeContainer &nodes, const std::string &file, Time averagingPeriod = Seconds (0.5));
+
+ /**
+ * @brief Helper method to install tracers on a specific simulation node
+ *
+ * @param nodes Nodes on which to install tracer
+ * @param file File to which traces will be written. If filename is -, then std::out is used
+ * @param averagingPeriod How often data will be written into the trace file (default, every half second)
+ */
+ static void
+ Install (Ptr<Node> node, const std::string &file, Time averagingPeriod = Seconds (0.5));
+
+ /**
* @brief Trace constructor that attaches to the node using node pointer
* @param os reference to the output stream
* @param node pointer to the node
@@ -62,48 +92,6 @@
virtual ~L3RateTracer ();
/**
- * @brief Helper method to install tracers on all simulation nodes
- *
- * @param file File to which traces will be written. If filename is -, then std::out is used
- * @param averagingPeriod Defines averaging period for the rate calculation,
- * as well as how often data will be written into the trace file (default, every half second)
- *
- * @returns a tuple of reference to output stream and list of tracers. !!! Attention !!! This tuple needs to be preserved
- * for the lifetime of simulation, otherwise SEGFAULTs are inevitable
- *
- */
- static boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<L3RateTracer> > >
- InstallAll (const std::string &file, Time averagingPeriod = Seconds (0.5));
-
- /**
- * @brief Helper method to install tracers on the selected simulation nodes
- *
- * @param nodes Nodes on which to install tracer
- * @param file File to which traces will be written. If filename is -, then std::out is used
- * @param averagingPeriod How often data will be written into the trace file (default, every half second)
- *
- * @returns a tuple of reference to output stream and list of tracers. !!! Attention !!! This tuple needs to be preserved
- * for the lifetime of simulation, otherwise SEGFAULTs are inevitable
- *
- */
- static boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<L3RateTracer> > >
- Install (const NodeContainer &nodes, const std::string &file, Time averagingPeriod = Seconds (0.5));
-
- /**
- * @brief Helper method to install tracers on a specific simulation node
- *
- * @param nodes Nodes on which to install tracer
- * @param file File to which traces will be written. If filename is -, then std::out is used
- * @param averagingPeriod How often data will be written into the trace file (default, every half second)
- *
- * @returns a tuple of reference to output stream and list of tracers. !!! Attention !!! This tuple needs to be preserved
- * for the lifetime of simulation, otherwise SEGFAULTs are inevitable
- *
- */
- static boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<L3RateTracer> > >
- Install (Ptr<Node> node, const std::string &file, Time averagingPeriod = Seconds (0.5));
-
- /**
* @brief Helper method to install tracers on a specific simulation node
*
* @param nodes Nodes on which to install tracer