6 from IPython
import embed
11 self.
val = MessageSecurityMode.None
14 print(
"Python: New data change event", handle, node, val, attr)
18 if __name__ ==
"__main__":
19 client = opcua.Client(
True)
20 client.connect(
"opc.tcp://utgaard:4841")
23 root = client.get_root_node()
24 print(
"I got root: ", root)
25 print(
"Childs are: ", root.get_children())
28 myvar = client.get_node(opcua.NodeId(
"ns=1;i=1001"))
32 print(
"myvar is: ", myvar)
35 sub = client.create_subscription(100, sclt)
36 handle = sub.subscribe_data_change(myvar)
37 print(
"Subscribe handle is: ", handle)
FMT_API void print(std::FILE *f, CStringRef format_str, ArgList args)
def data_change(self, handle, node, val, attr)