Java library for communicating with OMNeT++?

244 shikime
Kalo te mesazhi i parë i palexuar

biur...@gmail.com

e palexuar
22 pri 2016, 10:37:54 e paradites22.4.16
për 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

e palexuar
24 pri 2016, 8:20:15 e paradites24.4.16
për 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

e palexuar
25 pri 2016, 2:46:44 e pasdites25.4.16
për 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

e palexuar
28 pri 2016, 6:11:22 e paradites28.4.16
për 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...
Përgjigju të gjithëve
Përgjigjju autorit
Transfero
0 mesazhe të reja