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

Class MySubHandler

tests/tests_subscriptions.py:32–48  ·  view source on GitHub ↗

More advanced subscription client using Future, so we can wait for events in tests

Source from the content-addressed store, hash-verified

30
31
32class MySubHandler():
33
34 """
35 More advanced subscription client using Future, so we can wait for events in tests
36 """
37
38 def __init__(self):
39 self.future = Future()
40
41 def reset(self):
42 self.future = Future()
43
44 def datachange_notification(self, node, val, data):
45 self.future.set_result((node, val, data))
46
47 def event_notification(self, event):
48 self.future.set_result(event)
49
50
51class MySubHandler2():

Calls

no outgoing calls