batman routing shut down a host

6 views
Skip to first unread message

Sven Scherbanowitz

unread,
Jun 13, 2017, 2:47:23 PM6/13/17
to OMNeT++ Users
Hi,

I'm working on a Bachelorthesis and I have some problems. I want to shut down a node
over the lifecyleController. When I try to restart the node, I've got a message:

scheduleAT():Message(omnetpp::cMessage) is currently scheduled, use
cancelEvent() before rescheduling -- in module(inet::inetmanet::Batman)
BatmanNetwork.host[1].batman(id=56), t=5s, event #138

Maybe someone knows, who I can rescheduling the message

BR
Sven

Alfonso Ariza Quintana

unread,
Jun 13, 2017, 3:05:05 PM6/13/17
to omn...@googlegroups.com

Strange, in theory the timer is canceled when the node is shutdown

 

You can try this

bool Batman::handleNodeStart(IDoneCallback *doneCallback)

{

    for (auto & elem : if_list)

    {

        BatmanIf *batman_if = elem;

        schedule_own_packet(batman_if);

    }

 

    simtime_t curr_time = simTime();

    simtime_t select_timeout = forw_list[0]->send_time > curr_time ? forw_list[0]->send_time : curr_time+10;

    cancelEvent(timer);

    scheduleAt(select_timeout, timer);

    scheduleNextEvent();

    return true;

--
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.
Visit this group at https://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages