0

I am a new bee working upon Veins5.2 and Omnetpp-5.6.2 version. I am working upon a simulation scenario in which an emergency vehicle (an Ambulance e.g;)is passing by and RSU has to send a stop message(beacon or WSM) to normal passenger cars/vehicles. I am creating my application file referring to example scenario.

Please find below snippet of my code.

void MyApplLayer::handleSelfMsg(cMessage* msg)
{
   BaseFrame1609_4* wsm1 = new BaseFrame1609_4();
   sendDown(wsm1);
}
void MyApplLayer::onWSM(BaseFrame1609_4* frame)
{
    //this function is called for all the cars nodes in my simulation
}
void TraCIDemoRSU11p::onWSM(BaseFrame1609_4* frame)
{
    //this function is never called for RSU in TraCIDemoRSU.cc
}

handleSelfMsg() and onWSM() is getting called for all the Cars in my application layer but onWSM() is not getting invoked in TraCIDempRSU11p.cc file (as per the requirement RSU has to broadcast message to stop the vehicle. For this purpose, I am trying to invoke onWSM() method for RSU (in TraCIDempRSU11p.cc file).

Could it be I am missing something in omnetpp.ini file. Could someone please suggest some way forward or any kind of suggestions/ideas are much appreciated.

I found following post during research: RSU not receiving WSMs in Veins 4.5 the above post suggest to check handLowerMsg is getting called or not. handleLowerMsg function (inside DemoBaseApplLayer) onWSM is getting called but only for car nodes in my scenario.

πάντα ῥεῖ
  • 1
  • 13
  • 116
  • 190

0 Answers0