NS-3 based Named Data Networking (NDN) simulator
ndnSIM: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
ns3::ndn::L3AggregateTracer Class Reference

NDN network-layer tracer for aggregate packet counts. More...

#include <ndn-l3-aggregate-tracer.h>

Inheritance diagram for ns3::ndn::L3AggregateTracer:
Collaboration diagram for ns3::ndn::L3AggregateTracer:

Public Member Functions

 L3AggregateTracer (boost::shared_ptr< std::ostream > os, Ptr< Node > node)
 Trace constructor that attaches to the node using node pointer. More...
 
 L3AggregateTracer (boost::shared_ptr< std::ostream > os, const std::string &nodeName)
 Trace constructor that attaches to the node using node name. More...
 
virtual ~L3AggregateTracer ()
 Destructor.
 
- Public Member Functions inherited from ns3::ndn::L3Tracer
 L3Tracer (Ptr< Node > node)
 Trace constructor that attaches to the node using node pointer. More...
 
 L3Tracer (const std::string &node)
 Trace constructor that attaches to the node using node name. More...
 
virtual ~L3Tracer ()
 Destructor.
 

Static Public Member Functions

static void InstallAll (const std::string &file, Time averagingPeriod=Seconds(0.5))
 Helper method to install tracers on all simulation nodes. More...
 
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. More...
 
static void Install (Ptr< Node > node, const std::string &file, Time averagingPeriod=Seconds(0.5))
 Helper method to install tracers on a specific simulation node. More...
 
static void Destroy ()
 Explicit request to remove all statically created tracers. More...
 
static Ptr< L3AggregateTracerInstall (Ptr< Node > node, boost::shared_ptr< std::ostream > outputStream, Time averagingPeriod=Seconds(0.5))
 Helper method to install tracers on a specific simulation node. More...
 

Protected Member Functions

virtual void PrintHeader (std::ostream &os) const
 Print head of the trace (e.g., for post-processing) More...
 
virtual void Print (std::ostream &os) const
 Print current trace data. More...
 
virtual void OutInterests (Ptr< const Interest >, Ptr< const Face >)
 
virtual void InInterests (Ptr< const Interest >, Ptr< const Face >)
 
virtual void DropInterests (Ptr< const Interest >, Ptr< const Face >)
 
virtual void OutNacks (Ptr< const Interest >, Ptr< const Face >)
 
virtual void InNacks (Ptr< const Interest >, Ptr< const Face >)
 
virtual void DropNacks (Ptr< const Interest >, Ptr< const Face >)
 
virtual void OutData (Ptr< const Data >, bool fromCache, Ptr< const Face >)
 
virtual void InData (Ptr< const Data >, Ptr< const Face >)
 
virtual void DropData (Ptr< const Data >, Ptr< const Face >)
 
virtual void SatisfiedInterests (Ptr< const pit::Entry >)
 
virtual void TimedOutInterests (Ptr< const pit::Entry >)
 
void SetAveragingPeriod (const Time &period)
 
void Reset ()
 
void PeriodicPrinter ()
 
- Protected Member Functions inherited from ns3::ndn::L3Tracer
void Connect ()
 

Protected Attributes

boost::shared_ptr< std::ostream > m_os
 
Time m_period
 
EventId m_printEvent
 
std::map< Ptr< const Face >
, boost::tuple< Stats, Stats > > 
m_stats
 
- Protected Attributes inherited from ns3::ndn::L3Tracer
std::string m_node
 
Ptr< Node > m_nodePtr
 

Detailed Description

NDN network-layer tracer for aggregate packet counts.

Definition at line 42 of file ndn-l3-aggregate-tracer.h.

Constructor & Destructor Documentation

ns3::ndn::L3AggregateTracer::L3AggregateTracer ( boost::shared_ptr< std::ostream >  os,
Ptr< Node >  node 
)

Trace constructor that attaches to the node using node pointer.

Parameters
osreference to the output stream
nodepointer to the node

Definition at line 199 of file ndn-l3-aggregate-tracer.cc.

ns3::ndn::L3AggregateTracer::L3AggregateTracer ( boost::shared_ptr< std::ostream >  os,
const std::string &  nodeName 
)

Trace constructor that attaches to the node using node name.

Parameters
osreference to the output stream
nodeNamename of the node registered using Names::Add

Definition at line 206 of file ndn-l3-aggregate-tracer.cc.

Member Function Documentation

void ns3::ndn::L3AggregateTracer::Destroy ( )
static

Explicit request to remove all statically created tracers.

This method can be helpful if simulation scenario contains several independent run, or if it is desired to do a postprocessing of the resulting data

Definition at line 53 of file ndn-l3-aggregate-tracer.cc.

void ns3::ndn::L3AggregateTracer::Install ( const NodeContainer &  nodes,
const std::string &  file,
Time  averagingPeriod = Seconds (0.5) 
)
static

Helper method to install tracers on the selected simulation nodes.

Parameters
nodesNodes on which to install tracer
fileFile to which traces will be written. If filename is -, then std::out is used
averagingPeriodHow 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

Definition at line 103 of file ndn-l3-aggregate-tracer.cc.

Referenced by Install(), and InstallAll().

void ns3::ndn::L3AggregateTracer::Install ( Ptr< Node >  node,
const std::string &  file,
Time  averagingPeriod = Seconds (0.5) 
)
static

Helper method to install tracers on a specific simulation node.

Parameters
nodesNodes on which to install tracer
fileFile to which traces will be written. If filename is -, then std::out is used
averagingPeriodHow 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

Definition at line 147 of file ndn-l3-aggregate-tracer.cc.

References Install().

Ptr< L3AggregateTracer > ns3::ndn::L3AggregateTracer::Install ( Ptr< Node >  node,
boost::shared_ptr< std::ostream >  outputStream,
Time  averagingPeriod = Seconds (0.5) 
)
static

Helper method to install tracers on a specific simulation node.

Parameters
nodesNodes on which to install tracer
outputStreamSmart pointer to a stream
averagingPeriodHow 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

Definition at line 187 of file ndn-l3-aggregate-tracer.cc.

void ns3::ndn::L3AggregateTracer::InstallAll ( const std::string &  file,
Time  averagingPeriod = Seconds (0.5) 
)
static

Helper method to install tracers on all simulation nodes.

Parameters
fileFile to which traces will be written. If filename is -, then std::out is used
averagingPeriodHow 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

Definition at line 59 of file ndn-l3-aggregate-tracer.cc.

References Install().

void ns3::ndn::L3AggregateTracer::Print ( std::ostream &  os) const
protectedvirtual

Print current trace data.

Parameters
osreference to output stream

Implements ns3::ndn::L3Tracer.

Definition at line 283 of file ndn-l3-aggregate-tracer.cc.

void ns3::ndn::L3AggregateTracer::PrintHeader ( std::ostream &  os) const
protectedvirtual

Print head of the trace (e.g., for post-processing)

Parameters
osreference to output stream

Implements ns3::ndn::L3Tracer.

Definition at line 235 of file ndn-l3-aggregate-tracer.cc.


The documentation for this class was generated from the following files: