21 #include "ns3/abort.h"
23 #include "ns3/simulator.h"
24 #include "ns3/queue.h"
25 #include "ns3/config.h"
26 #include "ns3/packet.h"
27 #include "ns3/object.h"
28 #include "ns3/names.h"
30 #include "ns3/internet-module.h"
31 #include "ns3/random-variable-stream.h"
32 #include "ns3/trace-helper.h"
33 #include "ns3/traffic-control-module.h"
72 AddGraph(src, dst, graphName,
"png");
86 std::string graphName,
99 NS_LOG_FUNCTION(
this << buffer << buffer->FetchState() << c->GetNQKDBuffers() << buffer->GetIndex() );
141 for(uint16_t i=0; i < n.
GetN(); i++)
171 for(uint16_t i=0; i < n.
GetN(); i++)
248 controlBob->AddLinkRecord(linkDetails);
keep track of a set of node pointers.
uint32_t GetN() const
Get the number of Ptr<Node> stored in this container.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
Instantiate subclasses of ns3::Object.
Ptr< Object > Create() const
Create an Object instance of the configured TypeId.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
A base class which provides memory management and object aggregation.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
void AggregateObject(Ptr< Object > other)
Aggregate two Objects together.
holds a vector of std::pair of Ptr<QKDControl> and interface index.
QKD control is a network component with the knowledge of the network status.
holds a vector of std::pair of Ptr<QKDEncryptor> and interface index.
static QKDGraphManager * getInstance()
Signelton getInstance function.
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.
void PrintGraphs()
Print graphs.
bool m_useRealStorages
Wheater to use real key file storage (still in development).
void AddGraph(Ptr< Node > src, Ptr< Node > dst)
Add a graph.
Ptr< QKDEncryptor > InstallQKDEncryptor(Ptr< Node > node)
Install QKD encryptor on a node.
Ptr< QKDControl > InstallQKDControl(Ptr< Node > node)
Install the QKD control on a node.
void PrintGraphs()
Print graphs.
std::string CreateQKDLink(Ptr< QKDControl > control, Ptr< Node > alice, Ptr< Node > bob, Ptr< Node > aliceKMS, Ptr< Node > bobKMS, uint32_t Mmin, uint32_t Mthr, uint32_t Mmax, uint32_t Mcurrent)
Create a QKD link.
static void CreateAndAggregateObjectFromTypeId(Ptr< Node > node, const std::string typeId)
Create an object from its TypeId and aggregates it to the node.
QKDLinkHelper()
Constructor.
ObjectFactory m_qkdbufferFactory
Device Factory.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Description of a QKD link.
std::string keyAssociationId