Add file operations functions
Add support for Read File Record (0x14) and Write File Record (0x15) functions. Supports single file read/write.
There was already a pull-request #407 trying to add file-support. Not integrated though. Have you seen it?
@pboettch I have seen it, also looks fine too. I've pushed my changes since those were left after implementing this functionality to one project I was doing, so I though I could share them. Personally I don't know which solution is better/cleaner.
I'm currently implementing the reply-function in my fork and took a look at the MODBUS-spec and figured out that the FILE-operation allow requesting multiple sub-requests for 0x14 and 0x15. Either I overlooked it or you didn't implement it in your reply-implementation. Could you explain why? Could it be, because libmodbus itself does not allow doing multiple sub-requests?
To avoid duplicated work, I implemented sub-request handling for file-read/write on a local repo, I will publish when the reply is working as well.
@pboettch that's correct. This implementation is working only with single sub-request due to simplicity reasons. libmodbus should handle it just fine, only the protocol handling will be more complex. It was enough for my use cases. If you are planning to extend it, that would be great.