I created a new safety messsage that is extended from the DemoSafetyMessage:
import veins.modules.messages.DemoSafetyMessage;
namespace veins;
packet NewSafetyMsg extends DemoSafetyMessage {
double senderAngle;
double PowRxdBmAvg;
}
I include this new message into the MyVeinsApp application and pass it to the onBSM function in both the .cc and .h files of MyVeinsApp.
#include "veins/modules/messages/NewSafetyMsg_m.h"
void onBSM(NewSafetyMsg* bsm) override; // in the .h file
#include "veins/modules/messages/NewSafetyMsg_m.h" //in the .cc file
However, I am getting this error in the .h file.
Description Resource Path Location Type ‘void veins::MyVeinsApp::onBSM(veins::NewSafetyMsg*)’ marked ‘override’, but does not override MyVeinsApp.h /veins/src/veins/modules/application/traci line 50 C/C++ Problem
I know that MyVeinsApp is extending the DemoBaseApplLayer which takes DemoSafetyMessage, So there should be no problem!! What I am doing wrong?