A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::QKDGraphManager Class Reference

QKDGraphManager. More...

#include "qkd-graph-manager.h"

+ Inheritance diagram for ns3::QKDGraphManager:
+ Collaboration diagram for ns3::QKDGraphManager:

Public Member Functions

 ~QKDGraphManager () override
 Destructor.
 
void CreateGraphForBuffer (Ptr< Node > srcKMSNode, Ptr< Node > dstKMSNode, uint32_t bufferID, uint32_t srcKMSApplicationIndex, std::string graphName, std::string graphType, Ptr< QBuffer > buff)
 Connect new QBuffer/Sbuffer to QKDTotalGraph.
 
Ptr< QKDTotalGraphGetTotalGraph ()
 Return Ptr to QKDTotalGraph.
 
void PrintGraphs ()
 Print graphs.
 
void SendCurrentChangeValueToGraph (const uint32_t &nodeID, const uint32_t &bufferID, const uint32_t &value)
 Temp function, forward value form trace source to the graph in the list.
 
void SendStatusValueToGraph (const uint32_t &nodeID, const uint32_t &bufferID, const uint32_t &value)
 Temp function, forward value form trace source to the graph in the list.
 
void SendThresholdValueToGraph (const uint32_t &nodeID, const uint32_t &bufferID, const uint32_t &value)
 Temp function, forward value form trace source to the graph in the list.
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
void UnidirectionalAggregateObject (Ptr< Object > other)
 Aggregate an Object to another Object.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static QKDGraphManagergetInstance ()
 Signelton getInstance function.
 
static TypeId GetTypeId ()
 Get the type ID.
 
static void ProcessCurrentChange (std::string context, uint32_t value)
 Mcur value changed, so plot it on the graph.
 
static void ProcessCurrentDecrease (std::string context, uint32_t value)
 Mcur value decreased, so plot it on the graph.
 
static void ProcessCurrentIncrease (std::string context, uint32_t value)
 Mcur value increase, so plot it on the graph.
 
static void ProcessStatusChange (std::string context, uint32_t value)
 Status changed, so plot it on the graph.
 
static void ProcessThresholdChange (std::string context, uint32_t value)
 Mthr value changed, so plot it on the graph.
 
static void ProcessThresholdDecrease (std::string context, uint32_t value)
 Mthr value decreased, so plot it on the graph.
 
static void ProcessThresholdIncrease (std::string context, uint32_t value)
 Mthr value increased, so plot it on the graph.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Private Member Functions

 QKDGraphManager ()
 

Private Attributes

std::vector< std::vector< Ptr< QKDGraph > > > m_graphs
 

Static Private Attributes

static bool instanceFlag = false
 check whether object exists
 
static Ptr< QKDTotalGraphm_totalGraph = nullptr
 Ptr to QKDTotalGraph.
 
static QKDGraphManagersingle = nullptr
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void DoDispose ()
 Destructor implementation.
 
virtual void DoInitialize ()
 Initialize() implementation.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Detailed Description

QKDGraphManager.

Introspection did not find any typical Config paths.

QKDGraphManager is a signleton class used to connect QKDGraphs and QKDTotalGraph. It uses TraceSources to make connection and make printing of graphs easier, all graphs are printed using a single function "PrintGraphs".


No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 80 bytes (on a 64-bit architecture).

Definition at line 39 of file qkd-graph-manager.h.

Constructor & Destructor Documentation

◆ ~QKDGraphManager()

ns3::QKDGraphManager::~QKDGraphManager ( )
override

Destructor.

Definition at line 42 of file qkd-graph-manager.cc.

References instanceFlag, and single.

◆ QKDGraphManager()

ns3::QKDGraphManager::QKDGraphManager ( )
inlineprivate

Definition at line 166 of file qkd-graph-manager.h.

Referenced by getInstance().

+ Here is the caller graph for this function:

Member Function Documentation

◆ CreateGraphForBuffer()

void ns3::QKDGraphManager::CreateGraphForBuffer ( Ptr< Node srcKMSNode,
Ptr< Node dstKMSNode,
uint32_t  bufferID,
uint32_t  srcKMSApplicationIndex,
std::string  graphName = "",
std::string  graphType = "",
Ptr< QBuffer buff = nullptr 
)

Connect new QBuffer/Sbuffer to QKDTotalGraph.

Parameters
Ptr<Node>src
Ptr<Node>dst
uint32_tbufferID
uint32_tsrcKMSApplicationIndex
std::stringgraphTitle
std::stringgraphType

Definition at line 147 of file qkd-graph-manager.cc.

References ns3::Config::Connect(), ns3::Create(), m_graphs, ns3::MakeCallback(), NS_LOG_FUNCTION, ProcessCurrentChange(), ProcessCurrentDecrease(), ProcessCurrentIncrease(), ProcessStatusChange(), and ProcessThresholdChange().

Referenced by ns3::QKDLinkHelper::AddGraph(), ns3::QKDLinkHelper::AddGraphs(), ns3::QKDKeyManagerSystemApplication::CreateKeyStreamSession(), and ns3::QKDKeyManagerSystemApplication::CreateRelaySBuffer().

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

◆ getInstance()

QKDGraphManager * ns3::QKDGraphManager::getInstance ( )
static

Signelton getInstance function.

Definition at line 32 of file qkd-graph-manager.cc.

References QKDGraphManager(), ns3::Create(), instanceFlag, m_totalGraph, and single.

Referenced by ns3::QKDLinkHelper::AddGraph(), ns3::QKDLinkHelper::AddGraphs(), and ns3::QKDLinkHelper::PrintGraphs().

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

◆ GetTotalGraph()

Ptr< QKDTotalGraph > ns3::QKDGraphManager::GetTotalGraph ( )

Return Ptr to QKDTotalGraph.

Returns
Ptr<QKDTotalGraph>

Definition at line 49 of file qkd-graph-manager.cc.

References m_totalGraph.

◆ GetTypeId()

TypeId ns3::QKDGraphManager::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 21 of file qkd-graph-manager.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ PrintGraphs()

void ns3::QKDGraphManager::PrintGraphs ( )

Print graphs.

Definition at line 54 of file qkd-graph-manager.cc.

References ns3::Create(), m_graphs, m_totalGraph, and NS_LOG_FUNCTION.

Referenced by ns3::QKDLinkHelper::PrintGraphs().

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

◆ ProcessCurrentChange()

void ns3::QKDGraphManager::ProcessCurrentChange ( std::string  context,
uint32_t  value 
)
static

Mcur value changed, so plot it on the graph.

Parameters
std::stringcontext
uint32_tvalue

NodeList/8/ApplicationList/0/$ns3::QKDKeyManagerSystemApplication/BufferList/1/CurrentChange

Definition at line 91 of file qkd-graph-manager.cc.

References ns3::Create(), SendCurrentChangeValueToGraph(), single, and ns3::value().

Referenced by CreateGraphForBuffer().

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

◆ ProcessCurrentDecrease()

void ns3::QKDGraphManager::ProcessCurrentDecrease ( std::string  context,
uint32_t  value 
)
static

Mcur value decreased, so plot it on the graph.

Parameters
std::stringcontext
uint32_tvalue

Definition at line 140 of file qkd-graph-manager.cc.

References m_totalGraph, and ns3::value().

Referenced by CreateGraphForBuffer().

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

◆ ProcessCurrentIncrease()

void ns3::QKDGraphManager::ProcessCurrentIncrease ( std::string  context,
uint32_t  value 
)
static

Mcur value increase, so plot it on the graph.

Parameters
std::stringcontext
uint32_tvalue

Definition at line 133 of file qkd-graph-manager.cc.

References m_totalGraph, and ns3::value().

Referenced by CreateGraphForBuffer().

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

◆ ProcessStatusChange()

void ns3::QKDGraphManager::ProcessStatusChange ( std::string  context,
uint32_t  value 
)
static

Status changed, so plot it on the graph.

Parameters
std::stringcontext
uint32_tvalue

Definition at line 106 of file qkd-graph-manager.cc.

References ns3::Create(), SendStatusValueToGraph(), single, and ns3::value().

Referenced by CreateGraphForBuffer().

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

◆ ProcessThresholdChange()

void ns3::QKDGraphManager::ProcessThresholdChange ( std::string  context,
uint32_t  value 
)
static

Mthr value changed, so plot it on the graph.

Parameters
std::stringcontext
uint32_tvalue

Definition at line 119 of file qkd-graph-manager.cc.

References ns3::Create(), SendThresholdValueToGraph(), single, and ns3::value().

Referenced by CreateGraphForBuffer().

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

◆ ProcessThresholdDecrease()

static void ns3::QKDGraphManager::ProcessThresholdDecrease ( std::string  context,
uint32_t  value 
)
static

Mthr value decreased, so plot it on the graph.

Parameters
std::stringcontext
uint32_tvalue

◆ ProcessThresholdIncrease()

static void ns3::QKDGraphManager::ProcessThresholdIncrease ( std::string  context,
uint32_t  value 
)
static

Mthr value increased, so plot it on the graph.

Parameters
std::stringcontext
uint32_tvalue

◆ SendCurrentChangeValueToGraph()

void ns3::QKDGraphManager::SendCurrentChangeValueToGraph ( const uint32_t nodeID,
const uint32_t bufferID,
const uint32_t value 
)

Temp function, forward value form trace source to the graph in the list.

Parameters
uint32_t&nodeID
uint32_t&bufferID
uint32_t&value

Definition at line 70 of file qkd-graph-manager.cc.

References ns3::Create(), m_graphs, NS_LOG_FUNCTION, and ns3::value().

Referenced by ProcessCurrentChange().

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

◆ SendStatusValueToGraph()

void ns3::QKDGraphManager::SendStatusValueToGraph ( const uint32_t nodeID,
const uint32_t bufferID,
const uint32_t value 
)

Temp function, forward value form trace source to the graph in the list.

Parameters
uint32_t&nodeID
uint32_t&bufferID
uint32_t&value

Definition at line 77 of file qkd-graph-manager.cc.

References ns3::Create(), m_graphs, NS_LOG_FUNCTION, and ns3::value().

Referenced by ProcessStatusChange().

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

◆ SendThresholdValueToGraph()

void ns3::QKDGraphManager::SendThresholdValueToGraph ( const uint32_t nodeID,
const uint32_t bufferID,
const uint32_t value 
)

Temp function, forward value form trace source to the graph in the list.

Parameters
uint32_t&nodeID
uint32_t&bufferID
uint32_t&value

Definition at line 84 of file qkd-graph-manager.cc.

References ns3::Create(), m_graphs, NS_LOG_FUNCTION, and ns3::value().

Referenced by ProcessThresholdChange().

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

Member Data Documentation

◆ instanceFlag

bool ns3::QKDGraphManager::instanceFlag = false
staticprivate

check whether object exists

Definition at line 168 of file qkd-graph-manager.h.

Referenced by ~QKDGraphManager(), and getInstance().

◆ m_graphs

std::vector<std::vector<Ptr<QKDGraph > > > ns3::QKDGraphManager::m_graphs
private

◆ m_totalGraph

Ptr< QKDTotalGraph > ns3::QKDGraphManager::m_totalGraph = nullptr
staticprivate

◆ single

QKDGraphManager * ns3::QKDGraphManager::single = nullptr
staticprivate

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