omnetpp | OMNeT Discrete Event Simulation Framework

 by   shigeya C++ Version: Current License: No License

kandi X-RAY | omnetpp Summary

kandi X-RAY | omnetpp Summary

omnetpp is a C++ library typically used in Simulation applications. omnetpp has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

The example simulations are designed to demonstrate many of the features of OMNeT++. We recommend that you try tictoc first, which also has an accompanying tutorial under doc/.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              omnetpp has a low active ecosystem.
              It has 9 star(s) with 34 fork(s). There are 1 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 1 open issues and 0 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of omnetpp is current.

            kandi-Quality Quality

              omnetpp has no bugs reported.

            kandi-Security Security

              omnetpp has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              omnetpp does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              omnetpp releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of omnetpp
            Get all kandi verified functions for this library.

            omnetpp Key Features

            No Key Features are available at this moment for omnetpp.

            omnetpp Examples and Code Snippets

            No Code Snippets are available at this moment for omnetpp.

            Community Discussions

            QUESTION

            Obtaining the number of correct messages in the network layer by the Omnet++ result collection
            Asked 2021-May-27 at 04:06

            Suppose in a wireless network with 25 nodes, we have a scenario where some of each node sends messages to some other nodes according to a routing protocol such as AODV. We simulate this network. After finishing the simulation, how to obtain the number of correct messages on the network layer by the Omnet++ result collection? Two metrics are defined, sentPacketCount and receivedPacketCount. By correct messages, I mean messages received by a node whose destination address field is the address of the same node. If retransmission occurs, it should be counted once for the receiver side for receivedPacketCount, in fact, received Packet Count will be increased when the packet is received in destination node. Every packet is sent, sentPacketCount will be increased. If a node has more than an application, all the messages generated by all applications of the same node must be counted.

            A part of omnetpp.ini file is for a node:

            ...

            ANSWER

            Answered 2021-May-26 at 08:09

            For TcpBasicApp or any other TCP app, the count of packets is meaningless. Tcp apps have streams, not packets. Even if you send out 1000 bytes in one write operation to a TCP socket, the other end may get it using 3 read operation, or 20... TCP also guarantees the delivery of the packets, so number of successfully sent packets = number of successfully received packets. So byte count statistics also do not matter.

            Number of sent/received packets/bytes makes sense for UDP traffic. In UDP there is a concept of packets and there is no guaranteed delivery. Luckily UdpBasicApp gathers these statistics by default. Take a look at the packetReceived and packetSent statistic. It gathers both packet count and total byte count.

            You may need to turn on scalar recording on all apps:

            Source https://stackoverflow.com/questions/67680830

            QUESTION

            Obtaining the sum of correct message byte lengths on the network layer by the Omnet++ result collection
            Asked 2021-May-26 at 09:01

            Suppose in a wireless network with 25 nodes, we have a scenario where some of each node sends messages to some other nodes according to a routing protocol such as AODV. We simulate this network. After finishing the simulation, how to obtain the sum of messages byte length on the network layer by the Omnet++ result collection? For each node, we must have two metrics, a metric for sent message byte lengths (e.g. totalSentMessageByteLengths) and a metric for received message byte lengths (e.g. totalReceivedMessageByteLengths). By correct messages, I mean messages received by a node whose destination address field is the address of the same node. If retransmission occurs, it should be summed once for the receiver side, summed the incorrect message byte lengths, and the correct message byte lengths for the sender side. If a node has more than an application, all the message byte lengths generated by all applications of the same node must be calculated. Message byte lengths mean the total byte of header and data on the network layer per byte. An instace code for a node in omnetpp.ini:

            ...

            ANSWER

            Answered 2021-May-26 at 09:01

            The Ipv4 module has several signals that can be used to create statistics either on a node or network level like packetSentToLower or packetReceivedFromLower. Just use these signals on your @statistics declaration.

            Source https://stackoverflow.com/questions/67696612

            QUESTION

            Finding the best methods in the Inet which perform receiving messages the application layer
            Asked 2021-May-16 at 07:56

            I need to find which methods in the Inet are best for the following conditions and requests:

            All applications in the application layer such as TcpApp, UDPApp, UdpBasicApp, etc are processed in a common method when a message or packet is received. For example, when a UdpBasicApp packet is sent, that packet is processed in that function(method). Also, a TcpApp packet is received, that packet is processed in that function(method). I guess that function(method) should be belonging a class on the common path before arriving to all applications(I guess that should be in Network Layer or Transport Layer).

            Suppose a part of my omnetpp.ini is:

            ...

            ANSWER

            Answered 2021-May-16 at 07:56

            The content of the application data packet is specific to any given application so there is no common function where you could catch 'all' application data. Even if there would be such a method, you would not be able to do anything with the data packet, because you would not know what is inside the packet and how to interpret it. You would just see X bytes of data.

            There is no common point down on lower layers either.

            • On link layer, data can come in on various interfaces if you have several networking cards.
            • On network layer, you can have either IPv6 or IPv4 traffic, so again no common path.
            • On transport layer, you can have either UDP, TCP or SCTP
            • On application layer, you have many application each interpreting the application data differently.

            In short, there is no such method and in fact it does not make sense to have one.

            Source https://stackoverflow.com/questions/67513658

            QUESTION

            How can add capability of supporting handlemessage function to compound module
            Asked 2021-May-06 at 01:44

            Modules that contain submodules are termed compound modules, as opposed to simple modules at the lowest level of the module hierarchy. Simple modules contain the algorithms of the model. The user implements the simple modules in C++, using the simulation class library A simple module supports handlemessage function, but a compound module doesn't support the handlemessage. An instance and most usage of compound module is AdhocHost module. How can add capability of supporting handlemessage function to compound module? For specially, add the handlemessage capability for AdhocHost module in the network layer.

            Is it possible to use a Inet Host like e.g. the WirelessHost from inet and apply custom coding for handling the message when received? I have only seen inet tutorials using the ini and ned files.

            When checking basic Tutorials without inet, like tictoc, there was the possibility to use the handleMessage function when a message has been received. Is there a similar possibility when using the WirelessHost or the AdhocHost module in the Inet?

            Thanks in advance

            ...

            ANSWER

            Answered 2021-May-05 at 11:27

            By definition, you call something a "compound module" if you delegate the message processing to smaller internal modules. If you have a handleMessage() method and want to process the message in C++ code, that is called a simple module by definition again.

            What you are asking is I guess: Can I add new behavior to INET modules that are coded in C++? And the answer is yes. You can implement your own behavior in simple modules and then you can insert those simple modules inside the node in various places. The most notable example is that you implement an application and then you can install that application inside the host, just like the applications already implemented in INET (like PingApp or UDPBasicApp etc.)

            Source https://stackoverflow.com/questions/67394066

            QUESTION

            Packet has bit Errors. Lost. Packet was not received correctly, sending it as control message to upper layer
            Asked 2021-Apr-18 at 09:58

            After configuring the simulation environment in Veins 5.0, different nodes send and receive messages at the same time. However, the following log is output only for specific messages.

            Packet has bit Errors. Lost

            Packet was not received correctly, sending it as control message to upper layer

            After browsing various information, I modified the omnetpp.ini code as follows, but the same transmission loss log is output.

            omnetpp.ini

            ...

            ANSWER

            Answered 2021-Apr-18 at 09:58

            What you are describing are collisions: if a node receives two wireless transmissions at the same time, it has difficulties understanding either transmission. (Imagine two people speaking to you at the same time: in this situation you would also have a harder time understanding what is being said).

            Normally, 802.11 tries to avoid this situation (this is the whole point of CSMA/CA, backoffs, ...), but there are cases where the mechanisms fail:

            A rather well-known case is a "hidden terminal" situation, where a sender is not aware of the presence of another sender (e.g., the other sender is hidden behind a building).

            Another, less well known case, is that where both senders start transmitting at the exact same time: Both senders will see that nobody else is transmitting, will change from receive to transmit mode, and will start sending (completely unaware that another sender is doing exactly this at exactly the same time). In practice, this situation is rather uncommon (after all, the two senders would need to start sending at very precisely the same time). Unfortunately, it is rather easy to do this by mistake in simulations: just configure two nodes to transmit at t=42s and they will both be trying to transmit at exactly t=42s.

            Source https://stackoverflow.com/questions/67108693

            QUESTION

            Import external object files in OMNeT IDE
            Asked 2021-Apr-08 at 18:05

            I have pre-written functions from another project that I want to include as part of my simulations. I have the object file (functions.a) and the header file (functions.h) of these functions.

            In a normal C/C++ project, I was able to import them using the steps outlined in this answer. However, my project was created as an OMNeT++ project and it appears the C/C++ Build -> Settings -> GCC C Linker -> Miscellaneous properties are not made available.

            Is there a way to access these properties or another alternative to import object files in an OMNeT project?

            EDIT

            I tried adding

            ...

            ANSWER

            Answered 2021-Apr-07 at 20:47

            OMNeT++ project uses Makefile, therefore to add an external library or class one should modify makefrag.
            You should go to Project | Properties | OMNeT++ | Makemake | select root or src of your project | Options, then Custom | Makefrag and write the following lines:

            Source https://stackoverflow.com/questions/66990894

            QUESTION

            Update parameter value in XML format
            Asked 2021-Mar-31 at 13:04

            I have parameters stored in an XML file. Below is a sample of the file.

            ...

            ANSWER

            Answered 2021-Mar-31 at 13:04

            Don't do this. par("moduleParameter").xmlValue() will give you the in memory object tree of the XML document, but that is not meant for modification. Your XML file seems to be just a hierarchical structure and modules and their parameters can mirror that exactly. There is absolutely no reason to reinvent the wheel when you can mirror that with INI file parameters.

            Source https://stackoverflow.com/questions/66873068

            QUESTION

            How to register two moduleType to VeinsInetManager?
            Asked 2021-Mar-23 at 17:33

            I used SUMO to move vehicles and bus nodes on a four-lane road. The source code of my route file is as follows:

            ...

            ANSWER

            Answered 2021-Mar-23 at 17:33

            I solved the problem.

            First of all, I applied this link to my problem.

            Using my question, how to register 2 or more nodes in moduleType is as follows.

            Source https://stackoverflow.com/questions/66762114

            QUESTION

            How do I place road locations made with SUMO?
            Asked 2021-Mar-21 at 13:46

            Instead of using OSM, I used SUMO to create a straight road with four lanes one way.

            The simulation environment I want is to use IEEE 802.11p and LTE at the same time. So, Veins and SimuLTE framework are used together, and VeinsInetMobility is used instead of TraCI.

            When running the actual simulation, it is located in the blue box as shown below. I want to move it to the red box position.

            Do I need to edit omnetpp.ini to move it to the red position? I don't know how to write the code to get the position moved.

            ...

            ANSWER

            Answered 2021-Mar-21 at 13:46

            SUMO and OMNeT++ are using different coordinate systems -- in fact, OMNeT++ normalizes, then flips SUMO coordinates vertically. For more details see the Veins FAQ entry "Why are the coordinates returned by TraCI methods different from the ones I see in the GUI?" on https://veins.car2x.org/documentation/faq/.

            If you want your vehicles in OMNeT++ to drive somewhere else you will need to change your SUMO simulation. In particular, if you want your cars in OMNeT++ to move further "south" (i.e., down), you will need to move the roads they are driving on in SUMO further "south". To be sure that SUMO does not just remove empty space in the "north" of your simulation when saving the map, you might have to add some dummy road up there, though I did not test this.

            Source https://stackoverflow.com/questions/66697876

            QUESTION

            Cannot open output scalar file in OMNeT++ and Veins
            Asked 2021-Feb-09 at 12:23

            I am using OMNeT++ 5.5.1, veins 5.0 and SUMO 1.7.0 to simulate a highway having six lanes in total (3 lanes in each direction). I am simulating the network with different number of vehicles (e.g., 50, 100, 150, 200) that I am generating from SUMO.

            The simulation runs fine when number of vehicles are 50 and 100. However, when I set the number of vehicles to 150, I get an error: "Cannot open output scalar file ..." (as attached in the screenshot below).

            The error occurs when a vehicle (node[84]) leaves the network.

            On debugging, I found that this error is causing in callFinish() method of cModule.cc: https://github.com/omnetpp/omnetpp/blob/omnetpp-5.x/src/sim/cmodule.cc#L1428

            and it throws an exception that is caught here: https://github.com/omnetpp/omnetpp/blob/omnetpp-5.x/src/sim/cmodule.cc#L1443

            Can anyone suggest how to correct it? Many thanks.

            Best Regards,

            Yasir Saleem

            ...

            ANSWER

            Answered 2021-Feb-09 at 12:23

            Thanks to @ChristophSommer for pointing out the attention towards memory corruption. It helped me to solve the issue.

            Cause of Problem: For logging statistics, I was creating a csv file (ofstream) and I realized that the csv was opening by all the vehicles and RSUs (instead of one node) while was closing ofstream by only one node (RSU). This was causing the problem.

            Solution: I fixed by making the ofstream variable global and opening and closing the ofstream file it by only one node (RSU).

            Source https://stackoverflow.com/questions/66023865

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install omnetpp

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/shigeya/omnetpp.git

          • CLI

            gh repo clone shigeya/omnetpp

          • sshUrl

            git@github.com:shigeya/omnetpp.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link