Hi,
Try using this line:
Node* node =0;
node = Node::get_node_by_address(node_ID);
MobileNode* nd = (MobileNode*)node;
nd-getLoc(sx,sy,sz);
I think u have to include “#include god.h”, hope this helps...
Good luc,
De: El hadi Cherkaoui e_cherka...@yahoo.fr
Para: NS user ns-users@ISI.EDU
Enviado: dom,15 mayo, 2011 19:19
Asunto: [ns] HOW TO GET THE POSITION OF NODE IN C++ CODE ??
--- En date de : Dim 15.5.11, El hadi Cherkaoui e_cherka...@yahoo.fr a écrit :
De: El hadi Cherkaoui e_cherka...@yahoo.fr
Objet: HOW TO GET THE POSITION OF NODE IN C++ CODE ??
À: NS user ns-users@ISI.EDU
Date: Dimanche 15 mai 2011, 19h35
dear all
I can not find the c++ instruction to get the position of a node at a given
time...
I don't need to extract this information from the trace file because i need to
get it during the simulation and not after it finish...
Thanx a lot
B. R