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
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 // --------------------------------------------
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 
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:
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
91 {
92  m_defaultBandwidth = bw;
93 }
94 
95 inline std::string
97 {
98  return m_defaultBandwidth;
99 }
100 
101 inline void
103 {
104  m_queue = queue;
105 }
106 
107 inline std::string
109 {
110  return m_queue;
111 }
112 
113 }; // end namespace ns3
114 
115 #endif /* ROCKETFUEL_TOPOLOGY_WEIGHTS_READER_H */
virtual NodeContainer Read(void)
Main topology reading function.
This class reads annotated topology and apply settings to the corresponding nodes and links...
void SetDefaultQueue(const std::string &queue)
Topology file reader (extension of Rocketfuel-format type).
void SetDefaultBandwidth(const std::string &bw)
RocketfuelWeightsReader(const std::string &path="", double scale=1.0)