20 #ifndef GNUPLOT_HELPER_H
21 #define GNUPLOT_HELPER_H
23 #include "ns3/gnuplot-aggregator.h"
24 #include "ns3/object-factory.h"
25 #include "ns3/probe.h"
27 #include "ns3/time-series-adaptor.h"
67 GnuplotHelper(
const std::string& outputFileNameWithoutExtension,
68 const std::string& title,
69 const std::string& xLegend,
70 const std::string& yLegend,
71 const std::string& terminalType =
"png");
91 void ConfigurePlot(
const std::string& outputFileNameWithoutExtension,
92 const std::string& title,
93 const std::string& xLegend,
94 const std::string& yLegend,
95 const std::string& terminalType =
"png");
123 void PlotProbe(
const std::string& typeId,
124 const std::string& path,
125 const std::string& probeTraceSource,
126 const std::string& title,
160 void AddProbe(
const std::string& typeId,
const std::string& probeName,
const std::string& path);
178 const std::string& matchIdentifier,
179 const std::string& path,
180 const std::string& probeTraceSource,
181 const std::string& title);
190 std::map<std::string, std::pair<Ptr<Probe>, std::string>>
m_probeMap;
KeyLocation
The location of the key in the plot.
Helper class used to make gnuplot plots.
void ConfigurePlot(const std::string &outputFileNameWithoutExtension, const std::string &title, const std::string &xLegend, const std::string &yLegend, const std::string &terminalType="png")
std::string m_title
Title string to use for this plot.
GnuplotHelper()
Constructs a gnuplot helper that will create a space separated gnuplot data file named "gnuplot-helpe...
void AddTimeSeriesAdaptor(const std::string &adaptorName)
Adds a time series adaptor to be used to make the plot.
Ptr< GnuplotAggregator > m_aggregator
The aggregator used to make the plots.
Ptr< Probe > GetProbe(std::string probeName) const
Gets the specified probe.
std::string m_terminalType
Terminal type for the plot.
std::string m_outputFileNameWithoutExtension
The name of the output file to created without its extension.
uint32_t m_plotProbeCount
Number of plot probes that have been created.
ObjectFactory m_factory
Used to create the probes and collectors as they are added.
std::string m_yLegend
Legend for the y axis.
std::map< std::string, Ptr< TimeSeriesAdaptor > > m_timeSeriesAdaptorMap
Maps time series adaptor names to time series adaptors.
void AddProbe(const std::string &typeId, const std::string &probeName, const std::string &path)
Adds a probe to be used to make the plot.
void PlotProbe(const std::string &typeId, const std::string &path, const std::string &probeTraceSource, const std::string &title, GnuplotAggregator::KeyLocation keyLocation=GnuplotAggregator::KEY_INSIDE)
void ConnectProbeToAggregator(const std::string &typeId, const std::string &matchIdentifier, const std::string &path, const std::string &probeTraceSource, const std::string &title)
Connects the probe to the aggregator.
std::map< std::string, std::pair< Ptr< Probe >, std::string > > m_probeMap
Maps probe names to probes.
void ConstructAggregator()
Constructs the aggregator.
std::string m_xLegend
Legend for the x axis.
Ptr< GnuplotAggregator > GetAggregator()
Gets the aggregator.
Instantiate subclasses of ns3::Object.
Smart pointer class similar to boost::intrusive_ptr.
Every class exported by the ns3 library is enclosed in the ns3 namespace.