In a project, I have to use a custom beacon message. The parameters it require, differ from the parameters that are in WaveShortMessage. I defined .msg file and was able to generate _m.cc and _m.h files. To use custom message in TraCIDemo11p, I thought of replacing WSM object parameter with that of custom messages's object parameter in onBeacon() function. But that won't work as BaseWaveApplLayer too have used WSM object only.
So I created another MyAppLayer.ned, whose content was same as that of TraCIDemo11p.ned, except "sendWhileParking" parameter (which I removed in MyAppLayer.ned) and I wrote corresponding .h and .cc files for MyAppLayer.ned by looking at the structure of TraCIDemo11p.h/.cc files. Also, I carefully included all the relevant header files, including custom message's _m.h file. But it has generated lot of errors like-
- scheduleAt() not defined in the scope
- "MyMsg" is not defined in the scope . . . and similar.
Please help me with how to use custom message in TraCIDemo11p in place of WSM. Thank you.