LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   1 error when calling class OldSim: (http://www.linuxquestions.org/questions/linux-software-2/1-error-when-calling-class-oldsim-778662/)

Makrand Naik 12-29-2009 05:43 AM

1 error when calling class OldSim:
 
hi
i need to know how to run a tcl script on ns 2-30
ive installed it on fedora 9
the installation was succeessfull
and i have also set the path of the variables correctly
but whenever i start ns, and try to execute a tcl script
i get an error as 1 error when calling class OldSim:

Please tell me where am i wrong
and suggest a correct way to work this out

knudfl 12-30-2009 05:49 AM

Welcome to LQ.

Any particular reason to use the old ns-2.30 ?
The latest version is 2.34 , works OK on Fedora 9.

I never saw the error, you have.
How did ./validate turn out ?

Is it all tcl sripts, causing that error ?
Please try with some of the 300 scripts in ns-2.30/tcl/

Or use some of the examples e.g.
http://nile.wpi.edu/NS/simple_ns.html
from http://nile.wpi.edu/NS/

Or .. http://www.isi.edu/nsnam/ns/tutorial/
http://www.isi.edu/nsnam/ns/tutorial/nsscript1.html
http://www.isi.edu/nsnam/ns/tutorial.../example1b.tcl
etc. etc.
.....

noorzaman 06-05-2010 04:07 AM

OldSim error Recovery
 
This is not an error in actual, but this is a wrong attempt to execute your script file like following way.
Running script like this is not allowed , I mean it will generate the error ( $ ns

% ns examplename.tcl <~~~~ Please DON'T go like this )


Please run your script like this way.

$ ns examplename.tcl <~~~~ DO this way

Noor Zaman

zungeru 12-28-2010 10:55 AM

same trouble I am facing
 
Quote:

Originally Posted by noorzaman (Post 3993159)
This is not an error in actual, but this is a wrong attempt to execute your script file like following way.
Running script like this is not allowed , I mean it will generate the error ( $ ns

% ns examplename.tcl <~~~~ Please DON'T go like this )


Please run your script like this way.

$ ns examplename.tcl <~~~~ DO this way

Noor Zaman

I amalso facing the same trouble, pls help

set nf [open out.nam w]
$ns namtrace-all $nf

proc finish {} {
global ns nf
$ns flush-trace
close $nf
exec nam out.nam &
exit 0
}
set n0 [$ns node]
set n1 [$ns node]

$ns duplex-link $n0 $n1 1Mb 10ms DropTail

$ns at 5.0 "finish"

$ns run


zungeru@zungeru-AOA110:~$ ns example1.tcl
can't read "ns": no such variable
while executing
"$ns namtrace-all $nf"
(file "example1.tcl" line 2)
zungeru@zungeru-AOA110:~$

knudfl 12-28-2010 11:46 AM

Post # 4, @ zungeru : Welcome to LQ.

1) cd ns-allinone-2.34/ns-2.34/ ( Or whatever your version is ).
2) su ( or sudo 'make install', if you have Ubuntu.)
2a) make install : The binary 'ns' will be copied to /usr/local/bin/
... and ns will always be in your path.

The same can be done with nam : 'make install' will copy one file to
/usr/local/bin/ : 'nam'

..

Amithaspalan 03-10-2013 12:25 AM

class oldsim error
 
we have to run tcl script like this"xxxx@xxxx-PC:~$ns filename.tcl"


All times are GMT -5. The time now is 11:10 PM.