22 #ifndef ROCKETFUEL_MAP_READER_H
23 #define ROCKETFUEL_MAP_READER_H
27 #include "ns3/net-device-container.h"
28 #include "ns3/data-rate.h"
31 #include <boost/graph/adjacency_list.hpp>
83 const string& referenceOspfRate =
"100Mbps");
109 virtual NodeContainer
110 Read(
RocketfuelParams params,
bool keepOneComponent =
true,
bool connectBackbones =
true);
113 GetBackboneRouters()
const;
116 GetGatewayRouters()
const;
119 GetCustomerRouters()
const;
122 SaveTopology(
const std::string& file);
125 SaveGraphviz(
const std::string& file);
134 GenerateFromMapsFile(
int argc,
char* argv[]);
137 CreateLink(
string nodeName1,
string nodeName2,
double averageRtt,
const string& minBw,
138 const string& maxBw,
const string& minDelay,
const string& maxDelay);
140 KeepOnlyBiggestConnectedComponent();
143 AssignClients(uint32_t clientDegree, uint32_t gwDegree);
146 ConnectBackboneRouters();
149 Ptr<UniformRandomVariable> m_randVar;
151 NodeContainer m_backboneRouters;
152 NodeContainer m_gatewayRouters;
153 NodeContainer m_customerRouters;
155 typedef boost::adjacency_list_traits<boost::setS, boost::setS, boost::undirectedS> Traits;
157 enum node_type_t { UNKNOWN = 0, CLIENT = 1, GATEWAY = 2, BACKBONE = 3 };
160 property<boost::vertex_name_t, std::string,
161 boost::property<boost::vertex_index_t, uint32_t,
162 boost::property<boost::vertex_rank_t, node_type_t,
163 boost::property<boost::vertex_color_t, std::string>>>>
166 typedef boost::no_property edgeProperty;
168 typedef boost::adjacency_list<boost::setS, boost::setS, boost::undirectedS, nodeProperty,
171 typedef map<string, Traits::vertex_descriptor> node_map_t;
172 node_map_t m_graphNodes;
175 uint32_t m_maxNodeId;
177 const DataRate m_referenceOspfRate;
181 assignGw(Traits::vertex_descriptor vertex, uint32_t degree, node_type_t nodeType);