I come from the PLC4X project (https://plc4x.apache.org
) and we use netty as backbone for our drivers to communicate with PLCs.
But as some older PLCs are connected via Serial Ports we have the need to communicate with them as well.
In all our test it works quite nicely and can be used under Apache 2.0 License so its a good fit.
But it relies on the (now deprecated) Oio Classes (as this is the rather straightforward approach).
As solution I sat down and wrote a prototypic implementation of a Bridge between jSerialComm and Netty based on the Nio Classes.
The code can be found at .
JSerialComm provides an event based approach (I have no idea how it works internally) so it is really non blocking and does not need any polling or so.
But, of course quite some hacking is involved and currently i'm usure whether it compiles on newer JDKs as I do a bit of reflection to access (package) private fields from netty.
But today I hat the time to make a first round trip test with a real COM Port and to my astonishment it really worked.
I have two questions now.
First, I would of course like any comments on my work and if its done "okay" or if things could be improved.
Second, and most important, I'm unsure where to put that code. We can include it in the PLC4X project as we need it there.
But over time it will be hard to maintain it there as we have not that much people that know netty internals.
So one consideration was if the netty project would accept such a code donation and take it into the netty codebase and maintain it there.
What are your ideas or comments, I woudl really appreciate any feedback!