0

I am using the Veins 4.5 framework for a semester project. I am trying to observe the behavior of different functions in the sample codes given. For some reason, the RSU's onWSM function never gets called. I added a message (using the EV command) to print to the log whenever this function is called but the message is never logged. I tried the same thing in the vehicle's onWSM function and it works. I do not understand what the problem is here.

I searched Google and apparently other people have posted similar questions on different forums but have not received an answer (e.g. http://java.wekeepcoding.com/article/10429913/RSU+receiving+message+but+onWSM+method+not+executing+in+veins+4.5). There are answers regarding the same issue for a different version of Veins but the functions are now different in the version I am using (e.g. Allow a RSU receive messages in Veins).

Any help would be appreciated.

an4s
  • 161
  • 1
  • 10

1 Answers1

0

One thing that comes to mind is to look into the handleLowerMsg function inside BaseWaveApplLayer to see whether or not onWSM is actually getting called on arrival of a WSM for the RSU.

Julian Heinovski
  • 1,822
  • 3
  • 16
  • 27
Anirban Das
  • 113
  • 2
  • 6
  • I added log messages in the `handleLowerMsg` function. In the log, the messages are only printed for the nodes (i.e. cars), not the RSU. For the nodes, the message only gets printed for the `bsm` part of the `if-else` conditions. I tried adding an `onBSM` function in the RSU application to see if that function will ever get called but it doesn't. Any other suggestions? – an4s Nov 18 '17 at 21:13