High level client to connect to an OPC-UA server. This class makes it easy to connect and browse address space. It attemps to expose as much functionality as possible but if you want more flexibility it is possible and adviced to use UaClient object, available as self.uaclient which offers the raw OPC-UA services interface.
def opcua.client.client.Client.__init__ | ( | self, | |
url, | |||
timeout = 4 |
|||
) |
def opcua.client.client.Client.__enter__ | ( | self | ) |
def opcua.client.client.Client.__exit__ | ( | self, | |
exc_type, | |||
exc_value, | |||
traceback | |||
) |
def opcua.client.client.Client._add_anonymous_auth | ( | self, | |
params | |||
) | [private] |
def opcua.client.client.Client._add_certificate_auth | ( | self, | |
params, | |||
certificate, | |||
challenge | |||
) | [private] |
def opcua.client.client.Client._add_user_auth | ( | self, | |
params, | |||
username, | |||
password | |||
) | [private] |
def opcua.client.client.Client._encrypt_password | ( | self, | |
password, | |||
policy_uri | |||
) | [private] |
def opcua.client.client.Client.activate_session | ( | self, | |
username = None , |
|||
password = None , |
|||
certificate = None |
|||
) |
def opcua.client.client.Client.close_secure_channel | ( | self | ) |
def opcua.client.client.Client.close_session | ( | self | ) |
def opcua.client.client.Client.connect | ( | self | ) |
def opcua.client.client.Client.connect_socket | ( | self | ) |
def opcua.client.client.Client.create_session | ( | self | ) |
def opcua.client.client.Client.create_subscription | ( | self, | |
period, | |||
handler | |||
) |
Create a subscription. returns a Subscription object which allow to subscribe to events or data on server handler argument is a class with data_change and/or event methods. period argument is either a publishing interval in seconds or a CreateSubscriptionParameters instance. The second option should be used, if the opcua-server has problems with the default options. These methods will be called when notfication from server are received. See example-client.py. Do not do expensive/slow or network operation from these methods since they are called directly from receiving thread. This is a design choice, start another thread if you need to do such a thing.
def opcua.client.client.Client.delete_nodes | ( | self, | |
nodes, | |||
recursive = False |
|||
) |
def opcua.client.client.Client.disconnect | ( | self | ) |
def opcua.client.client.Client.disconnect_socket | ( | self | ) |
def opcua.client.client.Client.find_endpoint | ( | endpoints, | |
security_mode, | |||
policy_uri | |||
) | [static] |
def opcua.client.client.Client.find_servers | ( | self, | |
uris = None |
|||
) |
def opcua.client.client.Client.get_endpoints | ( | self | ) |
def opcua.client.client.Client.get_namespace_array | ( | self | ) |
def opcua.client.client.Client.get_namespace_index | ( | self, | |
uri | |||
) |
def opcua.client.client.Client.get_node | ( | self, | |
nodeid | |||
) |
def opcua.client.client.Client.get_objects_node | ( | self | ) |
def opcua.client.client.Client.get_root_node | ( | self | ) |
def opcua.client.client.Client.get_server_node | ( | self | ) |
def opcua.client.client.Client.load_client_certificate | ( | self, | |
path | |||
) |
def opcua.client.client.Client.load_private_key | ( | self, | |
path | |||
) |
def opcua.client.client.Client.open_secure_channel | ( | self, | |
renew = False |
|||
) |
def opcua.client.client.Client.register_server | ( | self, | |
server, | |||
discovery_configuration = None |
|||
) |
def opcua.client.client.Client.send_hello | ( | self | ) |
def opcua.client.client.Client.server_policy_id | ( | self, | |
token_type, | |||
default | |||
) |
def opcua.client.client.Client.server_policy_uri | ( | self, | |
token_type | |||
) |
def opcua.client.client.Client.set_security | ( | self, | |
policy, | |||
certificate_path, | |||
private_key_path, | |||
server_certificate_path = None , |
|||
mode = ua.MessageSecurityMode.SignAndEncrypt |
|||
) |
def opcua.client.client.Client.set_security_string | ( | self, | |
string | |||
) |
Set SecureConnection mode. String format: Policy,Mode,certificate,private_key[,server_private_key] where Policy is Basic128Rsa15 or Basic256, Mode is Sign or SignAndEncrypt certificate, private_key and server_private_key are paths to .pem or .der files Call this before connect()