20 #ifndef CCNX_CS_TRACER_H 21 #define CCNX_CS_TRACER_H 23 #include "ns3/ndnSIM/model/ndn-common.hpp" 26 #include "ns3/simple-ref-count.h" 27 #include <ns3/nstime.h> 28 #include <ns3/event-id.h> 29 #include <ns3/node-container.h> 62 class CsTracer :
public SimpleRefCount<CsTracer> {
77 InstallAll(
const std::string& file, Time averagingPeriod = Seconds(0.5));
93 Install(
const NodeContainer& nodes,
const std::string& file, Time averagingPeriod = Seconds(0.5));
109 Install(Ptr<Node> node,
const std::string& file, Time averagingPeriod = Seconds(0.5));
124 Install(Ptr<Node> node, shared_ptr<std::ostream> outputStream,
125 Time averagingPeriod = Seconds(0.5));
141 CsTracer(shared_ptr<std::ostream> os, Ptr<Node> node);
148 CsTracer(shared_ptr<std::ostream> os,
const std::string& node);
169 Print(std::ostream& os)
const;
176 CacheHits(shared_ptr<const Interest>, shared_ptr<const Data>);
179 CacheMisses(shared_ptr<const Interest>);
183 SetAveragingPeriod(
const Time& period);
195 shared_ptr<std::ostream> m_os;
198 EventId m_printEvent;
218 #endif // CCNX_CS_TRACER_H NDN tracer for cache performance (hits and misses)
Copyright (c) 2011-2015 Regents of the University of California.
static void InstallAll(const std::string &file, Time averagingPeriod=Seconds(0.5))
Helper method to install tracers on all simulation nodes.
std::ostream & operator<<(std::ostream &os, const ContentStore &cs)
void Print(std::ostream &os) const
Print current trace data.
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 Destroy()
Explicit request to remove all statically created tracers.
Copyright (c) 2011-2015 Regents of the University of California.
void PrintHeader(std::ostream &os) const
Print head of the trace (e.g., for post-processing)
CsTracer(shared_ptr< std::ostream > os, Ptr< Node > node)
Trace constructor that attaches to the node using node pointer.