[ns] Energy used in transmitting 1KB of data to another peer node

2005-12-20 Thread Anup Mayank
Hi All, I want to know how much energy is used by a wireless mobile node in transmitting 1KB of data from one node to another node in its neighbor. Is there any formula to find out this information. Please help me with it. Thanks Anup -- I don't know the key to success, but the key to failure

Re: [ns] How to access location/position of a wireless mobile node ?

2005-12-20 Thread Anup Mayank
Hi Anupama, Answer to your first question is as follows: MobileNode * curNode = (MobileNode *) (Node::get_node_by_address(id_)); // id_ is the id of node double x,y,z; curNode-getLoc(x,y,z); This will assign the X,Y,Z coordinate value to your local variable. I hope this helps. Anup On

Re: [ns] How to access to neighbors of a wireless mobile node ?

2005-12-20 Thread Anup Mayank
Hi, One of solving this problem can be as follows int findNeighbors(int *neighborList) //returns the total number of neighbors and populates neighborList { MobileNode * curNode = (MobileNode *)(Node::get_node_by_address(id_)); if(curNode==NULL) { printf(findNeighbors Error: