NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
annotated-topology-reader.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20
// Based on the code by Hajime Tazaki <tazaki@sfc.wide.ad.jp>
21
22
#ifndef __ANNOTATED_TOPOLOGY_READER_H__
23
#define __ANNOTATED_TOPOLOGY_READER_H__
24
25
#include "ns3/topology-reader.h"
26
#include "ns3/random-variable-stream.h"
27
#include "ns3/object-factory.h"
28
29
namespace
ns3
{
30
36
class
AnnotatedTopologyReader
:
public
TopologyReader {
37
public
:
46
AnnotatedTopologyReader
(
const
std::string& path =
""
,
double
scale = 1.0);
47
virtual
~AnnotatedTopologyReader
();
48
56
virtual
NodeContainer
57
Read
();
58
62
virtual
NodeContainer
63
GetNodes
()
const
;
64
68
virtual
const
std::list<Link>&
69
GetLinks
()
const
;
70
80
virtual
void
81
AssignIpv4Addresses
(Ipv4Address base);
82
90
virtual
void
91
SetBoundingBox
(
double
ulx,
double
uly,
double
lrx,
double
lry);
92
97
virtual
void
98
SetMobilityModel
(
const
std::string& model);
99
103
virtual
void
104
ApplyOspfMetric
();
105
109
virtual
void
110
SaveTopology
(
const
std::string&
file
);
111
115
virtual
void
116
SaveGraphviz
(
const
std::string& file);
117
118
protected
:
119
Ptr<Node>
120
CreateNode
(
const
std::string
name
, uint32_t systemId);
121
122
Ptr<Node>
123
CreateNode
(
const
std::string name,
double
posX,
double
posY, uint32_t systemId);
124
125
protected
:
131
void
132
ApplySettings
();
133
134
protected
:
135
std::string
m_path
;
136
NodeContainer
m_nodes
;
137
138
private
:
139
AnnotatedTopologyReader
(
const
AnnotatedTopologyReader
&);
140
AnnotatedTopologyReader
&
141
operator=(
const
AnnotatedTopologyReader
&);
142
143
Ptr<UniformRandomVariable> m_randX;
144
Ptr<UniformRandomVariable> m_randY;
145
146
ObjectFactory m_mobilityFactory;
147
double
m_scale;
148
149
uint32_t m_requiredPartitions;
150
};
151
}
152
153
#endif
ns3::AnnotatedTopologyReader::m_nodes
NodeContainer m_nodes
Definition:
annotated-topology-reader.hpp:136
ns3::AnnotatedTopologyReader::AnnotatedTopologyReader
AnnotatedTopologyReader(const std::string &path="", double scale=1.0)
Constructor.
Definition:
annotated-topology-reader.cpp:67
ns3::AnnotatedTopologyReader
This class reads annotated topology and apply settings to the corresponding nodes and links...
Definition:
annotated-topology-reader.hpp:36
ns3::AnnotatedTopologyReader::ApplyOspfMetric
virtual void ApplyOspfMetric()
Apply OSPF metric on Ipv4 (if exists) and Ccnx (if exists) stacks.
Definition:
annotated-topology-reader.cpp:283
ns3::AnnotatedTopologyReader::SetMobilityModel
virtual void SetMobilityModel(const std::string &model)
Set mobility model to be used on nodes.
Definition:
annotated-topology-reader.cpp:98
ns3::AnnotatedTopologyReader::GetLinks
virtual const std::list< Link > & GetLinks() const
Get links read by the reader.
Definition:
annotated-topology-reader.cpp:149
ns3::AnnotatedTopologyReader::AssignIpv4Addresses
virtual void AssignIpv4Addresses(Ipv4Address base)
Assign IPv4 addresses to all links.
Definition:
annotated-topology-reader.cpp:270
ns3::AnnotatedTopologyReader::SaveTopology
virtual void SaveTopology(const std::string &file)
Save positions (e.g., after manual modification using visualizer)
Definition:
annotated-topology-reader.cpp:436
ndn::security::file
tpm file
Definition:
key-chain.cpp:69
ns3::AnnotatedTopologyReader::ApplySettings
void ApplySettings()
This method applies setting to corresponding nodes and links NetDeviceContainer must be allocated Nod...
Definition:
annotated-topology-reader.cpp:328
ns3
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
content-store-impl.cpp:38
ns3::AnnotatedTopologyReader::SetBoundingBox
virtual void SetBoundingBox(double ulx, double uly, double lrx, double lry)
Set bounding box where nodes will be randomly places (if positions are unspecified) ...
Definition:
annotated-topology-reader.cpp:86
ns3::AnnotatedTopologyReader::Read
virtual NodeContainer Read()
Main annotated topology reading function.
Definition:
annotated-topology-reader.cpp:155
ns3::AnnotatedTopologyReader::~AnnotatedTopologyReader
virtual ~AnnotatedTopologyReader()
Definition:
annotated-topology-reader.cpp:104
ns3::AnnotatedTopologyReader::GetNodes
virtual NodeContainer GetNodes() const
Get nodes read by the reader.
Definition:
annotated-topology-reader.cpp:143
ns3::AnnotatedTopologyReader::m_path
std::string m_path
Definition:
annotated-topology-reader.hpp:135
ns3::AnnotatedTopologyReader::SaveGraphviz
virtual void SaveGraphviz(const std::string &file)
Save topology in graphviz format (.dot file)
Definition:
annotated-topology-reader.cpp:539
ndn::name
Definition:
name-component.cpp:37
ns3::AnnotatedTopologyReader::CreateNode
Ptr< Node > CreateNode(const std::string name, uint32_t systemId)
Definition:
annotated-topology-reader.cpp:110
ndnSIM
utils
topology
annotated-topology-reader.hpp
Generated on Tue Feb 23 2016 22:18:45 for ndnSIM by
1.8.11