mxcubecore.Command.exporter.ExporterClient#

Exporter Client implementation

Classes

ExporterClient(server_ip, server_port, ...)

ExporterClient class

class mxcubecore.Command.exporter.ExporterClient.ExporterClient(server_ip, server_port, protocol, timeout, retries)[source]#

Bases: StandardClient

ExporterClient class

create_array_parameter(value)[source]#

Create a string to send. :param value: simple, tuple ot list

Returns:

formated string

Return type:

(str)

execute(method, pars=None, timeout=-1)[source]#

Execute a command synchronous. :param method: Method name :type method: str :param pars: parameters :type pars: str :param timeout: Timeout [s] :type timeout: float

execute_async(method, pars=None)[source]#

Execute command asynchronous. :param method: Method name :type method: str :param pars: parameters :type pars: str

get_method_list()[source]#

Get the list of the methods :returns: List of strings (the methods) :rtype: (list)

get_property_list()[source]#

Get the list of the properties. :returns: List of strings (the properties) :rtype: (list)

get_server_object_name()[source]#

Get the server object name :returns: The name. :rtype: (str)

on_event(name, value, timestamp)[source]#

Action

on_message_received(msg)[source]#

Act if the message is an event, pass to StandardClient otherwise. :param msg: The message. :type msg: str

parse_array(value)[source]#

Parse to list :param value: input string :type value: str

Returns:

List of strings

Return type:

(list)

read_property(prop, timeout=-1)[source]#

Read a property :param prop: property name :type prop: str

Returns:

reply from the process.

Return type:

(str)

read_property_as_string_array(prop)[source]#

Read a propery and convert the return value to list of strings. :param prop: property name :type prop: str

Returns:

List of strings

Return type:

(list)

write_property(prop, value, timeout=-1)[source]#

Write property synchronous. :param prop: property name :type prop: str :param value: sample, list or tuple