mxcubeweb.core.adapter.nstate_adapter#

Classes

NStateAdapter(ho, role, app)

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

Bases: ActuatorAdapterBase

get_value() → StrValueModel#

Retrieve value from underlying hardware object.

Returns:

The value.

Return type:

(str)

Raises:

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

msg()#

Return a message describing the current state.

Should be used to communicate details of the state to the user.

Returns:

The message string.

Return type:

(str)

set_value(value: HOActuatorValueChangeModel) → str#

Set value of the N-state 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()#

Stop the execution.