Hi Abdullah,

Assuming the node address is stored in 'index':
--
double x, y, z;
MobileNode *node_ = (MobileNode *) Node::get_node_by_address(index);
node_->getLoc(&x, &y, &z);
--
Now, x, y and z contain the current node position.

Regards,
fran

On Monday 25 February 2008 04:35, abdullah qawasmeh wrote:
> Hi All,
>
> Does anybody know how to get the location of a node from the routing agent
> class?. I know that the Node Object has three instance variables (X,Y,and
> Z), but how can I read these values from the routing agent class?. I need
> to read these variables because I am developing a new ad hoc routing
> protocol, and based on the location of a node packets are routed.
>
> Any help regarding this issue will be greatly appreciated...
>
>
>
>
> ---------------------------------
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it
> now.

-- 
Francisco J. Ros, Ph.D. Student
Dept. of Information and Communications Engineering
University of Murcia, Murcia (Spain)

http://masimum.inf.um.es/fjrm/

Reply via email to