|
|
| 211 |
void CheckForLostPackets (Time maxDelay); |
211 |
void CheckForLostPackets (Time maxDelay); |
| 212 |
|
212 |
|
| 213 |
// --- methods to get the results --- |
213 |
// --- methods to get the results --- |
|
|
214 |
|
| 215 |
/// Container: FlowId, FlowStats |
| 216 |
typedef std::map<FlowId, FlowStats> FlowStatsContainer; |
| 217 |
/// Container Iterator: FlowId, FlowStats |
| 218 |
typedef std::map<FlowId, FlowStats>::iterator FlowStatsContainerI; |
| 219 |
/// Container Const Iterator: FlowId, FlowStats |
| 220 |
typedef std::map<FlowId, FlowStats>::const_iterator FlowStatsContainerCI; |
| 221 |
/// Container: FlowProbe |
| 222 |
typedef std::vector< Ptr<FlowProbe> > FlowProbeContainer; |
| 223 |
/// Container Iterator: FlowProbe |
| 224 |
typedef std::vector< Ptr<FlowProbe> >::iterator FlowProbeContainerI; |
| 225 |
/// Container Const Iterator: FlowProbe |
| 226 |
typedef std::vector< Ptr<FlowProbe> >::const_iterator FlowProbeContainerCI; |
| 227 |
|
| 214 |
/// Retrieve all collected the flow statistics. Note, if the |
228 |
/// Retrieve all collected the flow statistics. Note, if the |
| 215 |
/// FlowMonitor has not stopped monitoring yet, you should call |
229 |
/// FlowMonitor has not stopped monitoring yet, you should call |
| 216 |
/// CheckForLostPackets() to make sure all possibly lost packets are |
230 |
/// CheckForLostPackets() to make sure all possibly lost packets are |
| 217 |
/// accounted for. |
231 |
/// accounted for. |
| 218 |
/// \returns the flows statistics |
232 |
/// \returns the flows statistics |
| 219 |
std::map<FlowId, FlowStats> GetFlowStats () const; |
233 |
const FlowStatsContainer& GetFlowStats () const; |
| 220 |
|
234 |
|
| 221 |
/// Get a list of all FlowProbe's associated with this FlowMonitor |
235 |
/// Get a list of all FlowProbe's associated with this FlowMonitor |
| 222 |
/// \returns a list of all the probes |
236 |
/// \returns a list of all the probes |
| 223 |
std::vector< Ptr<FlowProbe> > GetAllProbes () const; |
237 |
const FlowProbeContainer& GetAllProbes () const; |
| 224 |
|
238 |
|
| 225 |
/// Serializes the results to an std::ostream in XML format |
239 |
/// Serializes the results to an std::ostream in XML format |
| 226 |
/// \param os the output stream |
240 |
/// \param os the output stream |
|
|
| 228 |
/// \param enableHistograms if true, include also the histograms in the output |
242 |
/// \param enableHistograms if true, include also the histograms in the output |
| 229 |
/// \param enableProbes if true, include also the per-probe/flow pair statistics in the output |
243 |
/// \param enableProbes if true, include also the per-probe/flow pair statistics in the output |
| 230 |
void SerializeToXmlStream (std::ostream &os, int indent, bool enableHistograms, bool enableProbes); |
244 |
void SerializeToXmlStream (std::ostream &os, int indent, bool enableHistograms, bool enableProbes); |
|
|
245 |
|
| 231 |
/// Same as SerializeToXmlStream, but returns the output as a std::string |
246 |
/// Same as SerializeToXmlStream, but returns the output as a std::string |
| 232 |
/// \param indent number of spaces to use as base indentation level |
247 |
/// \param indent number of spaces to use as base indentation level |
| 233 |
/// \param enableHistograms if true, include also the histograms in the output |
248 |
/// \param enableHistograms if true, include also the histograms in the output |
| 234 |
/// \param enableProbes if true, include also the per-probe/flow pair statistics in the output |
249 |
/// \param enableProbes if true, include also the per-probe/flow pair statistics in the output |
| 235 |
/// \return the XML output as string |
250 |
/// \return the XML output as string |
| 236 |
std::string SerializeToXmlString (int indent, bool enableHistograms, bool enableProbes); |
251 |
std::string SerializeToXmlString (int indent, bool enableHistograms, bool enableProbes); |
|
|
252 |
|
| 237 |
/// Same as SerializeToXmlStream, but writes to a file instead |
253 |
/// Same as SerializeToXmlStream, but writes to a file instead |
| 238 |
/// \param fileName name or path of the output file that will be created |
254 |
/// \param fileName name or path of the output file that will be created |
| 239 |
/// \param enableHistograms if true, include also the histograms in the output |
255 |
/// \param enableHistograms if true, include also the histograms in the output |
|
|
| 257 |
}; |
273 |
}; |
| 258 |
|
274 |
|
| 259 |
/// FlowId --> FlowStats |
275 |
/// FlowId --> FlowStats |
| 260 |
std::map<FlowId, FlowStats> m_flowStats; |
276 |
FlowStatsContainer m_flowStats; |
| 261 |
|
277 |
|
| 262 |
/// (FlowId,PacketId) --> TrackedPacket |
278 |
/// (FlowId,PacketId) --> TrackedPacket |
| 263 |
typedef std::map< std::pair<FlowId, FlowPacketId>, TrackedPacket> TrackedPacketMap; |
279 |
typedef std::map< std::pair<FlowId, FlowPacketId>, TrackedPacket> TrackedPacketMap; |
| 264 |
TrackedPacketMap m_trackedPackets; //!< Tracked packets |
280 |
TrackedPacketMap m_trackedPackets; //!< Tracked packets |
| 265 |
Time m_maxPerHopDelay; //!< Minimum per-hop delay |
281 |
Time m_maxPerHopDelay; //!< Minimum per-hop delay |
| 266 |
std::vector< Ptr<FlowProbe> > m_flowProbes; //!< all the FlowProbes |
282 |
FlowProbeContainer m_flowProbes; //!< all the FlowProbes |
| 267 |
|
283 |
|
| 268 |
// note: this is needed only for serialization |
284 |
// note: this is needed only for serialization |
| 269 |
std::list<Ptr<FlowClassifier> > m_classifiers; //!< the FlowClassifiers |
285 |
std::list<Ptr<FlowClassifier> > m_classifiers; //!< the FlowClassifiers |