CVBpy 14.0
BaseNode Class Reference

Represents the base class of all other OPCUA nodes. More...

Inherits object.

Inherited by MethodNode, ObjectNode, and VariableNode.

Public Member Functions

List[cvb.opcua.NodeIDbrowse (self, cvb.opcua.BrowseFilter filter_options)
 Enumerates the child nodes present in the OPCUA server. More...
 
Union[int, float, str] get_attribute (self, int attribute_id)
 Gets specific information about this node. More...
 
cvb.opcua.NodeID node_id (self)
 Gets the OPCUA node ID of this node. More...
 
None set_attribute (self, int attribute_id, Union[int, float, str] value)
 Sets specific information about this node. More...
 

Properties

 access = property
 int: Gets access rights to this node (see cvb.opcua.Access).
 
 browse_name = property
 str: Gets the browse name of this node.
 
 connection_status = property
 int: Gets connection status of this node (see cvb.opcua.ConnectionStatus).
 
 description = property
 str: Gets description of this node.
 
 display_name = property
 str: Gets the human-readable name of this node.
 
 node_class = property
 int: Gets OPCUA node class of this node (see cvb.opcua.NodeClass).
 

Detailed Description

Represents the base class of all other OPCUA nodes.

For instantiation of a specific node type, use one of the specific subclasses. Note that this class does not expose any public interface. OPCUA nodes are available for different node classes.

Member Function Documentation

◆ browse()

List[cvb.opcua.NodeID] browse (   self,
cvb.opcua.BrowseFilter  filter_options 
)

Enumerates the child nodes present in the OPCUA server.

Enumerates the child nodes present in the OPCUA server. See cvb.opcua.BrowseFilter for further browsing options. The OPCUA client must be connected to a OPCUA server to succeed. The cvb.opcua.BaseNode.browse method is only valid on nodes extracted via a client.

Parameters

filter_options : cvb.opcua.BrowseFilter Filtering parameters for browsing.

Returns

List[cvb.opcua.NodeID] A list of nodes filtered by the applied options.

◆ get_attribute()

Union[int, float, str] get_attribute (   self,
int  attribute_id 
)

Gets specific information about this node.

Try avoiding this function if possible. Most information should already be available via the dedicated property such as cvb.opcua.BaseNode.display_name. Furthermore, not all information may not make sense for cvb.opcua.BaseNodes; some pieces of information might be applicable to a specific subclass suc has cvb.opcua.FloatNode, but not for cvb.opcua.ObjectNode. Again, try using methods/properties in the appropriate subclass.

Parameters

attribute_id : int Identifier of the desired information (see cvb.opcua.AttributeID).

Returns

Union[int, float, str] The desired information.

◆ node_id()

cvb.opcua.NodeID node_id (   self)

Gets the OPCUA node ID of this node.

Returns

cvb.opcua.NodeID The OPCUA node ID of this node.

◆ set_attribute()

None set_attribute (   self,
int  attribute_id,
Union[int, float, str]  value 
)

Sets specific information about this node.

Try avoiding this function if possible. Most information should already be available via the dedicated property such as cvb.opcua.BaseNode.display_name. Furthermore, not all information may not make sense for cvb.opcua.BaseNodes; some pieces of information might be applicable to a specific subclass such as cvb.opcua.FloatNode, but not for cvb.opcua.ObjectNode. Again, try using methods/properties in the appropriate subclass.

Parameters

attribute_id : int Identifier of the desired information (see cvb.opcua.AttributeID).

value : Union[int, float, str] New value for the attribute.