-
Notifications
You must be signed in to change notification settings - Fork 4
Opencmw-cpp interoperability fixes and testing #239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
serialiser/src/main/java/io/opencmw/serialiser/spi/WireDataFieldDescription.java
Fixed
Show fixed
Hide fixed
b59e823 to
ca0c7f5
Compare
ca0c7f5 to
f7d90f9
Compare
client/src/test/java/io/opencmw/client/OpenCmwCppInteropTest.java
Dismissed
Show dismissed
Hide dismissed
serialiser/src/main/java/io/opencmw/serialiser/spi/FastByteBuffer.java
Dismissed
Show dismissed
Hide dismissed
f7d90f9 to
c68ae1b
Compare
c68ae1b to
1a14a65
Compare
RalphSteinhagen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK...
While from a design point of view, the type hierarchy could be stream-lined a bit more into signed/unsigned and 8, 16, 32, 64-bit width fundamental integer, + float + string types, we should leave the ambiguity of byte and char (Java vs. C++, i.e. Java 16 bit, vs. C/C++ 8 bit/UTF8, or wchar) since this is an unlikely but possible feature that FESA/Japc developer/user might rely upon.
Can be merged as is. Optional to be verified:
- missing newline at the end of files (cosmetic nag by GH inspections)
- missing
@Overrideand other security bot complaints - JSON iter dependency (i.e. do we need to explicitly pull this in as a primary dependency. AFAIK this is only needed for testing/benchmarking).
Opencmw-java and opencmw-cpp used different metadata entries for the field descriptions. While opencmw-cpp serialised [description(string), unit(string), modifier(byte/enum)], opencmw-java used [description(string), unit(string), direction(string), groups(string[])]. This lead to failures in deserialising c++ serialised field medatadata. These changes make opencmw-java use the same format as c++. Signed-off-by: Alexander Krimm <A.Krimm@gsi.de>
Signed-off-by: Alexander Krimm <A.Krimm@gsi.de>
char in c++ is usually represented as 1 byte, while java chose 2 bytes. To allow for interoperability, this changes the serialisation to only use a single byte. Since this replaces a memcpy by a naive for loop, it could probably be improved by doing it in a tight loop, and using more efficient conversion functions. This first step gets the 2 implementations to be consistent, performance improvements can be added later on. Signed-off-by: Alexander Krimm <A.Krimm@gsi.de>
To run the tests locally, copy the Compatibility test executable from opencmw-cpp to the repository root. The CI will fetch it from the artifact of opencmw-cpp. If it is not available, the tests will be skipped. Signed-off-by: Alexander Krimm <A.Krimm@gsi.de>
1a14a65 to
14847e6
Compare
Follow-up of #223 and companion PR to fair-acc/opencmw-cpp#389
Should be merged after that one, to ensure that the compatibility test is correctly run.
Changes:
missing functionality: