A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
qkd-location-register-entry.cc
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#include "ns3/log.h"
12#include "ns3/address.h"
13#include "ns3/node.h"
14#include "ns3/nstime.h"
15#include "ns3/simulator.h"
16#include "ns3/uinteger.h"
17#include "ns3/trace-source-accessor.h"
18#include <iostream>
19#include <fstream>
20#include <string>
21
23
24namespace ns3 {
25
26 NS_LOG_COMPONENT_DEFINE("QKDLocationRegisterEntry");
27
28 NS_OBJECT_ENSURE_REGISTERED(QKDLocationRegisterEntry);
29
30 TypeId
32 {
33 static TypeId tid = TypeId("ns3::QKDLocationRegisterEntry")
35 .SetGroupName("QKDLocationRegisterEntry")
36 .AddConstructor<QKDLocationRegisterEntry>()
37 ;
38 return tid;
39 }
40
41 TypeId
46
50
57 std::string dstKmId
58 )
59 : m_nextHop(nextHopKmNodeId),
60 m_nextHopAddress(nextHopKmNodeAddress),
61 m_hops(hops),
62 m_dstKmNodeId(dstKmNodeId),
63 m_dstAddress(dstKmAddress),
64 m_dstKmId(dstKmId)
65 {
67 }
68
69 std::string
74
78
79 void
84
85 void
87 {
88 *stream->GetStream() << GetSourceAppId() << "\t\t"
89 << GetRemoteAppId() << "\t\t"
90 << GetNextHop() << "\n";
91 }
92
93} // namespace ns3
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
QKDLocationRegisterEntry()
std::string GetSourceAppId() const
~QKDLocationRegisterEntry() override
void Print(Ptr< OutputStreamWrapper > stream) const
Print routing table entry.
uint32_t m_dstKmNodeId
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
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
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition type-id.cc:1001
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition object-base.h:35
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.