[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: possible bug found in simplex duplex link creation



Damon,

The simplex-link and duplex-link do not return a handle to the
newly created link.   You need to query the handle separately, and
use the queue{} method on that handle.

One of the following will work for you:

$ns simplex-link $n0 $n1 1Mb 10ms DropTail
set queue1 [[$ns link $n0 $n1] queue]

or

$ns duplex-link $n0 $n1 1Mb 10ms DropTail
set queue01 [[$ns link $n0 $n1] queue]
set queue10 [[$ns link $n1 $n0] queue]

It is a coincidence that the duplex-link returns a handle to a link.
There is no guarantee that it will work in this manner.


Kannan

PS:  To query queue sizes, check out the documentation on the
queue-limit method.


>>> From: damon <[email protected]>
>>> Date: Thu, 26 Feb 1998 00:43:21 EST

> I found some interesting behavior when it comes to creating links...
> 
> I want to create two simplex links and gain access to the queues to monitor and
> change their size...
> So, here's what I did...
> 
> >>set link1 [$ns simplex-link $n0 $n1 1Mb 10ms DropTail]
> >>set link2 [$ns simplex-link $n0 $n1 1Mb 10ms DropTail]
> 
> now, it states in the manual to get the handle for the queue I must call
> queue{}.
> So, here's what I put in...
> 
> >>set queue1 [$link1 queue]
> 
> Here's the error I get
> 
> >>invalid command name ""
> >>      while executing
> >>"$link1 queue"
> 
> Now,  if I change my link creation to one duplex link, everything works fine...
> 
> >>set link [$ns duplex-link $n0 $n1 1Mb 10ms DropTail]
> >>set queue1 [$link queue]
> >>puts "queue size1- [$queue1 set limit_]"
> 
> my output
> 
> >>queue size1- 50
> 
> What am I doing wrong that I cannot duplicate this for two simplex links?
> 
> Thanks,
> Damon
> 
> 
> 
> 

--
[email protected]
http://www.isi.edu/~kannan