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

[ns] Re: qlim for sat repeater example



On Thu, 21 Dec 2000, Tom Henderson wrote:

> Haroldo,
> you have discovered a bug.  Here is the fix:
> 
> softball:~/mash/ns-2/tcl/lib> diff ns-sat.tcl ns-sat.tcl.good
> 350c350
> <       $ifq set qlim_ $qlen
> ---
> >       $ifq set limit_ $qlen

This is a good example of what can happen when you're changing
variable names...

Since hz asked the same thing of the ns list, forwarding a copy there
fyi.

L.

> Thanks,
> Tom
> 
> (lloyd, I'll go ahead and check this in)
> 
> > ---------- Forwarded message ----------
> > Date: Thu, 21 Dec 2000 08:21:53 -0300
> > From: haroldo zattar <[email protected]>
> > To: [email protected]
> > Subject: qlim for sat repeater example
> > 
> >    Hi sir
> > 
> > First I desire Merry christmas and a big new year. I am trying to modifie 
> > the qlim parameter but for all values that I use the result is the same. 
> > What is necessary to do to alterate the qlim and the results become 
> > different. I tried to put qlim from zero to high values and the result is 
> > the same. I wait you help.
> > Thank you
> > Zattar - Brazil
> > 
> > Simple script with a geostationary satellite and two terminals
> > # and an error module on the receiving terminal.  The traffic consists of
> > # a FTP source and a CBR stream
> > #
> > 
> > global ns
> > set ns [new Simulator]
> > $ns rtproto Dummy; # Using C++ routing agents and objects
> > 
> > # Global configuration parameters
> > 
> > global opt
> > set opt(chan)           Channel/Sat
> > set opt(bw_up)		2Mb; # Uplink bandwidth-- becomes downlink bw also
> > set opt(phy)            Phy/Sat
> > set opt(mac)            Mac/Sat
> > set opt(ifq)            Queue/DropTail
> > set opt(qlim)		50
> > set opt(ll)             LL/Sat
> > 
> > # XXX This tracing enabling must precede link and node creation
> > set f [open out.tr w]
> > $ns trace-all $f
> > 
> > # Set up satellite and terrestrial nodes
> > 
> > # GEO satellite at 95 degrees longitude West
> > set n1 [$ns satnode-geo-repeater -95 $opt(chan)]
> > 
> > # Two terminals: one in NY and one in SF
> > set n2 [$ns satnode-terminal 40.9 -73.9]; # NY
> > set n3 [$ns satnode-terminal 37.8 -122.4]; # SF
> > 
> > # Add GSLs to geo satellites
> > $n2 add-gsl geo $opt(ll) $opt(ifq) $opt(qlim) $opt(mac) $opt(bw_up) \
> >     $opt(phy) [$n1 set downlink_] [$n1 set uplink_]
> > $n3 add-gsl geo $opt(ll) $opt(ifq) $opt(qlim) $opt(mac) $opt(bw_up) \
> >     $opt(phy) [$n1 set downlink_] [$n1 set uplink_]
> > 
> > # Add an error model to the receiving terminal node
> > set em_ [new ErrorModel]
> > $em_ unit pkt
> > $em_ set rate_ 0.02
> > $em_ ranvar [new RandomVariable/Uniform]
> > $n3 interface-errormodel $em_
> > 
> > $ns trace-all-satlinks $f
> > 
> > # Attach agents for CBR traffic generator
> > set udp0 [new Agent/UDP]
> > $ns attach-agent $n2 $udp0
> > set cbr0 [new Application/Traffic/CBR]
> > $cbr0 attach-agent $udp0
> > $cbr0 set interval_ 6
> > 
> > set null0 [new Agent/Null]
> > $ns attach-agent $n3 $null0
> > 
> > $ns connect $udp0 $null0
> > 
> > # Attach agents for FTP
> > set tcp1 [$ns create-connection TCP $n2 TCPSink $n3 0]
> > set ftp1 [$tcp1 attach-app FTP]
> > $ns at 7.0 "$ftp1 produce 100"
> > 
> > # We use centralized routing
> > set satrouteobject_ [new SatRouteObject]
> > $satrouteobject_ compute_routes
> > 
> > $ns at 1.0 "$cbr0 start"
> > 
> > $ns at 100.0 "finish"
> > 
> > proc finish {} {
> > 	global ns f
> > 	$ns flush-trace
> > 	close $f
> > 
> > 	exit 0
> > }
> > 
> > $ns run

<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>