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
I have observed that in the current implementation of Free OPC UA, datachange events are only triggered when the Variant value of a node changes. This behavior raises a few questions and concerns:
1. Why is the datachange event only triggered by changes in the Variant value?
2. Why not compare the entire DataValue object to trigger the datachange event, including changes in the timestamp?
3. If I want to trigger datachange events when the timestamp of the DataValue changes, is the only solution to modify the set_attribute_value method in the Address_space?
I expected that a datachange event would be triggered when any part of the DataValue (including the timestamp) changes, not just when the Variant value changes.
Currently, the datachange event is only triggered if the Variant value changes, as shown in the code snippet:
if old.Value != value.Value: # only send call callback when a value change has happened
cbs = list(attval.datachange_callbacks.items())
Here is a brief description of the use case: In our application, we need to ensure that subscribers are notified not only when the value changes but also when the timestamp changes. This is important for certain monitoring and logging requirements where the timestamp itself is a critical piece of information.If applicable, here is a code snippet demonstrating the current behavior and a potential modification:
# Current behavior
if old.Value != value.Value: # only send call callback when a value change has happened
cbs = list(attval.datachange_callbacks.items())
# Proposed change to trigger on any DataValue change
if old != value: # trigger on any change in DataValue
cbs = list(attval.datachange_callbacks.items())
The text was updated successfully, but these errors were encountered:
Thank you for your prompt response and assistance.
I have made the following changes to my code to set up the DataChangeTrigger to StatusValueTimestamp:
However, I noticed the following issue, DataChangeHandler Not Triggered on Timestamp Change: Despite setting the DataChangeTrigger to StatusValueTimestamp, the handler function is not triggered when only the timestamp changes.
Could you please review the code and let me know if there is anything I am missing or doing incorrectly? Any guidance on resolving this issue would be greatly appreciated.
python version 3.9.12
opcua version 0.98.13
Thank you for your assistance.
I have observed that in the current implementation of Free OPC UA, datachange events are only triggered when the Variant value of a node changes. This behavior raises a few questions and concerns:
I expected that a datachange event would be triggered when any part of the DataValue (including the timestamp) changes, not just when the Variant value changes.
Currently, the datachange event is only triggered if the Variant value changes, as shown in the code snippet:
Here is a brief description of the use case: In our application, we need to ensure that subscribers are notified not only when the value changes but also when the timestamp changes. This is important for certain monitoring and logging requirements where the timestamp itself is a critical piece of information.If applicable, here is a code snippet demonstrating the current behavior and a potential modification:
The text was updated successfully, but these errors were encountered: