Java library for communicating with OMNeT++?

216 views
Skip to first unread message

biur...@gmail.com

unread,
Apr 22, 2016, 10:37:54 AM4/22/16
to OMNeT++ Users
Hello everyone,

I was wondering if there is any library or existing code in Java which allows to create/control OMNeT++ through a TCP/IP connection.
My idea is to develop something similar to VEINS but in Java code (since it's the only language I have user experience). I have already a piece of working code in Java that allows me to retrieve information from SUMO traffic simulator about vehicles position and speed, now I would like to create a simulation in OMNeT++ where the nodes will be this vehicles.

If there is no library available, then I would like to know, first of all if it's possible to run OMNeT++ with an option of --remote-port (like in SUMO) in order to create a connection using Sockets.

I would appreciate any comment / suggestion you could provide.
Thanks in advance,

Carlos.

Rudolf Hornig

unread,
Apr 24, 2016, 8:20:15 AM4/24/16
to OMNeT++ Users
No, there are no support for that. There were some experiments that allow to start/stop the simulation using HTTP, but it's not possibly to interface with the kernel at a more deeper level. If your aim is to write your simulation in Java, then probably OMNeT++ is not a good choice as it is C++ based. 

On the other hand, OMNeT++ is rather conservative on the use of C++ features. What is used pretty much the subset of C++ that is implemented in Java. (except the direct memory management)

biur...@gmail.com

unread,
Apr 25, 2016, 2:46:44 PM4/25/16
to OMNeT++ Users
Then, would you recommend me to switch to C++?
There is any way of launching OMNeT++ listening in one TCP port?

Rudolf Hornig

unread,
Apr 28, 2016, 6:11:22 AM4/28/16
to OMNeT++ Users


On Monday, 25 April 2016 20:46:44 UTC+2, biur...@gmail.com wrote:
Then, would you recommend me to switch to C++?
Yes. C++ is the native API of OMNeT++. There were attempts to bring a Java wrapper around the native C++ API, but because the way the java mamory management works (i.e. garbage collector). The interface were always hard to use... 

OMNeT++ does not define anything like an API over a TCP port, mostly because in itself, OMNeT++ does not contain any domain specific code. It's just a framework, than can do many thing, but in itself does not do anything...
Reply all
Reply to author
Forward
0 new messages