[ns] reg : Linking errors
Hai Everybody, For linking the c++ code with otcl script, I have included the C++ code and it's object file under the ns2 directory and used make command to re-compile it for the changes included. But it is producing the following errors ... So, Kindly suggest me some guidelines regarding this [r...@localhost ns-2.34]# g++ -c greedy4.c++ linkage.tcl:1: error: ‘set’ does not name a type agent.h:37: error: expected class-name before ‘{’ token greedy4.c++:35: error: extra qualification ‘GreedyBound::’ on member ‘readmatrix’ greedy4.c++:35: error: ‘void GreedyBound::readmatrix()’ cannot be overloaded greedy4.c++:21: error: with ‘void GreedyBound::readmatrix()’ greedy4.c++:56: error: extra qualification ‘GreedyBound::’ on member ‘distance’ greedy4.c++:56: error: ‘void GreedyBound::distance()’ cannot be overloaded greedy4.c++:19: error: with ‘void GreedyBound::distance()’ greedy4.c++:69: error: extra qualification ‘GreedyBound::’ on member ‘greedy’ greedy4.c++:69: error: ‘void GreedyBound::greedy(int)’ cannot be overloaded greedy4.c++:20: error: with ‘void GreedyBound::greedy(int)’ greedy4.c++:108: error: extra qualification ‘GreedyBound::’ on member ‘findangle’ greedy4.c++:108: error: ‘void GreedyBound::findangle(double, double, double)’ cannot be overloaded greedy4.c++:23: error: with ‘void GreedyBound::findangle(double, double, double)’ greedy4.c++:159: error: extra qualification ‘GreedyBound::’ on member ‘display’ greedy4.c++:159: error: ‘void GreedyBound::display(int)’ cannot be overloaded greedy4.c++:22: error: with ‘void GreedyBound::display(int)’ greedy4.c++:184: error: expected class-name before ‘{’ token greedy4.c++:192: error: cannot define member function ‘GreedyBound::BsrAgent::BsrAgent’ within ‘GreedyBound’ greedy4.c++:201: error: cannot define member function ‘GreedyBound::BsrAgent::command’ within ‘GreedyBound’ greedy4.c++:210: error: cannot define member function ‘GreedyBound::BsrAgent::MyprivateFunc’ within ‘GreedyBound’ greedy4.c++:216: error: expected `}' at end of input greedy4.c++: In member function ‘void GreedyBound::readmatrix()’: greedy4.c++:37: error: ‘Tcl’ was not declared in this scope greedy4.c++:37: error: ‘tcl’ was not declared in this scope greedy4.c++:37: error: ‘Tcl’ is not a class or namespace greedy4.c++: In member function ‘void GreedyBound::distance()’: greedy4.c++:60: error: ‘Tcl’ was not declared in this scope greedy4.c++:60: error: ‘tcl’ was not declared in this scope greedy4.c++:60: error: ‘Tcl’ is not a class or namespace greedy4.c++: In member function ‘void GreedyBound::greedy(int)’: greedy4.c++:72: error: ‘Tcl’ was not declared in this scope greedy4.c++:72: error: ‘tcl’ was not declared in this scope greedy4.c++:72: error: ‘Tcl’ is not a class or namespace greedy4.c++:74: error: no matching function for call to ‘GreedyBound::GreedyBound()’ greedy4.c++:11: note: candidates are: GreedyBound::GreedyBound(const GreedyBound) greedy4.c++: In member function ‘void GreedyBound::findangle(double, double, double)’: greedy4.c++:111: error: ‘Tcl’ was not declared in this scope greedy4.c++:111: error: ‘tcl’ was not declared in this scope greedy4.c++:111: error: ‘Tcl’ is not a class or namespace greedy4.c++: In member function ‘void GreedyBound::display(int)’: greedy4.c++:161: error: ‘Tcl’ was not declared in this scope greedy4.c++:161: error: ‘tcl’ was not declared in this scope greedy4.c++:161: error: ‘Tcl’ is not a class or namespace greedy4.c++: In constructor ‘GreedyBound::BsrAgentClass::BsrAgentClass()’: greedy4.c++:186: error: class ‘GreedyBound::BsrAgentClass’ does not have any field named ‘TclClass’ greedy4.c++: In static member function ‘static TclObject* GreedyBound::BsrAgentClass::create(int, const char* const*)’: greedy4.c++:188: error: cannot convert ‘GreedyBound::BsrAgent*’ to ‘TclObject*’ in return greedy4.c++: At global scope: greedy4.c++:189: error: expected unqualified-id at end of input [r...@localhost ns-2.34] Thanking You, Gayathri Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/
[ns] reg : reading of files in tcl script
Hai Can anyone guide me in reading a file in tcl script of ns2. how the data in that file can be assigned to variable in tcl... to make changes in the output of nam. Thank You, Gayathri. The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
[ns] regarding packet header files
Hai... I have created a new packet header for my project regarding geographic routing protocol for adhoc networks. with this mail i have included my header file. #ifndef __bsr_h__ #define __bsr_h__ #include agent.h #define NETWORK_DIAMETER 8 // 8 hops // The followings are used for the forward() function. #define DELAY 1.0 #define NO_DELAY -1.0 #define ARP_DELAY 0.01 class BsrAgent : public Agent { public: int command(int argc, const char*const* argv); void greedy(int src); void readmatrix(); void findangle(double src,double next,double dest); void display(int src); }; #endif /* __bsr_h__ */ but while compilation it produces the following errors. bsr.h:5:19: error: agent.h: No such file or directory bsr.h:17: error: expected class-name before ‘{’ token can anyone guide me regarding this... Thank You, Gayathri. The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
[ns] regarding wireless scenario
Hai Everybody, Can anyone help me or provide some snapshots of routing in an wirless scenario. how the output will look like for wireless scenario. The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
[ns] regarding errors in packet.h
Hai everybody, I have included my protocol in packet.h predefined header file, but while compiling, it produces the following errors. please suggest me some guidelines for rectifying these errors. g++ packet.h In file included from config.h:24, from packet.h:7: tclcl.h:6:17: error: tcl.h: No such file or directory tclcl.h:8:18: error: otcl.h: No such file or directory tclcl.h:11:26: error: tclcl-config.h: No such file or directory tclcl.h:12:23: error: tracedvar.h: No such file or directory tclcl.h:126:28: error: tclcl-mappings.h: No such file or directory In file included from scheduler.h:4, from config.h:277, from packet.h:7: config.h:1:1: error: unterminated #ifndef In file included from /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/heap.h:58, from scheduler.h:88, from config.h:277, from packet.h:7: /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the X header for the X.h header for C++ includes, or iostream instead of the deprecated header iostream.h. To disable this warning use -Wno-deprecated. In file included from packet.h:7: config.h:1:1: error: unterminated #ifndef In file included from packet.h:10: bsd-list.h:44: error: stray ‘\’ in program bsd-list.h:44: error: stray ‘\’ in program In file included from packet.h:10: bsd-list.h:47:3: error: #endif without #if In file included from packet.h:11: packet-stamp.h:11:21: error: antenna.h: No such file or directory In file included from ns-process.h:6, from packet.h:12: config.h:1:1: error: unterminated #ifndef tclcl.h:23: error: ‘Tcl_Interp’ has not been declared tclcl.h:26: error: ISO C++ forbids declaration of ‘Tcl_Interp’ with no type tclcl.h:26: error: ‘Tcl_Interp’ declared as an ‘inline’ field tclcl.h:26: error: expected ‘;’ before ‘*’ token tclcl.h:51: error: expected `;' before ‘inline’ tclcl.h:55: error: ‘Tcl_CmdProc’ has not been declared tclcl.h:56: error: ‘ClientData’ has not been declared tclcl.h:57: error: ‘Tcl_CmdDeleteProc’ has not been declared tclcl.h:60: error: ‘Tcl_CmdProc’ has not been declared tclcl.h:61: error: ‘ClientData’ has not been declared tclcl.h:62: error: ‘Tcl_CmdDeleteProc’ has not been declared tclcl.h:111: error: ISO C++ forbids declaration of ‘TclObject’ with no type tclcl.h:111: error: expected ‘;’ before ‘*’ token tclcl.h:112: error: ‘TclObject’ has not been declared tclcl.h:113: error: ‘TclObject’ has not been declared tclcl.h:118: error: ISO C++ forbids declaration of ‘Tcl_Interp’ with no type tclcl.h:118: error: expected ‘;’ before ‘*’ token tclcl.h:123: error: ‘Tcl_HashTable’ does not name a type tclcl.h:72: error: ‘TCL_GLOBAL_ONLY’ was not declared in this scope tclcl.h: In member function ‘int Tcl::dark() const’: tclcl.h:25: error: ‘tcl_’ was not declared in this scope tclcl.h: In member function ‘char* Tcl::result() const’: tclcl.h:51: error: ‘tcl_’ was not declared in this scope tclcl.h: In member function ‘void Tcl::result(const char*)’: tclcl.h:53: error: ‘tcl_’ was not declared in this scope tclcl.h: In member function ‘void Tcl::CreateCommand(const char*, int*, int, int*)’: tclcl.h:58: error: ‘tcl_’ was not declared in this scope tclcl.h:58: error: ‘Tcl_CreateCommand’ was not declared in this scope tclcl.h: In member function ‘void Tcl::CreateCommand(int*, int, int*)’: tclcl.h:63: error: ‘tcl_’ was not declared in this scope tclcl.h:63: error: ‘Tcl_CreateCommand’ was not declared in this scope tclcl.h: In member function ‘void Tcl::DeleteCommand(const char*)’: tclcl.h:66: error: ‘tcl_’ was not declared in this scope tclcl.h:66: error: ‘Tcl_DeleteCommand’ was not declared in this scope tclcl.h: In member function ‘void Tcl::EvalFile(const char*)’: tclcl.h:69: error: ‘tcl_’ was not declared in this scope tclcl.h:69: error: ‘Tcl_EvalFile’ was not declared in this scope tclcl.h:69: error: ‘TCL_OK’ was not declared in this scope tclcl.h: In member function ‘const char* Tcl::var(const char*, int)’: tclcl.h:73: error: ‘tcl_’ was not declared in this scope tclcl.h:73: error: ‘Tcl_GetVar’ was not declared in this scope tclcl.h: In member function ‘void Tcl::add_error(const char*)’: tclcl.h:96: error: ‘interp’ was not declared in this scope tclcl.h:96: error: ‘Tcl_AddErrorInfo’ was not declared in this scope tclcl.h: In member function ‘const char* Tcl::rds(const char*, const char*) const’: tclcl.h:107: error: ‘tcl_’ was not declared in this scope tclcl.h:108: error: ‘TCL_GLOBAL_ONLY’ was not declared in this scope tclcl.h:108: error: ‘Tcl_GetVar2’ was not declared in this scope tclcl.h: At global scope: tclcl.h:140: error: ‘TracedVar’ has not been declared tclcl.h:142: error: ‘TracedInt’ has not been
[ns] regarding greedy forwarding
Hai Everybody, Can anyone help me in writing c++ code for Greedy Forwarding algorithm for routing purpose. The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
[ns] regarding implementation of geographic routing protocol for adhoc networks
Hai Everybody, I'm now in progress with implementation of geographic routing protocol for adhoc networks like GPSR, DREAM, LAR. I want to do some extensions of ns2 for the implementation. I have altered the packet header file called packet.h to include my protocol and also, i have included the header files such as config.h, scheduler.h... that are included in the packet.h. but while compilation it produced lots of error regarding the concepts of the header file, but i'm not sure about the concepts of the header files. please guide me regarding this. Thank You, Gayathri. The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
[ns] regarding performance measures
Hai. can anyone suggest me some guidelines regarding in measuring the performance of the base station while nodes attached to it increases. Also, suggest me some guidelines for creating base station. The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
[ns] regarding the header files
Hai.. I have altered the packet.h header file in order to add my routing protocol similar to GPSR and DREAM etc...similarly i have attached all the header files like config.h,autoconf.h, ns-process.h, scheduler.hthat are included in the packet.h header file.while i'm compiling the header file it is indicating lot of errors in the header files that are included in the packet.h. I am working with ns 2.34 version. so, kindly guide me to solve this problem. Thank You, Gayathri Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/
[ns] regarding my project
Hai, I don't know how to implement an algorithm in ns2.So, please suggest me some guidelines regarding algorithm implementation in ns2. Thank you, Gayathri. The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
[ns] Regarding angle traversal
Hai Everybody, What is the tcl command for defining the angle between two nodes.Please suggest me some guidelines regarding this. Thank you, Gayathri The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
[ns] Regarding angle traversal
Hai Everybody, I don't know how to calculate and maintain the cumulative angle traversed by the packet to reach destination. Please guide me in computing this calculation. The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
[ns] Regarding angle traversal
Hai Everybody, I don't know the computation of angle traversed by the packet to reach the destination. Please guide me in computing this angle traversal. Thank you, Gayathri. The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
[ns] regarding trace analysis
Hai Everybody, I hav written tcl script for creating 10 nodes in wireless topology.But while running the script the xgraph is not generated and i has open nam file in animater then it shows the simulation.I hereby attached my tcl script with this mail.pls suggest me some guidelines regarding the trace and nam files. set val(chan) Channel/WirelessChannel set val(prop) Propagation/TwoRayGround set val(netif) Phy/WirelessPhy set val(mac) Mac/802_11 set val(ifq) Queue/DropTail/PriQueue set val(ll) LL set val(ant) Antenna/OmniAntenna set val(ifqlen) 50 set val(nn) 10 set val(rp) DSDV set val(x) 500 set val(y) 400 set val(stop) 150 set ns [new Simulator] set tracefd [open fwd.tr w] set windowVsTime2 [open fwdg.tr w] set namtrace [open fwd.nam w] $ns trace-all $tracefd $ns namtrace-all-wireless $namtrace $val(x) $val(y) set topo [new Topography] $topo load_flatgrid $val(x) $val(y) set god [create-god 10] set chan_1_ [new $val(chan)] set chan_2_ [new $val(chan)] $ns node-config -adhocRouting $val(rp)\ -llType $val(ll)\ -macType $val(mac)\ -ifqType $val(ifq)\ -ifqLen $val(ifqlen)\ -antType $val(ant)\ -propType $val(prop)\ -phyType $val(netif)\ -channel $chan_1_\ -topoInstance $topo\ -agentTrace ON\ -routerTrace ON\ -macTrace ON\ -movementTrace ON for {set i 0} {$i $val(nn)} {incr i} { set node_($i) [$ns node] } $node_(0) set X_ 5.0 $node_(0) set Y_ 5.0 $node_(1) set X_ 200.0 $node_(1) set Y_ 5.0 $node_(2) set X_ 272.0 $node_(2) set Y_ 349.0 $node_(3) set X_ 40.0 $node_(3) set Y_ 263 $node_(4) set X_ 110.0 $node_(4) set Y_ 210.0 $node_(5) set X_ 450.0 $node_(5) set Y_ 300.0 $node_(6) set X_ 185.0 $node_(6) set Y_ 400.0 $node_(7) set X_ 20.0 $node_(7) set Y_ 220.0 $node_(8) set X_ 100.0 $node_(8) set Y_ 120.0 $node_(9) set X_ 300.0 $node_(9) set Y_ 270.0 $ns duplex-link $node_(0) $node_(1) 1Mb 10ms DropTail $ns duplex-link $node_(0) $node_(2) 1Mb 10ms SFQ $ns duplex-link $node_(1) $node_(2) 1Mb 10ms DropTail $ns duplex-link $node_(1) $node_(3) 1Mb 10ms SFQ $ns duplex-link $node_(2) $node_(3) 1Mb 10ms DropTail $ns duplex-link $node_(3) $node_(4) 1Mb 10ms SFQ $ns duplex-link $node_(4) $node_(5) 1Mb 10ms DropTail $ns duplex-link $node_(5) $node_(6) 1Mb 10ms SFQ $ns duplex-link $node_(6) $node_(7) 1Mb 10ms DropTail $ns duplex-link $node_(7) $node_(8) 1Mb 10ms SFQ $ns duplex-link $node_(8) $node_(9) 1Mb 10ms DropTail $ns node-config -adhocRouting $val(rp)\ -llType $val(ll)\ -macType $val(mac)\ -ifqType $val(ifq)\ -ifqLen $val(ifqlen)\ -antType $val(ant)\ -propType $val(prop)\ -phyType $val(netif)\ -channel $chan_1_\ -topoInstance $topo\ -agentTrace ON\ -routerTrace ON\ -macTrace ON\ -movementTrace ON $ns duplex-link-op $node_(0) $node_(1) orient right $ns duplex-link-op $node_(0) $node_(2) orient left-up $ns duplex-link-op $node_(1) $node_(2) orient left-up $ns duplex-link-op $node_(1) $node_(3) orient right-up $ns duplex-link-op $node_(2) $node_(3) orient right-up $ns duplex-link-op $node_(3) $node_(4) orient right-up $ns duplex-link-op $node_(4) $node_(5) orient right $ns duplex-link-op $node_(5) $node_(6) orient right $ns duplex-link-op $node_(6) $node_(7) orient right-down $ns duplex-link-op $node_(7) $node_(8) orient left-down $ns duplex-link-op $node_(8) $node_(9) orient left-down #$ns rtproto Static set tcp0 [new Agent/TCP/Newreno] $tcp0 set class_ 2 #$tcp set window_ 2000 #Agent/TCPSink/DelAck set interval_ 100ms set sink [new Agent/TCPSink] $ns attach-agent $node_(0) $tcp0 $ns attach-agent $node_(9) $sink $ns connect $tcp0 $sink $tcp0 set fid_ 1 set ftp [new Application/FTP] $ftp attach-agent $tcp0 $ns at 1.0 $ftp start proc record {tcp file} { global ns set time 0.1 set cwnd [$tcp set cwnd_] set now [$ns now] puts $file $now $cwnd $ns at [expr $now+$time] record $tcp $file } $ns at 1.1 record $tcp0 $windowVsTime2 for {set i 0} {$i $val(nn)} {incr i} { $ns initial_node_pos $node_($i) 30 } for {set i 0} {$i $val(nn)} {incr i} { $ns at $val(stop) $node_($i) reset; } $ns at $val(stop) $ns nam-end-wireless $val(stop) $ns at $val(stop) stop $ns at 150.01 puts \end simulation\ ; $ns halt proc stop {} { global ns tracefd namtrace $ns flush-trace close $tracefd close $namtrace exec nam $namtrace exec xgraph $tracefd -t Packet flow -x Time -y Packets exit 0 } $ns run Thanks
[ns] Regarding errors
Hai ns users, I wrote simple tcl script to create 10 nodes ,but i had come across with the following error. num_nodes is set 10 INITIALIZE THE LIST xListHead channel.cc:sendUp - Calc highestAntennaZ_ and distCST_ highestAntennaZ_ = 1.5, distCST_ = 550.0 SORTING LISTS ...DONE! end simulation I don't know the specific reason behind this error.So pls guide me to overcome this problem. The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
[ns] regarding packet forwarding mechanism in ns2
- Dear Friends, Please suggest me some guidelines for packet forwarding mechanisms in wireless LAN in NS2.I am confused with the packet forwarding mechanism of wired and wireless. Connect more, do more and share more with Yahoo! India Mail. Learn more. Connect more, do more and share more with Yahoo! India Mail. Learn more. http://in.overview.mail.yahoo.com/