This page provides a high-level introduction to the OMNeT++ discrete event simulation framework. It covers the framework's architecture, major components, and design philosophy. OMNeT++ is primarily used for building network simulations, but its generic component model makes it suitable for queueing networks and other complex discrete event systems.
For detailed information about specific subsystems, see:
Sources: include/omnetpp/simkerneldefs.h25-32 Version1
OMNeT++ is a C++-based discrete event simulation (DES) framework. In a discrete event system, state changes (events) happen at discrete instances in time. Between events, the system state remains constant doc/src/manual/ch-simple-modules.tex26-34
The framework provides:
Sources: doc/src/manual/ch-simple-modules.tex26-34 doc/src/manual/ch-ned-lang.tex1-3 doc/src/manual/ch-message-definitions.tex1-3 doc/src/manual/ch-run-sim.tex1-3 doc/src/manual/ch-ana-sim.tex1-3 ui/ChangeLog30-64
OMNeT++ follows a layered architecture where models are defined through a mix of NED, MSG, and C++ code, which are then compiled into a simulation executable.
Sources: src/nedxml/ChangeLog156-161 src/nedxml/ChangeLog18-22 src/utils/ChangeLog29-31 src/qtenv/ChangeLog194-206 src/cmdenv/ChangeLog1-10
The kernel manages the simulation lifecycle and the hierarchy of components. Most library classes derive from cObject for basic services like name storage and metadata doc/src/manual/ch-sim-lib.tex55-59
| Class | Purpose |
|---|---|
cSimulation | The central object that owns the network and the Future Event Set (FES) doc/src/manual/ch-simple-modules.tex70-72 |
cModule | Base class for hierarchical components; simple modules contain C++ logic, compound modules contain submodules doc/src/manual/ch-simple-modules.tex6-11 |
cMessage | Represents events. It is sent between modules and scheduled in the FES doc/src/manual/ch-simple-modules.tex120-125 |
SimTime | A 64-bit integer based decimal fixed-point representation for simulation time doc/src/manual/ch-simple-modules.tex154-156 |
cIRngManager | Pluggable Random Number Generator manager mechanism include/omnetpp/ChangeLog31-34 |
Sources: doc/src/manual/ch-simple-modules.tex6-11 doc/src/manual/ch-simple-modules.tex70-72 doc/src/manual/ch-simple-modules.tex120-125 doc/src/manual/ch-simple-modules.tex154-156 doc/src/manual/ch-sim-lib.tex55-59 include/omnetpp/ChangeLog31-34
OMNeT++ models are hierarchical. The Network Description (NED) language is used to declare:
cDatarateChannel, cDelayChannel) that define delay, loss, and datarate src/nedxml/ChangeLog13-14Sources: doc/src/manual/ch-simple-modules.tex76-87 src/sim/ChangeLog176-180 src/sim/ChangeLog182-183 src/qtenv/ChangeLog112-118 src/envir/ChangeLog163-165
The kernel is decoupled from the UI via the cEnvir interface.
cCanvas or 3D cOsgCanvas. It features a Generic Object Inspector with "Children" and "Details" modes src/qtenv/ChangeLog40-52 include/omnetpp/ChangeLog199-205Sources: src/qtenv/ChangeLog1-30 src/envir/ChangeLog91-104 src/cmdenv/ChangeLog1-10 src/utils/ChangeLog5-12
Simulation results are collected using a signal-based mechanism.
emit() signals. The @statistic property in NED defines how these signals are recorded into result filters and recorders src/sim/ChangeLog117-124 include/omnetpp/ChangeLog118-120.vec (vector) and .sca (scalar) files, supporting both text and SQLite formats src/envir/ChangeLog98-104omnetpp.scave) for high-level data manipulation ui/ChangeLog177-183 src/scave/ChangeLog125-127Sources: src/sim/ChangeLog14-23 src/envir/ChangeLog5-8 ui/ChangeLog85-93 src/scave/ChangeLog125-127
SimTime to prevent rounding errors common with floating-point types doc/src/manual/ch-simple-modules.tex154-156cIRngManager), configuration providers, or event schedulers include/omnetpp/ChangeLog31-34 src/envir/ChangeLog183-185cClassDescriptor, enabling runtime inspection in Qtenv include/omnetpp/ChangeLog69-72Sources: doc/src/manual/ch-simple-modules.tex6-11 doc/src/manual/ch-simple-modules.tex154-156 include/omnetpp/ChangeLog31-34 include/omnetpp/ChangeLog69-72 src/envir/ChangeLog183-185
For detailed information, please refer to the following child pages:
setenv and install.sh src/utils/ChangeLog16-18Sources: src/utils/ChangeLog16-18 .gitignore82-126
Refresh this wiki