Lecture 5
Lecture 5
We Shall Cover
What is OMNET++?
How to get a free copy?
How to compile and install on windows?
Running for the time
What is OMNET++
2. Processing
related to event
• Simulation Kernel terminates when:
_ No more events in event queue
1.Event at head
_ Termination condition reached popped
_ User terminates
3. New events
added to queue
Getting a free copy
• www.omnetpp.org
• Download the latest release (4.6in our case)
omnetpp-4.6-scr-window.zip
• Complete folder
-C++ compiler
-CMD Line build environment
Download source code
Compile & Install
Debug is elaborate
But slow
bin
Release is optimized
Debug
And fast
Release
1. Debug Mode
• Debug mode does not optimize the binary it produces
• Relation between source code and generated instruction is more complex
• Allows breakpoints to be set accurately
• Allows programmer to step through code one line at a time
• Compiled with full symbolic debug information
2. Release mode
• Release mode enables optimizations
• Generate without any debug data
• Lots of code could be completely removed or written code
• Resulting executable may not match with written code
Select the default workplace
We Shall Cover
Design to OMNET++
Model structure
Design of OMNET++
Reusable components
Compound
modules
No of components
Types of components
• Gates
_ Input output interfaces of modules
_ Allow message passing
_ Linked via connection (T prop , R data , BER)
Simple modules
Network
1. Define
Compound modules module
types
2. Instantiate
3. Network implements system model them
• Channels
_ Connection types with specific properties
_ Reusable at several places
_ Standard host talking to another standard host via an Ethernet cable
Message
Tuple space (time stamp, arbitrary data,…..)
Network
A compound module with no external gates
2. Instantiate
3. Network implements system model them
Module Parameters
• Pass configuration data to simple modules
• Define model topology
• String, numeric, Boolean
• Constants, random numbers
• Expressions as references
Overview of OMNET++
We Shall Cover
Introduction to NED Language
Graphical Editor
What is NED Language?
• A Network description language
• Creates network topologies in OMNET ++
• You can create topology alternately graphically as well
• Correspondingly NED source code is automatically generated
Network Definition
• Network definitions are compound modules
_ Self-contained simulation models
Simple Module Declaration
• Describes the interface of modules
_ Gates
_ Parameters