LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-21-2015, 02:30 AM   #1
Zahraa Ayad
LQ Newbie
 
Registered: Dec 2014
Posts: 19

Rep: Reputation: Disabled
Post Error while binding variables in NS-2


Hi LQ, I am using NS-2.35.
I made changes to AODV protocol to support controlled mobility. I needed to pass x and y positions (after executing an algorithm for mobility) from C++ to TCL and then put them into (setdest) command. I did the following in aodv constructor:

bind("x_axis",&x_tcl);
bind("y_axis",&y_tcl);

and I gave x_axis and y-axis a default value in ns-default.tcl.

and this is how i use them in TCL code:

$ns at 21.0 "$node_(0) setdest $x_axis $y_axis 100.0"

but I am getting the following error:

num_nodes is set 36
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
can't read "x_axis": no such variable
while executing
"$ns at 21.0 "$node_(0) setdest $x_axis $y_axis 100.0""
(file "eaodv.tcl" line 309)

Is there any problem ??
 
  


Reply

Tags
c++, ns2, tcl-ns2



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
compilation or binding error Aabha Linux - Newbie 0 09-01-2014 04:45 PM
Mozilla - no xbl binding error jasontn Linux - Newbie 5 01-24-2005 06:47 AM
error binding address/port blackzone Linux - Networking 1 09-03-2004 02:23 AM
xbl binding error in firefox sandy_obrien Linux - Software 3 06-02-2004 03:06 AM
binding an integer to variables... xconspirisist Programming 4 11-05-2003 11:48 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:51 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
Open Source Consulting | Domain Registration