21 #ifndef NDN_L3_AGGREGATE_TRACER_H
22 #define NDN_L3_AGGREGATE_TRACER_H
24 #include "ndn-l3-tracer.h"
26 #include <ns3/nstime.h>
27 #include <ns3/event-id.h>
28 #include <ns3/node-container.h>
30 #include <boost/tuple/tuple.hpp>
31 #include <boost/shared_ptr.hpp>
56 InstallAll (
const std::string &file, Time averagingPeriod = Seconds (0.5));
70 Install (
const NodeContainer &nodes,
const std::string &file, Time averagingPeriod = Seconds (0.5));
84 Install (Ptr<Node> node,
const std::string &file, Time averagingPeriod = Seconds (0.5));
107 L3AggregateTracer (boost::shared_ptr<std::ostream> os,
const std::string &nodeName);
124 static Ptr<L3AggregateTracer>
125 Install (Ptr<Node> node, boost::shared_ptr<std::ostream> outputStream, Time averagingPeriod = Seconds (0.5));
133 Print (std::ostream &os)
const;
136 OutInterests (Ptr<const Interest>, Ptr<const Face>);
139 InInterests (Ptr<const Interest>, Ptr<const Face>);
142 DropInterests (Ptr<const Interest>, Ptr<const Face>);
145 OutNacks (Ptr<const Interest>, Ptr<const Face>);
148 InNacks (Ptr<const Interest>, Ptr<const Face>);
151 DropNacks (Ptr<const Interest>, Ptr<const Face>);
154 OutData (Ptr<const Data>,
bool fromCache, Ptr<const Face>);
157 InData (Ptr<const Data>, Ptr<const Face>);
160 DropData (Ptr<const Data>, Ptr<const Face>);
164 SatisfiedInterests (Ptr<const pit::Entry>);
167 TimedOutInterests (Ptr<const pit::Entry>);
171 SetAveragingPeriod (
const Time &period);
180 boost::shared_ptr<std::ostream> m_os;
183 EventId m_printEvent;
185 mutable std::map<Ptr<const Face>, boost::tuple<Stats, Stats> > m_stats;
191 #endif // NDN_L3_AGGREGATE_TRACER_H
virtual void PrintHeader(std::ostream &os) const
Print head of the trace (e.g., for post-processing)
L3AggregateTracer(boost::shared_ptr< std::ostream > os, Ptr< Node > node)
Trace constructor that attaches to the node using node pointer.
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.
static void InstallAll(const std::string &file, Time averagingPeriod=Seconds(0.5))
Helper method to install tracers on all simulation nodes.
Base class for network-layer (incoming/outgoing Interests and Data) tracing of NDN stack...
virtual ~L3AggregateTracer()
Destructor.
virtual void Print(std::ostream &os) const
Print current trace data.
static void Destroy()
Explicit request to remove all statically created tracers.
NDN network-layer tracer for aggregate packet counts.