LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 08-28-2016, 01:17 PM   #1
samira das
LQ Newbie
 
Registered: Aug 2016
Posts: 3

Rep: Reputation: Disabled
Error in tcl script while testing a video using evalvid


hi,
iam using Evalvid tool to test quality of a video in a wireless networks. I have properly followed the steps in the installation of evalvid and it seems that my installation is proper. But when iam trying to execute a tcl script iam getting the following errors:
invalid command name "Agent/myUDP"
while executing
"Agent/myUDP create _o59 "
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new Agent/myUDP"
invoked from within
"set udp_(0) [new Agent/myUDP]

My tcl scipt is as follows:-
set ns [new Simulator]
set tracefd [open out.tr w]
$ns trace-all $tracefd
set max_fragmented_size 1000
#add udp header(8 bytes) and IP header (20bytes)
set packetSize 1028
set s1 [$ns node]
set r1 [$ns node]
set r2 [$ns node]
set d1 [$ns node]
$ns duplex-link $s1 $r1 10Mb 1ms DropTail
$ns simplex-link $r1 $r2 0.18Mb 10ms DropTail
$ns simplex-link $r2 $r1 0.18Mb 10ms DropTail
$ns duplex-link $r2 $d1 10Mb 1ms DropTail
set qr1r2 [[$ns link $r1 $r2] queue]
$qr1r2 set limit_ 10
set udp1 [new Agent/myUDP]
$ns attach-agent $s1 $udp1
$udp1 set packetSize_ $packetSize
$udp1 set_filename sd_be
set null1 [new Agent/myUdpSink2]
$ns attach-agent $d1 $null1
$ns connect $udp1 $null1
$null1 set_trace_filename rd_be
set original_file_name st
set trace_file_name video1.dat
set original_file_id [open $original_file_name r]
set trace_file_id [open $trace_file_name w]
set frame_count 0
set last_time 0
while {[eof $original_file_id] == 0} { gets $original_file_id current_line
scan $current_line "%d%s%d%s%s%s%d%s" no_ frametype_ length_ tmp1_ tmp2_ tmp3_
tmp4_ tmp5_
# 30 frames/sec. (1 sec -> 1000000us)
set time [expr 1000 * 1000/30]
if { $frametype_ == "I" } set type_v 1
if { $frametype_ == "P" } set type_v 2
if { $frametype_ == "B" } set type_v 3
if { $frametype_ == "H" } set type_v 1
puts $trace_file_id "$time $length_ $type_v $max_fragmented_size"
incr frame_count }
close $original_file_id
close $trace_file_id
set end_sim_time [expr 1.0 * 1000/30 * ($frame_count + 1) / 1000]
puts "$end_sim_time"
set trace_file [new Tracefile]
$trace_file filename $trace_file_name
set video1 [new Application/Traffic/myTrace2]
$video1 attach-agent $udp1
$video1 attach-tracefile $trace_file
proc finish {} { global ns nd
$ns flush-trace
close $nd
exit 0 }
$ns at 0.0 "$video1 start"
$ns at $end_sim_time "$video1 stop"
$ns at [expr $end_sim_time + 1.0] "$null1 closefile"
$ns at [expr $end_sim_time + 1.0] "finish"
$ns run

Iam not getting what is this error.should i make any changes in Makefile.in or any file so that this code executes properly??
please can anyone find solution to my problem...
Thanking you,
Samira Das.

Last edited by samira das; 08-29-2016 at 08:01 AM.
 
Old 08-28-2016, 01:46 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,944

Rep: Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693
Duplicate; reported
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Error in tcl script while testing a video using evalvid samira das Linux - Newbie 0 08-29-2016 09:44 PM
Integration of ns-2.35 and EvalVid 2.7: Problem with tcl jjfotso Linux - Software 0 08-18-2016 08:48 PM
Tcl/Tk Error in startup script: too may nested evaluations(infnite loop?) Tchiarot Programming 2 09-03-2015 06:03 PM
error in implementing gaf in tcl script ranjithap Linux - Newbie 1 04-22-2014 02:35 AM


All times are GMT -5. The time now is 12:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration