INTO-CPS-Association / unifmu

A universal mechanism for implementing Functional Mock-up Units (FMUs) in various languages
41 stars 4 forks source link

Java assets were deleted #45

Closed rudi closed 2 years ago

rudi commented 2 years ago

Hi, I was trying to report some issues with the Java FMU generated code produced by version 0.0.5, but it seems commit 5992c34fac99e8d55b7be8c02e392d46198e4617 deleted them.

clegaard commented 2 years ago

Hi Rudi, thanks for raising the issue. There has been a significant number of changes that have broken support for MATLAB and Java.

Reimplementing the Java functionality should be similar to the effort put into the C# code ~ 400 lines of code. In case Java support would be useful to you I am open to put in some time to reintroduce it ;)

rudi commented 2 years ago

Hi, thanks for the answer! Java support would be great to have for us. If you restore the files, I can help with testing and documentation, probably also with implementation.

clegaard commented 2 years ago

Sounds great. I created a new branch called java where I added some placeholder for the Java files. Previously I used the maven build system, but it felt a bit cumbersome. This time I used gradle. Do you have any strong preferences?

rudi commented 2 years ago

I use gradle in another project, so prefer gradle as well.

clegaard commented 2 years ago

Great!

Current status is:

What remains to be done can be summarized as:

Referencing the csharp assets should provide a good starting point.

I will be going on vacation this Saturday, so I won't be working on it for the next week. However, your help would be very welcome, even if it is just fleshing out the Model.java file with placeholder definitions for the FMI methods :)

clegaard commented 2 years ago

I just created a new release which provides a Java backend. You should be able to create an FMU like:

unifmu generate java my_java_fmu

In case of problems, please submit a ticket :)

rudi commented 2 years ago

Many thanks! I'm at home with an ARM computer right now, will test on Friday when I'm back at an Intel machine.