- Home Page of ProjectGuideline.com ›
- Forums ›
- Get Help to do your B.E., and M.E., M.Tech., & M.S., Project in Ns2 ›
- God::instance()->IsNeighbor(i , j)
Hi all.
I added this function to my tcl file
for {set i 0} {$i < $num_row*$num_row} {incr i} {
for {set j 0} {$i < $num_row*$num_row} {incr j} {
God::instance()->IsNeighbor(i , j)
}
}
but I got this error
invalid command name “God::instance()->IsNeighbor(i”
while executing
“God::instance()->IsNeighbor(i , j)”
(“for” body line 3)
invoked from within
“for {set i 0} {$i < $num_row*$num_row} {incr i} {
for {set j 0} {$i < $num_row*$num_row} {incr j} {
God::instance()->IsNeighbor(i , j)
…”
(file “pbcast_sim.tcl” line 155)
Could anyone know how to use God::instance()->IsNeighbor(i , j) inside TCL file?
thanks
If you are talking about wireless scenario, then you can not detect neighbors of a node like this.
Try the following link.
[url]
http://www.cse.msu.edu/~wangbo1/ns2/nshowto2.html
[/url]
@CharlesPandian wrote:
If you are talking about wireless scenario, then you can not detect neighbors of a node like this.
Try the following link.
[url]
http://www.cse.msu.edu/~wangbo1/ns2/nshowto2.html
[/url]
Dear CharlesPandian,
I disable energy checking in IsNeighbor function in mobile/god.cc, and run make command in order to modify the change. but I still have the same error
invalid command name “God::instance()->IsNeighbor(i”
while executing
“God::instance()->IsNeighbor(i , j)”
(“for” body line 3)
invoked from within
“for {set i 0} {$i < $num_row*$num_row} {incr i} {
for {set j 0} {$i < $num_row*$num_row} {incr j} {
God::instance()->IsNeighbor(i , j);…”
(file “pbcast_sim.tcl” line 155)
I do not where is the problem.
thank you so much for your help.