A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
topology-read
model
rocketfuel-topology-reader.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2010 Hajime Tazaki
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Hajime Tazaki (tazaki@sfc.wide.ad.jp)
19
*/
20
21
#ifndef ROCKETFUEL_TOPOLOGY_READER_H
22
#define ROCKETFUEL_TOPOLOGY_READER_H
23
24
#include "ns3/nstime.h"
25
#include "
topology-reader.h
"
26
27
namespace
ns3
{
28
29
30
// ------------------------------------------------------------
31
// --------------------------------------------
43
class
RocketfuelTopologyReader
:
public
TopologyReader
44
{
45
public
:
50
static
TypeId
GetTypeId
(
void
);
51
52
RocketfuelTopologyReader
();
53
virtual
~RocketfuelTopologyReader
();
54
65
virtual
NodeContainer
Read
(
void
);
66
67
private
:
78
NodeContainer
GenerateFromMapsFile
(
int
argc,
char
*argv[]);
79
90
NodeContainer
GenerateFromWeightsFile
(
int
argc,
char
*argv[]);
91
95
enum
RF_FileType
96
{
97
RF_MAPS
,
98
RF_WEIGHTS
,
99
RF_UNKNOWN
100
};
101
102
108
enum
RF_FileType
GetFileType
(
const
char
*);
109
110
int
m_linksNumber
;
111
int
m_nodesNumber
;
112
std::map<std::string, Ptr<Node> >
m_nodeMap
;
113
114
private
:
120
RocketfuelTopologyReader
(
const
RocketfuelTopologyReader
&);
127
RocketfuelTopologyReader
&
operator=
(
const
RocketfuelTopologyReader
&);
128
129
130
// end class RocketfuelTopologyReader
131
};
132
133
// end namespace ns3
134
};
135
136
137
#endif
/* ROCKETFUEL_TOPOLOGY_READER_H */
138
139
ns3::RocketfuelTopologyReader::RocketfuelTopologyReader
RocketfuelTopologyReader()
Definition:
rocketfuel-topology-reader.cc:47
ns3::RocketfuelTopologyReader::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
rocketfuel-topology-reader.cc:37
ns3::RocketfuelTopologyReader::RF_WEIGHTS
Definition:
rocketfuel-topology-reader.h:98
ns3::RocketfuelTopologyReader::GenerateFromMapsFile
NodeContainer GenerateFromMapsFile(int argc, char *argv[])
Topology read function from a file containing the nodes map.
Definition:
rocketfuel-topology-reader.cc:104
ns3::RocketfuelTopologyReader::GetFileType
enum RF_FileType GetFileType(const char *)
Classifies the file type according to its content.
Definition:
rocketfuel-topology-reader.cc:282
ns3::RocketfuelTopologyReader::RF_MAPS
Definition:
rocketfuel-topology-reader.h:97
ns3::RocketfuelTopologyReader::GenerateFromWeightsFile
NodeContainer GenerateFromWeightsFile(int argc, char *argv[])
Topology read function from a file containing the nodes weights.
Definition:
rocketfuel-topology-reader.cc:219
ns3::TopologyReader
Interface for input file readers management.
Definition:
topology-reader.h:43
ns3::RocketfuelTopologyReader::m_nodesNumber
int m_nodesNumber
Number of nodes.
Definition:
rocketfuel-topology-reader.h:111
ns3::RocketfuelTopologyReader::~RocketfuelTopologyReader
virtual ~RocketfuelTopologyReader()
Definition:
rocketfuel-topology-reader.cc:54
ns3::RocketfuelTopologyReader::m_nodeMap
std::map< std::string, Ptr< Node > > m_nodeMap
Map of the nodes (name, node).
Definition:
rocketfuel-topology-reader.h:112
ns3::RocketfuelTopologyReader::RF_UNKNOWN
Definition:
rocketfuel-topology-reader.h:99
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::NodeContainer
keep track of a set of node pointers.
Definition:
node-container.h:38
ns3::RocketfuelTopologyReader::m_linksNumber
int m_linksNumber
Number of links.
Definition:
rocketfuel-topology-reader.h:110
topology-reader.h
ns3::RocketfuelTopologyReader::Read
virtual NodeContainer Read(void)
Main topology reading function.
Definition:
rocketfuel-topology-reader.cc:324
ns3::RocketfuelTopologyReader::RF_FileType
RF_FileType
Enum of the possible file types.
Definition:
rocketfuel-topology-reader.h:95
ns3::RocketfuelTopologyReader
Topology file reader (Rocketfuel-format type).
Definition:
rocketfuel-topology-reader.h:43
ns3::RocketfuelTopologyReader::operator=
RocketfuelTopologyReader & operator=(const RocketfuelTopologyReader &)
Copy constructor.
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
Generated on Wed Nov 7 2018 10:02:11 for ns-3 by
1.8.14