mxcubeweb.core.adapter.actuator_adapter#
Classes
|
Adapter for Energy Hardware Object. |
- class mxcubeweb.core.adapter.actuator_adapter.ActuatorAdapter(ho, role, app, resource_handler_config=ResourceHandlerConfigModel(url_prefix='', name=None, exports=[], commands=['set_value', 'stop'], attributes=['data', 'get_value']))[source]#
Bases:
ActuatorAdapterBaseAdapter for Energy Hardware Object.
A web socket is used to communicate information on longer running processes.
- get_value() FloatValueModel[source]#
Read the energy.
- Returns:
Energy [keV].
- Return type:
(float as str)
- Raises:
ValueError – When value for any reason can’t be retrieved.
- read_only()[source]#
Check if the energy is tunable or not.
- Returns:
True if tunable, False if not.
- Return type:
(bool)
- set_value(value: HOActuatorValueChangeModel) str[source]#
Execute the sequence to set the value.
- Parameters:
value (float) – Target energy [keV].
- Returns:
The actual value set.
- Return type:
(float as str)
- Raises:
ValueError – Value not valid or attemp to set a non-tunable energy.
RuntimeError – Timeout while setting the value.
StopItteration – When a value change was interrupted (abort/cancel).