dodal.devices.fast_shutter.GenericFastShutter#

class dodal.devices.fast_shutter.GenericFastShutter[source]#

Basic enum device specialised for a fast shutter with configured open_state and close_state so it is generic enough to be used with any device or plan without knowing the specific enum to use.

For example:

await shutter.set(shutter.open_state) await shutter.set(shutter.close_state)

OR

RE(bps.mv(shutter, shutter.open_state)) RE(bps.mv(shutter, shutter.close_state))

Parameters:
  • pv (str)

  • open_state (TypeVar(StrictEnumT, bound= StrictEnum | SubsetEnum | SupersetEnum))

  • close_state (TypeVar(StrictEnumT, bound= StrictEnum | SubsetEnum | SupersetEnum))

  • name (str, default: '')

  • pv – The pv to connect to the shutter device.

  • open_state – The enum value that corresponds with opening the shutter.

  • close_state – The enum value that corresponds with closing the shutter.

  • name

Methods

is_closed()

Checks to see if shutter is in close_state.

is_open()

Checks to see if shutter is in open_state.

set(value)

Attributes

async is_open() bool[source]#

Checks to see if shutter is in open_state. Should not be used directly inside a plan. A user should use the following instead in a plan: :rtype: bool

from bluesky import plan_stubs as bps is_open = yield from bps.rd(shutter.state) == shutter.open_state

async is_closed() bool[source]#

Checks to see if shutter is in close_state. Should not be used directly inside a plan. A user should use the following instead in a plan: :rtype: bool

from bluesky import plan_stubs as bps is_closed = yield from bps.rd(shutter.state) == shutter.close_state