Hi all,
How to obtain node dynamic information's in a function which is defined outside the main()?
I have created a roadway scenario where vehicles(nodes) transmit periodic messages using DSRC. Unlike CAM, in every message i need to report the (nodeID) of other detected vehicles (i.e. which is detected within its 20meters w.r.t sender).
Initially i was performing the following functions, but i got struck in one function. Please give your suggestions!
I have created nodes, DSRC configurations and sockets successfully. Then!
1. I send the socket packet for every node and called a GENERATETRAFFIC function from main().
2. In GENERATETRAFFIC function i called another function called TABLE
2.1 In TABLE function, I don't know how to obtain the nodes information, because the class NodeContainer or Node are not working as it is defined outside main.
If I could get the node information in TABLE function, I can detect the nodes within the 20 m of sender node using
MobilityModel::GetDistanceFrom function
Finally, I can return the (nodeID) of detected vehicles information to the GENERATETRAFFIC function which will be later included and sent in the socket packet
Thanks!