Not all Timers are Executing

29 views
Skip to first unread message

Yasir Saleem

unread,
Dec 21, 2020, 9:34:01 AM12/21/20
to omn...@googlegroups.com
Hello everyone, 

In my network in OMNeT++ 5.5.1, I have two nodes (node[0] and node[1]) which are setting the timers using the below code. The timers set by node[0] and node[1] are triggered most of the time, however there is one time during which the timer, set by node[0], is supposed to be triggered but it is not triggering. I ensured that node[1] is not setting the timer at the same time as of node[0] but still the timer is not triggering.

Here is the code:

    MyWaitTimerMessage *myTimer = new MyWaitTimerMessage();
    myTimer->setNodeId(myId);
    double interval = 40.0 // In actual, the interval is calculating based on some criteria
    scheduleAt(simTime() + interval, myTimer);


Does anyone have any idea what is the problem behind it? and what are the factors that can cause timers to not trigger?

Also, is there any way to list all the scheduled timers in OMNeT++ so that I can check whether it exists in the global list of timers or not?

Moreover, is collision between timers possible or not (in fact I have ensured that all timers are scheduled at different times, with the differences of milliseconds at least).

Thank you in advance.
Yasir Saleem

Alfonso Ariza Quintana

unread,
Dec 21, 2020, 11:28:40 AM12/21/20
to omn...@googlegroups.com
The list of events in the simulation IDE, shows the timers,
The timers don't have collisions, if two timers have the same value, the timers are processes using FIFO.
You need to put attention at the simulation duration and the maximum simulation time in based to the timer resolution

De: omn...@googlegroups.com <omn...@googlegroups.com> en nombre de Yasir Saleem <shaikh.ya...@gmail.com>
Enviado: lunes, 21 de diciembre de 2020 15:33
Para: omn...@googlegroups.com <omn...@googlegroups.com>
Asunto: [Omnetpp-l] Not all Timers are Executing
 
--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/omnetpp/CACXL%3DdNrFW%3D5eCfJibsaccZm8GzDdu6j86pCwi1OnwP7%3DpuJSw%40mail.gmail.com.

Yasir Saleem

unread,
Dec 28, 2020, 6:40:50 AM12/28/20
to OMNeT++ Users
Thank you very much Alfonso for answering to my questions. 
I now got it. 
You answer (specially the third one) helped me to diagnose it and then I realized that since my nodes are mobile, therefore the node[0] which timer was not calling, actually left the network due to mobility. Since it is no longer in the network, therefore its timer was not calling. 
Many thanks again and it helped to figure out the problem.

Best Regards,
Yasir

Reply all
Reply to author
Forward
0 new messages