OMNeT++
User Guide
Version 5.4.1
Copyright © 2016 András Varga and OpenSim Ltd.
1. Introduction ........................................................................................................ 1
1.1. The Workbench ........................................................................................ 1
1.2. Workspaces .............................................................................................. 2
1.3. The Simulation Perspective ...................................................................... 3
1.4. Configuring OMNeT++ Preferences ......................................................... 3
1.5. Creating OMNeT++ Projects .................................................................... 3
1.6. Project References .................................................................................... 4
1.7. Getting Help ............................................................................................. 5
2. Editing NED Files ............................................................................................... 6
2.1. Overview ................................................................................................... 6
2.2. Opening Older NED Files ......................................................................... 6
2.3. Creating New NED Files ........................................................................... 6
2.3.1. NED Source Folders ...................................................................... 7
2.4. Using the NED Editor .............................................................................. 8
2.4.1. Editing in Graphical Mode ............................................................ 8
2.4.2. Editing in Source Mode ............................................................... 12
2.5. Associated Views .................................................................................... 15
2.5.1. Outline View ................................................................................ 15
2.5.2. Property View .............................................................................. 15
2.5.3. Palette View ................................................................................. 16
2.5.4. Problems View ............................................................................. 16
2.5.5. NED Inheritance View ................................................................. 16
2.5.6. Module Hierarchy View ............................................................... 16
2.5.7. Parameters View .......................................................................... 17
3. Editing INI Files ................................................................................................ 18
3.1. Overview ................................................................................................. 18
3.2. Creating INI Files ................................................................................... 18
3.3. Using the INI File Editor ........................................................................ 19
3.3.1. Editing in Form Mode ................................................................. 19
3.3.2. Editing in Text Mode ................................................................... 22
3.4. Associated Views .................................................................................... 23
3.4.1. Outline View ................................................................................ 23
3.4.2. Problems View ............................................................................. 23
3.4.3. Parameters View .......................................................................... 23
3.4.4. Module Hierarchy View ............................................................... 24
3.4.5. NED Inheritance View ................................................................. 24
4. Editing Message Files ........................................................................................ 25
4.1. Creating Message Files ........................................................................... 25
4.2. The Message File Editor ......................................................................... 25
5. C++ Development ............................................................................................ 27
5.1. Introduction ........................................................................................... 27
5.2. Prerequisites ........................................................................................... 27
5.3. Creating a C++ Project .......................................................................... 27
5.4. Editing C++ Code ................................................................................. 29
5.4.1. The C++ Editor .......................................................................... 30
5.4.2. Include Browser View .................................................................. 31
5.4.3. Outline View ................................................................................ 32
5.4.4. Type Hierarchy View .................................................................... 32
5.5. Building the Project ................................................................................ 32
5.5.1. Basics .......................................................................................... 32
5.5.2. Console View ............................................................................... 34
5.5.3. Problems View ............................................................................. 34
5.6. Configuring the Project ........................................................................... 35
5.6.1. Configuring the Build Process ..................................................... 35
5.6.2. Managing Build Configurations ................................................... 35
5.6.3. Configuring the Project Build System .......................................... 36
5.6.4. Configuring Makefile Generation for a Folder .............................. 37
5.6.5. Project References and Makefile Generation ................................ 40
iii
OMNeT++ User Guide
5.7. Project Features ...................................................................................... 41
5.7.1. Motivation .................................................................................... 41
5.7.2. What is a Project Feature ............................................................ 41
5.7.3. The Project Features Dialog ......................................................... 42
5.7.4. What Happens When You Enable/Disable a Feature ..................... 43
5.7.5. Using Features from Command Line ........................................... 43
5.7.6. The .oppfeatures File .............................................................. 43
5.7.7. How to Introduce a Project Feature ............................................. 44
5.8. Project Files ........................................................................................... 44
6. Launching and Debugging ................................................................................. 46
6.1. Introduction ........................................................................................... 46
6.2. Launch Configurations ........................................................................... 46
6.3. Running a Simulation ............................................................................ 46
6.3.1. Quick Run ................................................................................... 46
6.3.2. The Run Configurations Dialog ................................................... 47
6.3.3. Creating a Launch Configuration ................................................. 47
6.3.4. Debug vs. Release Launch ........................................................... 50
6.4. Batch Execution ..................................................................................... 50
6.5. Debugging a Simulation ......................................................................... 51
6.5.1. Starting a Debug Session ............................................................ 51
6.5.2. Using the Debugger ..................................................................... 51
6.5.3. Pretty Printers ............................................................................. 52
6.6. Just-in-Time Debugging .......................................................................... 53
6.7. Profiling a Simulation on Linux ............................................................. 53
6.8. Controlling the Execution and Progress Reporting ................................. 53
7. The Qtenv Graphical Runtime Environment ..................................................... 56
7.1. Features .................................................................................................. 56
7.2. Overview of the User Interface ............................................................... 57
7.3. Using Qtenv ............................................................................................ 58
7.3.1. Starting Qtenv ............................................................................. 58
7.3.2. Setting Up and Running the Simulation ...................................... 58
7.3.3. Inspecting Simulation Objects ..................................................... 61
7.4. Using Qtenv with a Debugger ................................................................. 62
7.5. Parts of the Qtenv UI ............................................................................. 63
7.5.1. The Status Bars .......................................................................... 63
7.5.2. The Timeline ............................................................................... 64
7.5.3. The Object Navigator ................................................................... 64
7.5.4. The Object Inspector ................................................................... 64
7.5.5. The Network Display ................................................................... 66
7.5.6. The Log Viewer ........................................................................... 68
7.6. Inspecting Objects .................................................................................. 70
7.6.1. Object Inspectors ........................................................................ 70
7.6.2. Browsing the Registered Components ......................................... 70
7.6.3. Querying Objects ......................................................................... 71
7.7. The Preferences Dialog ........................................................................... 72
7.7.1. General ........................................................................................ 73
7.7.2. Logs ............................................................................................. 74
7.7.3. Configuring the Layouting Algorithm ........................................... 75
7.7.4. Configuring Animation ................................................................. 76
7.7.5. Timeline and Animation Filtering ................................................ 77
7.7.6. Configuring Fonts ........................................................................ 78
7.7.7. The .qtenvrc File .......................................................................... 78
7.8. Qtenv and C++ ...................................................................................... 79
7.8.1. Inspectors .................................................................................... 79
7.8.2. During Simulation ....................................................................... 80
7.9. Reference ................................................................................................ 80
7.9.1. Command-Line Options .............................................................. 80
7.9.2. Environment Variables ................................................................ 80
iv
OMNeT++ User Guide
7.9.3. Configuration Options ................................................................. 81
8. The Tkenv Graphical Runtime Environment ..................................................... 82
8.1. Features .................................................................................................. 82
8.2. Overview of the User Interface ............................................................... 83
8.3. Using Tkenv ........................................................................................... 84
8.3.1. Starting Tkenv ............................................................................. 84
8.3.2. Setting Up and Running the Simulation ...................................... 84
8.3.3. Inspecting Simulation Objects ..................................................... 86
8.4. Using Tkenv with a Debugger ................................................................ 88
8.5. Parts of the Tkenv UI ............................................................................. 88
8.5.1. The Status Bar ............................................................................ 88
8.5.2. The Timeline ............................................................................... 89
8.5.3. The Object Navigator ................................................................... 89
8.5.4. The Object Inspector ................................................................... 90
8.5.5. The Network Display ................................................................... 91
8.5.6. The Log Viewer ........................................................................... 93
8.6. Inspecting Objects .................................................................................. 94
8.6.1. Object Inspectors ........................................................................ 94
8.6.2. Browsing the Registered Components ......................................... 96
8.6.3. Querying Objects ......................................................................... 96
8.7. The Preferences Dialog ........................................................................... 98
8.7.1. General ........................................................................................ 98
8.7.2. Configuring the Layouting Algorithm ........................................... 99
8.7.3. Configuring Animation ............................................................... 100
8.7.4. Timeline and Animation Filtering .............................................. 101
8.7.5. Configuring Fonts ...................................................................... 102
8.7.6. The .tkenvrc File ....................................................................... 102
8.8. Tkenv and C++ ................................................................................... 103
8.8.1. Inspectors .................................................................................. 103
8.8.2. During Simulation ..................................................................... 104
8.9. Reference .............................................................................................. 104
8.9.1. Command-Line Options ............................................................ 104
8.9.2. Environment Variables .............................................................. 104
8.9.3. Configuration Options ............................................................... 105
9. Sequence Charts ............................................................................................. 106
9.1. Introduction ......................................................................................... 106
9.2. Creating an Eventlog File ..................................................................... 106
9.3. Sequence Chart .................................................................................... 107
9.3.1. Legend ....................................................................................... 107
9.3.2. Timeline .................................................................................... 108
9.3.3. Zero Simulation Time Regions .................................................. 109
9.3.4. Module Axes .............................................................................. 109
9.3.5. Gutter ........................................................................................ 110
9.3.6. Events ........................................................................................ 110
9.3.7. Messages ................................................................................... 110
9.3.8. Displaying Module State on Axes ............................................... 111
9.3.9. Zooming .................................................................................... 111
9.3.10. Navigation ................................................................................ 112
9.3.11. Tooltips ................................................................................... 112
9.3.12. Bookmarks .............................................................................. 112
9.3.13. Associated Views ..................................................................... 112
9.3.14. Filtering ................................................................................... 112
9.4. Eventlog Table ...................................................................................... 113
9.4.1. Display Mode ............................................................................. 113
9.4.2. Name Mode ............................................................................... 114
9.4.3. Type Mode ................................................................................. 114
9.4.4. Line Filter .................................................................................. 114
9.4.5. Navigation .................................................................................. 114
v