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) |
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". - |
* 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". - |
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??
|
← #4 .
Which tcl file differs ? A file name, please. |
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" .
|
← #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". - |
Thanks for the brief description . . .
|
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.
|
← #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 |
thanks :)
|
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. |
All times are GMT -5. The time now is 01:06 PM. |