NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
rocketfuel-weights-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 ROCKETFUEL_TOPOLOGY_WEIGHTS_READER_H
23
#define ROCKETFUEL_TOPOLOGY_WEIGHTS_READER_H
24
25
#include "ns3/ndnSIM/utils/topology/annotated-topology-reader.hpp"
26
#include "ns3/net-device-container.h"
27
28
namespace
ns3
{
29
30
// ------------------------------------------------------------
31
// --------------------------------------------
39
class
RocketfuelWeightsReader
:
public
AnnotatedTopologyReader
{
40
public
:
41
RocketfuelWeightsReader
(
const
std::string& path =
""
,
double
scale = 1.0);
42
virtual
~RocketfuelWeightsReader
();
43
44
void
45
SetFileType
(uint8_t inputType);
46
57
virtual
NodeContainer
58
Read
(
void
);
59
60
void
61
Commit
();
62
63
enum
{
LINKS
,
WEIGHTS
,
LATENCIES
,
POSITIONS
};
64
65
inline
void
66
SetDefaultBandwidth
(
const
std::string& bw);
67
68
inline
std::string
69
GetDefaultBandwidth
()
const
;
70
71
inline
void
72
SetDefaultQueue
(
const
std::string& queue);
73
74
inline
std::string
75
GetDefaultQueue
()
const
;
76
77
private
:
78
RocketfuelWeightsReader
(
const
RocketfuelWeightsReader
&);
79
RocketfuelWeightsReader
&
80
operator=(
const
RocketfuelWeightsReader
&);
81
82
private
:
83
uint8_t m_inputType;
84
std::string m_defaultBandwidth;
// since the topology files don't provide bandwidth parameter
85
std::string m_queue;
86
87
};
// end class RocketfuelWeightsReader
88
89
inline
void
90
RocketfuelWeightsReader::SetDefaultBandwidth
(
const
std::string& bw)
91
{
92
m_defaultBandwidth = bw;
93
}
94
95
inline
std::string
96
RocketfuelWeightsReader::GetDefaultBandwidth
()
const
97
{
98
return
m_defaultBandwidth;
99
}
100
101
inline
void
102
RocketfuelWeightsReader::SetDefaultQueue
(
const
std::string& queue)
103
{
104
m_queue = queue;
105
}
106
107
inline
std::string
108
RocketfuelWeightsReader::GetDefaultQueue
()
const
109
{
110
return
m_queue;
111
}
112
113
};
// end namespace ns3
114
115
#endif
/* ROCKETFUEL_TOPOLOGY_WEIGHTS_READER_H */
ns3::RocketfuelWeightsReader::LATENCIES
Definition:
rocketfuel-weights-reader.hpp:63
ns3::RocketfuelWeightsReader::WEIGHTS
Definition:
rocketfuel-weights-reader.hpp:63
ns3::RocketfuelWeightsReader::Read
virtual NodeContainer Read(void)
Main topology reading function.
Definition:
rocketfuel-weights-reader.cpp:85
ns3::AnnotatedTopologyReader
This class reads annotated topology and apply settings to the corresponding nodes and links...
Definition:
annotated-topology-reader.hpp:36
ns3::RocketfuelWeightsReader::SetDefaultQueue
void SetDefaultQueue(const std::string &queue)
Definition:
rocketfuel-weights-reader.hpp:102
ns3::RocketfuelWeightsReader
Topology file reader (extension of Rocketfuel-format type).
Definition:
rocketfuel-weights-reader.hpp:39
ns3::RocketfuelWeightsReader::GetDefaultQueue
std::string GetDefaultQueue() const
Definition:
rocketfuel-weights-reader.hpp:108
ns3
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
content-store-impl.cpp:38
ns3::RocketfuelWeightsReader::SetDefaultBandwidth
void SetDefaultBandwidth(const std::string &bw)
Definition:
rocketfuel-weights-reader.hpp:90
ns3::RocketfuelWeightsReader::Commit
void Commit()
Definition:
rocketfuel-weights-reader.cpp:187
ns3::RocketfuelWeightsReader::SetFileType
void SetFileType(uint8_t inputType)
Definition:
rocketfuel-weights-reader.cpp:79
ns3::RocketfuelWeightsReader::~RocketfuelWeightsReader
virtual ~RocketfuelWeightsReader()
Definition:
rocketfuel-weights-reader.cpp:73
ns3::RocketfuelWeightsReader::POSITIONS
Definition:
rocketfuel-weights-reader.hpp:63
ns3::RocketfuelWeightsReader::LINKS
Definition:
rocketfuel-weights-reader.hpp:63
ns3::RocketfuelWeightsReader::GetDefaultBandwidth
std::string GetDefaultBandwidth() const
Definition:
rocketfuel-weights-reader.hpp:96
ns3::RocketfuelWeightsReader::RocketfuelWeightsReader
RocketfuelWeightsReader(const std::string &path="", double scale=1.0)
Definition:
rocketfuel-weights-reader.cpp:58
ndnSIM
utils
topology
rocketfuel-weights-reader.hpp
Generated on Sun Feb 25 2018 13:27:06 for ndnSIM by
1.8.14