Ejemplo n.º 1
0
void
RoutingTable::scheduleRoutingTableCalculation(Nlsr& pnlsr)
{
  if (pnlsr.getIsRouteCalculationScheduled() != true) {
    ndn::time::milliseconds delay = util::jitter::getTimeWithJitter(m_routingCalcInterval);

    _LOG_DEBUG("Scheduling routing table calculation in " << delay);

    m_scheduler.scheduleEvent(delay, ndn::bind(&RoutingTable::calculate, this, std::ref(pnlsr)));
    pnlsr.setIsRouteCalculationScheduled(true);
  }
}
Ejemplo n.º 2
0
void
RoutingTable::scheduleRoutingTableCalculation(Nlsr& pnlsr)
{
  if (pnlsr.getIsRouteCalculationScheduled() != true) {
    _LOG_DEBUG("Scheduling routing table calculation in " << m_routingCalcInterval);

    m_scheduler.scheduleEvent(m_routingCalcInterval,
                              ndn::bind(&RoutingTable::calculate, this, ndn::ref(pnlsr)));

    pnlsr.setIsRouteCalculationScheduled(true);
  }
}