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

Re: [ns] why can't I use ST multicast mode in ns ? (fwd)



I am vey glad that you could help me. 
The following is my script and the error reported by ns.

script file

set ns [new Simulator]
$ns multicast

set f [open out.tr w]
$ns trace-all $f
$ns namtrace-all [open out.nam w]

$ns color 1 red
# prune/graft packets
$ns color 30 purple
$ns color 31 green

set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
set n4 [$ns node]

# Use automatic layout
$ns duplex-link $n0 $n1 1.5Mb 10ms DropTail
$ns duplex-link $n1 $n2 1.5Mb 10ms DropTail
$ns duplex-link $n2 $n3 1.5Mb 10ms DropTail
$ns duplex-link $n3 $n4 1.5Mb 10ms DropTail
$ns duplex-link $n4 $n0 1.5Mb 10ms DropTail

# error in the following line
$ns mrtproto ST

set group1 [Node allocaddr]
set cbr0 [new Application/Traffic/CBR]
set udp0 [new Agent/UDP]
$cbr0 attach-agent $udp0
$ns attach-agent $n1 $udp0
$udp0 set dst_addr_ $group1
$udp0 set dst_port_ 0

set rcvr [new Agent/LossMonitor]
$ns attach-agent $n2 $rcvr
$ns at 1.2 "$n2 join-group $rcvr $group1"
$ns at 1.25 "$n2 leave-group $rcvr $group1"
$ns at 1.35 "$n2 join-group $rcvr $group1"


$ns at 1.0 "$cbr0 start"

$ns at 2.0 "finish"

proc finish {} {
 global ns
 $ns flush-trace

 puts "running nam..."
 exec nam out.nam &
 exit 0
}

$ns run


error reported by ns

invalid command name "ST"
    while executing
"ST create _o155 _o3 _o38"
    invoked from within
"catch "$className create $o $args" msg"
    (procedure "new" line 3)
    invoked from within
"new $mproto $self $node"
    (procedure "_o3" line 2)
    (Simulator mrtproto-iifs line 2)
    invoked from within
"$self mrtproto-iifs $mproto $Node_($n) """
    (procedure "_o3" line 23)
    (Simulator mrtproto line 23)
    invoked from within
"$ns mrtproto ST"
    (file "st.tcl" line 28)