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

Class SubHandler

examples/server-ua-python-mirror.py:20–33  ·  view source on GitHub ↗

Subscription Handler. To receive events from server for a subscription. The handler forwards updates to it's referenced python object

Source from the content-addressed store, hash-verified

18
19
20class SubHandler(object):
21 """
22 Subscription Handler. To receive events from server for a subscription.
23 The handler forwards updates to it's referenced python object
24 """
25
26 def __init__(self, obj):
27 self.obj = obj
28
29 def datachange_notification(self, node, val, data):
30 # print("Python: New data change event", node, val, data)
31
32 _node_name = node.get_browse_name()
33 setattr(self.obj, _node_name.Name, data.monitored_item.Value.Value.Value)
34
35
36class UaObject(object):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected