[ns] Re: Mobiwan, How to print X Y Z from node ?

Warodom Werapun ple at graduate.kmitl.ac.th
Fri May 7 09:33:56 PDT 2004


    No.  My trace file was generated from ns2.1b6 and using nam trace 
file with nam ( 2.1b9 ) without any errors.
With the help of Ali, I can see mobile IPv6 movement.  See the 
modification below...

-------------------
You need to change from *$ns namtrace-all $namf* to *$ns 
namtrace-all-wireless $namf 800 800*. However, doing this the NAM layout 
will be destroyed a bit and you have to move the nodes in NAM manually 
by pressing the EDIT button and zooming in and out.

Also add these two lines so you can see the packet flow: *
$ns node-config -macTrace ON
$ns node-config -routerTrace ON*
-----------------



Anjana Sharma wrote:

>Hello
>   It seems u r using ns2.1b. when I run "simple-wireless.tcl" in ns2.1b9,
>I gett the error" routes not comouted". Pls do let me know, if u know
>about it.
>
>Thanks
>Ajana
>
>
>  
>
>>    Thank you Ali and Larbi.  :)
>>
>>    
>>
>>>>   I notices, when I change position of nodes (in simple-mipv6.tcl),
>>>>no any changes with all nodes position.
>>>>        
>>>>
>>>Do you mean that you cannot see the mobile node movement in NAM? Then
>>>the problem might be the NAM version which is included in the allinone
>>>version of ns-2.1b6(a). Download and install a newer NAM version and
>>>you will see the mobile nodes move.
>>>      
>>>
>>       Yes, I try to used nam (from ns-2.1b9a).  It's still freeze.  I
>>cannot see any nodes movement except packets movement.  On the
>>otherhand, I'm not sure that mobiwan script (simple-mipv6.tcl)  provide
>>node movement? and I don't see the mobile node in NAM too.
>>Have you ever seen the mobile node in NAM , created by simple-mipv6.tcl ?
>>
>>    
>>
>>>So, I like to check out the actual position of nodes.  How I can
>>>print  X Y Z arguments from local_node ( mobile_ )  ? Try this:
>>>*puts "x=[$local_node set X_]"*
>>>      
>>>
>>    It works!!  :)   but If I like to print  X_  from "mobile_"
>>instance.  I mean, I print X_ from simple-mipv6.tcl file.  Is it
>>possible to do? because I notices that mobile_ node receives the return
>>of $local_node.
>>
>>    
>>
>>>>>/script/simple-mipv6.tcl
>>>>>          
>>>>>
>>>>set mobile_ [create-mobile 1.1.1 1.1.0 100 100  1 0.01]
>>>>
>>>>--------------------
>>>>
>>>>        
>>>>
>>>>>/src/lib/proc-mipv6-config.tcl
>>>>>          
>>>>>
>>>>proc create-mobile {home_addr ha_addr X Y Z random args} {
>>>>  global ns
>>>>  def_mobile_config
>>>>
>>>>  # Home site
>>>>  set channel [set_channel_by_addr $home_addr]
>>>>  $ns set chan $channel
>>>>  set local_node [$ns node $home_addr]
>>>>  $local_node set-ha $ha_addr
>>>>  $local_node set X_ $X
>>>>  $local_node set Y_ $Y
>>>>  $local_node set Z_ $Z
>>>>        
>>>>
>>>*puts "x=[$local_node set X_]"*
>>>
>>>      
>>>
>>>>  $local_node random-motion $random
>>>>
>>>>  set start [lindex $args 0]
>>>>
>>>>  if { $random !=  } {
>>>>       $ns at $start "$local_node start"
>>>>  }
>>>>  return $local_node
>>>>}
>>>>        
>>>>
>>--
>>
>>Warodom  Werapun
>>PGP:  http://plex.coe.psu.ac.th/myPGP.txt
>>
>>
>>    
>>
>
>
>  
>


-- 
Warodom  Werapun
PGP:  http://plex.coe.psu.ac.th/myPGP.txt




More information about the Ns-users mailing list