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

Function add_server_custom_enum_struct

tests/tests_enum_struct.py:31–40  ·  view source on GitHub ↗
(server)

Source from the content-addressed store, hash-verified

29 __repr__ = __str__
30
31def add_server_custom_enum_struct(server):
32 # import some nodes from xml
33 server.import_xml("tests/enum_struct_test_nodes.xml")
34 ns = server.get_namespace_index('http://yourorganisation.org/struct_enum_example/')
35 uatypes.register_extension_object('ExampleStruct', ua.NodeId(5001, ns), ExampleStruct)
36 val = ua.ExampleStruct()
37 val.IntVal1 = 242
38 val.EnumVal = ua.ExampleEnum.EnumVal2
39 myvar = server.get_node(ua.NodeId(6009, ns))
40 myvar.set_value(val)

Callers 1

setUpClassMethod · 0.90

Calls 4

set_valueMethod · 0.80
import_xmlMethod · 0.45
get_namespace_indexMethod · 0.45
get_nodeMethod · 0.45

Tested by

no test coverage detected