How to get the position of the sender at the receiver using the sender's NodeId?

73 views
Skip to first unread message

Boong Baang

unread,
Oct 20, 2019, 9:50:22 PM10/20/19
to ns-3-users
This question is similar to this - https://groups.google.com/forum/#!searchin/ns-3-users/location$20node|sort:date/ns-3-users/oK43ZdImVA0/2rV35bYsBgAJ

I add the sender's node id, that acts like an index for the node container for that particular node and is usually accessible as NodeContainer.Get(nodeId). But if my application doesn't have access to all these, and only knows the nodeId, how will it access the sender's location after it receives the packet. I have added the location from the sender's side, but I also want to check it at the receiver. 
header_new_added_working.cc

Tom Henderson

unread,
Oct 20, 2019, 10:10:16 PM10/20/19
to ns-3-...@googlegroups.com, Boong Baang
Have a look at this method:

stats/wifi-example-sim.cc:  Ptr<Node> appSource = NodeList::GetNode (0);

- Tom


Boong Baang

unread,
Oct 21, 2019, 11:25:05 AM10/21/19
to ns-3-users
Thanks it worked. Is there a way to know which objects are global in scope?
Reply all
Reply to author
Forward
0 new messages