I am using instant veins and I want to implement my scenario where I compute if there is a collision between two nodes, I need to recuperate the position from the two nodes at the same time. I used getPosition of the received packet to find the position of only one node. But in my application, I need to have the position of all of them. The messages should be received at the same time from the nodes then the possibility of collision is verified binary, do you have an idea how to stock them somewhere and then use them in a binary way to compute real-time collision? Any proposition will be helpful.
Asked
Active
Viewed 37 times
1 Answers
0
If how to get the position is not an aspect you want to model (e.g., you only want to know the position of all nodes for statistics), you can make use of OMNeT++'s capability to traverse the module hierarchy (getParentModule
, getSubmodule
, getVectorSize
, getModuleByPath
, ...) to get a C++ pointer to any module in the whole simulation, then call the appropriate C++ method to get its position.

Christoph Sommer
- 6,893
- 1
- 17
- 35