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

Build a set of QKDNetDevice objects such as QKD buffers QKD encryptors and QKD graphs. More...

#include "qkd-link-helper.h"

+ Collaboration diagram for ns3::QKDLinkHelper:

Public Member Functions

 QKDLinkHelper ()
 Create a QKDLinkHelper to make life easier when creating point to point networks.
 
virtual ~QKDLinkHelper ()
 
void AddGraph (Ptr< Node > src, Ptr< Node > dst)
 ADD QKDGraph.
 
void AddGraph (Ptr< Node > src, Ptr< Node > dst, std::string graphName)
 ADD QKDGraph.
 
void AddGraph (Ptr< Node > src, Ptr< Node > dst, std::string graphName, std::string graphType)
 ADD QKDGraph.
 
void AddGraphs ()
 ADD QKDGraph.
 
void ConfigureQBuffers (std::vector< Ptr< QKDControl > > controllers, uint32_t Mmin, uint32_t Mthr, uint32_t Mmax, uint32_t defaultKeySize)
 Configure all Q buffers(default conf).
 
void ConfigureQBuffers (std::vector< Ptr< QKDControl > > controllers, uint32_t Mmin, uint32_t Mthr, uint32_t Mmax, uint32_t Mcurr, uint32_t defaultKeySize)
 Configure all Q buffers(default conf).
 
void ConfigureRSBuffers (std::vector< Ptr< QKDControl > > controllers, uint32_t Mmin, uint32_t Mthr, uint32_t Mmax, uint32_t defaultKeySize)
 
void ConfigureRSBuffers (std::vector< Ptr< QKDControl > > controllers, uint32_t Mmin, uint32_t Mthr, uint32_t Mmax, uint32_t Mcurr, uint32_t defaultKeySize)
 
void CreateTopologyGraph (std::vector< Ptr< QKDControl > > controllers, uint32_t reroute=0)
 
Ptr< QCenControllerInstallQCenController (Ptr< Node > node)
 
Ptr< QKDControlInstallQKDNController (Ptr< Node > node)
 Install QKDN controller on node.
 
void PopulateRoutingTables ()
 
void PrintGraphs ()
 Print QKDGraphs.
 

Static Public Member Functions

static void CreateAndAggregateObjectFromTypeId (Ptr< Node > node, const std::string typeId)
 create an object from its TypeId and aggregates it to the node
 

Public Attributes

bool m_useRealStorages
 

Private Member Functions

std::vector< std::pair< uint32_t, uint32_t > > DijkstraSP (std::vector< std::vector< std::pair< uint32_t, uint32_t > > > adjList, uint32_t start)
 
uint32_t GetColumn (uint32_t nodeId)
 
uint32_t ReverseColumn (uint32_t position)
 

Private Attributes

std::vector< std::vector< std::pair< uint32_t, uint32_t > > > m_adjList
 
Ptr< QCenControllerm_cen_controller
 Centralized control for rerouting.
 
std::map< uint32_t, Ptr< QKDControl > > m_controllers
 
std::vector< uint32_tm_indexToKmNodeId
 
std::unordered_map< uint32_t, uint32_tm_kmNodeIdToIndex
 
ObjectFactory m_qkdbufferFactory
 Device Factory.
 

Detailed Description

Build a set of QKDNetDevice objects such as QKD buffers QKD encryptors and QKD graphs.

Definition at line 43 of file qkd-link-helper.h.

Constructor & Destructor Documentation

◆ QKDLinkHelper()

ns3::QKDLinkHelper::QKDLinkHelper ( )

Create a QKDLinkHelper to make life easier when creating point to point networks.

Definition at line 30 of file qkd-link-helper.cc.

References m_adjList, m_controllers, and m_useRealStorages.

◆ ~QKDLinkHelper()

virtual ns3::QKDLinkHelper::~QKDLinkHelper ( )
inlinevirtual

Definition at line 52 of file qkd-link-helper.h.

Member Function Documentation

◆ AddGraph() [1/3]

void ns3::QKDLinkHelper::AddGraph ( Ptr< Node src,
Ptr< Node dst 
)

ADD QKDGraph.

Parameters
Ptr<Node>src
Ptr<Node>dst

Definition at line 123 of file qkd-link-helper.cc.

References AddGraph().

Referenced by AddGraph(), and AddGraph().

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

◆ AddGraph() [2/3]

void ns3::QKDLinkHelper::AddGraph ( Ptr< Node src,
Ptr< Node dst,
std::string  graphName 
)

ADD QKDGraph.

Parameters
Ptr<Node>src
Ptr<Node>dst
std::stringgraphName

Definition at line 137 of file qkd-link-helper.cc.

References AddGraph(), and ns3::Create().

+ Here is the call graph for this function:

◆ AddGraph() [3/3]

void ns3::QKDLinkHelper::AddGraph ( Ptr< Node srcKMSNode,
Ptr< Node dstKmsNode,
std::string  graphName,
std::string  graphType 
)

ADD QKDGraph.

Parameters
Ptr<QKDControl>QKDControl
Ptr<Node>src
Ptr<Node>dst
std::stringgraphName
std::stringgraphType

Definition at line 154 of file qkd-link-helper.cc.

References ns3::Create(), ns3::QKDGraphManager::CreateGraphForBuffer(), ns3::QKDGraphManager::getInstance(), NS_ASSERT, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ AddGraphs()

◆ ConfigureQBuffers() [1/2]

void ns3::QKDLinkHelper::ConfigureQBuffers ( std::vector< Ptr< QKDControl > >  controllers,
uint32_t  Mmin,
uint32_t  Mthr,
uint32_t  Mmax,
uint32_t  defaultKeySize 
)

Configure all Q buffers(default conf).

Mandatory function!

Parameters
controllersvector of all QKDN controllers
Mminminimum amount(bits) of key material QKD buffer should maintain
Mthrthresold amount(bits) of key material
Mmaxmaximum amount(bits) of key material QKD buffer can store

Definition at line 229 of file qkd-link-helper.cc.

References ConfigureQBuffers(), ns3::Create(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ ConfigureQBuffers() [2/2]

void ns3::QKDLinkHelper::ConfigureQBuffers ( std::vector< Ptr< QKDControl > >  controllers,
uint32_t  Mmin,
uint32_t  Mthr,
uint32_t  Mmax,
uint32_t  Mcurr,
uint32_t  defaultKeySize 
)

Configure all Q buffers(default conf).

Mandatory function!

Parameters
controllersvector of all QKDN controllers
Mminminimum amount(bits) of key material QKD buffer should maintain
Mmaxmaximum amount(bits) of key material QKD buffer can store
Mthrthresold amount(bits) of key material
Mcurrcurrent amount(bits) of key material QKD buffer maintain
defaultKeysizedefault size of stored keys

Definition at line 242 of file qkd-link-helper.cc.

References ns3::Create(), and NS_LOG_FUNCTION.

Referenced by ConfigureQBuffers().

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

◆ ConfigureRSBuffers() [1/2]

void ns3::QKDLinkHelper::ConfigureRSBuffers ( std::vector< Ptr< QKDControl > >  controllers,
uint32_t  Mmin,
uint32_t  Mthr,
uint32_t  Mmax,
uint32_t  defaultKeySize 
)

Definition at line 272 of file qkd-link-helper.cc.

References ConfigureRSBuffers(), and ns3::Create().

+ Here is the call graph for this function:

◆ ConfigureRSBuffers() [2/2]

void ns3::QKDLinkHelper::ConfigureRSBuffers ( std::vector< Ptr< QKDControl > >  controllers,
uint32_t  Mmin,
uint32_t  Mthr,
uint32_t  Mmax,
uint32_t  Mcurr,
uint32_t  defaultKeySize 
)

Definition at line 258 of file qkd-link-helper.cc.

References ns3::Create().

Referenced by ConfigureRSBuffers().

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

◆ CreateAndAggregateObjectFromTypeId()

void ns3::QKDLinkHelper::CreateAndAggregateObjectFromTypeId ( Ptr< Node node,
const std::string  typeId 
)
static

create an object from its TypeId and aggregates it to the node

Parameters
nodethe node
typeIdthe object TypeId

Definition at line 284 of file qkd-link-helper.cc.

References ns3::Create(), and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ CreateTopologyGraph()

void ns3::QKDLinkHelper::CreateTopologyGraph ( std::vector< Ptr< QKDControl > >  controllers,
uint32_t  reroute = 0 
)

Definition at line 317 of file qkd-link-helper.cc.

References ns3::Create(), GetColumn(), m_adjList, m_cen_controller, m_controllers, NS_ASSERT, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ DijkstraSP()

std::vector< std::pair< uint32_t, uint32_t > > ns3::QKDLinkHelper::DijkstraSP ( std::vector< std::vector< std::pair< uint32_t, uint32_t > > >  adjList,
uint32_t  start 
)
private

Definition at line 364 of file qkd-link-helper.cc.

References ns3::Create().

Referenced by PopulateRoutingTables().

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

◆ GetColumn()

uint32_t ns3::QKDLinkHelper::GetColumn ( uint32_t  nodeId)
private

Definition at line 293 of file qkd-link-helper.cc.

References ns3::Create(), and m_controllers.

Referenced by CreateTopologyGraph(), and PopulateRoutingTables().

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

◆ InstallQCenController()

Ptr< QCenController > ns3::QKDLinkHelper::InstallQCenController ( Ptr< Node node)

Definition at line 211 of file qkd-link-helper.cc.

References ns3::Create(), m_cen_controller, NS_LOG_FUNCTION, and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ InstallQKDNController()

Ptr< QKDControl > ns3::QKDLinkHelper::InstallQKDNController ( Ptr< Node node)

Install QKDN controller on node.

Parameters
nodesmart pointer on node
Returns
Ptr<QKDControl> smart pointer on QKDN controller

Definition at line 195 of file qkd-link-helper.cc.

References ns3::Create(), NS_LOG_FUNCTION, and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ PopulateRoutingTables()

void ns3::QKDLinkHelper::PopulateRoutingTables ( )

Definition at line 416 of file qkd-link-helper.cc.

References ns3::Create(), DijkstraSP(), GetColumn(), m_adjList, m_controllers, NS_LOG_FUNCTION, and ReverseColumn().

+ Here is the call graph for this function:

◆ PrintGraphs()

void ns3::QKDLinkHelper::PrintGraphs ( )

Print QKDGraphs.

Definition at line 186 of file qkd-link-helper.cc.

References ns3::QKDGraphManager::getInstance(), NS_LOG_FUNCTION, and ns3::QKDGraphManager::PrintGraphs().

+ Here is the call graph for this function:

◆ ReverseColumn()

uint32_t ns3::QKDLinkHelper::ReverseColumn ( uint32_t  position)
private

Definition at line 307 of file qkd-link-helper.cc.

References ns3::Create(), m_controllers, and NS_LOG_ERROR.

Referenced by PopulateRoutingTables().

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

Member Data Documentation

◆ m_adjList

std::vector< std::vector<std::pair<uint32_t, uint32_t> > > ns3::QKDLinkHelper::m_adjList
private

Definition at line 157 of file qkd-link-helper.h.

Referenced by QKDLinkHelper(), CreateTopologyGraph(), and PopulateRoutingTables().

◆ m_cen_controller

Ptr<QCenController> ns3::QKDLinkHelper::m_cen_controller
private

Centralized control for rerouting.

Definition at line 153 of file qkd-link-helper.h.

Referenced by CreateTopologyGraph(), and InstallQCenController().

◆ m_controllers

std::map<uint32_t, Ptr<QKDControl> > ns3::QKDLinkHelper::m_controllers
private

◆ m_indexToKmNodeId

std::vector<uint32_t> ns3::QKDLinkHelper::m_indexToKmNodeId
private

Definition at line 142 of file qkd-link-helper.h.

◆ m_kmNodeIdToIndex

std::unordered_map<uint32_t, uint32_t> ns3::QKDLinkHelper::m_kmNodeIdToIndex
private

Definition at line 140 of file qkd-link-helper.h.

◆ m_qkdbufferFactory

ObjectFactory ns3::QKDLinkHelper::m_qkdbufferFactory
private

Device Factory.

Definition at line 159 of file qkd-link-helper.h.

◆ m_useRealStorages

bool ns3::QKDLinkHelper::m_useRealStorages

Definition at line 128 of file qkd-link-helper.h.

Referenced by QKDLinkHelper().


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