tokio-modbus icon indicating copy to clipboard operation
tokio-modbus copied to clipboard

[WIP] Issue 40: read device identification

Open ptasz3k opened this issue 4 years ago • 7 comments

Response and request de- and serialization is done, client api also. I would be grateful for review.

From my current understanding of the codebase the burden of creating server side logic for request processing is on the shoulders of user. In contrast to standard read-write registers functions this one is quite complicated. We have two options, both are not done for the moment:

  1. implement all the logic for that function in the library, user task is to initialize the Service with HashMap<int, string> (objId -> value),

  2. user handles segmentation and preparation of data, library checks if everything is ok (ascii is ascii, data fits in pdu and so on).

Personally i like option 1 more, but it seems that it doesn't match the 'spirit' of tokio-modbus. What are your thoughts about that?

ptasz3k avatar Apr 22 '20 20:04 ptasz3k

Hi. Any chance to rebase this issue and merge? If not, can i submit it?

gustavowd avatar Apr 04 '23 13:04 gustavowd

Hi, I'll try to get back to it till the end of the week. Any thoughts about the question from original pr?

ptasz3k avatar Apr 04 '23 13:04 ptasz3k

stion from original pr?

I can't comment on what the server-side implementation should look like, as I'm not one of the core developers, but I always believe that integrating the library is the best idea.

I'm using your code in a fork on my github for the latest version of tokio-modbus. If you want to verify to use in your pull request, the link is: https://github.com/gustavowd/tokio-modbus/tree/device_identification

gustavowd avatar Apr 04 '23 20:04 gustavowd

Hi, thanks, i'll take a look at it!

ptasz3k avatar Apr 05 '23 07:04 ptasz3k

Rebase on current master is done, but slave/server-side code is still to be corrected.

ptasz3k avatar Apr 05 '23 08:04 ptasz3k

@gustavowd Unfortunately, I won't have the time needed to finish this until the end of May. If you want to do it sooner, go ahead!

ptasz3k avatar Apr 20 '23 13:04 ptasz3k

What is the plan with this PR?

uklotzde avatar Jan 19 '24 11:01 uklotzde

Please re-open when ready.

uklotzde avatar Mar 21 '24 15:03 uklotzde