You are on page 1of 17

OMNet+

+
Step by Step
Part - 3
By
Mohammed Amer AlBatati

Getting Started
Start the OMNet IDE:
1. Lunch mingwenv.cmd
2. Type: omnetpp

Getting Started - cont.


Then you will be asked to select the

workspace path.
Lets create our own. (e.g.; C:\Myworkspace)
Click OK

OMNet IDE

Overview
Workbenc
h

What's
New

Tutoria
ls

Migration

Modeling Concepts
An OMNeT++ model consists of modules that

communicate with message passing.


Simple
modules can be grouped into
compound modules and so forth.
The number of hierarchy levels is unlimited.

Modeling Concepts - cont.

Gate(s)
Input gate (receive data
from)
Output gate (send data
from)
Connection (link)
Modules communicate by exchanging
messages. In an actual simulation,
messages can represent
frames, packets , jobs, etc.

Simple Example
Go to Project Explorer (Window-> Show

View-> Project Explorer)


Right-Click-> New -> OMNet++ Project
Name it (myproject) -> select empty project
-> Finish

Create Your First Simple Node


Right-Click on myproject -> New -> Simple

Module
Name it (Node.ned) -> A simple module ->
Finish

Modifying Node.ned
Double Click on Node.ned.
A dual-mode (Design and Source) NED editor

is opened.

Modifying Node.ned
Double Click on Node.ned.
A dual-mode (Design and Source) NED editor

is opened.

Defining Gates
For now, let our Node with only two gates:

input and output gates.


Use keyword gates followed by : to define
gates.
Use keyword input for input gates.
Use keyword output for output gates.
Dont forget semi-colons or to save your file.

Defining Gates - cont.


Go back to Design view.
By Right-click on Node module, you can

modify the module properties (e.g.; base, icon


and polygon).
Lets change the icon.

Creating a Network
Lets create a network with two nodes (node1

and node2) connected to each other.


Right-Click on myproject -> New -> Network
Name it (mynetwork.ned) -> An empty
network -> Finish.
Still with NED editor, so it can be done using
either Design or Source mode.

Creating a Network Design


Mode
One click on module Node in Submodules.
Another click on mynetwork to create first

node.
Rename it if needed.
Do the same with the other node.

Creating a Network Design


Mode
Connect them together by using

Connection, which can be founded in


Palette.
There are three types of channels:

Activate Connection by clicking on it.


Connect Node1 with Node2 by clicking Node1

first then Node2. (From node1 to Node2)


Do the same with Node 2.

Creating a Network Source


Mode
By opening the Source mode we will find:
CTRL+SHIFT+O
To import needed
packages.

CTRL+SHIFT+F
To reformat the NED file.

CTRL+SPACE
When help is needed.

Running The Experiments


let's test what we have done so far.
Right-click on mynetwork.ned Run As ->

OMNet++ Simulator.

OK -> OK

You might also like