In Veins, while sending a BSM or WSA a random initial time is chosen to make sure that the transmission time is in CCH. This is implemented in BaseWaveApplLayer::computeAsynchronousSendingTime()
. Then based on beaconInterval/wsaInterval they are sent periodically.
For event driven emergency messages which are not periodic should the application layer
- wait for control Channel or
- send whenever it has to send a packet but the MAC layer queues the packet till CCH time and send in CCH time?
Which is the best way to implement this in Veins?
I see the 2nd approach as more apt way. When a WSM is scheduled in SCH by the application layer, Veins adds them in to AC queue and send the back-logged messages during the next CCH and then sends the messages generated during the next CCH (FIFO behaviour). This approach increases end to end delay for all the messages under heavy load. How is the delay actually defined for messages that are generated during SCH?
Any insights on best approach in this case?