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

QKDGraphManager. More...

#include "qkd-graph-manager.h"

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

Public Member Functions

virtual ~QKDGraphManager ()
 Destructor. More...
 
void AddQKDBuffer (Ptr< QKDControl > c, Ptr< Node > src, Ptr< Node > dst, uint32_t bufferID, std::string graphName, std::string graphType)
 Connect new QKDBuffer to QKDTotalGraph. More...
 
Ptr< QKDTotalGraphGetTotalGraph ()
 Return Ptr to QKDTotalGraph. More...
 
void PrintGraphs ()
 Print graphs. More...
 
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. More...
 
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. More...
 
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. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose (void)
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator (void) const
 Get an iterator to the Objects aggregated to this one. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Get the most derived TypeId for this 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...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
void Initialize (void)
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized (void) 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 (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= ([[maybe_unused]] const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) 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 erros. 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 QKDGraphManagergetInstance ()
 Signelton getInstance function. More...
 
static TypeId GetTypeId (void)
 Get the type ID. More...
 
static void ProcessCurrentChange (std::string context, uint32_t value)
 Mcur value changed, so plot it on the graph. More...
 
static void ProcessCurrentDecrease (std::string context, uint32_t value)
 Mcur value decreased, so plot it on the graph. More...
 
static void ProcessCurrentIncrease (std::string context, uint32_t value)
 Mcur value increase, so plot it on the graph. More...
 
static void ProcessStatusChange (std::string context, uint32_t value)
 Status changed, so plot it on the graph. More...
 
static void ProcessThresholdChange (std::string context, uint32_t value)
 Mthr value changed, so plot it on the graph. More...
 
static void ProcessThresholdDecrease (std::string context, uint32_t value)
 Mthr value decreased, so plot it on the graph. More...
 
static void ProcessThresholdIncrease (std::string context, uint32_t value)
 Mthr value increased, so plot it on the graph. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Private Member Functions

 QKDGraphManager ()
 

Private Attributes

std::vector< std::vector< QKDGraph * > > m_graphs
 

Static Private Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void DoDispose (void)
 Destructor implementation. More...
 
virtual void DoInitialize (void)
 Initialize() implementation. More...
 
virtual void NotifyNewAggregate (void)
 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 (void)
 Notifier called once the ObjectBase is fully constructed. More...
 

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 56 bytes (on a 64-bit architecture).

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

Constructor & Destructor Documentation

◆ ~QKDGraphManager()

ns3::QKDGraphManager::~QKDGraphManager ( )
virtual

Destructor.

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

References instanceFlag, and single.

◆ QKDGraphManager()

ns3::QKDGraphManager::QKDGraphManager ( )
inlineprivate

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

Referenced by getInstance().

+ Here is the caller graph for this function:

Member Function Documentation

◆ AddQKDBuffer()

void ns3::QKDGraphManager::AddQKDBuffer ( Ptr< QKDControl c,
Ptr< Node src,
Ptr< Node dst,
uint32_t  bufferID,
std::string  graphName,
std::string  graphType 
)

Connect new QKDBuffer to QKDTotalGraph.

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

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

References ns3::Config::Connect(), ns3::Node::GetId(), m_graphs, ns3::MakeCallback(), NS_LOG_FUNCTION, ProcessCurrentChange(), ProcessCurrentDecrease(), ProcessCurrentIncrease(), ProcessStatusChange(), ProcessThresholdChange(), ProcessThresholdDecrease(), and ProcessThresholdIncrease().

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

+ 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 42 of file qkd-graph-manager.cc.

References QKDGraphManager(), instanceFlag, m_totalGraph, and single.

Referenced by ns3::QKDLinkHelper::AddGraph(), 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 59 of file qkd-graph-manager.cc.

References m_totalGraph.

◆ GetTypeId()

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

Get the type ID.

Returns
the object TypeId

Definition at line 31 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 64 of file qkd-graph-manager.cc.

References m_graphs, m_totalGraph, and NS_LOG_FUNCTION.

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

+ 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

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

References SendCurrentChangeValueToGraph(), and single.

Referenced by AddQKDBuffer().

+ 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 146 of file qkd-graph-manager.cc.

References m_totalGraph.

Referenced by AddQKDBuffer().

+ 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 139 of file qkd-graph-manager.cc.

References m_totalGraph.

Referenced by AddQKDBuffer().

+ 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 115 of file qkd-graph-manager.cc.

References SendStatusValueToGraph(), and single.

Referenced by AddQKDBuffer().

+ 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 126 of file qkd-graph-manager.cc.

References SendThresholdValueToGraph(), and single.

Referenced by AddQKDBuffer().

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

◆ ProcessThresholdDecrease()

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

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

References m_totalGraph.

Referenced by AddQKDBuffer().

+ Here is the caller graph for this function:

◆ ProcessThresholdIncrease()

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

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

References m_totalGraph.

Referenced by AddQKDBuffer().

+ Here is the caller graph for this function:

◆ 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 83 of file qkd-graph-manager.cc.

References m_graphs, and NS_LOG_FUNCTION.

Referenced by ProcessCurrentChange().

+ 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 90 of file qkd-graph-manager.cc.

References m_graphs, and NS_LOG_FUNCTION.

Referenced by ProcessStatusChange().

+ 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 97 of file qkd-graph-manager.cc.

References m_graphs, and NS_LOG_FUNCTION.

Referenced by ProcessThresholdChange().

+ 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 177 of file qkd-graph-manager.h.

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

◆ m_graphs

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

◆ m_totalGraph

◆ single

QKDGraphManager * ns3::QKDGraphManager::single = NULL
staticprivate

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