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

Fix bug where certain server capability parameters were cast to u32 instead of u16 #39

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

gudjont89
Copy link

According to the OPC-UA standard (https://reference.opcfoundation.org/Core/Part5/v104/docs/6.3.2) the following parameters should have the type uint16:

  • MaxBrowseContinuationPoints
  • MaxHistoryContinuationPoints
  • MaxQueryContinuationPoints
    In the current implementation of the library, these parameters are cast to u32. This causes a type mismatch bug when connecting from an OPC-UA client on a B&R PLC to a server using the library. The fix was verified on that B&R PLC, but has not been tested on other PLCs.

This is according to the OPC-UA standard.
Copy link
Contributor

@einarmo einarmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh. These values being u16 honestly is bizarre to me. It's absolutely not inconceivable that you would want to support more than 65k continuation points on a sufficiently large server. I guess if you want that you're stuck with setting the value to 0? (We don't currently support this I think...). All that for a theoretical saving of 4 bytes...

Either way, thanks for your contribution!

@einarmo einarmo merged commit 9d2a452 into FreeOpcUa:master Feb 3, 2025
6 checks passed
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.

3 participants