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
>   

Reply via email to