Enhance OpcManager logging for data change notifications

- Added logging statements to OpcManager to track data change notifications and cycle count resets for monitored tags.
- Improved traceability of events related to OPC cycles, aiding in debugging and monitoring.
This commit is contained in:
vitor-aignosi
2025-05-05 11:10:16 -03:00
parent 5f95b6309e
commit 342535b7e7

View File

@@ -222,6 +222,12 @@ class OpcManager():
source_timestamp = monitored_item.Value.SourceTimestamp
tag = str(node)
self.logger.info(
f"Data change notification received for tag: {tag} after {self.nodes[tag]['cycle_rule']['cycle_count']} cycles")
self.logger.info(
f"Resetting cycle count for tag: {tag} after {self.non_receive_count} OPC cycles")
self.nodes[tag]['cycle_rule']['cycle_count'] = 0
self.non_receive_count = 0