eta_utility.servers.opc_ua module
- class eta_utility.servers.opc_ua.OpcUaServer(namespace: str | int, ip: str | None = None, port: int = 4840)[source]
- Bases: - object- Provides an OPC UA server with a number of specified nodes. Each node can contain single values or arrays. - Parameters:
- namespace – Namespace of the OPC UA Server. 
- ip – IP Address to listen on (default: None). 
- port – Port to listen on (default: 4840). 
 
 - write(values: Mapping[NodeOpcUa, Any]) None[source]
- Write some values directly to the OPC UA server. - Parameters:
- values – Dictionary of data to write {node.name: value}. 
 
 - read(nodes: NodeOpcUa | Nodes[NodeOpcUa] | None = None) pd.DataFrame[source]
- Read some manually selected values directly from the OPC UA server. - Parameters:
- nodes – Single node or list/set of nodes to read from. 
- Returns:
- pandas.DataFrame containing current values of the OPC UA-variables. 
- Raises:
- RuntimeError – When an error occurs during reading. 
 
 - create_nodes(nodes: Nodes[NodeOpcUa]) None[source]
- Create nodes on the server from a list of nodes. This will try to create the entire node path. - Parameters:
- nodes – List or set of nodes to create. 
 
 - delete_nodes(nodes: Nodes[NodeOpcUa]) None[source]
- Delete the given nodes and their parents (if the parents do not have other children). - Parameters:
- nodes – List or set of nodes to be deleted.