41 * http://www.cs.washington.edu/research/networking/rocketfuel/maps/rocketfuel_maps_cch.tar.gz |
41 * http://www.cs.washington.edu/research/networking/rocketfuel/maps/rocketfuel_maps_cch.tar.gz |
42 */ |
42 */ |
43 class RocketfuelTopologyReader : public TopologyReader |
43 class RocketfuelTopologyReader : public TopologyReader |
44 { |
44 { |
45 public: |
45 public: |
|
46 /** |
|
47 * \brief Get the type ID. |
|
48 * \return the object TypeId |
|
49 */ |
46 static TypeId GetTypeId (void); |
50 static TypeId GetTypeId (void); |
47 |
51 |
48 RocketfuelTopologyReader (); |
52 RocketfuelTopologyReader (); |
49 virtual ~RocketfuelTopologyReader (); |
53 virtual ~RocketfuelTopologyReader (); |
50 |
54 |
59 * \return the container of the nodes created (or empty container if there was an error) |
63 * \return the container of the nodes created (or empty container if there was an error) |
60 */ |
64 */ |
61 virtual NodeContainer Read (void); |
65 virtual NodeContainer Read (void); |
62 |
66 |
63 private: |
67 private: |
64 RocketfuelTopologyReader (const RocketfuelTopologyReader&); |
68 /** |
65 RocketfuelTopologyReader& operator= (const RocketfuelTopologyReader&); |
69 * \brief Topology read function from a file containing the nodes map. |
66 // Parser for the *.cch file available at: |
70 * |
67 // http://www.cs.washington.edu/research/networking/rocketfuel/maps/rocketfuel_maps_cch.tar.gz |
71 * Parser for the *.cch file available at: |
|
72 * http://www.cs.washington.edu/research/networking/rocketfuel/maps/rocketfuel_maps_cch.tar.gz |
|
73 * |
|
74 * \param argc argument counter |
|
75 * \param argv argument vector |
|
76 * \return the container of the nodes created (or empty container if there was an error) |
|
77 */ |
68 NodeContainer GenerateFromMapsFile (int argc, char *argv[]); |
78 NodeContainer GenerateFromMapsFile (int argc, char *argv[]); |
69 // Parser for the weights.* file available at: |
79 |
70 // http://www.cs.washington.edu/research/networking/rocketfuel/maps/weights-dist.tar.gz |
80 /** |
|
81 * \brief Topology read function from a file containing the nodes weights. |
|
82 * |
|
83 * Parser for the weights.* file available at: |
|
84 * http://www.cs.washington.edu/research/networking/rocketfuel/maps/weights-dist.tar.gz |
|
85 * |
|
86 * \param argc argument counter |
|
87 * \param argv argument vector |
|
88 * \return the container of the nodes created (or empty container if there was an error) |
|
89 */ |
71 NodeContainer GenerateFromWeightsFile (int argc, char *argv[]); |
90 NodeContainer GenerateFromWeightsFile (int argc, char *argv[]); |
72 |
91 |
|
92 /** |
|
93 * \brief Enum of the possible file types. |
|
94 */ |
73 enum RF_FileType |
95 enum RF_FileType |
74 { |
96 { |
75 RF_MAPS, |
97 RF_MAPS, |
76 RF_WEIGHTS, |
98 RF_WEIGHTS, |
77 RF_UNKNOWN |
99 RF_UNKNOWN |
78 }; |
100 }; |
|
101 |
|
102 |
|
103 /** |
|
104 * \brief Classifies the file type according to its content. |
|
105 * |
|
106 * \return the file type (RF_MAPS, RF_WEIGHTS, or RF_UNKNOWN) |
|
107 */ |
79 enum RF_FileType GetFileType (const char *); |
108 enum RF_FileType GetFileType (const char *); |
|
109 |
|
110 int m_linksNumber; //!< number of links |
|
111 int m_nodesNumber; //!< number of nodes |
|
112 std::map<std::string, Ptr<Node> > m_nodeMap; //!< map of the nodes (name, node) |
80 |
113 |
81 // end class RocketfuelTopologyReader |
114 // end class RocketfuelTopologyReader |
82 }; |
115 }; |
83 |
116 |
84 // end namespace ns3 |
117 // end namespace ns3 |