tokio-modbus
tokio-modbus copied to clipboard
[WIP] Issue 40: read device identification
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:
-
implement all the logic for that function in the library, user task is to initialize the Service with HashMap<int, string> (objId -> value),
-
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?
Hi. Any chance to rebase this issue and merge? If not, can i submit it?
Hi, I'll try to get back to it till the end of the week. Any thoughts about the question from original pr?
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
Hi, thanks, i'll take a look at it!
Rebase on current master is done, but slave/server-side code is still to be corrected.
@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!
What is the plan with this PR?
Please re-open when ready.