So, if I'm using the diffusion protocol, what should I do to turn nodes on and off?
On 9/4/06, Julian Monteiro <[EMAIL PROTECTED]> wrote: > > > I've misunderstood the results of that grep, I didn't realized that > these strcmp were the functions... sorry. > Now I see, the 'reset-state' command is only used in the directed > diffusion protocol from C. Intanagonwiwat. > > So, if I'm not using diffusion I can remove that line, or implement a > 'reset-state' in all protocols I want to simulate. > ... but this is not the time for a patch. > > Best regards, > Julian > p.s. this is a very good page, thanks! : > http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging3.html > > Pedro Vale Estrela wrote: > > > >> -----Original Message----- > >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf > >> Of Julian Monteiro > >> Sent: segunda-feira, 4 de Setembro de 2006 15:40 > >> To: Alex Triffitt > >> Cc: [email protected] > >> Subject: Re: [ns] idle/sleep state > >> > >> > >> Hello Alex, > >> > >> I'm not sure if this is the best solution, but you can use the 'on' and > >> 'off' commands in the mobile node to put it to sleep. > >> Unfortunately these commands doesn't work.in NS2 off the box (as of > >> version 2.29.3) > >> > >> To do so, you need comment out a call to a unexistent tcl function in > >> the line 202 of ns-2.29/common/mobilenode.cc : > >> // Remove this line. I didn't found this function anywhere!. > >> // tcl.evalf("%s reset-state", str); > >> > > > > ns2> grep "reset-state" */*.cc > > > > this function is defined in diffusion/diffusion.cc , flodding.cc and > > omni-cast.cc > > > > > > > >> After that, to put a node to sleep, mix the commands 'on' and 'off' in > >> the scenery model, e.g: > >> $ns_ at 3.0 "$node_(0) off" > >> $ns_ at 10.0 "$node_(0) on" > >> > >> Also, the Energy Model must be enabled to use that, i.e, put above line > >> in node configuration: > >> -energyModel EnergyModel > >> > >> > > > > > > > >> Best Regards, > >> Julian > >> p.s. How do I submit this patch to the NS2 tree? > >> > > > > An excellent question indeed. > > Short answer: > > diff -C3 "original file" "modified file" > idle.patch > > > > persons are able to apply your patch using > > cat idle.patch | patch > > > > > > longer answer: > > check step 7 of > > http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging3.html > > > > if you have more questions please ask; however, please submit your patch > > only after you are sure what is that "reset-state" code about! > > > > Pedro Vale Estrela > > > > > > > > > > > > > > > > > > > >> Alex Triffitt wrote: > >> > >>> I am wanting to put a node into a idle/sleeping state where it will > not > >>> > >> listen for transmitted packets and to all intense and purposes is not > >> participating in the MANET i've created. Could someone possiblely tell > me > >> how this is done or point out where I can find out how to do this > >> > >>> Kindest regardsAlex > >>> > >>> > > > > > > > >
