secop_ophyd.devices.drivable#

Devices for the interface class Drivable.

Module Contents#

Classes#

SECoPMovableLogic

Move logic for a SECoP “Drivable” module.

SECoPDrivableBase

Common base of the device classes for SECoP modules with the interface class “Drivable”: SECoPMoveableDevice and SECoPCompositeMoveableDevice. Which of the two a module gets depends on the datatypes of its ‘target’ and ‘value’ parameters, see class_from_interface.

SECoPMovableMock

Mock behaviour for SECoP Drivable modules: start IDLE, and move the readback to the target instantly.

SECoPMoveableDevice

Standard movable SECoP device, corresponding to a SECoP module with the interface class “Drivable” whose ‘target’ and ‘value’ are atomic (scalar or array). A Drivable with a struct/tuple ‘target’ or ‘value’ is a SECoPCompositeMoveableDevice.

SECoPCompositeMoveableDevice

Movable SECoP device, corresponding to a SECoP module with the interface class “Drivable” whose ‘target’ and/or ‘value’ is a struct or tuple.

API#

class secop_ophyd.devices.drivable.SECoPMovableLogic[source]#

Bases: ophyd_async.core.MovableLogic[typing.Any]

Move logic for a SECoP “Drivable” module.

A move is considered complete once the module’s status parameter leaves BUSY and enters the IDLE range, rather than when readback equals setpoint.

status: ophyd_async.core.SignalR = None#
secclient: secop_ophyd.AsyncFrappyClient.AsyncSecopClient = None#
module: str = None#
logger: logging.Logger = None#
async stop() → None[source]#
async move(new_position: Any, timeout: ophyd_async.core.TimeoutCalculator) → None[source]#
class secop_ophyd.devices.drivable.SECoPDrivableBase(sri: str = '', name: str = '', connector: secop_ophyd.devices.connector.SECoPDeviceConnector | None = None, loglevel=logging.INFO, logdir: str | None = None)[source]#

Bases: secop_ophyd.devices.writable.SECoPWritableBase

Common base of the device classes for SECoP modules with the interface class “Drivable”: SECoPMoveableDevice and SECoPCompositeMoveableDevice. Which of the two a module gets depends on the datatypes of its ‘target’ and ‘value’ parameters, see class_from_interface.

Initialization

Initializes the SECoPReadableDevice

Parameters:
  • secclient (AsyncSecopClient) – SECoP client providing communication to the SEC Node

  • module_name (str) – Name of the SEC Node module that is represented by this device

class secop_ophyd.devices.drivable.SECoPMovableMock(name: str = '', parent: ophyd_async.core._device.DeviceMock | None = None)[source]#

Bases: ophyd_async.core.InstantMovableMock

Mock behaviour for SECoP Drivable modules: start IDLE, and move the readback to the target instantly.

Initialization

async connect(device: secop_ophyd.devices.drivable.SECoPMoveableDevice) → None[source]#
class secop_ophyd.devices.drivable.SECoPMoveableDevice(sri: str = '', name: str = '', connector: secop_ophyd.devices.connector.SECoPDeviceConnector | None = None, loglevel=logging.INFO, logdir: str | None = None)[source]#

Bases: secop_ophyd.devices.drivable.SECoPDrivableBase, ophyd_async.core.StandardMovable[ophyd_async.core.SignalDatatypeT]

Standard movable SECoP device, corresponding to a SECoP module with the interface class “Drivable” whose ‘target’ and ‘value’ are atomic (scalar or array). A Drivable with a struct/tuple ‘target’ or ‘value’ is a SECoPCompositeMoveableDevice.

Initialization

Initialize SECoPMovableDevice

Parameters:
  • secclient (AsyncSecopClient) – SECoP client providing communication to the SEC Node

  • module_name (str) – ame of the SEC Node module that is represented by this device

movable_logic() → ophyd_async.core.MovableLogic#
set_name(name: str, *, child_name_separator: str | None = None) → None[source]#
class secop_ophyd.devices.drivable.SECoPCompositeMoveableDevice(sri: str = '', name: str = '', connector: secop_ophyd.devices.connector.SECoPDeviceConnector | None = None, loglevel=logging.INFO, logdir: str | None = None)[source]#

Bases: secop_ophyd.devices.drivable.SECoPDrivableBase, secop_ophyd.devices.writable.SECoPWritableDevice[secop_ophyd.devices.writable.T], bluesky.protocols.Stoppable

Movable SECoP device, corresponding to a SECoP module with the interface class “Drivable” whose ‘target’ and/or ‘value’ is a struct or tuple.

Behaves like SECoPWritableDevice for a struct/tuple, and can be stopped: set() takes the whole target as a dict or tuple and is the only way to change it, locate() returns setpoint and readback in the same form, and read() has one data key per member. A move reports no progress updates.

Initialization

Initializes the SECoPReadableDevice

Parameters:
  • secclient (AsyncSecopClient) – SECoP client providing communication to the SEC Node

  • module_name (str) – Name of the SEC Node module that is represented by this device

async set(value: secop_ophyd.devices.writable.T, timeout: float | None = None) → None[source]#

Move to the given target and wait until the module has left BUSY.

async stop(success: bool = False) → None[source]#

Stop the module and end a running set(): successfully if success, else with a RuntimeError.