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

Handle invalid references when browsing #77

Merged
merged 2 commits into from
Mar 18, 2024
Merged

Handle invalid references when browsing #77

merged 2 commits into from
Mar 18, 2024

Conversation

sgoll
Copy link
Contributor

@sgoll sgoll commented Mar 15, 2024

Description

Some PLCs return an invalid (unset) array of references when browsing a node with no children. While not exactly specified in the OPC UA standard, the sensible thing to do here is to threat it the same as an empty array and not as an error.

@sgoll sgoll requested a review from uklotzde March 15, 2024 16:03
@sgoll sgoll force-pushed the browse-references branch from 569b6ea to 78154fc Compare March 16, 2024 00:23
@uklotzde uklotzde merged commit 2213439 into main Mar 18, 2024
13 checks passed
@uklotzde uklotzde deleted the browse-references branch March 18, 2024 11:38
uklotzde pushed a commit that referenced this pull request Mar 19, 2024
## Description

This removes the unnecessary `Option` from the return type of
`AsyncClient::call_method()`. It was used to indicate that the method
returned an unset (invalid) array of output arguments but that should
not happen within the specification.[^1]

[^1]: In any case, it would be unclear what the meaning behind this was
when the call itself was successful.

We treat this as an empty list of output arguments, similar to what we
did for `AsyncClient::browse()` in #77.
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