mxcubecore.HardwareObjects.XMLRPCServer#

XMLRPC-Server that makes it possbile to access core features of MXCuBE like the queue from external applications. The Server is implemented as a hardware object and is configured with an XML-file. See the example configuration XML for more information.

Classes

XMLRPCServer(name)

class mxcubecore.HardwareObjects.XMLRPCServer.XMLRPCServer(name)[source]#

Bases: HardwareObject

addGphlWorkflow(parent_node_id, task_dict, workflow_id)[source]#

Add GPhL workflow to queue.

addXrayCentring(parent_node_id, **centring_parameters)[source]#

Add Xray centring to queue.

centre_beam()[source]#

Centers the beam using the beamcmds hardware object.

get_available_beam_size()[source]#

Get the available predefined beam sizes. :returns:

Dictionary wiith list of avaiable beam size labels

and the corresponding size (width,height) tuples. {“label”: [str, str, …], “size”: [(w,h), (w,h), …]}

Return type:

(dict)

get_available_zoom_levels()[source]#

Returns the avaliable pre-defined zoom levels.

get_back_light_level()[source]#

Gets the level of the back light

get_beam_size()[source]#

Get the beam size [um], its shape and label. :returns:

(width, heigth, shape, label), with types

(float, float, str, str)

Return type:

(tuple)

get_cp()[source]#
Returns:

a json encoded list with all centred positions

get_front_light_level()[source]#

Gets the level of the front light

get_zoom_level()[source]#

Returns the zoom level.

init()[source]#

Method inherited from HardwareObject, called by framework-2.

is_queue_executing(node_id=None)[source]#
Returns:

True if the queue is executing otherwise False

Return type:

bool

log_message(message, level='info')[source]#

Logs a message in the user_level_log of MxCuBE, normally displayed at the bottom of the MxCuBE window.

Parameters:
  • message – The message to log

  • message – The log level, one of the strings: ‘info’. ‘warning’, ‘error’

Returns:

True on success otherwise False

Return type:

bool

open_dialog(dict_dialog)[source]#

Opens the workflow dialog in mxCuBE. This call blocks util the dialog is ended by the user.

queue_execute_entry_with_id(node_id, use_async=False)[source]#

Execute the entry that has the model with node id <node_id>.

Parameters:

node_id (int) – The node id of the model to find.

queue_set_workflow_lims_id(node_id, lims_id)[source]#

Set lims id of workflow node with id <node_id>

Parameters:
  • node_id (int) – The node id of the workflow node

  • lims_id (int) – The lims id

save_current_pos()[source]#

Saves the current position as a centered position.

set_back_light_level(level)[source]#

Sets the level of the back light

set_beam_size(size)[source]#

Set the beam size. :param size: Width, heigth or

(str): Size label.

set_front_light_level(level)[source]#

Sets the level of the front light

set_zoom_level(pos)[source]#

Sets the zoom to a pre-defined level.

shape_history_get_grid(sid)[source]#
Parameters:

sid – Shape id

Returns:

Grid with id <sid>

Return type:

dict

Format of the returned dictionary:

{‘id’: id,

‘dx_mm’: float, ‘dy_mm’: float, ‘steps_x’: int, ‘steps_y’: int, ‘x1’: float, ‘y1’: float, ‘angle’: float}

start_queue()[source]#

Starts the queue execution.

Returns:

True on success otherwise False

Return type:

bool

workflow_end()[source]#

Notify the workflow HO that the workflow has finished.