LinuxQuestions.org
Help answer threads with 0 replies.
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


Reply
  Search this Thread
Old 11-01-2014, 09:09 AM   #1
Md Zishan Khan
LQ Newbie
 
Registered: Oct 2014
Location: West Bengal, INDIA
Posts: 16

Rep: Reputation: Disabled
getting error in NS 2.34 while running a tcl file


num_nodes is set 100

(_o14 cmd line 1)
invoked from within
"_o14 cmd addr"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o14" line 2)
(SplitObject unknown line 2)
invoked from within
"_o14 addr"
("eval" body line 1)
invoked from within
"eval $node addr $args"
("default" arm line 2)
invoked from within
"switch -exact $routingAgent_ {
DSDV {
set ragent [$self create-dsdv-agent $node]
}
DSR {
$self at 0.0 "$node start-dsr"
}
AODV {
set ragent [$self cre..."
(procedure "_o3" line 14)
(Simulator create-wireless-node line 14)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns node"
("for" body line 2)
invoked from within
"for {set i 0} {$i < $val(nn) } { incr i } {
set mnode_($i) [$ns node]
}"
(file "wfrp_802_15_4.tcl" line 74)
 
Old 11-01-2014, 11:48 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,629

Rep: Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267
Welcome to LQ.

The file "wfrp_802_15_4.tcl" is an "WFRP protocol simulation".
`wfrp_802_15_4.tcl', line 11 : set val(rp) WFRP ;# protocol type


WFRP, "ns-2.34 imp-protocol"
https://code.google.com/p/ns-allinon...-imp-protocol/
→ → https://code.google.com/p/ns-allinon..._15_4.tcl?r=15
→ Checkout https://code.google.com/p/ns-allinon...ource/checkout

HOWTO wfrp, build example :
$ tar xvf ns-allinone-2.34.tar.gz
$ svn checkout http://ns-allinone-2-34-imp-protocol...com/svn/trunk/ ns-allinone-2-34-imp-protocol-read-only
$ cd ns-allinone-2.34/
$ mv ns-2.34/ ns-2.34-orig
$ cp ../ns-allinone-2-34-imp-protocol-read-only/src/ns-2.34/ ./
$ export CC=gcc-4.4 CXX=g++-4.4 && ./install
$ cd ns-2.34/
$ cp ns ns-wfrp
# cp ns-wfrp /usr/local/bin/

* Edit line 111 in wfrp_802_15_4.tcl to :
exec nam nam-wfrp-802-15-4.nam &

Run the simulation : $ ns-wfrp wfrp_802_15_4.tcl
.. The simulation looks OK, the files nam-wfrp-802-15-4.nam 10.1 kB,
+ trace-wfrp-802-15-4.tr 6.5 kB are created,
.. the NAM window opens OK, and displays a nice "plot".

-
 
Old 11-01-2014, 12:25 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,629

Rep: Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267
* There is another added protocol in "ns-2.34 imp-protocol" : XFXVanets.

Please see the folder ns-2.34/avanets/ :
Two examples : example.tcl, trab.tcl
.. which can also be run with the executable "ns-wfrp".


-
 
Old 11-09-2014, 06:28 AM   #4
Md Zishan Khan
LQ Newbie
 
Registered: Oct 2014
Location: West Bengal, INDIA
Posts: 16

Original Poster
Rep: Reputation: Disabled
Problem is solved, Now my wfrp protocol is working but I saw that the tcl file has been slightly chaged from the real one . . . why??
 
Old 11-09-2014, 08:25 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,629

Rep: Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267
← #4 .

Which tcl file differs ?

A file name, please.
 
Old 11-10-2014, 01:28 AM   #6
Md Zishan Khan
LQ Newbie
 
Registered: Oct 2014
Location: West Bengal, INDIA
Posts: 16

Original Poster
Rep: Reputation: Disabled
The wfrp_802_15_4.tcl while which is in the path "ns-allinone-2-34-imp-protocol-read-only/src/ns-2.34/wfrp/tcl" is slightly different from the same file that is in the path - "ns-allinone-2-34-imp-protocol-read-only/src/ns-2.34/wfrp" .

Last edited by Md Zishan Khan; 11-10-2014 at 01:29 AM.
 
Old 11-10-2014, 05:38 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,629

Rep: Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267
← #6 :

Well, text files like wfrp_802_15_4.tcl can easily be read,
or you can do $ diff -Nau wfrp/tcl/wfrp_802_15_4.tcl wfrp/wfrp_802_15_4.tcl
to get the difference. Save a diff text file :
$ diff -Nau wfrp/tcl/wfrp_802_15_4.tcl wfrp/wfrp_802_15_4.tcl >> file.diff

Hints : One file is 3 nodes, the other 100 nodes.
One is edited for nam files → See post #2, "edit line 111".
The other one will probably not produce any <out>.nam .
* Please read the files.

In the perfect situation, you would have two files with different names,
.. like wfrp_802_15_4-3node.tcl, wfrp_802_15_4-100node.tcl .

Many of the ns2 protocols you can find on the Internet,
are made by young students, using ns2 etc. for the first time.
Not always "the perfect code".

-
 
Old 11-10-2014, 06:07 AM   #8
Md Zishan Khan
LQ Newbie
 
Registered: Oct 2014
Location: West Bengal, INDIA
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thanks for the brief description . . .
 
Old 11-10-2014, 06:09 AM   #9
Md Zishan Khan
LQ Newbie
 
Registered: Oct 2014
Location: West Bengal, INDIA
Posts: 16

Original Poster
Rep: Reputation: Disabled
I have a personal question . I am new for NS and I want to learn that how to create a new protocol, and what are the major facts that I have to study for it.
 
Old 11-10-2014, 06:53 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,629

Rep: Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267
← #9 .

Google .. how to create a new routing protocol in ns2 ..
https://www.google.com/webhp?hl=all&...rotocol+in+ns2

Ns2 documentation http://www.isi.edu/nsnam/ns/doc/index.html
 
Old 11-10-2014, 06:56 AM   #11
Md Zishan Khan
LQ Newbie
 
Registered: Oct 2014
Location: West Bengal, INDIA
Posts: 16

Original Poster
Rep: Reputation: Disabled
thanks
 
Old 02-11-2016, 02:26 AM   #12
murali558
LQ Newbie
 
Registered: Feb 2016
Posts: 1

Rep: Reputation: Disabled
problem conffiguring my CBRp protocol

while configuring CBRP protocol in my ns-2.35 even after i got the .o files , i am getting these errors when i run the tcl file.

(_o14 cmd line 1)
invoked from within
"_o14 cmd addr"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o14" line 2)
(SplitObject unknown line 2)
invoked from within
"_o14 addr"
("eval" body line 1)
invoked from within
"eval $node addr $args"
("default" arm line 2)
invoked from within
"switch -exact $routingAgent_ {
DSDV {
set ragent [$self create-dsdv-agent $node]
}
DSR {
$self at 0.0 "$node start-dsr"
}
AODV {
set ragent [$self cre..."
(procedure "_o3" line 14)
(Simulator create-wireless-node line 14)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns node"
invoked from within
"set n(0) [$ns node]"
(file "20nodes.tcl" line 64)


please help me what changes i have to do.

Last edited by murali558; 02-11-2016 at 02:27 AM. Reason: have to add email notifications
 
  


Reply

Tags
imp-ns2, ns2, wfrp, xfxvanets


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
error while running tcl file on Antnet algorithm. R.Mosheca Linux - Software 0 07-31-2014 09:44 AM
[SOLVED] Error while running tcl file in ubuntu 12.04 mulyead Linux - Newbie 3 11-14-2013 11:30 AM
error running tcl file simulating mpolsr assassin91 Linux - Newbie 1 04-18-2012 09:35 AM
scheduler error in running tcl file humairaafzal73 Linux - Software 0 02-27-2012 10:17 AM
running of tcl error tootz Linux - Software 15 03-01-2011 12:08 AM


All times are GMT -5. The time now is 12:08 AM.

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