Callback-API for modbus slaves
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).
I like the general idea of this (a lot) but haven't tried this out yet.
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!
@ranft I'm sure you'll be interested by the recent changes I applied to libmodbus master few hours ago ;)
https://github.com/stephane/libmodbus/commit/73a88a747c473a7427ef70f0351ff6f5370c3495