Re: [ns] idle/sleep state
If you are using the protocol at 'ns-2.29/diffusion' (old), I think you can use the commands 'on' and 'off' as it is there. If you wanna use the 'diffusion3/' protocol, then you should remove the call to 'reset-state' in the command 'off' at mobilenode.cc. []s Super Torresmo wrote: > 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] > <mailto:[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 > <http://tagus.inesc-id.pt/%7Epestrela/ns2/ns2_debugging3.html> > > Pedro Vale Estrela wrote: > > > >> -Original Message- > >> From: [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> [mailto: > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>] On Behalf > >> Of Julian Monteiro > >> Sent: segunda-feira, 4 de Setembro de 2006 15:40 > >> To: Alex Triffitt > >> Cc: ns-users@ISI.EDU <mailto:ns-users@ISI.EDU> > >> 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 <http://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 > <http://tagus.inesc-id.pt/%7Epestrela/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 > >>> > >>> > > > > > > > >
Re: [ns] idle/sleep state
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: ns-users@ISI.EDU > >> 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 > >>> > >>> > > > > > > > >
Re: [ns] idle/sleep state
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: ns-users@ISI.EDU >> 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 >>> >>> > > >
Re: [ns] idle/sleep state
> -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: ns-users@ISI.EDU > 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 > >
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); 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? 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 >
Re: [ns] idle/sleep state
I'm also trying to do this, but I didn't find ou yet if it is possible... On 8/30/06, Alex Triffitt <[EMAIL PROTECTED]> 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 >
[ns] idle/sleep state
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