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

Function _get_enum_strings

opcua/common/structures.py:364–369  ·  view source on GitHub ↗
(name, node)

Source from the content-addressed store, hash-verified

362
363
364def _get_enum_strings(name, node):
365 def_node = node.get_child("0:EnumStrings")
366 val = def_node.get_value()
367 c = EnumType(name)
368 c.fields = [EnumeratedValue(st.Text, idx) for idx, st in enumerate(val)]
369 return c

Callers 1

load_enumsFunction · 0.85

Calls 4

EnumTypeClass · 0.85
EnumeratedValueClass · 0.85
get_childMethod · 0.80
get_valueMethod · 0.80

Tested by

no test coverage detected