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

QKD buffer is a secure storage for QKD keys. More...

#include "qkd-buffer.h"

+ Inheritance diagram for ns3::QKDBuffer:
+ Collaboration diagram for ns3::QKDBuffer:

Classes

struct  data
 Data specific variables. More...
 
struct  KeyStorage
 The key storage description. More...
 

Public Member Functions

 QKDBuffer ()
 Constructor. More...
 
virtual ~QKDBuffer ()
 Destructor. More...
 
bool AddNewKey (Ptr< QKDKey > key, uint32_t keyTransformed)
 Add new key to the storage. More...
 
void CheckState (void)
 Update the state of the buffer. More...
 
void Dispose (void)
 Destroy a QKD buffer. More...
 
double FetchAverageKeyChargingTimePeriod ()
 Get the average duration of key charging process in the long run. More...
 
int64_t FetchDeltaTime ()
 
Ptr< QKDKeyFetchKeyByID (std::string keyID)
 Get the key of a given identifier. More...
 
Ptr< QKDKeyFetchKeyByID (std::string keyID, uint32_t fillProcessActive)
 Get the key of a given identifier. More...
 
Ptr< QKDKeyFetchKeyBySize (const uint32_t &keySize)
 Get the key of a given size. More...
 
int64_t FetchLastKeyChargingTimeDuration ()
 Get the time value about the time duration of last key charging process. More...
 
uint32_t FetchMaxNumberOfRecordedKeyChargingTimePeriods ()
 Get the maximal number of values which are used for calculation of average key charging time period. More...
 
uint32_t FetchPreviousState (void)
 Get the previous state of the QKD buffer. More...
 
uint32_t FetchState (void)
 Get the current state of the QKD buffer. More...
 
double GetAverageKeyConsumptionRate ()
 Get average key consumption rate. More...
 
double GetAverageKeyGenerationRate ()
 Get average key generation rate. More...
 
Ptr< NodeGetDstNode ()
 Get the QKD destination node. More...
 
uint32_t GetId (void) const
 Get the QKD buffer identifier. More...
 
uint32_t GetIndex ()
 Get the index of the buffer per local node. More...
 
uint32_t GetKeyCount ()
 Get the number of stored keys. More...
 
uint32_t GetKeyCount (uint32_t keySize)
 Get the number of the available keys with a given size. More...
 
uint64_t GetKeyCountBit ()
 Get the amount of stored keys in bits. More...
 
uint32_t GetKeySize ()
 Get default size of the key (ETSI QKD 014). More...
 
uint32_t GetMaxKeyCount ()
 Get the maximum number of stored keys. More...
 
uint64_t GetMaxKeyCountBit ()
 Get the maximum amount of stored keys in bits. More...
 
uint64_t GetMaxKeySizeBit ()
 Get the maximal key size that can be served in bits. More...
 
uint32_t GetMCurrentPrevious (void) const
 Get previous - before latest change. More...
 
uint32_t GetMinKeyCount ()
 Get the minimum number of stored keys. More...
 
uint32_t GetMinKeySize ()
 Get the minimum key size that can be served. More...
 
uint64_t GetMinKeySizeBit ()
 Get the minimum key size that can be served in bits. More...
 
uint32_t GetMthr (void) const
 Get the threshold value of QKD storage. More...
 
uint64_t GetReadyKeyCountBit ()
 Get the amount of the key material in bits that is ready to be served. More...
 
Ptr< NodeGetSrcNode ()
 Get the QKD source node. More...
 
uint64_t GetTargetKeyCountBit ()
 Get tge amount of key material in bits that is ready to be served and belongs to a set of targeted keys. More...
 
void Init (Ptr< Node > srcNode, Ptr< Node > dstNode, uint32_t Mmin, uint32_t Mthr, uint32_t Mmax, uint32_t Mcurrent, bool useRealStorages)
 Initialize a QKD buffer. More...
 
void InitTotalGraph () const
 Initialize total graph. More...
 
void KeyCalculation ()
 Help function used for ploting graphs. More...
 
bool operator== (QKDBuffer const &o) const
 Define equal operator on the QKD buffer object. More...
 
bool ProbeKeyStatus (std::string keyId, QKDKey::QKDKeyState_e keyState)
 Check if the state of the key equals to a given state. More...
 
void RecordTargetSize (uint32_t size)
 Record the key target size. More...
 
void ReleaseReservation (std::string keyId)
 Release the key reservation. More...
 
void ReserveKey (std::string keyId)
 Reserve the QKD key. More...
 
Ptr< QKDKeySearchOptimalKeyToTransform (uint32_t targetSize)
 Serach for the optimal key to transform. More...
 
void SetDstNode (Ptr< Node >)
 Set the QKD destination node. More...
 
void SetIndex (uint32_t)
 Set the index of the buffer per local node. More...
 
void SetMthr (uint32_t thr)
 Set the threshold value of the QKD storage. More...
 
void SetSrcNode (Ptr< Node >)
 Set the QKD source node. More...
 
void UpdateKeyConsumptionStatistics (Ptr< QKDKey > key)
 Update key consumption statistics. More...
 
void UpdateKeyGenerationStatistics (Ptr< QKDKey > key)
 Update key generation statistics. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
 ~Object () override
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose ()
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one. More...
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object. More...
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated 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...
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized () 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 () const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o[[maybe_unused]])
 Assignment operator. More...
 
void Ref () const
 Increment the reference count. More...
 
void Unref () 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 errors. 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 TypeId GetTypeId (void)
 Get the TypeId. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID. More...
 

Public Attributes

uint32_t m_bufferID
 The unique buffer identifier. More...
 
Ptr< Nodem_dstNode
 The destination node. More...
 
Ptr< Nodem_srcNode
 The source node. More...
 

Static Public Attributes

static uint32_t nBuffers = 0
 The number of the created buffers - a static value. More...
 
static const uint32_t QKDSTATUS_CHARGING = 2
 QKDStatus CHARGING. More...
 
static const uint32_t QKDSTATUS_EMPTY = 3
 QKDStatus EMPTY. More...
 
static const uint32_t QKDSTATUS_READY = 0
 QKDStatus READY. More...
 
static const uint32_t QKDSTATUS_WARNING = 1
 QKDStatus WARNING. More...
 

Private Attributes

double m_averageKeyChargingSize
 The average key charging size. More...
 
double m_averageKeyChargingTimePeriod
 The average duration of the key charging time period. More...
 
double m_averageKeyConsumptionRate
 The average key consumption rate. More...
 
TracedCallback< double > m_averageKeyConsumptionRateTrace
 A trace of the average key consumption rate. More...
 
double m_averageKeyConsumptionSize
 The average key consumption size. More...
 
double m_averageKeyConsumptionTimePeriod
 The average duration of the key consumption time period. More...
 
double m_averageKeyGenerationRate
 The average key generation rate. More...
 
TracedCallback< double > m_averageKeyGenerationRateTrace
 A trace of the average key generation rate. More...
 
uint32_t m_bitsUsedInTimePeriod
 Help value used for graph ploting. More...
 
double m_c
 The average amount of key in the buffer during the recalculate time period. More...
 
EventId m_calculateRoutingMetric
 The event to calculate routing metric. More...
 
std::vector< int64_t > m_chargingTimePeriods
 The durations of the serveral last charging time periods. More...
 
TracedCallback< double > m_CMetricChangeTrace
 A trace of c metric changes. More...
 
std::vector< int64_t > m_consumptionTimePeriods
 The durations of the serveral last consumption time periods. More...
 
uint32_t m_currentKeyBit
 The current amount of key material in the QKD key storage. More...
 
TracedCallback< uint32_t > m_currentKeyBitChangeTrace
 A trace for current bit change. More...
 
TracedCallback< uint32_t > m_currentKeyBitDecreaseTrace
 A trace of decrease in amount of key bits. More...
 
TracedCallback< uint32_t > m_currentKeyBitIncreaseTrace
 A trace of increase in amount of key bits. More...
 
uint32_t m_currentKeyBitPrevious
 The previous value of current amount of key material in the QKD key storage. More...
 
uint32_t m_currentKeyBitReally
 The current amount of key material used for real tracking of storage (transform!). More...
 
uint64_t m_currentReadyKeyBit
 The current amount of key material in the QKD buffer that are ready to be served. More...
 
uint64_t m_currentTargetKeyBit
 The current amount of key material in the QKD buffer that is already targeted. More...
 
uint32_t m_defaultKeySize
 The default key size as required by the ETSI QKD 014 interface details. More...
 
std::map< uint32_t, QKDBuffer::KeyStoragem_destinations
 
bool m_isRisingCurve
 Whether curve on graph is rising or not. More...
 
TracedCallback< Ptr< QKDKey > > m_keyReservedTrace
 A trace for reserved keys. More...
 
std::map< std::string, Ptr< QKDKey > > m_keys
 The list of available keys with their identifiers. More...
 
TracedCallback< Ptr< QKDKey > > m_keyServedTrace
 A trace for served keys. More...
 
std::vector< int64_t > m_lastChargedKeySizes
 The size of the several last generated keys. More...
 
std::vector< int64_t > m_lastConsumedKeySizes
 The size of the several last consumed keys. More...
 
int64_t m_lastKeyChargingTimeDuration
 The timestamp of a last key usage. More...
 
int64_t m_lastKeyChargingTimeStamp
 The timestamp of a last key charging (when the new key material was added). More...
 
int64_t m_lastKeyConsumptionTimeDuration
 The timestamp of a last key fetch operation. More...
 
int64_t m_lastKeyConsumptionTimeStamp
 The timestamp of a last key consumption (when the last key material was fetched). More...
 
uint32_t m_maximalKeyCount
 The maximal number of stored keys. More...
 
uint32_t m_maxKeyBit
 The maximal amount of key material in the QKD key storage. More...
 
uint32_t m_maxNumberOfRecordedKeyChargingTimePeriods
 The maximal number of values which are used for calculation of the average key charging time period. More...
 
uint32_t m_maxNumberOfRecordedKeyConsumptionTimePeriods
 The maximal number of values which are used for calculation of the average key consumption time period. More...
 
uint32_t m_minimalKeyCount
 The minimal number of stored keys. More...
 
uint32_t m_minKeyBit
 The minimal amount of key material in the QKD key storage. More...
 
TracedCallback< Ptr< QKDKey > > m_newKeyAddedTrace
 A trace of newly added keys. More...
 
uint32_t m_nextKeyID
 The identifie of the next key to be generated. More...
 
uint32_t m_noAddNewValue
 Help value used for graph ploting. More...
 
uint32_t m_noEntry
 Help value used for graph ploting. More...
 
uint32_t m_period
 Help value used for graph ploting. More...
 
uint32_t m_previousStatus
 The previous status; important for deciding about further status that can be selected. More...
 
std::vector< struct QKDBuffer::datam_previousValues
 Help vector used for graph ploting. More...
 
uint32_t m_recalculateTimePeriod
 The period of time (in seconds) to calculate average amount of the key in the buffer. More...
 
uint32_t m_srcNodeBufferListIndex
 The index in the source node buffer list. More...
 
uint32_t m_status
 The state of the Net Device transmit state machine. More...
 
TracedCallback< uint32_t > m_StatusChangeTrace
 A trace of status changes. More...
 
std::vector< uint32_t > m_targetSizeSet
 The list of requested key sizes. More...
 
uint32_t m_thresholdKeyBit
 The threshold amount of key material in the QKD key storage. More...
 
TracedCallback< uint32_t > m_thresholdKeyBitChangeTrace
 A traceback for available key bits. More...
 
TracedCallback< uint32_t > m_thresholdKeyBitDecreaseTrace
 A traceback for consumed key bits. More...
 
TracedCallback< uint32_t > m_thresholdKeyBitIncreaseTrace
 A traceback for generated key bits. More...
 
TracedCallback< Ptr< QKDKey > > m_transformedKeyAddedTrace
 A trace for tranformed keys. More...
 
bool m_useRealStorages
 

Additional Inherited Members

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

Detailed Description

QKD buffer is a secure storage for QKD keys.

QKDBuffer is assigned for each link using QKDControl on each side of the link (each node).

Note
The two nodes that establish the logical QKD connection will implement one QKD buffer on each side which will be assigned by QKDControl entity. The purpose of the QKD buffer is to collect enough key material for its subsequent use for cryptographic purposes. Due to the limited charging key rate of QKD protocols, QKDPostProcessing applications strive to save keys in QKD buffers to generate as many keys in advance. However, warehouses have a limited capacity that is defined with a maximum value. They also have a minimum capacity that describes the minimum amount of key required to establish initial post-processing operations. Also, the buffer implements a threshold value that may indicate that the necessary actions are being taken before the buffer is completely emptied.

It is important to note that a QKD link has full application only when there are enough keys to apply for cryptographic purposes. Therefore, constant monitoring of the state of the QKD buffer is necessary to identify the statuses in which the QKD buffer can be found: READY - Amount of key is larger than threshold Mthr WARNING - Amount of key is lower then threshold and the amount of keys in the buffer is decreasing CHARGING - Amount of key is lower then threshold and the amount of keys in the buffer is increasing EMPTY - The amount of keys in the buffer is lower than the minimal value

The states of the QKD buffer do not directly affect the communication, but it can be used for easier prioritization of traffic depending on the state of the buffer. For example, in EMPTY state, QKD post-processing applications used to establish a new key material should have the highest priority in traffic processing.

Definition at line 79 of file qkd-buffer.h.

Constructor & Destructor Documentation

◆ QKDBuffer()

ns3::QKDBuffer::QKDBuffer ( )

Constructor.

Definition at line 166 of file qkd-buffer.cc.

References NS_LOG_FUNCTION.

◆ ~QKDBuffer()

ns3::QKDBuffer::~QKDBuffer ( )

Destructor.

Definition at line 219 of file qkd-buffer.cc.

References m_destinations, m_keys, m_targetSizeSet, and NS_LOG_FUNCTION.

Member Function Documentation

◆ AddNewKey()

bool ns3::QKDBuffer::AddNewKey ( Ptr< QKDKey key,
uint32_t  keyTransformed 
)

Add new key to the storage.

Add new content to buffer.

Parameters
keyThe QKD key object.
keyTransformedIs the key transformed?
Returns
The success indicator.
Parameters
Ptr<QKDKey>key
uint32_tkeyTransformed Used when node receives information that new key material was establieshed

Definition at line 318 of file qkd-buffer.cc.

References KeyCalculation(), m_currentKeyBit, m_currentKeyBitChangeTrace, m_currentKeyBitIncreaseTrace, m_currentKeyBitReally, m_currentReadyKeyBit, m_currentTargetKeyBit, m_keys, m_maxKeyBit, m_newKeyAddedTrace, m_targetSizeSet, m_transformedKeyAddedTrace, NS_LOG_FUNCTION, and UpdateKeyGenerationStatistics().

+ Here is the call graph for this function:

◆ CheckState()

void ns3::QKDBuffer::CheckState ( void  )

Update the state of the buffer.

Definition at line 778 of file qkd-buffer.cc.

References m_currentKeyBit, m_currentKeyBitPrevious, m_isRisingCurve, m_maxKeyBit, m_minKeyBit, m_previousStatus, m_status, m_StatusChangeTrace, m_thresholdKeyBit, NS_LOG_FUNCTION, QKDSTATUS_CHARGING, QKDSTATUS_EMPTY, QKDSTATUS_READY, and QKDSTATUS_WARNING.

Referenced by KeyCalculation().

+ Here is the caller graph for this function:

◆ Dispose()

void ns3::QKDBuffer::Dispose ( void  )

Destroy a QKD buffer.

This is the pre-destructor function of the QKDBuffer.

Definition at line 228 of file qkd-buffer.cc.

References ns3::Simulator::Cancel(), m_calculateRoutingMetric, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ FetchAverageKeyChargingTimePeriod()

double ns3::QKDBuffer::FetchAverageKeyChargingTimePeriod ( )

Get the average duration of key charging process in the long run.

Returns
The average duration of key charging period.

Definition at line 861 of file qkd-buffer.cc.

References m_averageKeyChargingTimePeriod, and NS_LOG_FUNCTION.

◆ FetchDeltaTime()

int64_t ns3::QKDBuffer::FetchDeltaTime ( )

Definition at line 853 of file qkd-buffer.cc.

References ns3::Time::GetMilliSeconds(), m_lastKeyChargingTimeStamp, ns3::Simulator::Now(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ FetchKeyByID() [1/2]

Ptr< QKDKey > ns3::QKDBuffer::FetchKeyByID ( std::string  keyID)

Get the key of a given identifier.

Parameters
keyIDThe key identifier.
Returns
The key (NULL is returned if the key is not found).

Definition at line 498 of file qkd-buffer.cc.

◆ FetchKeyByID() [2/2]

Ptr< QKDKey > ns3::QKDBuffer::FetchKeyByID ( std::string  keyID,
uint32_t  fillProcessActive 
)

Get the key of a given identifier.

Parameters
keyIDThe key identifier.
fillProcessActiveIs asked by the fill process?
Returns
The key (NULL is returned if the key is not found).

Definition at line 506 of file qkd-buffer.cc.

References m_currentKeyBit, m_currentKeyBitReally, m_keys, NS_LOG_FUNCTION, and UpdateKeyConsumptionStatistics().

+ Here is the call graph for this function:

◆ FetchKeyBySize()

Ptr< QKDKey > ns3::QKDBuffer::FetchKeyBySize ( const uint32_t &  keySize)

Get the key of a given size.

Fetch key from buffer with given key size! This function is called by master KMS while selection keys to return on ETSI 014 get_key request.

Parameters
keySizeThe key size.
Returns
The key (NULL is returned if the key is not found).

Therefore, the selected key must be READY and not reserved for other use.

Definition at line 475 of file qkd-buffer.cc.

References KeyCalculation(), m_currentKeyBit, m_currentKeyBitReally, m_keys, NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::QKDKey::READY, and UpdateKeyConsumptionStatistics().

+ Here is the call graph for this function:

◆ FetchLastKeyChargingTimeDuration()

int64_t ns3::QKDBuffer::FetchLastKeyChargingTimeDuration ( )

Get the time value about the time duration of last key charging process.

Return time value about the time duration of last key charging process.

Returns
The time value.

Definition at line 842 of file qkd-buffer.cc.

References m_lastKeyChargingTimeDuration, and NS_LOG_FUNCTION.

◆ FetchMaxNumberOfRecordedKeyChargingTimePeriods()

uint32_t ns3::QKDBuffer::FetchMaxNumberOfRecordedKeyChargingTimePeriods ( )

Get the maximal number of values which are used for calculation of average key charging time period.

Returns
The maximal number of recorded key charging time periods; the default value is 5.

Definition at line 437 of file qkd-buffer.cc.

References m_maxNumberOfRecordedKeyChargingTimePeriods.

◆ FetchPreviousState()

uint32_t ns3::QKDBuffer::FetchPreviousState ( void  )

Get the previous state of the QKD buffer.

Help function used for ploting graphs.

Returns
The integer representation of the QKD buffer state.

Definition at line 874 of file qkd-buffer.cc.

References m_previousStatus, and NS_LOG_FUNCTION.

◆ FetchState()

uint32_t ns3::QKDBuffer::FetchState ( void  )

Get the current state of the QKD buffer.

QKD buffer can be in one of the following states: – READY—when Mcur (t) ≥ Mthr , – WARNING—when Mthr > Mcur (t) > Mmin and the previous state was READY, – CHARGING—when Mthr > Mcur (t) and the previous state was EMPTY, – EMTPY—when Mmin ≥ Mcur (t) and the previous state was WARNING or CHARGING

Returns
The state.

Definition at line 867 of file qkd-buffer.cc.

References m_status, and NS_LOG_FUNCTION.

◆ GetAverageKeyConsumptionRate()

double ns3::QKDBuffer::GetAverageKeyConsumptionRate ( )

Get average key consumption rate.

Returns
The average key consumption rate.

Definition at line 366 of file qkd-buffer.cc.

References ns3::Time::GetSeconds(), m_averageKeyConsumptionRate, m_averageKeyConsumptionSize, m_averageKeyConsumptionTimePeriod, m_consumptionTimePeriods, m_maxNumberOfRecordedKeyConsumptionTimePeriods, ns3::Simulator::Now(), NS_LOG_DEBUG, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ GetAverageKeyGenerationRate()

double ns3::QKDBuffer::GetAverageKeyGenerationRate ( )

Get average key generation rate.

Returns
The average key generation rate.

Definition at line 431 of file qkd-buffer.cc.

References m_averageKeyGenerationRate, and NS_LOG_FUNCTION.

◆ GetDstNode()

Ptr< Node > ns3::QKDBuffer::GetDstNode ( )

Get the QKD destination node.

Returns
The destination node.

Definition at line 922 of file qkd-buffer.cc.

References m_dstNode.

◆ GetId()

uint32_t ns3::QKDBuffer::GetId ( void  ) const

Get the QKD buffer identifier.

Returns
The buffer indentifier.

Definition at line 823 of file qkd-buffer.cc.

References m_bufferID, and NS_LOG_FUNCTION.

◆ GetIndex()

uint32_t ns3::QKDBuffer::GetIndex ( )

Get the index of the buffer per local node.

Returns
The index.

Definition at line 931 of file qkd-buffer.cc.

References m_srcNodeBufferListIndex.

◆ GetKeyCount() [1/2]

uint32_t ns3::QKDBuffer::GetKeyCount ( )

Get the number of stored keys.

(ETSI QKD 014)

Returns
The number of stored keys.

Definition at line 275 of file qkd-buffer.cc.

References m_keys.

◆ GetKeyCount() [2/2]

uint32_t ns3::QKDBuffer::GetKeyCount ( uint32_t  keySize)

Get the number of the available keys with a given size.

Parameters
keySizeThe key size.
Returns
The key number.

Definition at line 442 of file qkd-buffer.cc.

References m_keys, NS_LOG_FUNCTION, and ns3::QKDKey::READY.

◆ GetKeyCountBit()

uint64_t ns3::QKDBuffer::GetKeyCountBit ( )

Get the amount of stored keys in bits.

Returns
The amount of stored keys in bits.

Definition at line 288 of file qkd-buffer.cc.

References m_currentKeyBit.

◆ GetKeySize()

uint32_t ns3::QKDBuffer::GetKeySize ( )

Get default size of the key (ETSI QKD 014).

Returns
The default key size.

Definition at line 235 of file qkd-buffer.cc.

References m_defaultKeySize.

◆ GetMaxKeyCount()

uint32_t ns3::QKDBuffer::GetMaxKeyCount ( )

Get the maximum number of stored keys.

(ETSI QKD 014)

Returns
The maximum number of stored keys.

Definition at line 283 of file qkd-buffer.cc.

References m_maximalKeyCount.

◆ GetMaxKeyCountBit()

uint64_t ns3::QKDBuffer::GetMaxKeyCountBit ( )

Get the maximum amount of stored keys in bits.

(ETSI QKD 014)

Returns
The maximum amount of stored keys in bits.

◆ GetMaxKeySizeBit()

uint64_t ns3::QKDBuffer::GetMaxKeySizeBit ( )

Get the maximal key size that can be served in bits.

(ETSI QKD 014)

Returns
The maximal key size that can be served in bits.

Definition at line 307 of file qkd-buffer.cc.

References m_maxKeyBit.

◆ GetMCurrentPrevious()

uint32_t ns3::QKDBuffer::GetMCurrentPrevious ( void  ) const

Get previous - before latest change.

Help function used for ploting graphs.

Returns
The integer representation of the previous QKD storage key material.

Definition at line 881 of file qkd-buffer.cc.

References m_currentKeyBitPrevious, and NS_LOG_FUNCTION.

◆ GetMinKeyCount()

uint32_t ns3::QKDBuffer::GetMinKeyCount ( )

Get the minimum number of stored keys.

(ETSI QKD 014)

Returns
The minimum number of stored keys.

Definition at line 279 of file qkd-buffer.cc.

References m_minimalKeyCount.

◆ GetMinKeySize()

uint32_t ns3::QKDBuffer::GetMinKeySize ( )

Get the minimum key size that can be served.

(ETSI QKD 014)

Returns
The minimum key size that can be served.

◆ GetMinKeySizeBit()

uint64_t ns3::QKDBuffer::GetMinKeySizeBit ( )

Get the minimum key size that can be served in bits.

(ETSI QKD 014)

Returns
The minimum key size that can be served in bits.

Definition at line 303 of file qkd-buffer.cc.

References m_minKeyBit.

◆ GetMthr()

uint32_t ns3::QKDBuffer::GetMthr ( void  ) const

Get the threshold value of QKD storage.

The threshold value Mthr (t) at the time of measurement t is used to indicate the state of the QKD buffer where it holds that Mthr (t) ≤ Mmax.

Returns
The threshold value.

Definition at line 888 of file qkd-buffer.cc.

References m_thresholdKeyBit, and NS_LOG_FUNCTION.

◆ GetReadyKeyCountBit()

uint64_t ns3::QKDBuffer::GetReadyKeyCountBit ( )

Get the amount of the key material in bits that is ready to be served.

Returns
The amount of available key material in bits.

This function provides the information on the amount of key material that is ready to be served, and is not reserved for the other purposes.

Definition at line 293 of file qkd-buffer.cc.

References m_currentReadyKeyBit.

◆ GetSrcNode()

Ptr< Node > ns3::QKDBuffer::GetSrcNode ( )

Get the QKD source node.


Returns
The source node.

Definition at line 913 of file qkd-buffer.cc.

References m_srcNode.

◆ GetTargetKeyCountBit()

uint64_t ns3::QKDBuffer::GetTargetKeyCountBit ( )

Get tge amount of key material in bits that is ready to be served and belongs to a set of targeted keys.

Returns
The amount of available key material in bits that is of the size of requested keys.

Definition at line 298 of file qkd-buffer.cc.

References m_currentTargetKeyBit.

◆ GetTypeId()

◆ Init()

void ns3::QKDBuffer::Init ( Ptr< Node srcNode,
Ptr< Node dstNode,
uint32_t  Mmin,
uint32_t  Mthr,
uint32_t  Mmax,
uint32_t  Mcurrent,
bool  useRealStorages 
)

Initialize a QKD buffer.

Parameters
srcNodeThe source node.
dstNodeThe destination node.
MminThe lower threshold value.
MthrThe threshold value.
MmaxThe buffer's capacity.
McurrentThe current amout of key material in the buffer.
useRealStoragesShould the program use external file key storage?

Definition at line 172 of file qkd-buffer.cc.

References m_averageKeyConsumptionRate, m_averageKeyGenerationRate, m_bitsUsedInTimePeriod, m_bufferID, m_currentKeyBit, m_currentKeyBitPrevious, m_currentKeyBitReally, m_currentReadyKeyBit, m_currentTargetKeyBit, m_dstNode, m_lastKeyChargingTimeDuration, m_lastKeyChargingTimeStamp, m_lastKeyConsumptionTimeDuration, m_lastKeyConsumptionTimeStamp, m_maxKeyBit, m_minKeyBit, m_nextKeyID, m_noAddNewValue, m_noEntry, m_period, m_previousStatus, m_srcNode, m_thresholdKeyBit, m_useRealStorages, nBuffers, and NS_LOG_FUNCTION.

◆ InitTotalGraph()

void ns3::QKDBuffer::InitTotalGraph ( ) const

Initialize total graph.

Help function for total graph ploting.

Definition at line 829 of file qkd-buffer.cc.

References m_currentKeyBit, m_currentKeyBitIncreaseTrace, m_thresholdKeyBit, m_thresholdKeyBitIncreaseTrace, and NS_LOG_FUNCTION.

◆ KeyCalculation()

void ns3::QKDBuffer::KeyCalculation ( )

Help function used for ploting graphs.

Definition at line 245 of file qkd-buffer.cc.

References CheckState(), ns3::compareByData(), m_currentKeyBit, m_currentKeyBitPrevious, m_isRisingCurve, m_noEntry, m_period, m_previousValues, NS_LOG_FUNCTION, ns3::QKDBuffer::data::position, and ns3::QKDBuffer::data::value.

Referenced by AddNewKey(), and FetchKeyBySize().

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

◆ operator==()

bool ns3::QKDBuffer::operator== ( QKDBuffer const &  o) const

Define equal operator on the QKD buffer object.

Parameters
oThe other QKD buffer.
Returns
True if buffers are identical; False otherwise.

Definition at line 816 of file qkd-buffer.cc.

References m_bufferID.

◆ ProbeKeyStatus()

bool ns3::QKDBuffer::ProbeKeyStatus ( std::string  keyId,
QKDKey::QKDKeyState_e  keyState 
)

Check if the state of the key equals to a given state.

Parameters
keyIdThe key identifier.
keyStateThe key state to compare with.
Returns
The comparison result.

Definition at line 455 of file qkd-buffer.cc.

References m_keys, and NS_LOG_FUNCTION.

◆ RecordTargetSize()

void ns3::QKDBuffer::RecordTargetSize ( uint32_t  size)

Record the key target size.

Parameters
sizeThe key size in bits.

Must keep a record on the requested key sizes to avoid their usage in the key transformation functions!

Definition at line 769 of file qkd-buffer.cc.

References m_targetSizeSet, and NS_LOG_FUNCTION.

◆ ReleaseReservation()

void ns3::QKDBuffer::ReleaseReservation ( std::string  keyId)

Release the key reservation.

Parameters
keyIdThe key identifier.

Definition at line 697 of file qkd-buffer.cc.

References m_currentReadyKeyBit, m_keys, NS_FATAL_ERROR, NS_LOG_FUNCTION, and ns3::QKDKey::RESERVED.

◆ ReserveKey()

void ns3::QKDBuffer::ReserveKey ( std::string  keyId)

Reserve the QKD key.

Parameters
keyIdThe key identifier.

Definition at line 665 of file qkd-buffer.cc.

References m_currentReadyKeyBit, m_currentTargetKeyBit, m_keyReservedTrace, m_keys, m_targetSizeSet, NS_FATAL_ERROR, NS_LOG_FUNCTION, and ns3::QKDKey::READY.

◆ SearchOptimalKeyToTransform()

Ptr< QKDKey > ns3::QKDBuffer::SearchOptimalKeyToTransform ( uint32_t  targetSize)

Serach for the optimal key to transform.

Parameters
targetSizeThe target size.
Returns
The optimal transformation candidate – key.

The search algorithm will prefer keys whose size is larger then the target size.

Definition at line 716 of file qkd-buffer.cc.

References m_keys, m_targetSizeSet, NS_ASSERT, NS_LOG_FUNCTION, and ns3::QKDKey::READY.

◆ SetDstNode()

void ns3::QKDBuffer::SetDstNode ( Ptr< Node node)

Set the QKD destination node.

Parameters
Thedestination node.

Definition at line 918 of file qkd-buffer.cc.

References m_dstNode.

◆ SetIndex()

void ns3::QKDBuffer::SetIndex ( uint32_t  index)

Set the index of the buffer per local node.

Parameters
Theindex.

Definition at line 927 of file qkd-buffer.cc.

References m_srcNodeBufferListIndex.

◆ SetMthr()

void ns3::QKDBuffer::SetMthr ( uint32_t  thr)

Set the threshold value of the QKD storage.

Parameters
Thethreshold value.

Definition at line 894 of file qkd-buffer.cc.

References m_thresholdKeyBit, m_thresholdKeyBitChangeTrace, m_thresholdKeyBitDecreaseTrace, m_thresholdKeyBitIncreaseTrace, and NS_LOG_FUNCTION.

◆ SetSrcNode()

void ns3::QKDBuffer::SetSrcNode ( Ptr< Node node)

Set the QKD source node.

Parameters
Thesource node.

Definition at line 909 of file qkd-buffer.cc.

References m_srcNode.

◆ UpdateKeyConsumptionStatistics()

◆ UpdateKeyGenerationStatistics()

void ns3::QKDBuffer::UpdateKeyGenerationStatistics ( Ptr< QKDKey key)

Member Data Documentation

◆ m_averageKeyChargingSize

double ns3::QKDBuffer::m_averageKeyChargingSize
private

The average key charging size.

Definition at line 513 of file qkd-buffer.h.

Referenced by UpdateKeyGenerationStatistics().

◆ m_averageKeyChargingTimePeriod

double ns3::QKDBuffer::m_averageKeyChargingTimePeriod
private

The average duration of the key charging time period.

Definition at line 511 of file qkd-buffer.h.

Referenced by FetchAverageKeyChargingTimePeriod(), and UpdateKeyGenerationStatistics().

◆ m_averageKeyConsumptionRate

double ns3::QKDBuffer::m_averageKeyConsumptionRate
private

The average key consumption rate.

Definition at line 516 of file qkd-buffer.h.

Referenced by GetAverageKeyConsumptionRate(), Init(), and UpdateKeyConsumptionStatistics().

◆ m_averageKeyConsumptionRateTrace

TracedCallback< double > ns3::QKDBuffer::m_averageKeyConsumptionRateTrace
private

A trace of the average key consumption rate.

Definition at line 529 of file qkd-buffer.h.

Referenced by GetTypeId(), and UpdateKeyConsumptionStatistics().

◆ m_averageKeyConsumptionSize

double ns3::QKDBuffer::m_averageKeyConsumptionSize
private

The average key consumption size.

Definition at line 514 of file qkd-buffer.h.

Referenced by GetAverageKeyConsumptionRate(), and UpdateKeyConsumptionStatistics().

◆ m_averageKeyConsumptionTimePeriod

double ns3::QKDBuffer::m_averageKeyConsumptionTimePeriod
private

The average duration of the key consumption time period.

Definition at line 512 of file qkd-buffer.h.

Referenced by GetAverageKeyConsumptionRate(), and UpdateKeyConsumptionStatistics().

◆ m_averageKeyGenerationRate

double ns3::QKDBuffer::m_averageKeyGenerationRate
private

The average key generation rate.

Definition at line 515 of file qkd-buffer.h.

Referenced by GetAverageKeyGenerationRate(), Init(), and UpdateKeyGenerationStatistics().

◆ m_averageKeyGenerationRateTrace

TracedCallback< double > ns3::QKDBuffer::m_averageKeyGenerationRateTrace
private

A trace of the average key generation rate.

Definition at line 528 of file qkd-buffer.h.

Referenced by GetTypeId(), and UpdateKeyGenerationStatistics().

◆ m_bitsUsedInTimePeriod

uint32_t ns3::QKDBuffer::m_bitsUsedInTimePeriod
private

Help value used for graph ploting.

Definition at line 477 of file qkd-buffer.h.

Referenced by Init(), and UpdateKeyConsumptionStatistics().

◆ m_bufferID

uint32_t ns3::QKDBuffer::m_bufferID

The unique buffer identifier.

Definition at line 302 of file qkd-buffer.h.

Referenced by GetId(), Init(), and operator==().

◆ m_c

double ns3::QKDBuffer::m_c
private

The average amount of key in the buffer during the recalculate time period.

Definition at line 482 of file qkd-buffer.h.

◆ m_calculateRoutingMetric

EventId ns3::QKDBuffer::m_calculateRoutingMetric
private

The event to calculate routing metric.

Definition at line 517 of file qkd-buffer.h.

Referenced by Dispose().

◆ m_chargingTimePeriods

std::vector< int64_t > ns3::QKDBuffer::m_chargingTimePeriods
private

The durations of the serveral last charging time periods.

Definition at line 508 of file qkd-buffer.h.

Referenced by UpdateKeyConsumptionStatistics(), and UpdateKeyGenerationStatistics().

◆ m_CMetricChangeTrace

TracedCallback< double > ns3::QKDBuffer::m_CMetricChangeTrace
private

A trace of c metric changes.

Definition at line 526 of file qkd-buffer.h.

Referenced by GetTypeId().

◆ m_consumptionTimePeriods

std::vector< int64_t > ns3::QKDBuffer::m_consumptionTimePeriods
private

The durations of the serveral last consumption time periods.

Definition at line 509 of file qkd-buffer.h.

Referenced by GetAverageKeyConsumptionRate(), and UpdateKeyConsumptionStatistics().

◆ m_currentKeyBit

uint32_t ns3::QKDBuffer::m_currentKeyBit
private

The current amount of key material in the QKD key storage.

Definition at line 495 of file qkd-buffer.h.

Referenced by AddNewKey(), CheckState(), FetchKeyByID(), FetchKeyBySize(), GetKeyCountBit(), GetTypeId(), Init(), InitTotalGraph(), KeyCalculation(), and UpdateKeyConsumptionStatistics().

◆ m_currentKeyBitChangeTrace

TracedCallback< uint32_t > ns3::QKDBuffer::m_currentKeyBitChangeTrace
private

A trace for current bit change.

Definition at line 522 of file qkd-buffer.h.

Referenced by AddNewKey(), GetTypeId(), and UpdateKeyConsumptionStatistics().

◆ m_currentKeyBitDecreaseTrace

TracedCallback< uint32_t > ns3::QKDBuffer::m_currentKeyBitDecreaseTrace
private

A trace of decrease in amount of key bits.

Definition at line 524 of file qkd-buffer.h.

Referenced by GetTypeId(), and UpdateKeyConsumptionStatistics().

◆ m_currentKeyBitIncreaseTrace

TracedCallback< uint32_t > ns3::QKDBuffer::m_currentKeyBitIncreaseTrace
private

A trace of increase in amount of key bits.

Definition at line 523 of file qkd-buffer.h.

Referenced by AddNewKey(), GetTypeId(), and InitTotalGraph().

◆ m_currentKeyBitPrevious

uint32_t ns3::QKDBuffer::m_currentKeyBitPrevious
private

The previous value of current amount of key material in the QKD key storage.

Definition at line 499 of file qkd-buffer.h.

Referenced by CheckState(), GetMCurrentPrevious(), Init(), and KeyCalculation().

◆ m_currentKeyBitReally

uint32_t ns3::QKDBuffer::m_currentKeyBitReally
private

The current amount of key material used for real tracking of storage (transform!).

Definition at line 496 of file qkd-buffer.h.

Referenced by AddNewKey(), FetchKeyByID(), FetchKeyBySize(), and Init().

◆ m_currentReadyKeyBit

uint64_t ns3::QKDBuffer::m_currentReadyKeyBit
private

The current amount of key material in the QKD buffer that are ready to be served.

Definition at line 497 of file qkd-buffer.h.

Referenced by AddNewKey(), GetReadyKeyCountBit(), Init(), ReleaseReservation(), ReserveKey(), and UpdateKeyConsumptionStatistics().

◆ m_currentTargetKeyBit

uint64_t ns3::QKDBuffer::m_currentTargetKeyBit
private

The current amount of key material in the QKD buffer that is already targeted.

Should not be used to transform keys!

Definition at line 498 of file qkd-buffer.h.

Referenced by AddNewKey(), GetTargetKeyCountBit(), Init(), ReserveKey(), and UpdateKeyConsumptionStatistics().

◆ m_defaultKeySize

uint32_t ns3::QKDBuffer::m_defaultKeySize
private

The default key size as required by the ETSI QKD 014 interface details.

Definition at line 469 of file qkd-buffer.h.

Referenced by GetKeySize(), and GetTypeId().

◆ m_destinations

std::map< uint32_t, QKDBuffer::KeyStorage > ns3::QKDBuffer::m_destinations
private

Definition at line 533 of file qkd-buffer.h.

Referenced by ~QKDBuffer().

◆ m_dstNode

Ptr<Node> ns3::QKDBuffer::m_dstNode

The destination node.

Definition at line 301 of file qkd-buffer.h.

Referenced by GetDstNode(), Init(), and SetDstNode().

◆ m_isRisingCurve

bool ns3::QKDBuffer::m_isRisingCurve
private

Whether curve on graph is rising or not.

Definition at line 483 of file qkd-buffer.h.

Referenced by CheckState(), and KeyCalculation().

◆ m_keyReservedTrace

TracedCallback< Ptr<QKDKey> > ns3::QKDBuffer::m_keyReservedTrace
private

A trace for reserved keys.

Definition at line 521 of file qkd-buffer.h.

Referenced by GetTypeId(), and ReserveKey().

◆ m_keys

std::map< std::string, Ptr <QKDKey> > ns3::QKDBuffer::m_keys
private

The list of available keys with their identifiers.

Definition at line 472 of file qkd-buffer.h.

Referenced by ~QKDBuffer(), AddNewKey(), FetchKeyByID(), FetchKeyBySize(), GetKeyCount(), ProbeKeyStatus(), ReleaseReservation(), ReserveKey(), and SearchOptimalKeyToTransform().

◆ m_keyServedTrace

TracedCallback< Ptr<QKDKey> > ns3::QKDBuffer::m_keyServedTrace
private

A trace for served keys.

Definition at line 520 of file qkd-buffer.h.

Referenced by GetTypeId(), and UpdateKeyConsumptionStatistics().

◆ m_lastChargedKeySizes

std::vector< int64_t > ns3::QKDBuffer::m_lastChargedKeySizes
private

The size of the several last generated keys.

Definition at line 506 of file qkd-buffer.h.

Referenced by UpdateKeyGenerationStatistics().

◆ m_lastConsumedKeySizes

std::vector< int64_t > ns3::QKDBuffer::m_lastConsumedKeySizes
private

The size of the several last consumed keys.

Definition at line 507 of file qkd-buffer.h.

Referenced by UpdateKeyConsumptionStatistics().

◆ m_lastKeyChargingTimeDuration

int64_t ns3::QKDBuffer::m_lastKeyChargingTimeDuration
private

The timestamp of a last key usage.

Definition at line 502 of file qkd-buffer.h.

Referenced by FetchLastKeyChargingTimeDuration(), Init(), and UpdateKeyGenerationStatistics().

◆ m_lastKeyChargingTimeStamp

int64_t ns3::QKDBuffer::m_lastKeyChargingTimeStamp
private

The timestamp of a last key charging (when the new key material was added).

Definition at line 500 of file qkd-buffer.h.

Referenced by FetchDeltaTime(), Init(), and UpdateKeyGenerationStatistics().

◆ m_lastKeyConsumptionTimeDuration

int64_t ns3::QKDBuffer::m_lastKeyConsumptionTimeDuration
private

The timestamp of a last key fetch operation.

Definition at line 503 of file qkd-buffer.h.

Referenced by Init(), and UpdateKeyConsumptionStatistics().

◆ m_lastKeyConsumptionTimeStamp

int64_t ns3::QKDBuffer::m_lastKeyConsumptionTimeStamp
private

The timestamp of a last key consumption (when the last key material was fetched).

Definition at line 501 of file qkd-buffer.h.

Referenced by Init(), and UpdateKeyConsumptionStatistics().

◆ m_maximalKeyCount

uint32_t ns3::QKDBuffer::m_maximalKeyCount
private

The maximal number of stored keys.

Definition at line 489 of file qkd-buffer.h.

Referenced by GetMaxKeyCount(), and GetTypeId().

◆ m_maxKeyBit

uint32_t ns3::QKDBuffer::m_maxKeyBit
private

The maximal amount of key material in the QKD key storage.

Definition at line 486 of file qkd-buffer.h.

Referenced by AddNewKey(), CheckState(), GetMaxKeySizeBit(), GetTypeId(), and Init().

◆ m_maxNumberOfRecordedKeyChargingTimePeriods

uint32_t ns3::QKDBuffer::m_maxNumberOfRecordedKeyChargingTimePeriods
private

The maximal number of values which are used for calculation of the average key charging time period.

Definition at line 504 of file qkd-buffer.h.

Referenced by FetchMaxNumberOfRecordedKeyChargingTimePeriods(), GetTypeId(), and UpdateKeyGenerationStatistics().

◆ m_maxNumberOfRecordedKeyConsumptionTimePeriods

uint32_t ns3::QKDBuffer::m_maxNumberOfRecordedKeyConsumptionTimePeriods
private

The maximal number of values which are used for calculation of the average key consumption time period.

Definition at line 505 of file qkd-buffer.h.

Referenced by GetAverageKeyConsumptionRate(), GetTypeId(), and UpdateKeyConsumptionStatistics().

◆ m_minimalKeyCount

uint32_t ns3::QKDBuffer::m_minimalKeyCount
private

The minimal number of stored keys.

Definition at line 488 of file qkd-buffer.h.

Referenced by GetMinKeyCount(), and GetTypeId().

◆ m_minKeyBit

uint32_t ns3::QKDBuffer::m_minKeyBit
private

The minimal amount of key material in the QKD key storage.

Definition at line 485 of file qkd-buffer.h.

Referenced by CheckState(), GetMinKeySizeBit(), GetTypeId(), and Init().

◆ m_newKeyAddedTrace

TracedCallback< Ptr<QKDKey> > ns3::QKDBuffer::m_newKeyAddedTrace
private

A trace of newly added keys.

Definition at line 518 of file qkd-buffer.h.

Referenced by AddNewKey(), and GetTypeId().

◆ m_nextKeyID

uint32_t ns3::QKDBuffer::m_nextKeyID
private

The identifie of the next key to be generated.

Definition at line 471 of file qkd-buffer.h.

Referenced by Init().

◆ m_noAddNewValue

uint32_t ns3::QKDBuffer::m_noAddNewValue
private

Help value used for graph ploting.

Definition at line 476 of file qkd-buffer.h.

Referenced by Init(), and UpdateKeyGenerationStatistics().

◆ m_noEntry

uint32_t ns3::QKDBuffer::m_noEntry
private

Help value used for graph ploting.

Definition at line 474 of file qkd-buffer.h.

Referenced by Init(), KeyCalculation(), and UpdateKeyGenerationStatistics().

◆ m_period

uint32_t ns3::QKDBuffer::m_period
private

Help value used for graph ploting.

Definition at line 475 of file qkd-buffer.h.

Referenced by Init(), KeyCalculation(), and UpdateKeyGenerationStatistics().

◆ m_previousStatus

uint32_t ns3::QKDBuffer::m_previousStatus
private

The previous status; important for deciding about further status that can be selected.

Definition at line 484 of file qkd-buffer.h.

Referenced by CheckState(), FetchPreviousState(), and Init().

◆ m_previousValues

std::vector< struct QKDBuffer::data > ns3::QKDBuffer::m_previousValues
private

Help vector used for graph ploting.

Definition at line 480 of file qkd-buffer.h.

Referenced by KeyCalculation().

◆ m_recalculateTimePeriod

uint32_t ns3::QKDBuffer::m_recalculateTimePeriod
private

The period of time (in seconds) to calculate average amount of the key in the buffer.

The default value is 5.

Definition at line 479 of file qkd-buffer.h.

Referenced by GetTypeId().

◆ m_srcNode

Ptr<Node> ns3::QKDBuffer::m_srcNode

The source node.

Definition at line 300 of file qkd-buffer.h.

Referenced by GetSrcNode(), Init(), and SetSrcNode().

◆ m_srcNodeBufferListIndex

uint32_t ns3::QKDBuffer::m_srcNodeBufferListIndex
private

The index in the source node buffer list.

Definition at line 531 of file qkd-buffer.h.

Referenced by GetIndex(), and SetIndex().

◆ m_status

uint32_t ns3::QKDBuffer::m_status
private

The state of the Net Device transmit state machine.

Definition at line 510 of file qkd-buffer.h.

Referenced by CheckState(), and FetchState().

◆ m_StatusChangeTrace

TracedCallback< uint32_t > ns3::QKDBuffer::m_StatusChangeTrace
private

A trace of status changes.

Definition at line 525 of file qkd-buffer.h.

Referenced by CheckState(), and GetTypeId().

◆ m_targetSizeSet

std::vector<uint32_t> ns3::QKDBuffer::m_targetSizeSet
private

The list of requested key sizes.

Definition at line 468 of file qkd-buffer.h.

Referenced by ~QKDBuffer(), AddNewKey(), RecordTargetSize(), ReserveKey(), SearchOptimalKeyToTransform(), and UpdateKeyConsumptionStatistics().

◆ m_thresholdKeyBit

uint32_t ns3::QKDBuffer::m_thresholdKeyBit
private

The threshold amount of key material in the QKD key storage.

Definition at line 487 of file qkd-buffer.h.

Referenced by CheckState(), GetMthr(), GetTypeId(), Init(), InitTotalGraph(), and SetMthr().

◆ m_thresholdKeyBitChangeTrace

TracedCallback< uint32_t > ns3::QKDBuffer::m_thresholdKeyBitChangeTrace
private

A traceback for available key bits.

Definition at line 491 of file qkd-buffer.h.

Referenced by GetTypeId(), and SetMthr().

◆ m_thresholdKeyBitDecreaseTrace

TracedCallback< uint32_t > ns3::QKDBuffer::m_thresholdKeyBitDecreaseTrace
private

A traceback for consumed key bits.

Definition at line 493 of file qkd-buffer.h.

Referenced by GetTypeId(), and SetMthr().

◆ m_thresholdKeyBitIncreaseTrace

TracedCallback< uint32_t > ns3::QKDBuffer::m_thresholdKeyBitIncreaseTrace
private

A traceback for generated key bits.

Definition at line 492 of file qkd-buffer.h.

Referenced by GetTypeId(), InitTotalGraph(), and SetMthr().

◆ m_transformedKeyAddedTrace

TracedCallback< Ptr<QKDKey> > ns3::QKDBuffer::m_transformedKeyAddedTrace
private

A trace for tranformed keys.

Definition at line 519 of file qkd-buffer.h.

Referenced by AddNewKey(), and GetTypeId().

◆ m_useRealStorages

bool ns3::QKDBuffer::m_useRealStorages
private

Definition at line 470 of file qkd-buffer.h.

Referenced by Init().

◆ nBuffers

uint32_t ns3::QKDBuffer::nBuffers = 0
static

The number of the created buffers - a static value.

Definition at line 303 of file qkd-buffer.h.

Referenced by Init().

◆ QKDSTATUS_CHARGING

const uint32_t ns3::QKDBuffer::QKDSTATUS_CHARGING = 2
static

QKDStatus CHARGING.

Definition at line 87 of file qkd-buffer.h.

Referenced by CheckState().

◆ QKDSTATUS_EMPTY

const uint32_t ns3::QKDBuffer::QKDSTATUS_EMPTY = 3
static

QKDStatus EMPTY.

Definition at line 89 of file qkd-buffer.h.

Referenced by CheckState().

◆ QKDSTATUS_READY

const uint32_t ns3::QKDBuffer::QKDSTATUS_READY = 0
static

QKDStatus READY.

Definition at line 83 of file qkd-buffer.h.

Referenced by CheckState().

◆ QKDSTATUS_WARNING

const uint32_t ns3::QKDBuffer::QKDSTATUS_WARNING = 1
static

QKDStatus WARNING.

Definition at line 85 of file qkd-buffer.h.

Referenced by CheckState().


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