CVBpy 14.0
Client Class Reference

Represents an OPCUA client. More...

Inherits object.

Public Member Functions

cvb.opcua.Client create (str discover_url)
 Creates an OPCUA client object. More...
 
Union[cvb.opcua.BaseNode, cvb.opcua.IntegerNode, cvb.opcua.StringNode, cvb.opcua.FloatNode, cvb.opcua.VariableNode, cvb.opcua.MethodNodenode (self, cvb.opcua.NodeID node_id)
 Returns the node with the given node ID. More...
 
cvb.opcua.BaseNode root_node (self)
 Returns the root node of the server. More...
 
cvb.opcua.Subscription subscribe (self)
 Creates an OPCUA subscription for this client. More...
 

Detailed Description

Represents an OPCUA client.

It handles the client-side of the OPCUA client/server interaction.

Member Function Documentation

◆ create()

cvb.opcua.Client create ( str  discover_url)

Creates an OPCUA client object.

And connect it to a given server. There is no disconnect / connect function. The client is connect at creation and disconnected on deconstruction.

Parameters

discover_url : str URL of the OPCUA server to be connected with.

Returns

cvb.opcua.Client The client object.

◆ node()

Returns the node with the given node ID.

Parameters

node_id : cvb.opcua.NodeID Node ID for the desired node.

Returns

Union[cvb.opcua.BaseNode, cvb.opcua.IntegerNode, cvb.opcua.StringNode, cvb.opcua.FloatNode, cvb.opcua.VariableNode, cvb.opcua.MethodNode] The node object (this will be the specialized type if possible).

◆ root_node()

cvb.opcua.BaseNode root_node (   self)

Returns the root node of the server.

This is a helper for traversing the entire server structure.

Returns

cvb.opcua.BaseNode The root node.

◆ subscribe()

cvb.opcua.Subscription subscribe (   self)

Creates an OPCUA subscription for this client.

You can add a node as monitored items to receive updates when the data changes.

Returns

cvb.opcua.Subscription The subscription object.