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) str[source]#

Sets value of the Nstate adapter.

Parameters:

value (Enum) – value to be set containing name and value attributes.

Returns:

The actual value set as a string.

Return type:

(str)

Raises:
  • ValueError – Value not valid.

  • RuntimeError – Timeout while setting the value.

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

stop()[source]#

Stop the execution.