Connection pooling in modbus binding

OK, here’s the first prototype, you can download the experimental plugin here. The source code is in my github modbus-pooling branch.

There are no configuration changes required from the user. The implementation makes sure that at most one read/write operation can access a modbus slave at the same time. It should work as long as we have the same connection setting in each modbus slave.

Different ModbusSerialSlaves can now have different serial parameters, enabling using of multiple serial ports (discussed here). Related issues #2043, #626 and perhaps #1865.

I have done simple integration test but have not yet time to test fully with a proper modbus server. Also, I haven’t had possibility to test with serial devices, so let’s see how this works.

I think this is most critical for serial devices, since command received while polling the data corrupts the data stream. It might help also some tcp servers although PR #3228 (and later PR # 3512, see issue #3818 for more details) probably fixes most cases (but still writing while reading is an issue due to incomplete synchronization).

Hopefully the jar is packaged correctly and contains all the necessary stuff. As this is includes quite large changes from the code side, a thorough testing is needed. Thus I welcome you all to test this down and find out the bugs! :slightly_smiling:

P.S. I will have limited access to email and codes during the next two-three weeks but I’ll try to keep monitoring this thread.