mxcubeweb.core.adapter.nstate_adapter#

Classes

NStateAdapter(ho, role, app)

class mxcubeweb.core.adapter.nstate_adapter.NStateAdapter(ho, role, app)[source]#

Bases: ActuatorAdapterBase

get_value() StrValueModel[source]#

Retrieve value from underlying hardware object. :returns: The value. :rtype: (str)

Raises:

ValueError – When value for any reason can’t be retrieved.

Return type:

StrValueModel

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)

set_value(value: HOActuatorValueChangeModel)[source]#

Sets a value on underlying hardware object.

Parameters:

value (float) – Value to be set.

Raises:
  • ValueError – When conversion or treatment of value fails.

  • StopIteration – When a value change was interrupted (abort/cancel).

Emits:

hardware_object_value_changed with values over websocket

stop()[source]#

Stop the execution.