openhab / jamod

A fork of Java Modbus Library (jamod) - http://jamod.sourceforge.net/
Apache License 2.0
17 stars 26 forks source link

[modbus] add support for RTU encoding over TCP #8

Closed andrewfg closed 3 years ago

andrewfg commented 3 years ago

Until now, this library did not support RTU encoding over TCP.

This PR adds a new transport to provide RTU encoding over TCP.

This new transport is essentially a copy/paste/merge based on the existing 'RTU over Serial' and 'TCP over TCP' transports.

NOTE: this PR is the foundation for the following PRs..

andrewfg commented 3 years ago

@ssalonen can you please review?

andrewfg commented 3 years ago

Cc @kaikreuzer @fwolter - requesting review please.

fwolter commented 3 years ago

Did you try to file this PR against the upstream project? I think we should try to keep the difference to upstream as small as possible.

andrewfg commented 3 years ago

Did you try to file this PR against the upstream project?

I don’t think there is actually an upstream project any more. (??) As far as I can tell, it is a zombie..

ssalonen commented 3 years ago

@andrewfg @fwolter ... Correct, the upstream project (http://jamod.sourceforge.net/) is abandoded. The history of this repo is explained in the README.md. Basically, this originally comes from openhab1 version of modbus, with some minor fixes.

There are several forks from the original jamod, for example steveohara/j2mod which seems to be actively maintained and developed. However, transitioning to those should be discussed separately, there's many considerations (e.g. serial library used, necessary adjustments to transport bundle).

ssalonen commented 3 years ago

From my side no other changes expected. How about @andrewfg ?

andrewfg commented 3 years ago

How about @andrewfg ?

No. It is all stable for me. Which is just as well since @kaikreuzer merged it already anyway :)

kaikreuzer commented 3 years ago

Well, you could have planned further PRs, that's why I was asking. But ok, I'll then try to soon do a build and publish it to Bintray.

andrewfg commented 3 years ago

@kaikreuzer many thanks for merging this. Do I need to do anything more to get it built and cached on jfrog? Or is it all automatic?

EDIT: oops, I must have crossed with your prior post. Please ignore this one.

kaikreuzer commented 3 years ago

Here we go: https://bintray.com/openhab/mvn/jamod/1.3.0.OH#files/net%2Fwimpi%2Fjamod%2F1.3.0.OH

andrewfg commented 3 years ago

Cool. Thanks @kaikreuzer.