tcl - How can i set next hop of nodes in NS2? -


i have sensor field dimension 200*200. choose nearest node center of field cluster head. goal data of sensors forward cluster head , cluster head forward data sink node. want cluster head become next hop of sensor nodes (apart sink node) in field. how do that? thanks

i don't know ns2 if there forwarding command should matter of looping nodes , running forward command. here's pseudo code.

set head_x 7 set head_y 8  # node @ head_y head_x head_node # tell head forward sinc node  {set y 0} {$y < 200} {incr y} {      {set x 0} {$x < 200} {incr x} {          if {$x != $head_x && $y != $head_y} {             # tell node $y $x forward $head_node         }      } } 

Comments

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -