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

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

#include <l2-rate-tracer.hpp>

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

Public Member Functions

 L2RateTracer (std::shared_ptr< std::ostream > os, Ptr< Node > node)
 Network layer tracer constructor. More...
 
virtual ~L2RateTracer ()
 
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)
 
virtual ~L2Tracer ()
 
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 39 of file l2-rate-tracer.hpp.

Constructor & Destructor Documentation

ns3::L2RateTracer::L2RateTracer ( std::shared_ptr< std::ostream >  os,
Ptr< Node >  node 
)

Network layer tracer constructor.

Definition at line 84 of file l2-rate-tracer.cpp.

References SetAveragingPeriod().

ns3::L2RateTracer::~L2RateTracer ( )
virtual

Definition at line 91 of file l2-rate-tracer.cpp.

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 42 of file l2-rate-tracer.cpp.

References ns3::g_tracers.

void ns3::L2RateTracer::Drop ( Ptr< const Packet >  packet)
virtual

Implements ns3::L2Tracer.

Definition at line 166 of file l2-rate-tracer.cpp.

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 48 of file l2-rate-tracer.cpp.

References ns3::g_tracers.

void ns3::L2RateTracer::Print ( std::ostream &  os) const
virtual

Implements ns3::L2Tracer.

Definition at line 158 of file l2-rate-tracer.cpp.

References PRINTER.

void ns3::L2RateTracer::PrintHeader ( std::ostream &  os) const
virtual

Implements ns3::L2Tracer.

Definition at line 114 of file l2-rate-tracer.cpp.

void ns3::L2RateTracer::SetAveragingPeriod ( const Time &  period)

Definition at line 97 of file l2-rate-tracer.cpp.

Referenced by L2RateTracer().


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