2 sys.path.insert(0,
"..")
6 from opcua
import ua, Server
9 if __name__ ==
"__main__":
13 server.set_endpoint(
"opc.tcp://0.0.0.0:4840/freeopcua/server/")
16 uri =
"http://examples.freeopcua.github.io" 17 idx = server.register_namespace(uri)
20 objects = server.get_objects_node()
23 myobj = objects.add_object(idx,
"MyObject")
24 myvar = myobj.add_variable(idx,
"MyVariable", 6.7)
35 myvar.set_value(count)