conf-parameter.cpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
24 #include "conf-parameter.hpp"
25 #include "logger.hpp"
26 
27 namespace nlsr {
28 
29 INIT_LOGGER(ConfParameter);
30 
31 // To be changed when breaking changes are made to sync
32 const uint64_t ConfParameter::SYNC_VERSION = 4;
33 
34 void
36 {
37  NLSR_LOG_INFO("Router Name: " << m_routerName);
38  NLSR_LOG_INFO("Site Name: " << m_siteName);
39  NLSR_LOG_INFO("Network: " << m_network);
40  NLSR_LOG_INFO("Router Prefix: " << m_routerPrefix);
41  NLSR_LOG_INFO("ChronoSync sync Prefix: " << m_chronosyncPrefix);
42  NLSR_LOG_INFO("ChronoSync LSA prefix: " << m_lsaPrefix);
43  NLSR_LOG_INFO("Hello Interest retry number: " << m_interestRetryNumber);
44  NLSR_LOG_INFO("Hello Interest resend second: " << m_interestResendTime);
45  NLSR_LOG_INFO("Info Interest interval: " << m_infoInterestInterval);
46  NLSR_LOG_INFO("LSA refresh time: " << m_lsaRefreshTime);
47  NLSR_LOG_INFO("FIB Entry refresh time: " << m_lsaRefreshTime * 2);
48  NLSR_LOG_INFO("LSA Interest lifetime: " << getLsaInterestLifetime());
49  NLSR_LOG_INFO("Router dead interval: " << getRouterDeadInterval());
50  NLSR_LOG_INFO("Max Faces Per Prefix: " << m_maxFacesPerPrefix);
51  NLSR_LOG_INFO("Hyperbolic Routing: " << m_hyperbolicState);
52  NLSR_LOG_INFO("Hyp R: " << m_corR);
53  int i=0;
54  for (auto const& value: m_corTheta) {
55  NLSR_LOG_INFO("Hyp Angle " << i++ << ": "<< value);
56  }
57  NLSR_LOG_INFO("Seq Directory: " << m_seqFileDir);
58 
59  // Event Intervals
60  NLSR_LOG_INFO("Adjacency LSA build interval: " << m_adjLsaBuildInterval);
61  NLSR_LOG_INFO("First Hello Interest interval: " << m_firstHelloInterval);
62  NLSR_LOG_INFO("Routing calculation interval: " << m_routingCalcInterval);
63 }
64 
65 void
66 ConfParameter::setNetwork(const ndn::Name& networkName)
67 {
68  m_network = networkName;
69 
70  m_chronosyncPrefix.append("localhop");
71  m_chronosyncPrefix.append(m_network);
72  m_chronosyncPrefix.append("NLSR");
73  m_chronosyncPrefix.append("sync");
74  m_chronosyncPrefix.appendVersion(SYNC_VERSION);
75 
76  m_lsaPrefix.append("localhop");
77  m_lsaPrefix.append(m_network);
78  m_lsaPrefix.append("NLSR");
79  m_lsaPrefix.append("LSA");
80 }
81 
82 } // namespace nlsr
void setNetwork(const ndn::Name &networkName)
Copyright (c) 2014-2018, The University of Memphis, Regents of the University of California.
const ndn::time::seconds & getLsaInterestLifetime() const
#define INIT_LOGGER(name)
Definition: logger.hpp:35
#define NLSR_LOG_INFO(x)
Definition: logger.hpp:39
Copyright (c) 2014-2018, The University of Memphis, Regents of the University of California, Arizona Board of Regents.
uint32_t getRouterDeadInterval() const