Re: How to schedule messages in veins?

38 views
Skip to first unread message
Message has been deleted

Rudolf Hornig

unread,
Jul 19, 2016, 4:56:40 AM7/19/16
to OMNeT++ Users
There is no such thing as "messages received at the same time to the same vehicle". As the vehicle probably has a single radio, it cannot receive two messages at the same time. Messages coming from the lower OSI layer are queued and delivered in the order of reception.

On Monday, 18 July 2016 14:47:18 UTC+2, jhon sari wrote:
I need to handle messages received at the same time to the same vehicle. I am aware of the method   setSchedulingPriority (short p) . 
But in my case I want to use more than a simple integer to decide which message to handle first. 

Each message have a code(set by the sender node) and priority(set by the sender node). My algorithm goes like this:
  • If both messages have different codes: choose the message with the same code as receiver node or the one that has the code number 4.
  • else if they have different priority : choose one with higher priority
  • else choose message sent form the node closet in distance to the receiver node.

How and where can I implement this in veins? Any help is appreciated.  
Reply all
Reply to author
Forward
Message has been deleted
0 new messages