14-814/18-637: Wireless Network Security - Spring 2017
Assignment #2 - Studying Jamming Impact in WiFi - Project Import Instructions
- Often times when working with the Eclipse IDE (used as the IDE for OMNeT++), you will want to create new projects
for source code already written. OMNeT++ projects, or simulation models, are often shipped without any Eclipse-specific
project information. There are reasons for this, such as path mismatches, build system misconfigurations, internal structure
conflicts, etc. OMNeT++'s IDE will configure new projects correctly, all that is missing is the existing code. But never fear!
Follow these simple steps, and soon you'll be able to import any simulation models you want, without needing any Eclipse
project configuration stuff beforehand.
- In the OMNeT++ IDE, goto
File
-> New
-> OMNeT++ Project...
.
- Type in a name for your project, leave the two checkboxes checked, and click
Next
.
- Under
Select template
, select Empty project
, and click Finish
.
Now you have a new, blank project setup, with all the awesome OMNeT++ defaults. Now do the following:
- Your newly created project will be open by default in the Project-Explorer. Expanding the root project folder will yield
two items:
Includes
and package.ned
.
- If your source code already contains a
package.ned
, please delete the one created in the new project. Always
use the package.ned which comes with your source code.
- You will need to reference any simulation models that your source code uses. Usually this will be inet. To add
inet as a referenced simulation model, right-click on your new project root folder in the Project-Explorer, and go to
Properties
-> Project References
.
- Check the checkbox next to inet in the list. If you need other simulation models referenced, check the appropriate
checkboxes here.
Now you have your newly created project prepped for source code copying action. To do that, follow these steps:
- Using a file explorer (file manager, shell, etc), navigate to your OMNeT++ workspace root folder. By default this is
probably
.../omnetpp-5.0/samples/
.
- Find the folder which has the name of your project. When you open it, you will find nothing inside except some hidden
project configuration files that the IDE created for you (the includes folder that shows up in the OMNeT++ IDE Project-Explorer
is virtual).
- Copy all your source code into this folder.
- You will see the files update in the OMNeT++ IDE. If you are getting errors, check to make sure you are not missing anything.
For example, if your source code does not have a
package.ned
file, you may get package path errors. Also make sure
all the dependent simulation models and other projects are referenced correctly to your new project.
At this point your project should have no errors (some warnings may be present). To build the project, do the following:
- Open the
omnetpp.ini
file which came with your source code.
- Click the green arrow whose tooltip text is
Run [Project Name]
. This is located in the toolbar at the top of the IDE.
- You will get a dialog box about creating a new profile. Click ok.
- Now at this point the build will probably fail with an executable not found error. No worries, simply click the
green button again and the build system will actually be invoked to build your project.
Now sit back and enjoy some network simulation awesomeness!!
- [Instructions courtesy of Brian Ricks, slightly modified and updated]