MCPcopy Create free account
hub / github.com/FreeOpcUa/python-opcua / SubHandler

Class SubHandler

examples/client-example.py:22–35  ·  view source on GitHub ↗

Subscription Handler. To receive events from server for a subscription data_change and event methods are called directly from receiving thread. Do not do expensive, slow or network operation there. Create another thread if you need to do such a thing

Source from the content-addressed store, hash-verified

20
21
22class SubHandler(object):
23
24 """
25 Subscription Handler. To receive events from server for a subscription
26 data_change and event methods are called directly from receiving thread.
27 Do not do expensive, slow or network operation there. Create another
28 thread if you need to do such a thing
29 """
30
31 def datachange_notification(self, node, val, data):
32 print("Python: New data change event", node, val)
33
34 def event_notification(self, event):
35 print("Python: New event", event)
36
37
38if __name__ == "__main__":

Callers 1

client-example.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected