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

Method save_to_file

opcua/common/structures.py:186–193  ·  view source on GitHub ↗
(self, path, register=False)

Source from the content-addressed store, hash-verified

184 self.model.append(struct)
185
186 def save_to_file(self, path, register=False):
187 _file = open(path, "w+")
188 self._make_header(_file)
189 for struct in self.model:
190 _file.write(struct.get_code())
191 if register:
192 _file.write(self._make_registration())
193 _file.close()
194
195 def _make_registration(self):
196 code = "\n\n"

Callers 4

save_and_importMethod · 0.95
test_custom_structsMethod · 0.95
uageneratestructsFunction · 0.80

Calls 5

_make_headerMethod · 0.95
_make_registrationMethod · 0.95
writeMethod · 0.45
get_codeMethod · 0.45
closeMethod · 0.45

Tested by 2

test_custom_structsMethod · 0.76