-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Callback-API for modbus slaves #323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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.
|
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation + name...
|
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! |
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).