22 #ifndef NLSR_ROUTING_TABLE_HPP 23 #define NLSR_ROUTING_TABLE_HPP 32 #include <boost/cstdint.hpp> 33 #include <ndn-cxx/util/scheduler.hpp> 87 m_routingCalcInterval = ndn::time::seconds(interval);
90 const ndn::time::seconds&
93 return m_routingCalcInterval;
96 const std::list<RoutingTableEntry>&
102 const std::list<RoutingTableEntry>&
111 return m_rTable.size();
117 calculateLsRoutingTable(
Nlsr& pnlsr);
121 calculateHypRoutingTable(
Nlsr& pnlsr);
125 calculateHypDryRoutingTable(
Nlsr& pnlsr);
131 clearDryRoutingTable();
134 writeLog(
int hyperbolicState);
140 std::list<RoutingTableEntry> m_rTable;
143 ndn::Scheduler& m_scheduler;
145 const int m_NO_NEXT_HOP;
147 std::list<RoutingTableEntry> m_dryTable;
149 ndn::time::seconds m_routingCalcInterval;
154 #endif // NLSR_ROUTING_TABLE_HPP
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE
const std::list< RoutingTableEntry > & getDryRoutingTableEntry() const
RoutingTable(ndn::Scheduler &scheduler)
void scheduleRoutingTableCalculation(Nlsr &pnlsr)
Schedules a calculation event in the event scheduler only if one isn't already scheduled.
void setRoutingCalcInterval(uint32_t interval)
Copyright (c) 2014-2018, The University of Memphis, Regents of the University of California, Arizona Board of Regents.
void addNextHopToDryTable(const ndn::Name &destRouter, NextHop &nh)
Adds a next hop to a routing table entry in a dry run scenario.
RoutingTableEntry * findRoutingTableEntry(const ndn::Name &destRouter)
std::unique_ptr< AfterRoutingChange > afterRoutingChange
void addNextHop(const ndn::Name &destRouter, NextHop &nh)
Adds a next hop to a routing table entry.
const ndn::time::seconds & getRoutingCalcInterval() const
void calculate(Nlsr &nlsr)
Calculates a list of next hops for each router in the network.
const std::list< RoutingTableEntry > & getRoutingTableEntry() const