A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
qkd-location-register-entry.h
Go to the documentation of this file.
1/*
2 * Copyright(c) 2020 DOTFEESA www.tk.etf.unsa.ba
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 *
7 *
8 * Author: Emir Dervisevic <emir.dervisevic@etf.unsa.ba>
9 * Miralem Mehic <miralem.mehic@ieee.org>
10 */
11#ifndef QKD_LOCATION_REGISTER_ENTRY_H
12#define QKD_LOCATION_REGISTER_ENTRY_H
13
14#include "ns3/event-id.h"
15#include "ns3/ptr.h"
16#include "ns3/data-rate.h"
17#include "ns3/traced-callback.h"
18#include "ns3/output-stream-wrapper.h"
19#include "ns3/packet.h"
20#include "ns3/object.h"
21#include "ns3/traced-value.h"
22#include "ns3/trace-source-accessor.h"
23#include "ns3/node.h"
24#include "ns3/core-module.h"
25#include "ns3/log.h"
26
27#include "ns3/qkd-key-manager-system-application.h"
28
29#include <map>
30#include <iostream>
31#include <sstream>
32
33namespace ns3 {
34
35class QKDKeyManagerSystemApplication;
36
37/**
38 * @ingroup applications
39 * @class QKD QKDLocationRegister
40 * @brief QKD QKDLocationRegister is a class used to
41 * keep details about distant QKD nodes and their connectivity.
42 *
43 * @note QKDNetSim KMS implements a location register table that is used
44 * to define paths to distant node. It is a early version of routing table
45 * that will be updated via routing protocol.
46 */
48{
49 public:
50
51 /**
52 * @brief Get the type ID.
53 * @return the object TypeId
54 */
55 static TypeId GetTypeId();
56
57 /**
58 * @brief Get the type ID for the instance
59 * @return the instance TypeId
60 */
61 TypeId GetInstanceTypeId() const override;
62
64
71 std::string dstKmId
72 );
73
75
76 std::string
78 {
79 return m_dstAppId;
80 }
81
82 std::string
84 {
85 return m_srcAppId;
86 }
87
88 /**
89 * Get destination KMS Address
90 * @returns the destination KMS Address
91 */
94 {
95 return m_dstAddress;
96 }
97
99 {
100 return m_dstKmNodeId;
101 }
102
104 {
105 return m_nextHop;
106 }
107
108 /**
109 * Set next hop
110 * @param nextHop the ID of the next hop
111 */
112 void
114 {
115 m_nextHop = nextHop;
116 }
117 /**
118 * Get next hop
119 * @returns the ID of the next hop
120 */
123 {
124 return m_nextHop;
125 }
126
129 {
130 return m_nextHopAddress;
131 }
132
133 std::string GetKmId();
134
135 /**
136 * Set hop
137 * @param hopCount the hop count
138 */
139 void
140 SetHop(uint32_t hopCount)
141 {
142 m_hops = hopCount;
143 }
144 /**
145 * Get hop
146 * @returns the hop count
147 */
149 GetHop() const
150 {
151 return m_hops;
152 }
153 /**
154 * @brief Print registry info
155 */
156 void
158 /**
159 * Print routing table entry
160 * @param stream the output stream
161 */
162 void
163 Print(Ptr<OutputStreamWrapper> stream) const;
164
165 private:
166 std::string m_srcAppId;
167 std::string m_dstAppId;
173 std::string m_dstKmId;
174};
175
176
177
178} // namespace ns3
179
180#endif /* QKD_LOCATION_REGISTER_ENTRY_H */
181
Ipv4 addresses are stored in host order in this class.
A base class which provides memory management and object aggregation.
Definition object.h:78
Smart pointer class similar to boost::intrusive_ptr.
Definition ptr.h:66
Introspection did not find any typical Config paths.
Ipv4Address m_dstAddress
std::string m_srcAppId
void SetHop(uint32_t hopCount)
Set hop.
QKDLocationRegisterEntry()
Ipv4Address GetNextHopAddress() const
uint32_t GetNextHopKMNodeId() const
uint32_t GetDestinationKmNodeId() const
std::string GetSourceAppId() const
void SetNextHop(uint32_t nextHop)
Set next hop.
~QKDLocationRegisterEntry() override
void Print(Ptr< OutputStreamWrapper > stream) const
Print routing table entry.
uint32_t m_dstKmNodeId
Ipv4Address GetDestinationKmsAddress() const
Get destination KMS Address.
std::string m_dstAppId
uint32_t GetNextHop() const
Get next hop.
static TypeId GetTypeId()
Get the type ID.
void PrintRegistryInfo()
Print registry info.
std::string GetKmId()
std::string m_dstKmId
uint32_t GetHop() const
Get hop.
Ipv4Address m_nextHopAddress
std::string GetRemoteAppId() const
uint32_t m_nextHop
TypeId GetInstanceTypeId() const override
Get the type ID for the instance.
uint32_t m_hops
a unique identifier for an interface.
Definition type-id.h:49
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Definition ptr.h:436
Every class exported by the ns3 library is enclosed in the ns3 namespace.