A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
qkd-total-graph.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2020 DOTFEESA www.tk.etf.unsa.ba
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Miralem Mehic <miralem.mehic@ieee.org>
19
*/
20
21
#ifndef QKD_TOTAL_GRAPH_H
22
#define QKD_TOTAL_GRAPH_H
23
24
#include <fstream>
25
#include "ns3/object.h"
26
#include "ns3/gnuplot.h"
27
#include "ns3/core-module.h"
28
#include "ns3/node-list.h"
29
#include <sstream>
30
31
namespace
ns3
{
32
43
class
QKDTotalGraph
:
public
Object
44
{
45
public
:
46
51
static
TypeId
GetTypeId
(
void
);
52
56
QKDTotalGraph
();
57
63
QKDTotalGraph
(
64
std::string graphName,
65
std::string graphType
66
);
67
71
void
Init
(
72
std::string graphName,
73
std::string graphType
74
);
75
79
virtual
~QKDTotalGraph
();
80
84
void
PrintGraph
();
85
91
void
ProcessMThr
(uint32_t value,
char
sign);
92
98
void
ProcessMCurrent
(uint32_t value,
char
sign);
99
100
private
:
101
102
uint32_t
m_keymCurrent
;
103
uint32_t
m_keymThreshold
;
104
105
std::string
m_plotFileName
;
106
std::string
m_plotFileType
;
//png or svg
107
double
m_simulationTime
;
108
109
Gnuplot
m_gnuplot
;
110
Gnuplot2dDataset
m_dataset
;
111
Gnuplot2dDataset
m_datasetThreshold
;
112
};
113
}
114
115
#endif
/* QKDTotalGraph */
ns3::Gnuplot2dDataset
Class to represent a 2D points plot.
Definition:
gnuplot.h:118
ns3::Gnuplot
a simple class to generate gnuplot-ready plotting commands from a set of datasets.
Definition:
gnuplot.h:373
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:89
ns3::QKDTotalGraph
QKDTotalGraph is implemented to allow easier access to the state of ALL QKD buffers and easier monito...
Definition:
qkd-total-graph.h:44
ns3::QKDTotalGraph::m_simulationTime
double m_simulationTime
time value, x-axis
Definition:
qkd-total-graph.h:107
ns3::QKDTotalGraph::m_dataset
Gnuplot2dDataset m_dataset
Definition:
qkd-total-graph.h:110
ns3::QKDTotalGraph::PrintGraph
void PrintGraph()
Print the graph.
Definition:
qkd-total-graph.cc:138
ns3::QKDTotalGraph::m_plotFileName
std::string m_plotFileName
output filename
Definition:
qkd-total-graph.h:105
ns3::QKDTotalGraph::~QKDTotalGraph
virtual ~QKDTotalGraph()
Destructor.
Definition:
qkd-total-graph.cc:37
ns3::QKDTotalGraph::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
qkd-total-graph.cc:29
ns3::QKDTotalGraph::ProcessMThr
void ProcessMThr(uint32_t value, char sign)
Mthr value of the QKDBuffer changed, so plot it on the graph.
Definition:
qkd-total-graph.cc:175
ns3::QKDTotalGraph::m_keymCurrent
uint32_t m_keymCurrent
get some boundaries for the graph
Definition:
qkd-total-graph.h:102
ns3::QKDTotalGraph::m_gnuplot
Gnuplot m_gnuplot
Definition:
qkd-total-graph.h:109
ns3::QKDTotalGraph::ProcessMCurrent
void ProcessMCurrent(uint32_t value, char sign)
MCurrent value of the QKDBuffer changed, so plot it on the graph.
Definition:
qkd-total-graph.cc:161
ns3::QKDTotalGraph::Init
void Init(std::string graphName, std::string graphType)
Initialized function used in constructor.
Definition:
qkd-total-graph.cc:51
ns3::QKDTotalGraph::m_keymThreshold
uint32_t m_keymThreshold
get some boundaries for the graph
Definition:
qkd-total-graph.h:103
ns3::QKDTotalGraph::m_datasetThreshold
Gnuplot2dDataset m_datasetThreshold
Definition:
qkd-total-graph.h:111
ns3::QKDTotalGraph::QKDTotalGraph
QKDTotalGraph()
Constructor.
Definition:
qkd-total-graph.cc:39
ns3::QKDTotalGraph::m_plotFileType
std::string m_plotFileType
Definition:
qkd-total-graph.h:106
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
qkd
model
qkd-total-graph.h
Generated on Sun Mar 3 2024 17:11:07 for ns-3 by
1.9.1