conf: Make event intervals configurable
User can specify the intervals for the first Hello Interest,
AdjLsa building, and routing calculation in the conf file.
refs: #2071
Change-Id: Ic8eb29d433069086955178bc42b5f8fc8f4149d3
diff --git a/src/nlsr.cpp b/src/nlsr.cpp
index 930dc33..a66e6aa 100644
--- a/src/nlsr.cpp
+++ b/src/nlsr.cpp
@@ -142,7 +142,13 @@
m_nlsrLsdb.buildAndInstallOwnCoordinateLsa();
registerKeyPrefix();
- m_helloProtocol.scheduleInterest(10);
+
+ // Set event intervals
+ setFirstHelloInterval(m_confParam.getFirstHelloInterval());
+ m_helloProtocol.setAdjLsaBuildInterval(m_confParam.getAdjLsaBuildInterval());
+ m_routingTable.setRoutingCalcInterval(m_confParam.getRoutingCalcInterval());
+
+ m_helloProtocol.scheduleInterest(m_firstHelloInterval);
// Need to set direct neighbors' costs to 0 for hyperbolic routing
if (m_confParam.getHyperbolicState() == HYPERBOLIC_STATE_ON) {