-
Notifications
You must be signed in to change notification settings - Fork 271
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
Encode nil node id as zero #507
Conversation
a57c821
to
eef5288
Compare
This patch encodes a 'nil' NodeID as a two byte zero node id. See #506
Pinging the other OPC/UA experts on the team about this change. |
eef5288
to
19eef56
Compare
not sure... seems like encoding a However, I see this:
https://reference.opcfoundation.org/v104/Core/docs/Part3/8.2.4/ So maybe there is a valid reason. But in that case, I'd rather have a |
Having a function still means that you have to set it everywhere and |
It's the surprise factor. I'd be surprised if it didn't panic, and I might be surprised if it returned unexpected data because there was a special "null" node id generated (unexpectedly) behind the scenes. I just don't like surprises (birthday parties excepted). Where would we document that any where and for any reason a node id is nil, it will still (sorta) work? I would not expect a user to dig in and look at |
Since the concept of a What I'm struggling with is whether this should stop at the |
But it is also this inconsistency which makes me a bit reluctant about this PR in particular since we should either address all optional fields or none of them but not just a select few. |
Lets park this one. |
I'll close this one since there is no agreement. |
This patch encodes a
nil
NodeID as a two byte zero node id.See #506