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

Method make_node_code

schemas/generate_address_space.py:141–150  ·  view source on GitHub ↗
(self, obj, indent)

Source from the content-addressed store, hash-verified

139 ''')
140
141 def make_node_code(self, obj, indent):
142 self.writecode(indent, 'node = ua.AddNodesItem()')
143 self.writecode(indent, 'node.RequestedNewNodeId = {}'.format(nodeid_code(obj.nodeid)))
144 self.writecode(indent, 'node.BrowseName = {}'.format(bname_code(obj.browsename)))
145 self.writecode(indent, 'node.NodeClass = NodeClass.{0}'.format(obj.nodetype[2:]))
146 if obj.parent and obj.parentlink:
147 self.writecode(indent, 'node.ParentNodeId = {}'.format(nodeid_code(obj.parent)))
148 self.writecode(indent, 'node.ReferenceTypeId = {0}'.format(self.to_ref_type(obj.parentlink)))
149 if obj.typedef:
150 self.writecode(indent, 'node.TypeDefinition = {}'.format(nodeid_code(obj.typedef)))
151
152 def to_data_type(self, nodeid):
153 if not nodeid:

Callers 7

make_object_codeMethod · 0.95
make_object_type_codeMethod · 0.95
make_variable_codeMethod · 0.95
make_method_codeMethod · 0.95
make_reference_codeMethod · 0.95
make_datatype_codeMethod · 0.95

Calls 4

writecodeMethod · 0.95
to_ref_typeMethod · 0.95
nodeid_codeFunction · 0.85
bname_codeFunction · 0.85

Tested by

no test coverage detected