44 std::string graphName,
47 Init(graphName, graphType);
52 std::string graphName,
61 m_plotFileName = (graphName.empty()) ?
"QKD Total Graph" : graphName;
76 std::string outputTerminalCommand;
79 outputTerminalCommand =
"pngcair";
81 outputTerminalCommand =
"epslatex";
91 m_gnuplot.
AppendExtra (
"set terminal " + outputTerminalCommand +
" size 1524,768 enhanced font 'Helvetica,18'");
105 m_gnuplot.
AppendExtra (
"set arrow from graph 1,0 to graph 1.03,0 size screen 0.025,15,60 filled ls 3");
106 m_gnuplot.
AppendExtra (
"set arrow from graph 0,1 to graph 0,1.03 size screen 0.025,15,60 filled ls 3");
119 std::string plotTitle;
121 if(graphName.empty()){
122 plotTitle =
"QKD Key Material in Whole Network";
124 plotTitle = graphName;
141 tempPlotFileName1 +=
"_data.dat";
142 std::ofstream tempPlotFile1 (tempPlotFileName1.c_str());
void SetStyle(enum Style style)
void Add(double x, double y)
void SetExtra(const std::string &extra)
Add extra formatting parameters to this dataset.
void SetTitle(const std::string &title)
Change line title.
void AddDataset(const GnuplotDataset &dataset)
void SetLegend(const std::string &xLegend, const std::string &yLegend)
void AppendExtra(const std::string &extra)
void GenerateOutput(std::ostream &os)
Writes gnuplot commands and data values to a single output stream.
void SetTitle(const std::string &title)
void SetOutputFilename(const std::string &outputFilename)
A base class which provides memory management and object aggregation.
double m_simulationTime
time value, x-axis
Gnuplot2dDataset m_dataset
void PrintGraph()
Print the graph.
std::string m_plotFileName
output filename
virtual ~QKDTotalGraph()
Destructor.
static TypeId GetTypeId(void)
Get the type ID.
void ProcessMThr(uint32_t value, char sign)
Mthr value of the QKDBuffer changed, so plot it on the graph.
uint32_t m_keymCurrent
get some boundaries for the graph
void ProcessMCurrent(uint32_t value, char sign)
MCurrent value of the QKDBuffer changed, so plot it on the graph.
void Init(std::string graphName, std::string graphType)
Initialized function used in constructor.
uint32_t m_keymThreshold
get some boundaries for the graph
Gnuplot2dDataset m_datasetThreshold
QKDTotalGraph()
Constructor.
std::string m_plotFileType
static Time Now(void)
Return the current simulation virtual time.
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.