Search code examples
delayomnet++veins

Calculate time delay due to back-off process in VEINS


I am interested in the delay each packet experiences due to the back-off process in VEINS. For example, during the emergency broadcast.

Is there any built-in mechanism to get the back-off delay for each packet or vehicle or do I have to build something at the MAC layer?

Thank you.


Solution

  • Short answer: no, you'll have to write something yourself (or get access to code that someone else wrote to do this).

    As you can see in the MAC source, the default Veins distribution only keeps track of how often each vehicles' MAC goes into backoff, but not for how long. After successful transmission, nothing is recorded either. If you're going to implement this, please keep in mind that Veins also supports multiple channels (and you'll probably need to account for delays that are spent in other channels in some way).