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

Class Struct

schemas/generate_model.py:46–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44
45
46class Struct(object):
47 def __init__(self):
48 self.name = None
49 self.basetype = None
50 self.doc = ""
51 self.fields = []
52 self.bits = {}
53 self.needconstructor = None
54 self.needoverride = False
55 self.children = []
56 self.parents = []
57 self.extensionobject = False # used for struct which are not pure extension objects
58
59 def get_field(self, name):
60 for f in self.fields:
61 if f.name == name:
62 return f
63 raise Exception(f'field not found: {name}')
64
65 def __str__(self):
66 return f'Struct {self.name}:{self.basetype}'
67
68 __repr__ = __str__
69
70
71class Field(object):

Callers 4

split_requestsFunction · 0.70
add_extension_objectMethod · 0.70
parse_structMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected