OMNeT++ simulation tool supports the process of network simulation utilizing a set of network parameters and also simulation entities. The abbreviation of OMNeT++ is Object Modular Network Testbed in C++. This kind of technology needs the support of a simulator to simulate with the network. And, it is mandatory to know about Simulations that are used in our day to life.
“In this article, we discuss OMNeT++ simulation process and its goals, modules, types of programs and purpose of Ned files in OMNeT++ and many more details.”
OMNeT++ is mainly used to build network simulators and is based on the Component C++ framework and it is a modular and extensible network simulator. Queuing network wired and wireless networks and on-chip network there are some types of network and some functionalities like Internet protocol, Wireless Sensor network, Performance modeling, and sensor network are supported for domain specification. OMNeT++ is also known as objects oriented structure and mainly handles discrete events.
Introduction about simulation
To imitate the characteristics of real-world activity and overtime of system this is known as simulation. If we want to simulate some process mainly requires developing the model and that model insists to perform the physical network behaviour analysis for the given network conditions.
Use of simulation
- Simulation gives the best solution for the models which is having clear insights into the systems having complex behavior.
- To solve the problem we faced in the real world efficiently and safely.
- It gives the best communication support, understood and verification of analysis in an easy manner.
Until we will see about the basics of the simulation process and the purpose of simulation. We will go to discuss the OMNeT++ simulation. Then we go to the next topic that is OMNeT++ goals and modules of OMNeT++ with top-level module architecture which has two kinds of modules. There are three modules are used in OMNeT++ such as,
- Compound module
- System module
- Relationship of modules
Let us separately see each and every model,
Goals of OMNeT++
This kind of simulator is mainly used in,
- To model the systems this is under the approach of discrete events in a distributed system
- In telecommunication model, it is used model for handle the Traffic
- Able to calculate the complex software systems performance
- Model the protocol for the simulation process
- To validate the architecture of hardware’s
- Provide model to the queuing network
- Also used to construct a model for distributed hardware systems and multiprocessors
Modules in OMNeT++
This OMNeT++ simulation architecture has three basic layers of modules. That is a simple module and compound module. Here system module is placed at the top of the module.
- Compound module
- In this module, it has been interconnected with some compound modules and system modules of the architecture layer
- This module contains several submodules and submodules have the submodules in it
- Simple module
- This module has the class libraries of OMNeT++
- In architecture, this module is placed in the lower level of the layer
- Simple modules are implemented by users with the C++ structure
- The algorithm of models is placed in these simple modules
Relationship of modules
- The wireless communication between each module is possible for using message passing.
- NED languages are used to indicate the connections of the topology or structure of the modules.
- Particular functionalities can be followed by the implementation of applications.
- The module’s communications take place to exchange information through the connections.
So, the above section shows the goals and modules of OMNeT++ and with some architecture that represents the three modules in that infrastructure. Let us move on to the next topic that is part of simulation programs for OMNeT++ Simulations.
Components of the Simulation process
- File: omnetpp.ini this file has information like the execution of the simulation process and also has some general settings.
- NED files: This is a particular description language for OMNeT++.
- Modules: This is used to describe the behavior of a component and using C++ it has a blabla.h and blabla.cc file
These are the basic components that are used in the OMNeT++ simulation. Continuously we will discuss Network Description Language and the need for NED files in OMNET++, Channels, Simple and compound modules for NED language. This is a kind of topology that is used to construct the OMNeT++. Let us see each topic one by one,
Introduction about NED
Here, the structure of the specific model is created by using the particular NED language and it has a .ned suffix in files from the description of the network. NED have some set of elements There are,
- Network definitions
- Channel definitions
- Connections
- Simple module definitions
- Compound module definitions
Define NED files in OMNeT++
Network Description is the abbreviation of NED this is mainly has a structure of the OMNeT++ description language.
- The features of nutshell in NED are type module structure and hierarchical module structure.
- For defining a topology like a tree structure, chain, hypercube, ring, and mesh structure it has a very simple syntax but gives the power solutions of the structures.
Topology represents the structure of the network it has some types of topology such as star topology, mesh topology, Bus topology, and more. Mainly it represents the structure and also execution flow of the simulation process. So the above content gives knowledge about Network Description language. Then we will discuss channels and simple and compound modules for NED.
Channels in NED
- Parameters
- Data rate: It’s based on the bandwidth measures under bits per second.
- Delay: IT denoted the delay of propagation in the terms of seconds.
- Error rate: it’s if the probability of transmitting incorrect bits.
- It has a particular connection type and also has specific characteristics.
- To make a connection with the above-specified parameters here is the channel name used after NED description.
Simple and compound modules for NED
- This NED architecture has three modules there are system module, component module, and simple modules.
- System modules are placed top level in the hierarchy.
- For considering compound and simple modules,
- It is a connected by simple module and a compound module internally.
- Parameters and gates are used in simple and component models.
- Both modules are having submodules.
- Submodels also have the Submodels from themselves.
Compound module in NED architecture
- The gates of this module are must be connected then the module can able to communicate at the inside of the module.
- It is the connection of one or more Submodules.
- If we take any module that can be known as a submodule.
- Because of gates, it can act as another module outside of this compound module.
This is the basic architecture of NED and some details about the simple, compound, and system modules. The upcoming topic is a connection in NED and more some definition about Network description language.
Connection in NED
- For performing a connection it has some named channels or some kind of attributes there are, data rate, delay, and bit error rate.
- The concept of compound modules insists on how the system and modules can be connected with the gate and also connects the immediate sub modules.
- It supports only one to one connection.
Network setup
- To assign the value for parameters which is placed in submodules
- Declaration of modules that only represent the modules type like simple, system, and compound modules
- Without the gate, modules are used for the definitions of network
- From the definition of the network, we can give the model for the simulation process.
While we come to the topic that implementation modules this section is ready to provide extraordinary details about classes, building simulation programs, and the OMNeT++ simulation process also. If we consider the implementation of modules it contains two kinds of classes that are cSimpleModule and message. Let us see these classes.
Implementation of modules
Here we consider two types of class there are,
- cSimpleMessage
- cMessage
C++ Class: cSimpleModule
- The module of the compound does not have its C++ classes.
- Consider the simple module name MyModule it is implemented by the same class name that is MyModule.
- Define_ModuleDef (MyModule) this is the macro function for using defines a C++ class it converts the class into NED module type.
Member functions in sending a message
- CancelEvent (): using scheduleAt () it deletes the event schedule.
- Send (): sending the messages to the other modules.
- ScheduleAt (): can schedule the event and send the message itself.
Self-messages in cSimpleModule
- To deliver the message for the simple module with time to later points.
- Module can call isSelfMessage()
- Through handleMessages()
Sending messages in cSimpleModule
- The output gate data is the sent object of the message.
C++ Class: cMessage
- Here the event is represented by one of its subclasses.
- Messages in OMNeT++ are mainly used to represent the events.
- The event is expired then the module implementation sends a message by itself.
- From one module to the other module the message will send also to the modules in the destination.
- It has some future set that precedes the event with a strict time stamp and is inserted into the Future Event Set.
So, the above two C++ classes are widely used in recent times and these classes are used to send messages and self-messages. Then we will move on to the next topic that is Building Simulation programs.
Building simulation programs: For running the simulation we use two different kinds of the operating system. That is,
- Windows (Console)
- Nmake- f Makefile.vc
- Opp_nmakemake
- Linux
- ./x
- Opp_nmakemake-f (generate Makefile)
If we need to edit we can use both a graphical editor and also a text editor for the environment Eclipse-based OMNeT++ Simulation IDE. Then the components of the model it is developed by the C++ programming and class library and simulation kernel. Let we will share more details about the Simulation with OMNeT++.
OMNeT++ and its Simulations
- In this simulation, omnetpp.ini contains the parameters and also the configuration of OMNeT++ then the config file is used for various simulations with various parameters.
- After writing the program for simulation the link of the specific code is interfaced with the kernel and it provides the command line for GUI and interactive.
- The result of the simulation is getting both scalar and vector files and using of analysis tool it fives the output in the form of text files then the process takes place with Matlab, R, and any other tools.
This kind of simulation process is done by the OMNeT++. We hope this article is useful for gaining your knowledge about OMNeT++ simulation and also have a clear idea about NED language and its uses. We have more number of developing and developed projects based on this OMNeT++ simulator. Our experts have modern ideas about this topic. For further clarifications kindly contact us.