NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
ns3::RocketfuelWeightsReader Class Reference

Topology file reader (extension of Rocketfuel-format type). More...

#include <rocketfuel-weights-reader.hpp>

Inheritance diagram for ns3::RocketfuelWeightsReader:
Collaboration diagram for ns3::RocketfuelWeightsReader:

Public Types

enum  { LINKS, WEIGHTS, LATENCIES, POSITIONS }
 

Public Member Functions

 RocketfuelWeightsReader (const std::string &path="", double scale=1.0)
 
virtual ~RocketfuelWeightsReader ()
 
void SetFileType (uint8_t inputType)
 
virtual NodeContainer Read (void)
 Main topology reading function. More...
 
void Commit ()
 
void SetDefaultBandwidth (const std::string &bw)
 
std::string GetDefaultBandwidth () const
 
void SetDefaultQueue (const std::string &queue)
 
std::string GetDefaultQueue () const
 
- Public Member Functions inherited from ns3::AnnotatedTopologyReader
 AnnotatedTopologyReader (const std::string &path="", double scale=1.0)
 Constructor. More...
 
virtual ~AnnotatedTopologyReader ()
 
virtual NodeContainer GetNodes () const
 Get nodes read by the reader. More...
 
virtual const std::list< Link > & GetLinks () const
 Get links read by the reader. More...
 
virtual void AssignIpv4Addresses (Ipv4Address base)
 Assign IPv4 addresses to all links. More...
 
virtual void SetBoundingBox (double ulx, double uly, double lrx, double lry)
 Set bounding box where nodes will be randomly places (if positions are unspecified) More...
 
virtual void SetMobilityModel (const std::string &model)
 Set mobility model to be used on nodes. More...
 
virtual void ApplyOspfMetric ()
 Apply OSPF metric on Ipv4 (if exists) and Ccnx (if exists) stacks. More...
 
virtual void SaveTopology (const std::string &file)
 Save positions (e.g., after manual modification using visualizer) More...
 
virtual void SaveGraphviz (const std::string &file)
 Save topology in graphviz format (.dot file) More...
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::AnnotatedTopologyReader
Ptr< Node > CreateNode (const std::string name, uint32_t systemId)
 
Ptr< Node > CreateNode (const std::string name, double posX, double posY, uint32_t systemId)
 
void ApplySettings ()
 This method applies setting to corresponding nodes and links NetDeviceContainer must be allocated NodeContainer from Read method. More...
 
- Protected Attributes inherited from ns3::AnnotatedTopologyReader
std::string m_path
 
NodeContainer m_nodes
 

Detailed Description

Topology file reader (extension of Rocketfuel-format type).

http://www.cs.washington.edu/research/networking/rocketfuel/

Only weights and latencies file is supported

Definition at line 39 of file rocketfuel-weights-reader.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
LINKS 
WEIGHTS 
LATENCIES 
POSITIONS 

Definition at line 63 of file rocketfuel-weights-reader.hpp.

Constructor & Destructor Documentation

◆ RocketfuelWeightsReader()

ns3::RocketfuelWeightsReader::RocketfuelWeightsReader ( const std::string &  path = "",
double  scale = 1.0 
)

Definition at line 58 of file rocketfuel-weights-reader.cpp.

◆ ~RocketfuelWeightsReader()

ns3::RocketfuelWeightsReader::~RocketfuelWeightsReader ( )
virtual

Definition at line 73 of file rocketfuel-weights-reader.cpp.

Member Function Documentation

◆ SetFileType()

void ns3::RocketfuelWeightsReader::SetFileType ( uint8_t  inputType)

Definition at line 79 of file rocketfuel-weights-reader.cpp.

◆ Read()

NodeContainer ns3::RocketfuelWeightsReader::Read ( void  )
virtual

Main topology reading function.

This method opens an input stream and reads the Rocketfuel-format file. Every row represents a topology link (the ids of a couple of nodes), so the input file is read line by line to figure out how many links and nodes are in the topology.

Returns
the container of the nodes created (or empty container if there was an error)

Reimplemented from ns3::AnnotatedTopologyReader.

Definition at line 85 of file rocketfuel-weights-reader.cpp.

References ns3::AnnotatedTopologyReader::CreateNode(), LATENCIES, LINKS, ns3::AnnotatedTopologyReader::m_nodes, ns3::AnnotatedTopologyReader::m_path, POSITIONS, ns3::AnnotatedTopologyReader::Read(), and WEIGHTS.

◆ Commit()

void ns3::RocketfuelWeightsReader::Commit ( )

◆ SetDefaultBandwidth()

void ns3::RocketfuelWeightsReader::SetDefaultBandwidth ( const std::string &  bw)
inline

Definition at line 90 of file rocketfuel-weights-reader.hpp.

◆ GetDefaultBandwidth()

std::string ns3::RocketfuelWeightsReader::GetDefaultBandwidth ( ) const
inline

Definition at line 96 of file rocketfuel-weights-reader.hpp.

◆ SetDefaultQueue()

void ns3::RocketfuelWeightsReader::SetDefaultQueue ( const std::string &  queue)
inline

Definition at line 102 of file rocketfuel-weights-reader.hpp.

◆ GetDefaultQueue()

std::string ns3::RocketfuelWeightsReader::GetDefaultQueue ( ) const
inline

Definition at line 108 of file rocketfuel-weights-reader.hpp.


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