mxcubeweb.core.adapter.adapter_base#
Classes
|
|
|
Hardware Object Adapter Base class |
- class mxcubeweb.core.adapter.adapter_base.ActuatorAdapterBase(ho, *args)[source]#
Bases:
AdapterBase
- get_value()[source]#
Retrieve value from underlying hardware object. :returns: The value. :rtype: (str)
- Raises:
ValueError – When value for any reason can’t be retrieved.
- limits()[source]#
Read the energy limits. :returns: Two floats (min, max). :rtype: (tuple)
- Raises:
ValueError – When limits for any reason can’t be retrieved.
- set_value(value)[source]#
Sets a value on underlying hardware object. :param value: Value to be set. :type value: float
- Returns:
The actual value, after being set.
- Return type:
(str)
- Raises:
ValueError – When conversion or treatment of value fails.
StopIteration – When a value change was interrupted (abort/cancel).
- class mxcubeweb.core.adapter.adapter_base.AdapterBase(ho, role, app)[source]#
Bases:
object
Hardware Object Adapter Base class
- property adapter_type#
Returns: (str): The data type of the value
- available()[source]#
Check if the hardware object is considered to be available/online/enabled :returns: True if available. :rtype: (bool)
- emit_ho_changed(state, **kwargs)[source]#
Signal handler to be used for sending the entire object to the client via socketIO
- property ho#
Underlaying HardwareObject :returns: HardwareObject :rtype: (object)
- msg()[source]#
Returns a message describing the current state. should be used to communicate details of the state to the user. :returns: The message string. :rtype: (str)
- read_only()[source]#
Returns true if the hardware object is read only, set_value can not be called :returns: True if read enly. :rtype: (bool)