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::L2RateTracer Class Reference

Tracer to collect link-layer rate information about links. More...

#include <l2-rate-tracer.h>

Inheritance diagram for ns3::L2RateTracer:
Collaboration diagram for ns3::L2RateTracer:

Public Member Functions

 L2RateTracer (boost::shared_ptr< std::ostream > os, Ptr< Node > node)
 Network layer tracer constructor.
 
void SetAveragingPeriod (const Time &period)
 
virtual void PrintHeader (std::ostream &os) const
 
virtual void Print (std::ostream &os) const
 
virtual void Drop (Ptr< const Packet >)
 
- Public Member Functions inherited from ns3::L2Tracer
 L2Tracer (Ptr< Node > node)
 
void Connect ()
 

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 Destroy ()
 Explicit request to remove all statically created tracers. More...
 

Additional Inherited Members

- Protected Attributes inherited from ns3::L2Tracer
std::string m_node
 
Ptr< Node > m_nodePtr
 

Detailed Description

Tracer to collect link-layer rate information about links.

Todo:
Finish implementation

Definition at line 41 of file l2-rate-tracer.h.

Member Function Documentation

void ns3::L2RateTracer::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 50 of file l2-rate-tracer.cc.

void ns3::L2RateTracer::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
averagingPeriodDefines 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

Definition at line 56 of file l2-rate-tracer.cc.


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