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
Hi as the title says, I want to compare the values of two nodes.
I want to make sure that python does nothing unintendet in the background with the node datatypes.
For example when comparing nodes with different types of int: int16, int32, int64, Uint16, Uint32, Uint64.
I'm worried that the python "==" could create false positive or general negative results when comparing plain values of nodes
Is there a better way to compare two ua.DataValue() or ua.Variant() that keeps the datatype of the value in mind?
Instances of these classes can't be compared directly since they also have a timestamp that might not be important for comparing their values.
Sth like this:
value1 = node1.read_data_value().Value.Value
value2 = node2.read_data_value().Value.Value
print(ua.uatypes.compare_variants(value1, value2)).
# Returns True if both values are the same when cast to the same datatype
The text was updated successfully, but these errors were encountered:
Hi as the title says, I want to compare the values of two nodes.
I want to make sure that python does nothing unintendet in the background with the node datatypes.
For example when comparing nodes with different types of int: int16, int32, int64, Uint16, Uint32, Uint64.
I'm worried that the python "==" could create false positive or general negative results when comparing plain values of nodes
Example
Is there a better way to compare two ua.DataValue() or ua.Variant() that keeps the datatype of the value in mind?
Instances of these classes can't be compared directly since they also have a timestamp that might not be important for comparing their values.
Sth like this:
The text was updated successfully, but these errors were encountered: