-
Notifications
You must be signed in to change notification settings - Fork 4
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
Added support for "oneshot" modbus requests #30
base: development
Are you sure you want to change the base?
Added support for "oneshot" modbus requests #30
Conversation
… through the array parameter 'modbus_oneshot_timeout_ms' - Fixed some incorrect printf format strings in modbus_poll_callback
This reverts commit 8596166.
…e nodes after queuing data
Added missing "greater" in modbus_oneshot_timeout_ms description Fixed indentation in modbus_oneshot_timeout_ms description
After some more testing something seems amiss. If I disconnect my modbus server from the network then rrr will only give me the "queued" modbus_oneshot_status and not "timeout" for around 30 seconds when I do new requests. After that the "timeout" status appears. So for some reason p_modbus.c doesn't send the timeout status for the first 30 seconds when the modbus server is unresponsive. |
After our email conversation this is not an issue, so I think this is ready for merge. |
I added functionality for a "oneshot" modbus command that always sends one modbus requests instead of polling with an interval.
To trigger a oneshot command one should pass the option
modbus_oneshot_timeout_ms
.If a timeout happens the module now returns a response with tag
modbus_error
and string valueoneshot_timeout
. I feel that maybe there is a better way to name these fields, what do you think?p_modbus.c
modbus_poll_callback