[ns] Asking about TTL and set TTL in wireless network

2010-04-15 Thread darkblue winnie
Hi, I am currently implementing an protocol on ip layer in wireless network on ns2. I have the AODV as my routing protocol and 802.11 MAC as my mac layer. Above on the these two protocol, I inherited the Agent class to write my own protocol. I try to set TTL in my own protocol by set ih-ttl_ =

[ns] Asking about Energy Model

2010-04-06 Thread darkblue winnie
Hi, I am trying to use the energy model to track the energy consumption of my protocol in wireless networks. I have the 802.11 as the MAC layer and AODV as routing protocol. Then, above on them, I implemented my own protocol. The problem is that I do not know how to use the Energy Model

[ns] How to set a mobile node into sleep mode and how to wake it up?

2010-04-06 Thread darkblue winnie
Hi, I am trying to use the energy model to track the energy consumption of my protocol in wireless networks. I have the 802.11 as the MAC layer and AODV as routing protocol. Then, above on them, I implemented my own protocol. I need to also monitor the energy consumption for the protocol in

Re: [ns] energy of mobile node

2010-03-25 Thread darkblue winnie
I don't know what you exactly mean... Energy is a dynamic value. It decreases throughout the simulation process. If you just want to know the energy value, you can find it in the trace file after the simulation... Almost every line of packet log contains the energy details at that time. In my

Re: [ns] Is there any way to SHUTDOWN a MobileNode?

2010-03-25 Thread darkblue winnie
off? something like # tell all nodes when the simulation ends for { set i 0 } { $i $opt(nn) } { incr i } { $ns_ at $opt(stop).0 $node_($i) reset; } att, sergio On Wed, Mar 24, 2010 at 9:43 AM, darkblue winnie darkblue.win...@gmail.com wrote: Hi, I am

[ns] Is there any way to SHUTDOWN a MobileNode?

2010-03-24 Thread darkblue winnie
Hi, I am currently implementing a protocol in wireless network. I use 802.11 as MAC, AODV as the routing protocol, and also use the Energy_Model to track energy. Now I have finished the basic protocol and want to do a simulation. But I need to shutdown a MobileNode during the simulation, which

Re: [ns] Is there any way to SHUTDOWN a MobileNode?

2010-03-24 Thread darkblue winnie
nodes when the simulation ends for { set i 0 } { $i $opt(nn) } { incr i } { $ns_ at $opt(stop).0 $node_($i) reset; } att, sergio On Wed, Mar 24, 2010 at 9:43 AM, darkblue winnie darkblue.win...@gmail.com wrote: Hi, I am currently implementing a protocol in wireless network. I

[ns] Asking About Nam, skipping line in nam trace file

2010-03-19 Thread darkblue winnie
Hi, Currently I am developing my own protocol on NS-2 in wireless networks. I try to execute a tcl command in my C++ code to add a box on an existing nodes. I use the following command: Tcl tcl = Tcl::instance(); sprintf(tcl.buffer(), $node_(%d) add-mark m0 red box, id); And I check