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

QKDLocationRegister is a class used to keep details about distant QKD nodes and their connectivity. More...

#include "qkd-location-register.h"

+ Inheritance diagram for ns3::QKDLocationRegister:
+ Collaboration diagram for ns3::QKDLocationRegister:

Public Member Functions

 QKDLocationRegister ()
 c-tor
 
 QKDLocationRegister (Ptr< Node > n)
 
bool AddEntry (QKDLocationRegisterEntry &r)
 Add location table entry if it doesn't yet exist in location table.
 
bool DeleteEntry (uint32_t dst)
 Delete location table entry with destination address dst, if it exists.
 
Ipv4Address GetAddress ()
 
TypeId GetInstanceTypeId () const override
 Get the type ID for the instance.
 
void GetListOfAllEntries (std::map< uint32_t, QKDLocationRegisterEntry > &allRoutes)
 Lookup list of all addresses in the location table.
 
void GetListOfDestinationWithNextHop (uint32_t nxtHp, std::map< uint32_t, QKDLocationRegisterEntry > &dstList)
 Lookup list of addresses for which nxtHp is the next Hop address.
 
Ptr< NodeGetNode ()
 
uint32_t GetSize ()
 Provides the number of routes present in that nodes location table.
 
bool Lookup (uint32_t dstSaeId, QKDLocationRegisterEntry &rt)
 Lookup location table entry with destination address dst.
 
bool LookupByKms (Ipv4Address dstKmsId, QKDLocationRegisterEntry &rt)
 Lookup location table entry with destination address dst KMS Id @Ipv4Address destination KMS Ipv4Address.
 
void Print (Ptr< OutputStreamWrapper > stream) const
 Print location table.
 
void SetAddress (Ipv4Address addr)
 
void SetNode (Ptr< Node > n)
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
void UnidirectionalAggregateObject (Ptr< Object > other)
 Aggregate an Object to another Object.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Private Member Functions

std::vector< std::pair< uint32_t, uint32_t > > DijkstraSP (uint32_t start)
 
void PopulateRoutingTables ()
 

Private Attributes

Ipv4Address m_address
 
std::vector< std::pair< uint32_t, uint32_t > > m_adjList
 
std::map< uint32_t, Ptr< QKDControl > > m_controllers
 
uint32_t m_id
 
std::map< uint32_t, QKDLocationRegisterEntrym_locationEntites
 
Ptr< Nodem_node
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void DoDispose ()
 Destructor implementation.
 
virtual void DoInitialize ()
 Initialize() implementation.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Detailed Description

QKDLocationRegister is a class used to keep details about distant QKD nodes and their connectivity.

Introspection did not find any typical Config paths.

Note
QKDNetSim KMS implements a location register table that is used to define paths to distant node. It is a early version of routing table that will be updated via routing protocol.


No Attributes are defined for this type.
No TraceSources are defined for this type.
Group: QKDLocationRegister

Size of this type is 200 bytes (on a 64-bit architecture).

Definition at line 51 of file qkd-location-register.h.

Constructor & Destructor Documentation

◆ QKDLocationRegister() [1/2]

ns3::QKDLocationRegister::QKDLocationRegister ( )

c-tor

Definition at line 48 of file qkd-location-register.cc.

◆ QKDLocationRegister() [2/2]

ns3::QKDLocationRegister::QKDLocationRegister ( Ptr< Node n)

Definition at line 51 of file qkd-location-register.cc.

References ns3::Create(), ns3::Node::GetApplication(), ns3::Node::GetNApplications(), m_node, NS_ASSERT, SetAddress(), and SetNode().

+ Here is the call graph for this function:

Member Function Documentation

◆ AddEntry()

bool ns3::QKDLocationRegister::AddEntry ( QKDLocationRegisterEntry r)

Add location table entry if it doesn't yet exist in location table.

Parameters
rlocation table entry
Returns
true in success

Definition at line 67 of file qkd-location-register.cc.

References ns3::Create(), m_id, m_locationEntites, and NS_LOG_FUNCTION.

Referenced by PopulateRoutingTables().

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

◆ DeleteEntry()

bool ns3::QKDLocationRegister::DeleteEntry ( uint32_t  dst)

Delete location table entry with destination address dst, if it exists.

Parameters
dstdestination address
Returns
true on success

Definition at line 81 of file qkd-location-register.cc.

References m_locationEntites, and NS_LOG_FUNCTION.

◆ DijkstraSP()

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

Definition at line 155 of file qkd-location-register.cc.

References ns3::Create(), m_adjList, m_id, and NS_LOG_FUNCTION.

Referenced by PopulateRoutingTables().

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

◆ GetAddress()

Ipv4Address ns3::QKDLocationRegister::GetAddress ( )
inline

Definition at line 130 of file qkd-location-register.h.

References m_address.

◆ GetInstanceTypeId()

TypeId ns3::QKDLocationRegister::GetInstanceTypeId ( ) const
overridevirtual

Get the type ID for the instance.

Returns
the instance TypeId

Reimplemented from ns3::Object.

Definition at line 43 of file qkd-location-register.cc.

References GetTypeId().

+ Here is the call graph for this function:

◆ GetListOfAllEntries()

void ns3::QKDLocationRegister::GetListOfAllEntries ( std::map< uint32_t, QKDLocationRegisterEntry > &  allRoutes)

Lookup list of all addresses in the location table.

Parameters
allRoutesis the list that will hold all these addresses present in the nodes location table

Definition at line 123 of file qkd-location-register.cc.

References ns3::Create(), and m_locationEntites.

+ Here is the call graph for this function:

◆ GetListOfDestinationWithNextHop()

void ns3::QKDLocationRegister::GetListOfDestinationWithNextHop ( uint32_t  nxtHp,
std::map< uint32_t, QKDLocationRegisterEntry > &  dstList 
)

Lookup list of addresses for which nxtHp is the next Hop address.

Parameters
nxtHpnexthop's address for which we want the list of destinations
dstListis the list that will hold all these destination addresses

Definition at line 132 of file qkd-location-register.cc.

References ns3::Create(), and m_locationEntites.

+ Here is the call graph for this function:

◆ GetNode()

Ptr< Node > ns3::QKDLocationRegister::GetNode ( )
inline

Definition at line 126 of file qkd-location-register.h.

References m_node.

◆ GetSize()

uint32_t ns3::QKDLocationRegister::GetSize ( )

Provides the number of routes present in that nodes location table.

Returns
the number of routes

Definition at line 147 of file qkd-location-register.cc.

References m_locationEntites.

◆ GetTypeId()

TypeId ns3::QKDLocationRegister::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 32 of file qkd-location-register.cc.

References ns3::TypeId::SetParent().

Referenced by GetInstanceTypeId().

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

◆ Lookup()

bool ns3::QKDLocationRegister::Lookup ( uint32_t  dstSaeId,
QKDLocationRegisterEntry rt 
)

Lookup location table entry with destination address dst.

Parameters
dstdestination application ID
rtentry with destination address dst, if exists
Returns
true on success

Definition at line 88 of file qkd-location-register.cc.

References ns3::Create(), m_id, m_locationEntites, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ LookupByKms()

bool ns3::QKDLocationRegister::LookupByKms ( Ipv4Address  dstKmsId,
QKDLocationRegisterEntry rt 
)

Lookup location table entry with destination address dst KMS Id @Ipv4Address destination KMS Ipv4Address.

Parameters
rtentry with destination address dst, if exists
Returns
true on success

Definition at line 108 of file qkd-location-register.cc.

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

+ Here is the call graph for this function:

◆ PopulateRoutingTables()

void ns3::QKDLocationRegister::PopulateRoutingTables ( )
private

Definition at line 268 of file qkd-location-register.cc.

References AddEntry(), ns3::Create(), DijkstraSP(), m_controllers, m_id, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ Print()

void ns3::QKDLocationRegister::Print ( Ptr< OutputStreamWrapper stream) const

Print location table.

Parameters
streamthe output stream

◆ SetAddress()

void ns3::QKDLocationRegister::SetAddress ( Ipv4Address  addr)
inline

Definition at line 132 of file qkd-location-register.h.

References m_address.

Referenced by QKDLocationRegister().

+ Here is the caller graph for this function:

◆ SetNode()

void ns3::QKDLocationRegister::SetNode ( Ptr< Node n)
inline

Definition at line 128 of file qkd-location-register.h.

References m_id, and m_node.

Referenced by QKDLocationRegister().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_address

Ipv4Address ns3::QKDLocationRegister::m_address
private

Definition at line 150 of file qkd-location-register.h.

Referenced by GetAddress(), and SetAddress().

◆ m_adjList

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

Definition at line 146 of file qkd-location-register.h.

Referenced by DijkstraSP().

◆ m_controllers

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

Definition at line 148 of file qkd-location-register.h.

Referenced by PopulateRoutingTables().

◆ m_id

uint32_t ns3::QKDLocationRegister::m_id
private

Definition at line 144 of file qkd-location-register.h.

Referenced by AddEntry(), DijkstraSP(), Lookup(), PopulateRoutingTables(), and SetNode().

◆ m_locationEntites

std::map<uint32_t, QKDLocationRegisterEntry> ns3::QKDLocationRegister::m_locationEntites
private

◆ m_node

Ptr<Node> ns3::QKDLocationRegister::m_node
private

Definition at line 152 of file qkd-location-register.h.

Referenced by QKDLocationRegister(), GetNode(), and SetNode().


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