mxcubecore.HardwareObjects.TangoShutter#

TangoShutter class - interface for shutter controlled by TANGO Implements _set_value, get_value methods

Tango states are: “UNKNOWN”, “OPEN”, “CLOSED”, “FAULT”, “MOVING”, “DISABLE”, “STANDBY”, “RUNNING”

Example xml file:

<object class = "TangoShutter">
  <username>Safety Shutter</username>
  <tangoname>ab/cd/ef</tangoname>
  <command type="tango" name="Open">Open</command>
  <command type="tango" name="Close">Close</command>
  <channel type="tango" name="State" polling="1000">State</channel>
  <values>{"OPEN": "MYOPEN", "NEWSTATE": ["MYSTATE", "BUSY"]}</values>
</object>

In the example the <values> property contains a dictionary that redefines or adds specific tango shutter states. When redefining a known state, only the VALUES Enum will be updated. When defining a new state (new key), the dictionary value should be a list. The new state is added to both the VALUES and the SPECIFIC_STATES enumeration.

Attention:

  • do not use tuples or the Python JSON parser will fail!

  • make sure only double quotes (") are used inside the values dictionary, no single quotes (') are allowed!

  • the second element of the list should be a standard HardwareObjectState name (UNKNOWN, WARNING, BUSY, READY, FAULT, or OFF; see in BaseHardwareObjects)!

The <values> property is optional.

Classes

TangoShutter(name)

TANGO implementation of AbstractShutter

TangoShutterStates(value)

Shutter states definitions.

class mxcubecore.HardwareObjects.TangoShutter.TangoShutter(name: str)[source]#

Bases: AbstractShutter

TANGO implementation of AbstractShutter

Parameters:

name (str) –

SPECIFIC_STATES#

alias of TangoShutterStates

get_state() HardwareObjectState[source]#

Get the device state.

Returns:

Device state.

Return type:

HardwareObjectState

get_value() TangoShutterStates[source]#

Get the device value

Returns:

Enum member, corresponding to the ‘VALUE’ or UNKNOWN.

Return type:

TangoShutterStates

init() None[source]#

Initialise the predefined values

Return type:

None

class mxcubecore.HardwareObjects.TangoShutter.TangoShutterStates(value)[source]#

Bases: Enum

Shutter states definitions.