Skip to content
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

Open
wants to merge 15 commits into
base: development
Choose a base branch
from

Conversation

fre-ros
Copy link
Contributor

@fre-ros fre-ros commented Dec 3, 2024

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 value oneshot_timeout. I feel that maybe there is a better way to name these fields, what do you think?

  • Added new functionality for oneshot command inp_modbus.c
  • Fixed some incorrect printf format strings in modbus_poll_callback
  • Updated man page

@fre-ros
Copy link
Contributor Author

fre-ros commented Dec 6, 2024

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.

@fre-ros
Copy link
Contributor Author

fre-ros commented Feb 11, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants