[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Question: ErrorModel/Uniform
Hi! everyone.
I have a simple error model tcl script. It runs successfully.
###############
set ns [new Simulator]
set f [open err.tr w]
$ns trace-all $f
set n0 [$ns node]
set n1 [$ns node]
$ns duplex-link $n0 $n1 1.5Mb 10ms DropTail
set cbr [new Agent/CBR]
$ns attach-agent $n0 $cbr
set recv [new Agent/LossMonitor]
$ns attach-agent $n1 $recv
$ns connect $cbr $recv
(change)
set em [new ErrorModel] ===> set em
[new ErrorModel/Uniform]
$em set rate_
3.0 $em set
rate_ 3.0
set rv [new RandomVariable/Uniform] $rv set
min_ 0.0
$rv set min_
0.0 $rv set
max_ 1.0
$rv set max_ 1.0
$em ranvar $rv
set tr [$ns create-trace Loss $f $n0 $n1]
$em drop-target $tr
$ns lossmodel $em $n0 $n1
#################################
But When i did change part of ErrorModel to ErrorModel/Uniform, i found
the error.
no value given for parameter "rate" to "_o33"
(ErrorModel/Uniform init line 1)
invoked from within
"_o33 init "
(Class create line 1)
invoked from within
"ErrorModel/Uniform create _o33 "
invoked from within
"catch "$className create $o $args" msg"
(procedure "new" line 3)
invoked from within
"new ErrorModel/Uniform"
(file "err-m3.tcl" line 22)
If anyone of ns users can help me in this regard, i will appreciate..
Regards..
Deok-Young
begin: vcard
fn: Deok-young Lee
n: Lee;Deok-young
email;internet: [email protected]
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard