secop_ophyd.SECoPDevices#
Module Contents#
Classes#
Command devices that have Signals for command args, return values and a signal for triggering command execution (SignalX). They themselves are triggerable. |
|
Base Class for generating Opyd devices from SEC Node modules, objects of type SECoPBaseDevice are not supposed to be instanciated |
|
Standard readable SECoP device, corresponding to a SECoP module with the interface class “Readable” |
|
Standard triggerable SECoP device, corresponding to a SECoP module with the0s interface class “Triggerable” |
|
Fast settable device target |
|
Standard movable SECoP device, corresponding to a SECoP module with the interface class “Drivable” |
|
Generates the root ophyd device from a Sec-node. Signals of this Device correspond to the Sec-node properties |
Functions#
Data#
API#
- secop_ophyd.SECoPDevices.DISABLED = 0#
- secop_ophyd.SECoPDevices.IDLE = 100#
- secop_ophyd.SECoPDevices.STANDBY = 130#
- secop_ophyd.SECoPDevices.PREPARED = 150#
- secop_ophyd.SECoPDevices.WARN = 200#
- secop_ophyd.SECoPDevices.WARN_STANDBY = 230#
- secop_ophyd.SECoPDevices.WARN_PREPARED = 250#
- secop_ophyd.SECoPDevices.NSTABLE = 270#
- secop_ophyd.SECoPDevices.BUSY = 300#
- secop_ophyd.SECoPDevices.DISABLING = 310#
- secop_ophyd.SECoPDevices.INITIALIZING = 320#
- secop_ophyd.SECoPDevices.PREPARING = 340#
- secop_ophyd.SECoPDevices.STARTING = 360#
- secop_ophyd.SECoPDevices.RAMPING = 370#
- secop_ophyd.SECoPDevices.STABILIZING = 380#
- secop_ophyd.SECoPDevices.FINALIZING = 390#
- secop_ophyd.SECoPDevices.ERROR = 400#
- secop_ophyd.SECoPDevices.ERROR_STANDBY = 430#
- secop_ophyd.SECoPDevices.ERROR_PREPARED = 450#
- secop_ophyd.SECoPDevices.UNKNOWN = 401#
- class secop_ophyd.SECoPDevices.SECoPCMDDevice(path: secop_ophyd.util.Path, secclient: secop_ophyd.AsyncFrappyClient.AsyncFrappyClient)[source]#
Bases:
ophyd_async.core.StandardReadable,bluesky.protocols.Flyable,bluesky.protocols.TriggerableCommand devices that have Signals for command args, return values and a signal for triggering command execution (SignalX). They themselves are triggerable.
Once the CMD Device is triggered, the command args are retrieved from the ‘argument’ Signal. The command message is sent to the SEC Node and the return value is written to ‘result’ signal.
Initialization
Initialize the CMD Device
- Parameters:
path (Path) – Path to the command in the secclient module dict
secclient (AsyncFrappyClient) – SECoP client providing communication to the SEC Node
- trigger() ophyd_async.core.AsyncStatus[source]#
Triggers the SECoPCMDDevice and sends command message to SEC Node. Command argument is taken form ‘argument’ Signal, and return value is written in the ‘return’ Signal
- Returns:
A Status object, that is marked Done once the answer from the
SEC Node is received :rtype: AsyncStatus
- kickoff() ophyd_async.core.AsyncStatus[source]#
- complete() ophyd_async.core.AsyncStatus[source]#
- collect() Iterator[bluesky.protocols.PartialEvent][source]#
- class secop_ophyd.SECoPDevices.SECoPBaseDevice(secclient: secop_ophyd.AsyncFrappyClient.AsyncFrappyClient, module_name: str, loglevel=logging.INFO, logdir: str | None = None)[source]#
Bases:
ophyd_async.core.StandardReadableBase Class for generating Opyd devices from SEC Node modules, objects of type SECoPBaseDevice are not supposed to be instanciated
Initialization
Initiate A SECoPBaseDevice
- Parameters:
secclient (AsyncFrappyClient) – SECoP client providing communication to the SEC Node
- class secop_ophyd.SECoPDevices.SECoPCommunicatorDevice(secclient: secop_ophyd.AsyncFrappyClient.AsyncFrappyClient, module_name: str, loglevel=logging.INFO, logdir: str | None = None)[source]#
- class secop_ophyd.SECoPDevices.SECoPReadableDevice(secclient: secop_ophyd.AsyncFrappyClient.AsyncFrappyClient, module_name: str, loglevel=logging.INFO, logdir: str | None = None)[source]#
Bases:
secop_ophyd.SECoPDevices.SECoPCommunicatorDevice,bluesky.protocols.Triggerable,bluesky.protocols.SubscribableStandard readable SECoP device, corresponding to a SECoP module with the interface class “Readable”
Initialization
Initializes the SECoPReadableDevice
- Parameters:
secclient (AsyncFrappyClient) – SECoP client providing communication to the SEC Node
module_name (str) – Name of the SEC Node module that is represented by this device
- async wait_for_idle()[source]#
asynchronously waits until module is IDLE again. this is helpful, for running commands that are not done immediately
- trigger() ophyd_async.core.AsyncStatus[source]#
- class secop_ophyd.SECoPDevices.SECoPTriggerableDevice(secclient: secop_ophyd.AsyncFrappyClient.AsyncFrappyClient, module_name: str, loglevel=logging.info, logdir: str | None = None)[source]#
Bases:
secop_ophyd.SECoPDevices.SECoPReadableDevice,bluesky.protocols.StoppableStandard triggerable SECoP device, corresponding to a SECoP module with the0s interface class “Triggerable”
Initialization
Initialize SECoPTriggerableDevice
- Parameters:
secclient (AsyncFrappyClient) – SECoP client providing communication to the SEC Node
module_name (str) – ame of the SEC Node module that is represented by this device
- trigger() ophyd_async.core.AsyncStatus[source]#
- class secop_ophyd.SECoPDevices.SECoPWritableDevice(secclient: secop_ophyd.AsyncFrappyClient.AsyncFrappyClient, module_name: str, loglevel=logging.INFO, logdir: str | None = None)[source]#
Bases:
secop_ophyd.SECoPDevices.SECoPReadableDeviceFast settable device target
Initialization
Initializes the SECoPReadableDevice
- Parameters:
secclient (AsyncFrappyClient) – 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.SECoPDevices.SECoPMoveableDevice(secclient: secop_ophyd.AsyncFrappyClient.AsyncFrappyClient, module_name: str, loglevel=logging.INFO, logdir: str | None = None)[source]#
Bases:
secop_ophyd.SECoPDevices.SECoPWritableDevice,bluesky.protocols.Locatable,bluesky.protocols.StoppableStandard movable SECoP device, corresponding to a SECoP module with the interface class “Drivable”
Initialization
Initialize SECoPMovableDevice
- Parameters:
secclient (AsyncFrappyClient) – SECoP client providing communication to the SEC Node
module_name (str) – ame of the SEC Node module that is represented by this device
- set(new_target, timeout: Optional[float] = None) ophyd_async.core.AsyncStatus[source]#
Sends new target to SEC Nonde and waits until module is IDLE again
- Parameters:
new_target (_type_) – new taget/setpoint for module
timeout (Optional[float], optional) – timeout for set operation, defaults to None
- Returns:
Asyncstatus that gets set to Done once module is IDLE again
- Return type:
AsyncStatus
- async stop(success=True)[source]#
Calls stop command on the SEC Node module
- Parameters:
success (bool, optional) – True: device is stopped as planned False: something has gone wrong (defaults to True)
- async locate() bluesky.protocols.Location[source]#
- class secop_ophyd.SECoPDevices.SECoPNodeDevice(sec_node_uri: str, prefix: str = '', name: str = '', loglevel: str = 'INFO', logdir: str | None = None)[source]#
Bases:
ophyd_async.core.StandardReadableGenerates the root ophyd device from a Sec-node. Signals of this Device correspond to the Sec-node properties
Initialization
Initializes the node device and generates all node signals and subdevices corresponding to the SECoP-modules of the secnode
- Parameters:
secclient (AsyncFrappyClient) – SECoP client providing communication to the SEC Node
- async connect(mock: bool | ophyd_async.core.LazyMock = False, timeout: float = DEFAULT_TIMEOUT, force_reconnect: bool = False)[source]#
- class_from_instance(path_to_module: str | None = None)[source]#
Dynamically generate python class file for the SECoP_Node_Device, this allows autocompletion in IDEs and eases working with the generated Ophyd devices
- descriptiveDataChange(module, description)[source]#
called when the description has changed
this callback is called on the node with module=None and on every changed module with module==<module name>
- Parameters:
module (_type_) – module name of the module that has changes
description (_type_) – new Node description string
- secop_ophyd.SECoPDevices.IF_CLASSES = None#
- secop_ophyd.SECoPDevices.SECOP_TO_NEXUS_TYPE = None#
- secop_ophyd.SECoPDevices.ALL_IF_CLASSES = 'set(...)'#