Skip to first unread message

Francisco Eduardo Balart Sanchez

unread,
Aug 6, 2018, 2:58:08 PM8/6/18
to ns-3-users
Good day:

I'm implementing a cluster-based algorithm as MAC, to make experimentations i would like to
be able to delay the start of the AODV protocol.


There are two parts of the routing protocol i think should have such delay (i think)
  1. The  RoutingProtocol::Start Function
  358 void
 360 {
 361   NS_LOG_FUNCTION (this);
  //Should if put a sleep here or schedule to do nothing here?
  //Or propagate such delay on all timers (i don't think this woudl be good idea)
  362   if (m_enableHello)
 363     {
 364       m_nb.ScheduleTimer ();
 365     }
 367                                     this);
 369
 371                                     this);
 373
  374 }

2. The DoInitialize

 2113 void
2115 {
2116   NS_LOG_FUNCTION (this);
2117   uint32_t startTime;
2118   if (m_enableHello)
2119     {
2121       startTime = m_uniformRandomVariable->GetInteger (0, 100);
      // The startTime is for the hello world
2122       NS_LOG_DEBUG ("Starting at time " << startTime << "ms");
2123       m_htimer.Schedule (MilliSeconds (startTime));
2124     }
2126 }
2127


Thanks in advance and best regards

M.S. Francisco Eduardo Balart Sanchez

Francisco Eduardo Balart Sanchez

unread,
Aug 7, 2018, 12:59:35 AM8/7/18
to ns-3-users
Is the ns3::SystemConditionPrivate::TimedWait  the appropriate method?
Message has been deleted

Francisco Eduardo Balart Sanchez

unread,
Aug 7, 2018, 2:47:27 PM8/7/18
to ns-3-users
I was also thinking on a "wrapper" of Start or DoInitialize as shown below

aodv::Start()
{
   
//Port the code from here to StartTwo
   
Schedule(Delay, StartTwo);
}

Not sure if this or the TimedWait would be better option

thanks in advance and best regards
Reply all
Reply to author
Forward
0 new messages