20 #ifndef CCNX_RATE_L3_TRACER_H
21 #define CCNX_RATE_L3_TRACER_H
23 #include "ns3/ndnSIM/model/ndn-common.hpp"
27 #include "ns3/nstime.h"
28 #include "ns3/event-id.h"
29 #include "ns3/node-container.h"
53 InstallAll(
const std::string& file, Time averagingPeriod = Seconds(0.5));
64 Install(
const NodeContainer& nodes,
const std::string& file, Time averagingPeriod = Seconds(0.5));
75 Install(Ptr<Node> node,
const std::string& file, Time averagingPeriod = Seconds(0.5));
91 L3RateTracer(shared_ptr<std::ostream> os, Ptr<Node> node);
98 L3RateTracer(shared_ptr<std::ostream> os,
const std::string& node);
117 static Ptr<L3RateTracer>
118 Install(Ptr<Node> node, shared_ptr<std::ostream> outputStream,
119 Time averagingPeriod = Seconds(0.5));
126 Print(std::ostream& os)
const;
150 SetAveragingPeriod(
const Time& period);
159 shared_ptr<std::ostream> m_os;
163 mutable std::map<shared_ptr<const Face>, std::tuple<Stats, Stats, Stats, Stats>> m_stats;
169 #endif // CCNX_RATE_L3_TRACER_H
virtual ~L3RateTracer()
Destructor.
static void Destroy()
Explicit request to remove all statically created tracers.
virtual void Print(std::ostream &os) const
Print current trace data.
virtual void SatisfiedInterests(const nfd::pit::Entry &, const Face &, const Data &)
NDN network-layer rate tracer.
Base class for network-layer (incoming/outgoing Interests and Data) tracing of NDN stack...
Opaque type (shared_ptr) representing ID of a scheduled event.
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.
virtual void InInterests(const Interest &interest, const Face &face)
virtual void OutData(const Data &data, const Face &face)
virtual void TimedOutInterests(const nfd::pit::Entry &)
virtual void PrintHeader(std::ostream &os) const
Print head of the trace (e.g., for post-processing)
L3RateTracer(shared_ptr< std::ostream > os, Ptr< Node > node)
Trace constructor that attaches to the node using node pointer.
static void InstallAll(const std::string &file, Time averagingPeriod=Seconds(0.5))
Helper method to install tracers on all simulation nodes.
virtual void OutInterests(const Interest &interest, const Face &face)
virtual void InData(const Data &data, const Face &face)