QKD graphs are implemented to allow straightforward access to QKD buffers' state and convenient monitoring of key material consumption. More...
#include "qkd-graph.h"
Public Member Functions | |
QKDGraph (Ptr< QKDControl > control, Ptr< Node > src, Ptr< Node > dst, uint32_t bufferID, std::string graphTitle, std::string graphType) | |
Constructor. More... | |
virtual | ~QKDGraph () |
Destructor. More... | |
void | InitTotalGraph () const |
Initialized function for total graph. More... | |
void | PrintGraph () |
Print the graph. More... | |
void | ProcessMCurrent (uint32_t value) |
MCurrent value of the QKDBuffer changed, so plot it on the graph. More... | |
void | ProcessMStatus (uint32_t value) |
The status of the QKDBuffer changed, so plot it on the graph. More... | |
void | ProcessMStatusHelpFunction (double time, uint32_t newValue) |
Help function for detection of status change value. More... | |
void | ProcessMThrStatus (uint32_t value) |
The Mthr value of the QKDBuffer changed, so plot it on the graph. More... | |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. More... | |
~Object () override | |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose () |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. More... | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. More... | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated Object. More... | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. More... | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. More... | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
bool | IsInitialized () const |
Check if the object has been initialized. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o[[maybe_unused]]) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o[[maybe_unused]]) |
Assignment operator. More... | |
void | Ref () const |
Increment the reference count. More... | |
void | Unref () const |
Decrement the reference count. More... | |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising errors. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId () |
Register this type. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | DoDispose () |
Destructor implementation. More... | |
virtual void | DoInitialize () |
Initialize() implementation. More... | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. More... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
QKD graphs are implemented to allow straightforward access to QKD buffers' state and convenient monitoring of key material consumption.
Definition at line 47 of file qkd-graph.h.
ns3::QKDGraph::QKDGraph | ( | Ptr< QKDControl > | control, |
Ptr< Node > | src, | ||
Ptr< Node > | dst, | ||
uint32_t | bufferID, | ||
std::string | graphTitle, | ||
std::string | graphType | ||
) |
Constructor.
Ptr<QKDControl> | control |
Ptr<Node> | src |
Ptr<Node> | dst |
uint32_t | bufferID |
std::string | graphTitle |
std::string | graphType |
Definition at line 39 of file qkd-graph.cc.
References ns3::Gnuplot2dDataset::Add(), ns3::Gnuplot::AppendExtra(), ns3::Gnuplot2dDataset::FILLEDCURVE, ns3::Node::GetId(), ns3::Gnuplot2dDataset::LINES_POINTS, m_buffer, m_dataset, m_datasetMaximum, m_datasetMinimum, m_datasetThreshold, m_datasetWorkingState_0, m_datasetWorkingState_1, m_datasetWorkingState_2, m_datasetWorkingState_3, m_dst, m_gnuplot, m_graphStatusEntry, m_keymCurrent, m_keymMax, m_keymMin, m_keymThreshold, m_plotFileName, m_plotFileType, m_src, m_tempMax, NS_LOG_FUNCTION, ProcessMStatusHelpFunction(), ns3::GnuplotDataset::SetExtra(), ns3::Gnuplot::SetLegend(), ns3::Gnuplot::SetOutputFilename(), ns3::Gnuplot2dDataset::SetStyle(), ns3::GnuplotDataset::SetTitle(), and ns3::Gnuplot::SetTitle().
ns3::QKDGraph::~QKDGraph | ( | ) |
Destructor.
Definition at line 37 of file qkd-graph.cc.
|
static |
Get the type ID.
Definition at line 29 of file qkd-graph.cc.
References ns3::TypeId::SetParent().
void ns3::QKDGraph::InitTotalGraph | ( | ) | const |
Initialized function for total graph.
Definition at line 229 of file qkd-graph.cc.
References m_buffer.
void ns3::QKDGraph::PrintGraph | ( | ) |
Print the graph.
Definition at line 191 of file qkd-graph.cc.
References ns3::Gnuplot2dDataset::Add(), ns3::Gnuplot::AddDataset(), ns3::Gnuplot::GenerateOutput(), ns3::Node::GetId(), m_buffer, m_dataset, m_datasetMaximum, m_datasetMinimum, m_datasetThreshold, m_datasetWorkingState_0, m_datasetWorkingState_1, m_datasetWorkingState_2, m_datasetWorkingState_3, m_dst, m_gnuplot, m_keymMax, m_keymMin, m_plotFileName, m_simulationTime, m_src, NS_LOG_FUNCTION, and ProcessMStatusHelpFunction().
void ns3::QKDGraph::ProcessMCurrent | ( | uint32_t | value | ) |
MCurrent value of the QKDBuffer changed, so plot it on the graph.
Definition at line 235 of file qkd-graph.cc.
References ns3::Gnuplot2dDataset::Add(), ns3::Node::GetId(), ns3::Time::GetSeconds(), m_dataset, m_dst, m_simulationTime, m_src, ns3::Simulator::Now(), and NS_LOG_FUNCTION.
void ns3::QKDGraph::ProcessMStatus | ( | uint32_t | value | ) |
The status of the QKDBuffer changed, so plot it on the graph.
Definition at line 287 of file qkd-graph.cc.
References ns3::Time::GetSeconds(), m_simulationTime, ns3::Simulator::Now(), NS_LOG_FUNCTION, and ProcessMStatusHelpFunction().
void ns3::QKDGraph::ProcessMStatusHelpFunction | ( | double | time, |
uint32_t | newValue | ||
) |
Help function for detection of status change value.
Definition at line 251 of file qkd-graph.cc.
References ns3::Gnuplot2dDataset::Add(), ns3::Node::GetId(), m_datasetWorkingState_0, m_datasetWorkingState_1, m_datasetWorkingState_2, m_datasetWorkingState_3, m_dst, m_graphStatusEntry, m_keymMax, m_src, and NS_LOG_FUNCTION.
Referenced by QKDGraph(), PrintGraph(), and ProcessMStatus().
void ns3::QKDGraph::ProcessMThrStatus | ( | uint32_t | value | ) |
The Mthr value of the QKDBuffer changed, so plot it on the graph.
Definition at line 243 of file qkd-graph.cc.
References ns3::Gnuplot2dDataset::Add(), ns3::Node::GetId(), ns3::Time::GetSeconds(), m_datasetThreshold, m_dst, m_simulationTime, m_src, ns3::Simulator::Now(), and NS_LOG_FUNCTION.
QKDBuffer associated with the QKDGraph.
Definition at line 111 of file qkd-graph.h.
Referenced by QKDGraph(), InitTotalGraph(), and PrintGraph().
|
private |
Definition at line 127 of file qkd-graph.h.
Referenced by QKDGraph(), PrintGraph(), and ProcessMCurrent().
|
private |
Definition at line 135 of file qkd-graph.h.
Referenced by QKDGraph(), and PrintGraph().
|
private |
Definition at line 134 of file qkd-graph.h.
Referenced by QKDGraph(), and PrintGraph().
|
private |
Definition at line 133 of file qkd-graph.h.
Referenced by QKDGraph(), PrintGraph(), and ProcessMThrStatus().
|
private |
Definition at line 129 of file qkd-graph.h.
Referenced by QKDGraph(), PrintGraph(), and ProcessMStatusHelpFunction().
|
private |
Definition at line 130 of file qkd-graph.h.
Referenced by QKDGraph(), PrintGraph(), and ProcessMStatusHelpFunction().
|
private |
Definition at line 131 of file qkd-graph.h.
Referenced by QKDGraph(), PrintGraph(), and ProcessMStatusHelpFunction().
|
private |
Definition at line 132 of file qkd-graph.h.
Referenced by QKDGraph(), PrintGraph(), and ProcessMStatusHelpFunction().
|
private |
Definition at line 128 of file qkd-graph.h.
destination node, info required for graph title
Definition at line 113 of file qkd-graph.h.
Referenced by QKDGraph(), PrintGraph(), ProcessMCurrent(), ProcessMStatusHelpFunction(), and ProcessMThrStatus().
|
private |
Gluplot object settings.
Definition at line 126 of file qkd-graph.h.
Referenced by QKDGraph(), and PrintGraph().
|
private |
temp variable
Definition at line 124 of file qkd-graph.h.
Referenced by QKDGraph(), and ProcessMStatusHelpFunction().
|
private |
get some boundaries for the graph
Definition at line 116 of file qkd-graph.h.
Referenced by QKDGraph().
|
private |
get some boundaries for the graph
Definition at line 117 of file qkd-graph.h.
Referenced by QKDGraph(), PrintGraph(), and ProcessMStatusHelpFunction().
|
private |
get some boundaries for the graph
Definition at line 115 of file qkd-graph.h.
Referenced by QKDGraph(), and PrintGraph().
|
private |
get some boundaries for the graph
Definition at line 119 of file qkd-graph.h.
Referenced by QKDGraph().
|
private |
output filename
Definition at line 121 of file qkd-graph.h.
Referenced by QKDGraph(), and PrintGraph().
|
private |
Definition at line 122 of file qkd-graph.h.
Referenced by QKDGraph().
|
private |
time value, x-axis
Definition at line 123 of file qkd-graph.h.
Referenced by PrintGraph(), ProcessMCurrent(), ProcessMStatus(), and ProcessMThrStatus().
source node, info required for graph title
Definition at line 112 of file qkd-graph.h.
Referenced by QKDGraph(), PrintGraph(), ProcessMCurrent(), ProcessMStatusHelpFunction(), and ProcessMThrStatus().
|
private |
get some boundaries for the graph
Definition at line 118 of file qkd-graph.h.
Referenced by QKDGraph().