Open
Conversation
The parts of the error handling, where the same pattern was written along all the code, got unified into own functions in order to keep the code clean.
Contributor
|
I like the general idea of this (a lot) but haven't tried this out yet. |
The application now does get a notification after the read or write is done. Also the reason for the buffer retreival is now visible to the application.
| modbus-tcp-private.h \ | ||
| modbus-version.h | ||
| modbus-version.h \ | ||
| virtual-reply.c |
This was referenced May 18, 2016
Owner
|
I intend to apply a few changes on libmodbus (DRY in modbus_reply) and to review other work on callback feature before choosing the best way to add this feature. Stay tuned and thank you for your PR! |
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
modbus_reply-function was changed to support callbacks instead of a memory mapping. The memory mapping is now a specialized case of the callback mechanism, in order to handle both cases the same way (= no copies of existing code).