#include "qkd-graph-manager.h"
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< QKDTotalGraph > | GetTotalGraph () |
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< 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... | |
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... | |
SimpleRefCount & | operator= ([[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 QKDGraphManager * | getInstance () |
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< QKDTotalGraph > | m_totalGraph = 0 |
Ptr to QKDTotalGraph. More... | |
static QKDGraphManager * | single = 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... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
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.
|
virtual |
Destructor.
Definition at line 52 of file qkd-graph-manager.cc.
References instanceFlag, and single.
|
inlineprivate |
Definition at line 175 of file qkd-graph-manager.h.
Referenced by getInstance().
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.
Ptr<QKDControl> | c |
Ptr<Node> | src |
Ptr<Node> | dst |
uint32_t | bufferID |
std::string | graphTitle |
std::string | graphType |
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().
|
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().
Ptr< QKDTotalGraph > ns3::QKDGraphManager::GetTotalGraph | ( | ) |
Return Ptr to QKDTotalGraph.
Definition at line 59 of file qkd-graph-manager.cc.
References m_totalGraph.
|
static |
Get the type ID.
Definition at line 31 of file qkd-graph-manager.cc.
References ns3::TypeId::SetParent().
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().
|
static |
Mcur value changed, so plot it on the graph.
std::string | context |
uint32_t | value |
Definition at line 104 of file qkd-graph-manager.cc.
References SendCurrentChangeValueToGraph(), and single.
Referenced by AddQKDBuffer().
|
static |
Mcur value decreased, so plot it on the graph.
std::string | context |
uint32_t | value |
Definition at line 146 of file qkd-graph-manager.cc.
References m_totalGraph.
Referenced by AddQKDBuffer().
|
static |
Mcur value increase, so plot it on the graph.
std::string | context |
uint32_t | value |
Definition at line 139 of file qkd-graph-manager.cc.
References m_totalGraph.
Referenced by AddQKDBuffer().
|
static |
Status changed, so plot it on the graph.
std::string | context |
uint32_t | value |
Definition at line 115 of file qkd-graph-manager.cc.
References SendStatusValueToGraph(), and single.
Referenced by AddQKDBuffer().
|
static |
Mthr value changed, so plot it on the graph.
std::string | context |
uint32_t | value |
Definition at line 126 of file qkd-graph-manager.cc.
References SendThresholdValueToGraph(), and single.
Referenced by AddQKDBuffer().
|
static |
Mthr value decreased, so plot it on the graph.
std::string | context |
uint32_t | value |
Definition at line 160 of file qkd-graph-manager.cc.
References m_totalGraph.
Referenced by AddQKDBuffer().
|
static |
Mthr value increased, so plot it on the graph.
std::string | context |
uint32_t | value |
Definition at line 153 of file qkd-graph-manager.cc.
References m_totalGraph.
Referenced by AddQKDBuffer().
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.
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().
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.
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().
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.
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().
|
staticprivate |
check whether object exists
Definition at line 177 of file qkd-graph-manager.h.
Referenced by ~QKDGraphManager(), and getInstance().
|
private |
Definition at line 183 of file qkd-graph-manager.h.
Referenced by AddQKDBuffer(), PrintGraphs(), SendCurrentChangeValueToGraph(), SendStatusValueToGraph(), and SendThresholdValueToGraph().
|
staticprivate |
Ptr to QKDTotalGraph.
Definition at line 181 of file qkd-graph-manager.h.
Referenced by getInstance(), GetTotalGraph(), PrintGraphs(), ProcessCurrentDecrease(), ProcessCurrentIncrease(), ProcessThresholdDecrease(), and ProcessThresholdIncrease().
|
staticprivate |
Definition at line 179 of file qkd-graph-manager.h.
Referenced by ~QKDGraphManager(), getInstance(), ProcessCurrentChange(), ProcessStatusChange(), and ProcessThresholdChange().