[Click] nsclick: runclick patch
Michael Neufeld
mneufeld at bbn.com
Wed Jun 28 14:17:30 EDT 2006
Hi-
It's been a while, but as I recall I didn't make "$ns_ run" do the
runclick purely as an end-user control issue. I had a notion that I
might want to delay the start of some or all nodes until some later
point in the simulation so didn't add code to start them all
automatically. Of course, that kind of delayed start could easily be
accomplished with the write handlers now (not part of the first nsclick
rev), so I don't think there's any reason not to automatically start up
the click routers when the simulation starts.
I'd try adding the functionality by overriding the MobileNode "reset"
method in the ClickNode subclass and calling runclick after doing
whatever other "reset" stuff the MobileNode superclass needs to have
done. The "reset" method on each node gets called once when first
running the simulation, and I don't think it gets called after that. I
should have some time to reconstitute my nsclick dev environment and
give it a shot over the next day or two if nobody else gets to it first.
-Mike
Eddie Kohler wrote:
> Hi Bart,
>
> Applied, but this is kind of a shame. Why doesn't "$ns_ run" do the runclicks
> automatically? Could that be arranged?
>
> Eddie
>
>
> Bart Braem wrote:
>
>>Hello,
>>
>>When using nsclick all nodes should be started with runclick. If not done a
>>very, very strange behaviour will occur. E.g. nodes that trace but do not
>>actively send packets.
>>This patch adds the required code to the sample scripts provided with the
>>nsclick patch. We also added an explanation on how to use nsclick to the
>>Click wiki.
>>
>>Bart
>>
>>--- ns-2.29-patch.orig 2006-06-27 11:02:43.000000000 +0200
>>+++ ns-2.29-patch 2006-06-27 11:05:28.000000000 +0200
>>@@ -4575,10 +4575,12 @@
>> +#
>> +for {set i 0} {$i < $wirelessnodecount} {incr i} {
>> + $ns_ initial_node_pos $wireless_node_($i) 10
>>++ [$wireless_node_($i) entry] runclick
>> +}
>> +
>> +for {set i 0} {$i < $wirednodecount} {incr i} {
>> + $ns_ initial_node_pos $wired_node_($i) 10
>>++ [$wired_node_($i) entry] runclick
>> +}
>> +
>> +$ns_ initial_node_pos $bridge_node_ 10
>>@@ -4956,6 +4958,7 @@
>> +#
>> +for {set i 0} {$i < $nodecount} {incr i} {
>> + $ns_ initial_node_pos $node_($i) 20
>>++ [$wired_node_($i) entry] runclick
>> +}
>> +
>> +#
>>@@ -5254,6 +5257,7 @@
>> +#
>> +for {set i 0} {$i < $nodecount} {incr i} {
>> + $ns_ initial_node_pos $node_($i) 20
>>++ [$node_($i) entry] runclick
>> +}
>> +
>> +#
>>
>>
>>------------------------------------------------------------------------
>>
>>_______________________________________________
>>click mailing list
>>click at amsterdam.lcs.mit.edu
>>https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>
--
*******************************
Michael J. Neufeld, Ph.D.
Network Scientist
BBN Technologies
10 Moulton St.
Cambridge, MA 02138
http://www.bbn.com
*******************************
More information about the click
mailing list