how to stop the "send hello " - scheduled event?

48 views
Skip to first unread message

Cyntia kh

unread,
May 31, 2012, 12:15:57 PM5/31/12
to ns-3-users
Hello,

Question : how to stop the sending me Hello packets in Olsr after a
certain period of time ?


I am creating my own routing protocol which is a modification of
OLSR .

I am dealing with a very particular network scenario. My nodes are
not moving, and none of them gets disconnected .

What I want to accomplish it :

Stop the sending of Hello messages after ensuring that the Olsr state
has the 1hop and 2 hop neighbor information.

I have added an accessor method to read the 1 hop and 2 hop
information from Olsr state.

I have noticed that these information are complete after around 15
seconds from starting OLsr.

How Do I stop the sending of OLSR hello messages. They are scheduled
to be sent each " m_helloInterval" time interval as you can see in
olsr-routing-protocol.cc lines 2721 - 2725 .

RoutingProtocol::HelloTimerExpire ()
{
SendHello ();
m_helloTimer.Schedule (m_helloInterval);

}


my other question is , once I am able to stop the olsr,, I want to
immediately schedule the call for another function that starts using
the 1hop and 2 hop information. so basically I want to stop the
Sending of Olsr hello messages at second 15 , and at the same second,
start call a new function.

i have looked at Simulator Class but couldnt figure out how to solve
my problem.

Cyntia kh

unread,
May 31, 2012, 7:21:33 PM5/31/12
to ns-3-users
ok i know how to simulate an event at time = 10, i just did this

Simulator::Schedule (Seconds (10),....)

but i still dont know how to stop the sending of hello messages.

any idea? thanks

phuchong kheawchaoom

unread,
May 31, 2012, 10:45:55 PM5/31/12
to ns-3-...@googlegroups.com
you just use if else condition to stop or use it in simplicity.


--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.


Reply all
Reply to author
Forward
0 new messages