问题
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:
Delays in this order of magnitude are to be expected for one-hop transmissions. See also the discussion at Computing End-To-End Delay in Veins for a more detailed breakdown.
If you're talking end-to-end delay over multiple hops, note that packet creation time might note be a reliable indicator. Here, 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.
来源:https://stackoverflow.com/questions/32044168/end-to-end-delay-in-veins