You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to set or unset the final bit of signed integer values (sbyte, int16/32/64) I am getting an out of bounds error.
I am connecting to a third party server, getting the node that I require and running the following code:
defset_bit(node: SyncNode, bit: int, value: bool):
'''Sets the value of the indicated bit for the given node.'''ifvalue:
node.set_attr_bit(asyncua.ua.AttributeIds.Value, bit)
else:
node.unset_attr_bit(asyncua.ua.AttributeIds.Value, bit)
This raises an exception for certain values of bit (7 for sbyte, 15 for int16...) giving the reason (int16 example):
struct.error: short format requires -32768 <= number <= 32767
However this does not fail if the function would not actually change the value of the bit, for example the following code would run without issues:
When attempting to set or unset the final bit of signed integer values (sbyte, int16/32/64) I am getting an out of bounds error.
I am connecting to a third party server, getting the node that I require and running the following code:
This raises an exception for certain values of
bit
(7 for sbyte, 15 for int16...) giving the reason (int16 example):However this does not fail if the function would not actually change the value of the bit, for example the following code would run without issues:
Finally, there are no issues when using unsigned variable types (byte, uint16/32/64).
Python-Version: 3.12
opcua-asyncio Version: 1.0.6
The text was updated successfully, but these errors were encountered: