Represents an OPCUA server. More...
Inherits object.
Public Member Functions | |
int | add_namespace (self, str name) |
Adds a new namespace defined as a string to the server. More... | |
None | add_node (self, cvb.opcua.BaseNode node) |
Adds an OPCUA node to the server. More... | |
cvb.opcua.Server | create (int port) |
Creates an OPCUA server with the specified port number. More... | |
None | delete_node (self, cvb.opcua.NodeID node_id) |
Removes an OPCUA node from the OPCUA server. More... | |
Union[cvb.opcua.BaseNode, cvb.opcua.IntegerNode, cvb.opcua.StringNode, cvb.opcua.FloatNode, cvb.opcua.VariableNode, cvb.opcua.MethodNode, cvb.opcua.ObjectNode] | node (self, cvb.opcua.NodeID node_id) |
Returns the node with the given node ID. More... | |
None | start (self) |
Starts the OPCUA server. | |
None | stop (self) |
Stops the OPCUA server. | |
Properties | |
discoveryURL = property | |
str: Gets the URL of an OPCUA server as string. More... | |
Represents an OPCUA server.
It handles the server-side of the OPCUA client/server interaction. Unlike the cvb.opcua.Client, the server has start and stop operations. Primary tool for OPCUA modeling is the Server.add_node method. See also cvb.opcua.BaseNode for details.
int add_namespace | ( | self, | |
str | name | ||
) |
Adds a new namespace defined as a string to the server.
The namespace index of this namespace will be returned. The namespace index of the new assigned namespace is always assigned by the OPCUA server.
name : str Name for the new namespace.
int The namespace index.
None add_node | ( | self, | |
cvb.opcua.BaseNode | node | ||
) |
Adds an OPCUA node to the server.
See also cvb.opcua.BaseNode on node creation.
node : cvb.opcua.BaseNode Node to be added.
cvb.opcua.Server create | ( | int | port | ) |
Creates an OPCUA server with the specified port number.
The port must be a valid positive integer number. 4840 and 4843 are reserved for the OPCUA TCP protocol. They are usually used to connect to an LDS server. If you want to define a different number, please use a number in between 1024 and 65535 to avoid conflicting with well known ports, that are registered by the Internet Assigned Numbers Authority.
port : int The port number.
cvb.opcua.Server The server object.
None delete_node | ( | self, | |
cvb.opcua.NodeID | node_id | ||
) |
Removes an OPCUA node from the OPCUA server.
node_id : cvb.opcua.NodeID OPCUA node ID of the node to be removed form the server.
Union[cvb.opcua.BaseNode, cvb.opcua.IntegerNode, cvb.opcua.StringNode, cvb.opcua.FloatNode, cvb.opcua.VariableNode, cvb.opcua.MethodNode, cvb.opcua.ObjectNode] 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, cvb.opcua.ObjectNode] The node object; the object type will be the specialized if possible.
|
static |
str: Gets the URL of an OPCUA server as string.
The OPCUA server must be running on the URL being retrieved.