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

Method get_attribute

opcua/common/node.py:265–277  ·  view source on GitHub ↗

Read one attribute of a node result code from server is checked and an exception is raised in case of error

(self, attr)

Source from the content-addressed store, hash-verified

263 result[0].check()
264
265 def get_attribute(self, attr):
266 """
267 Read one attribute of a node
268 result code from server is checked and an exception is raised in case of error
269 """
270 rv = ua.ReadValueId()
271 rv.NodeId = self.nodeid
272 rv.AttributeId = attr
273 params = ua.ReadParameters()
274 params.NodesToRead.append(rv)
275 result = self.server.read(params)
276 result[0].StatusCode.check()
277 return result[0]
278
279 def get_attributes(self, attrs):
280 """

Callers 15

get_browse_nameMethod · 0.95
get_display_nameMethod · 0.95
get_data_typeMethod · 0.95
get_access_levelMethod · 0.95
get_user_access_levelMethod · 0.95
get_event_notifierMethod · 0.95
get_node_classMethod · 0.95
get_descriptionMethod · 0.95
get_data_valueMethod · 0.95
get_array_dimensionsMethod · 0.95
get_value_rankMethod · 0.95

Calls 2

checkMethod · 0.80
readMethod · 0.45

Tested by 1

test_xml_varsMethod · 0.64