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

Method __init__

examples/server-create-custom-structures.py:8–17  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6class DemoServer:
7
8 def __init__(self):
9 self.server = Server()
10
11 self.server.set_endpoint('opc.tcp://0.0.0.0:51210/UA/SampleServer')
12 self.server.set_server_name('Custom structure demo server')
13 # idx name will be used later for creating the xml used in data type dictionary
14 self._idx_name = 'http://examples.freeopcua.github.io'
15 self.idx = self.server.register_namespace(self._idx_name)
16
17 self.dict_builder = DataTypeDictionaryBuilder(self.server, self.idx, self._idx_name, 'MyDictionary')
18
19 def __enter__(self):
20 return self

Callers

nothing calls this directly

Calls 5

ServerClass · 0.90
set_endpointMethod · 0.80
set_server_nameMethod · 0.80
register_namespaceMethod · 0.45

Tested by

no test coverage detected