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.MethodNode] | node (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... | |
Represents an OPCUA client.
It handles the client-side of the OPCUA client/server interaction.
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.
discover_url : str URL of the OPCUA server to be connected with.
cvb.opcua.Client The client object.
Union[cvb.opcua.BaseNode, cvb.opcua.IntegerNode, cvb.opcua.StringNode, cvb.opcua.FloatNode, cvb.opcua.VariableNode, cvb.opcua.MethodNode] node | ( | self, | |
cvb.opcua.NodeID | node_id | ||
) |
Returns the node with the given node ID.
node_id : cvb.opcua.NodeID Node ID for the desired node.
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).
cvb.opcua.BaseNode root_node | ( | self | ) |
Returns the root node of the server.
This is a helper for traversing the entire server structure.
cvb.opcua.BaseNode The root node.
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.
cvb.opcua.Subscription The subscription object.