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

Publish rate throttled to 1hz #1

Open
rokel opened this issue Aug 16, 2021 · 2 comments
Open

Publish rate throttled to 1hz #1

rokel opened this issue Aug 16, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@rokel
Copy link

rokel commented Aug 16, 2021

When using the OPC-UA -> DDS route, the publish rate of the gateway seems to be throttled to 1Hz, regardless of the publishing_interval set for any subscription.

As far as I can tell this is due to this hard-coded parameter:

https://github.com/rticommunity/rticonnextdds-gateway-opcua/blob/master/src/opcUaSdk/OpcUaSdkClientProperty.hpp#L28

Changing e.g. to 10ms it seems to fix the issue. Is this intended behaviour?

@fgaranda
Copy link
Member

Hi @rokel,

That's true, the underlying OPC UA Client doesn't have an event-driven main loop or its own thread, so we must call periodically UA_Client_run_iterate in a separate thread that is part of the Gateway. The default value of run_async_timeout does indeed throttle the publishing_interval for any subscription.

We chose a default value of 1000ms, which may be too slow as a default value -- we can look into that. In any case, we should definitely provide an option to configure run_async_timeout via XML. The plumbing for such configuration parameter is almost there, let me take a look at it'll create a PR with the new configuration parameter. Would this work for you?

@fgaranda fgaranda self-assigned this Aug 18, 2021
@fgaranda fgaranda added the enhancement New feature or request label Aug 18, 2021
@rokel
Copy link
Author

rokel commented Aug 19, 2021

Thank you for the prompt response and explanation, that makes sense. Yes, a configuration parameter to set this would certainly solve the issue for us.

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

No branches or pull requests

2 participants