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.