0

How can I add a processing delay into an app layer module such as TraCIDemo11p?

For example, when a beacon arrives, the module should virtually do some processing and then perform some action (sending back a beacon).

Also, should I worry about putting a message queue as well in this case (because the module will continuously getting beacons from other vehicles)?

Community
  • 1
  • 1
Rao U
  • 27
  • 5

1 Answers1

0

How to modeling processing delay is covered in the introductory OMNeT++ tutorials, for example the Tic Toc tutorial's step 6:

In OMNeT++ such timing is achieved by the module sending a message to itself. Such messages are called self-messages (but only because of the way they are used, otherwise they are ordinary message objects).

As a quick hack, you can also simply specify a send delay for events sent from the application to lower layers. This models an application that can instantly receive all messages, can handle infinitely an arbitrary number of messages at the same time, but that takes some time to send a reply.

Christoph Sommer
  • 6,893
  • 1
  • 17
  • 35
  • Yes. Thanks for your answer respected Prof. Sommer. – Rao U Aug 26 '16 at 22:53
  • Maybe, you want to accept this answer as the solution to mark your question as answered. Therefore, this post can be more effective for helping people with a similar problem. – Julian Heinovski Oct 10 '17 at 14:30