[ns] Accessing Node by its ID ???
Mubashir Rehmani
mshrehmani at gmail.com
Mon May 19 02:36:26 PDT 2008
Hi Everyone
I want to access the node by its id ????
I know how to get the current id of node that is currently dealing by NS2 by
using the command
Node::nodeid();
Basically the problem is that NS2 treats node by node and the above command
return the nodeid which is in treatment by NS. And I want to access a
particular node irrespective of NS treatment of node.
And i also know that how to get the total number of Nodes by using the
command
God::instance()->nodes();
What i want is very simple. I need to call a particular function by calling
node by its id. For instance if NS2 is treating Node 2 and I want to call a
function of Node5 then i want things like that
Node5.id() ==> This command should return me the node id i.e. 5
Node5.particularfucntion(). ==> This command should call a function for node
5.
Is their any way to do this?
Thanks in advance.
Regards
--
Mubashir Husain Rehmani
M2R Réseaux et Télécommunications
L2S Supélec
Université de Paris Sud XI
Mobile France: 00 33 (0)6 32 00 89 35
More information about the Ns-users
mailing list