A Discrete-Event Network Simulator
API
ns3::QKDGraph Class Reference

QKD graphs are implemented to allow straightforward access to QKD buffers' state and convenient monitoring of key material consumption. More...

#include "qkd-graph.h"

+ Inheritance diagram for ns3::QKDGraph:
+ Collaboration diagram for ns3::QKDGraph:

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< ObjectGetObject () 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< ObjectGetObject (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...
 
SimpleRefCountoperator= (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...
 

Private Attributes

Ptr< QKDBufferm_buffer
 QKDBuffer associated with the QKDGraph. More...
 
Gnuplot2dDataset m_dataset
 
Gnuplot2dDataset m_datasetMaximum
 
Gnuplot2dDataset m_datasetMinimum
 
Gnuplot2dDataset m_datasetThreshold
 
Gnuplot2dDataset m_datasetWorkingState_0
 
Gnuplot2dDataset m_datasetWorkingState_1
 
Gnuplot2dDataset m_datasetWorkingState_2
 
Gnuplot2dDataset m_datasetWorkingState_3
 
Gnuplot2dDataset m_datasetWorkingState_Mthr
 
Ptr< Nodem_dst
 destination node, info required for graph title More...
 
Gnuplot m_gnuplot
 Gluplot object settings. More...
 
uint32_t m_graphStatusEntry
 temp variable More...
 
uint32_t m_keymCurrent
 get some boundaries for the graph More...
 
uint32_t m_keymMax
 get some boundaries for the graph More...
 
uint32_t m_keymMin
 get some boundaries for the graph More...
 
uint32_t m_keymThreshold
 get some boundaries for the graph More...
 
std::string m_plotFileName
 output filename More...
 
std::string m_plotFileType
 
double m_simulationTime
 time value, x-axis More...
 
Ptr< Nodem_src
 source node, info required for graph title More...
 
uint32_t m_tempMax
 get some boundaries for the graph 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...
 

Detailed Description

QKD graphs are implemented to allow straightforward access to QKD buffers' state and convenient monitoring of key material consumption.

Note
QKD graph is associated with QKD buffer which allows plotting of graphs on each node with associated QKD link and QKD buffer. QKD Graph creates separate PLT and DAT files which are suitable for plotting using popular Gnuplot tool in PNG (default), SVG or EPSLATEX format. QKDNetSim supports plotting of QKD Total Graph which is used to show the overall consumption of key material in QKD Network. QKD Total Graph is updated each time when key material is generated or consumed on a network link.

Definition at line 47 of file qkd-graph.h.

Constructor & Destructor Documentation

◆ QKDGraph()

◆ ~QKDGraph()

ns3::QKDGraph::~QKDGraph ( )

Destructor.

Definition at line 37 of file qkd-graph.cc.

Member Function Documentation

◆ GetTypeId()

TypeId ns3::QKDGraph::GetTypeId ( void  )
static

Get the type ID.

Returns
the object TypeId

Definition at line 29 of file qkd-graph.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ InitTotalGraph()

void ns3::QKDGraph::InitTotalGraph ( ) const

Initialized function for total graph.

Definition at line 229 of file qkd-graph.cc.

References m_buffer.

◆ PrintGraph()

◆ ProcessMCurrent()

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.

+ Here is the call graph for this function:

◆ ProcessMStatus()

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().

+ Here is the call graph for this function:

◆ 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessMThrStatus()

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.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_buffer

Ptr< QKDBuffer > ns3::QKDGraph::m_buffer
private

QKDBuffer associated with the QKDGraph.

Definition at line 111 of file qkd-graph.h.

Referenced by QKDGraph(), InitTotalGraph(), and PrintGraph().

◆ m_dataset

Gnuplot2dDataset ns3::QKDGraph::m_dataset
private

Definition at line 127 of file qkd-graph.h.

Referenced by QKDGraph(), PrintGraph(), and ProcessMCurrent().

◆ m_datasetMaximum

Gnuplot2dDataset ns3::QKDGraph::m_datasetMaximum
private

Definition at line 135 of file qkd-graph.h.

Referenced by QKDGraph(), and PrintGraph().

◆ m_datasetMinimum

Gnuplot2dDataset ns3::QKDGraph::m_datasetMinimum
private

Definition at line 134 of file qkd-graph.h.

Referenced by QKDGraph(), and PrintGraph().

◆ m_datasetThreshold

Gnuplot2dDataset ns3::QKDGraph::m_datasetThreshold
private

Definition at line 133 of file qkd-graph.h.

Referenced by QKDGraph(), PrintGraph(), and ProcessMThrStatus().

◆ m_datasetWorkingState_0

Gnuplot2dDataset ns3::QKDGraph::m_datasetWorkingState_0
private

Definition at line 129 of file qkd-graph.h.

Referenced by QKDGraph(), PrintGraph(), and ProcessMStatusHelpFunction().

◆ m_datasetWorkingState_1

Gnuplot2dDataset ns3::QKDGraph::m_datasetWorkingState_1
private

Definition at line 130 of file qkd-graph.h.

Referenced by QKDGraph(), PrintGraph(), and ProcessMStatusHelpFunction().

◆ m_datasetWorkingState_2

Gnuplot2dDataset ns3::QKDGraph::m_datasetWorkingState_2
private

Definition at line 131 of file qkd-graph.h.

Referenced by QKDGraph(), PrintGraph(), and ProcessMStatusHelpFunction().

◆ m_datasetWorkingState_3

Gnuplot2dDataset ns3::QKDGraph::m_datasetWorkingState_3
private

Definition at line 132 of file qkd-graph.h.

Referenced by QKDGraph(), PrintGraph(), and ProcessMStatusHelpFunction().

◆ m_datasetWorkingState_Mthr

Gnuplot2dDataset ns3::QKDGraph::m_datasetWorkingState_Mthr
private

Definition at line 128 of file qkd-graph.h.

◆ m_dst

Ptr< Node > ns3::QKDGraph::m_dst
private

destination node, info required for graph title

Definition at line 113 of file qkd-graph.h.

Referenced by QKDGraph(), PrintGraph(), ProcessMCurrent(), ProcessMStatusHelpFunction(), and ProcessMThrStatus().

◆ m_gnuplot

Gnuplot ns3::QKDGraph::m_gnuplot
private

Gluplot object settings.

Definition at line 126 of file qkd-graph.h.

Referenced by QKDGraph(), and PrintGraph().

◆ m_graphStatusEntry

uint32_t ns3::QKDGraph::m_graphStatusEntry
private

temp variable

Definition at line 124 of file qkd-graph.h.

Referenced by QKDGraph(), and ProcessMStatusHelpFunction().

◆ m_keymCurrent

uint32_t ns3::QKDGraph::m_keymCurrent
private

get some boundaries for the graph

Definition at line 116 of file qkd-graph.h.

Referenced by QKDGraph().

◆ m_keymMax

uint32_t ns3::QKDGraph::m_keymMax
private

get some boundaries for the graph

Definition at line 117 of file qkd-graph.h.

Referenced by QKDGraph(), PrintGraph(), and ProcessMStatusHelpFunction().

◆ m_keymMin

uint32_t ns3::QKDGraph::m_keymMin
private

get some boundaries for the graph

Definition at line 115 of file qkd-graph.h.

Referenced by QKDGraph(), and PrintGraph().

◆ m_keymThreshold

uint32_t ns3::QKDGraph::m_keymThreshold
private

get some boundaries for the graph

Definition at line 119 of file qkd-graph.h.

Referenced by QKDGraph().

◆ m_plotFileName

std::string ns3::QKDGraph::m_plotFileName
private

output filename

Definition at line 121 of file qkd-graph.h.

Referenced by QKDGraph(), and PrintGraph().

◆ m_plotFileType

std::string ns3::QKDGraph::m_plotFileType
private

Definition at line 122 of file qkd-graph.h.

Referenced by QKDGraph().

◆ m_simulationTime

double ns3::QKDGraph::m_simulationTime
private

time value, x-axis

Definition at line 123 of file qkd-graph.h.

Referenced by PrintGraph(), ProcessMCurrent(), ProcessMStatus(), and ProcessMThrStatus().

◆ m_src

Ptr< Node > ns3::QKDGraph::m_src
private

source node, info required for graph title

Definition at line 112 of file qkd-graph.h.

Referenced by QKDGraph(), PrintGraph(), ProcessMCurrent(), ProcessMStatusHelpFunction(), and ProcessMThrStatus().

◆ m_tempMax

uint32_t ns3::QKDGraph::m_tempMax
private

get some boundaries for the graph

Definition at line 118 of file qkd-graph.h.

Referenced by QKDGraph().


The documentation for this class was generated from the following files: