end to end delay in Veins

2019-04-15 16:29发布

问题:

I want to calculate end-to-end delay in Veins example scenario.

I have already read old mails that are related to this topic but they don't provide a real solution for the problem.

I used getCreationTime() and simTime() functions. The resulting delay is about 1.70*10^-4.

This delay doesn't make sense for me. It is supposed to be more. I need some help at this point. I take the creation time of macPkt by using mackPkt->creationTime() function and i extract simTime() from it for calculating end-to-end delay. However, it doesn't make sense.

I guess macPkt is not the packet created by transmitter. I need the creation time of the packet at the transmitter side. Can anyone help me? The calculating end to end delay is a problem of many users. I hope this Question help many users.

回答1:

You can use the ‘timestamp‘ field of a ‘WaveShortMessage‘ to store the creation time, then use this field at the receiver to calculate the delay. If you use your own messages, just add a field of your own.