0
votes

I am working with veins. I needed to change the default behavior of BaseWaveApplLayer. Rather doing in file changes, I created a second application file with the name MyApp. I added MyApp.cc, MyApp.h, MyApp.ned files. Then I duplicated TraCIDemoRSU11p, and added files for TraCIDemoRSU11pEnhanced. Now in .ini file when I changed *.rsu[*].applType to point to "TraCIDemoRSU11pEnhanced". It compiles fine, but when I try to run it, generates the following error:

 Submodule appl: no module type named `TraCIDemo11pEnhanced' found that implements module interface org.car2x.veins.base.modules.IBaseApplLayer (not in the loaded NED files?).

In MyApp.ned file it is declared to be of type IBaseApplLayer. I tried setting ned-path parameter in ini file, didn't resolve the problem. In veins project properties, NED source folder is checked. Do I have to add the ned path for the newly created application file, somewhere?

1
Check that the NED path is set correctly -- the output just before the error you pasted should tell you where OMNeT++ thinks the NED files should be. Also make sure that the .ned file contains the correct path and name within the file (did you rename the module to TraCIDemoRSU11pEnhanced?). - Rens van der Heijden
@RensvanderHeijden I did check it. It says something Loading NED files from .: 1 Loading NED files from ../../src/veins: 32 Loading NED files from /home/path/veins-4a2/examples/veins: 1 . The files are at /src/veins. Actually TraCIDemoRSU11pEnhanced is in the same folder as TraCIDemoRSU11p. I double checked it, the name checks out. I didn't rename the original module, I created another file under this name that extends MyApp. - dutu
What is the exact name of duplicated NED module that you have prepared: TraCIDemoRSU11pEnhanced or TraCIDemo11pEnhanced? Because you have mentioned TraCIDemoRSU11pEnhanced but in the error is TraCIDemo11pEnhanced. - Jerzy D.

1 Answers

0
votes

Try using the cookiecutter package (https://veins.car2x.org/tutorial/#newprojects) to create new applications that use veins instead of copying and pasting files: Use pip to install the package (https://github.com/cookiecutter/cookiecutter) Then follow the steps in (https://github.com/veins/cookiecutter-veins-project/blob/master/README.md) to create the new project; following the prompts that appear. This will create a new project that uses Veins and has the application layer-related files for you to update according to your application with no errors.