Showing posts with label linkdelay. Show all posts
Showing posts with label linkdelay. Show all posts

Thursday, October 3, 2013

Change delay of link NS2


Let us say, we have two nodes called $node3 and $node4. To get your link, use
set myLink [[$ns link $n(0) $n(1)] link]
Note that this is not just the link, it is the link_ within the Link (manual page 68 http://www.isi.edu/nsnam/ns/doc/ns_doc.pdf or html version http://www.isi.edu/nsnam/ns/doc/node63.html). This is the part that manages the link delay. In order to change the link delay, use
$myLink set delay_ 1ms
This part can be found in ns-2.35/tcl/lib/ns-link.tcl