poolcontroller

This module is part of the Python Pool library. It defines the base classes for

Classes

PoolController

Inheritance diagram of PoolController

class PoolController(**kwargs)[source]

Bases: sardana.pool.poolcontroller.PoolBaseController

Controller class mediator for sardana controller plugins

serialize(*args, **kwargs)[source]
re_init()[source]
get_ctrl_types()[source]
is_timerable()[source]
is_online()[source]
get_ctrl()[source]
ctrl

actual controller object

get_ctrl_info()[source]
ctrl_info

controller information object

set_operator(operator)[source]

Defines the current operator object for this controller. For example, in acquisition, it should be a PoolMeasurementGroup object.

Parameters:operator (object) – the new operator object
get_operator()[source]
operator

current controller operator

set_log_level(pool_ctrl, *args, **kwargs)[source]
get_log_level(pool_ctrl, *args, **kwargs)[source]
get_library_name()[source]
get_class_name()[source]
get_axis_attributes(pool_ctrl, *args, **kwargs)[source]
get_ctrl_attr(pool_ctrl, *args, **kwargs)[source]
set_ctrl_attr(pool_ctrl, *args, **kwargs)[source]
get_axis_attr(pool_ctrl, *args, **kwargs)[source]
set_axis_attr(pool_ctrl, *args, **kwargs)[source]
set_ctrl_par(pool_ctrl, *args, **kwargs)[source]
get_ctrl_par(pool_ctrl, *args, **kwargs)[source]
set_axis_par(pool_ctrl, *args, **kwargs)[source]
get_axis_par(pool_ctrl, *args, **kwargs)[source]
raw_read_axis_states(axes=None, ctrl_states=None)[source]

Unsafe method. Reads the state for the given axes. If axes is None, reads the state of all active axes.

Parameters:axes (seq<int> or None) – the list of axis to get the state. Default is None meaning all active axis in this controller
Returns:a tuple of two elements: a map containing the controller state information for each axis and a boolean telling if an error occured
Return type:dict<PoolElement, state info>, bool
read_axis_states(pool_ctrl, *args, **kwargs)[source]

Reads the state for the given axes. If axes is None, reads the state of all active axes.

Parameters:axes (seq<int> or None) – the list of axis to get the state. Default is None meaning all active axis in this controller
Returns:a map containing the controller state information for each axis
Return type:dict<PoolElement, state info>
raw_read_axis_values(axes=None, ctrl_values=None)[source]

Unsafe method. Reads the value for the given axes. If axes is None, reads the value of all active axes.

Parameters:axes (seq<int> or None) – the list of axis to get the value. Default is None meaning all active axis in this controller
Returns:a map containing the controller value information for each axis
Return type:dict<PoolElement, SardanaValue>
read_axis_values(pool_ctrl, *args, **kwargs)[source]

Reads the value for the given axes. If axes is None, reads the value of all active axes.

Parameters:axes (seq<int> or None) – the list of axis to get the value. Default is None meaning all active axis in this controller
Returns:a map containing the controller value information for each axis
Return type:dict<PoolElement, SardanaValue>
raw_stop_all()[source]
raw_stop_one(axis)[source]
stop_all(pool_ctrl, *args, **kwargs)[source]
stop(pool_ctrl, *args, **kwargs)
stop_one(pool_ctrl, *args, **kwargs)[source]
stop_axes(pool_ctrl, *args, **kwargs)[source]

Stops the given axes. If axes is None, stops all active axes.

Parameters:axes (seq<int> or None) – the list of axis to stop. Default is None meaning all active axis in this controller
stop_elements(pool_ctrl, *args, **kwargs)[source]

Stops the given elements. If axes is None, stops all active axes.

Parameters:elements – the list of elements to stop. Default is None meaning all active axis in this controller
raw_abort_all()[source]
raw_abort_one(axis)[source]
abort_all(pool_ctrl, *args, **kwargs)[source]
abort_one(pool_ctrl, *args, **kwargs)[source]
abort_axes(pool_ctrl, *args, **kwargs)[source]

Aborts the given axes. If axes is None, aborts all active axes.

Parameters:axes (seq<int> or None) – the list of axis to abort. Default is None meaning all active axis in this controller
abort_elements(pool_ctrl, *args, **kwargs)[source]

Aborts the given elements. If axes is None, aborts all active axes.

Parameters:elements – the list of elements to abort. Default is None meaning all active axis in this controller
abort(pool_ctrl, *args, **kwargs)
emergency_break(pool_ctrl, *args, **kwargs)[source]

Stops the given elements. If axes is None, stops all active axes. If stop raises exception, an abort is attempted.

Parameters:elements – the list of elements to stop. Default is None meaning all active axis in this controller
send_to_controller(pool_ctrl, *args, **kwargs)[source]
raw_move(axis_pos)[source]
move(pool_ctrl, *args, **kwargs)[source]
has_backlash()[source]
wants_rounding()[source]
define_position(pool_ctrl, *args, **kwargs)[source]
write_one(axis, value)[source]

PoolPseudoMotorController

Inheritance diagram of PoolPseudoMotorController

class PoolPseudoMotorController(**kwargs)[source]

Bases: sardana.pool.poolcontroller.PoolController

serialize(*args, **kwargs)[source]
calc_all_pseudo(pool_ctrl, *args, **kwargs)[source]
calc_all_physical(pool_ctrl, *args, **kwargs)[source]
calc_pseudo(pool_ctrl, *args, **kwargs)[source]
calc_physical(pool_ctrl, *args, **kwargs)[source]

PoolPseudoCounterController

Inheritance diagram of PoolPseudoCounterController

class PoolPseudoCounterController(**kwargs)[source]

Bases: sardana.pool.poolcontroller.PoolController

serialize(*args, **kwargs)[source]
calc(pool_ctrl, *args, **kwargs)[source]
calc_all(values)[source]