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 ??
|