By using wsm->getSenderPos i could get the position of the node that has generated the message. But when some other node has rebroadcasted the message the senderposition remains the same of the node generating the message. Is there any way i can get the position of the node that has rebroadcasted the message at the reciever side.Thanks
Up to Veins 4.4, the sample WaveShortMessage
message type contained a field senderPos
that could be used by applications to store/retrieve positions. The sample BaseWaveApplLayer::prepareWSM
application did this to allow a user to easily visualize how far a message has traveled.
There is no special significance to the contents of this field. Feel free to have your application use this message field to store a new position with every hop (by calling the setSenderPos
method).