18#include "ns3/packet.h"
19#include "ns3/object.h"
20#include "ns3/callback.h"
21#include "ns3/assert.h"
23#include "ns3/simulator.h"
25#include "ns3/nstime.h"
26#include "ns3/traced-callback.h"
27#include "ns3/deprecated.h"
96 std::string
GetId()
const;
97 void SetId(std::string);
A base class which provides memory management and object aggregation.
Smart pointer class similar to boost::intrusive_ptr.
The QKD key is an elementary class of QKDNetSim.
std::string GetModuleId()
Returns the id of the QKD module that generated key.
Ptr< QKDKey > Copy() const
Help function - Copy key.
std::string GetKeyString()
Get QKD key.
std::string GenerateRandomString(const int len)
Return random string.
void SetModuleId(std::string)
Save details about the QKD module that generated key.
Time GetKeyTimestamp()
Get timestamp of the key.
static TypeId GetTypeId()
Get the TypeId.
std::string ToString()
Return the raw key in std::string format.
std::string GetKeyBinary()
Return key in bits which is necessery for encryption or authentication.
QKDKeyState_e
QKD Key States.
std::string m_moduleId
id of QKD module that generated key
QKDKeyState_e m_state
state of the key
ns3::TracedCallback< const std::string &, const std::string & > m_stateTransitionTrace
The StateTransition trace source.
void SetSize(uint64_t)
Set the size of the key.
std::string ConsumeKeyString()
Return the raw key in std::string format and switch to SERVED state.
std::string GetId() const
uint64_t GetSize() const
Get the size of the key.
std::string GetStateString() const
Returns the current state of the key in string format.
void SetValue(std::string)
void SwitchToState(QKDKeyState_e state)
Change the state of the key.
uint64_t GetSizeInBits() const
Get the size of the key in bits.
QKDKeyState_e GetState() const
Returns the current state of the key.
uint8_t * GetKey()
Return key in byte* which is necessery for encryption or authentication Convert key from std::String ...
static uint64_t m_globalUid
Simulation virtual time values and global simulation resolution.
Forward calls to a chain of Callback.
a unique identifier for an interface.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Every class exported by the ns3 library is enclosed in the ns3 namespace.