secop_ophyd.SECoPDevices#
Module Contents#
Classes#
Annotation for Parameter Signals, defines the path to the parameter in the secclient module dict |
|
Annotation for Module Property Signals, defines the path to the property |
|
Command devices that have Signals for command args, return values and a signal for triggering command execution (SignalX). They themselves are triggerable. |
|
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” |
|
Standard movable SECoP device, corresponding to a SECoP module with the interface class “Drivable” |
Functions#
Convert SECoP enum member name to Python identifier. |
|
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#
- secop_ophyd.SECoPDevices.IGNORED_PROPS = ['meaning', '_plotly']#
- secop_ophyd.SECoPDevices.secop_enum_name_to_python(member_name: str) str[source]#
Convert SECoP enum member name to Python identifier.
- Examples:
‘Low Energy’ -> ‘LOW_ENERGY’ ‘high-power’ -> ‘HIGH_POWER’ ‘Mode 1’ -> ‘MODE_1’
- Parameters:
member_name – Original SECoP enum member name
- Returns:
Python-compatible identifier in UPPER_CASE
- secop_ophyd.SECoPDevices.format_assigned(device: ophyd_async.core.StandardReadable, signal: ophyd_async.core.SignalR) bool[source]#
- secop_ophyd.SECoPDevices.is_read_signal(device: ophyd_async.core.StandardReadable, signal: ophyd_async.core.SignalR | ophyd_async.core.SignalRW) bool[source]#
- secop_ophyd.SECoPDevices.is_config_signal(device: ophyd_async.core.StandardReadable, signal: ophyd_async.core.SignalR | ophyd_async.core.SignalRW) bool[source]#
- class secop_ophyd.SECoPDevices.ParameterType[source]#
Annotation for Parameter Signals, defines the path to the parameter in the secclient module dict
- class secop_ophyd.SECoPDevices.PropertyType[source]#
Annotation for Module Property Signals, defines the path to the property
- class secop_ophyd.SECoPDevices.SECoPDeviceConnector(sri: str, auto_fill_signals: bool = True, loglevel=logging.INFO, logdir: str | None = None)[source]#
Bases:
ophyd_async.core.DeviceConnector- create_children_from_annotations(device: ophyd_async.core.Device)[source]#
- fill_backend_with_path(backend: secop_ophyd.SECoPSignal.SECoPBackend, annotations: list[Any])[source]#
- async connect_mock(device: ophyd_async.core.Device, mock: ophyd_async.core.LazyMock)[source]#
- async connect_real(device: ophyd_async.core.Device, timeout: float, force_reconnect: bool)[source]#
- 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.SECoPDevice(sri: str = '', name: str = '', connector: secop_ophyd.SECoPDevices.SECoPDeviceConnector | None = None, loglevel=logging.INFO, logdir: str | None = None)[source]#
- class secop_ophyd.SECoPDevices.SECoPNodeDevice(sec_node_uri: str = '', name: str = '', loglevel=logging.INFO, logdir: str | None = None)[source]#
- class secop_ophyd.SECoPDevices.SECoPCommunicatorDevice(sri: str = '', name: str = '', connector: secop_ophyd.SECoPDevices.SECoPDeviceConnector | None = None, loglevel=logging.INFO, logdir: str | None = None)[source]#
- class secop_ophyd.SECoPDevices.SECoPReadableDevice(sri: str = '', name: str = '', connector: secop_ophyd.SECoPDevices.SECoPDeviceConnector | None = None, loglevel=logging.INFO, logdir: str | None = None)[source]#
Bases:
secop_ophyd.SECoPDevices.SECoPDevice,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(sri: str = '', name: str = '', connector: secop_ophyd.SECoPDevices.SECoPDeviceConnector | None = None, 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
- class secop_ophyd.SECoPDevices.SECoPWritableDevice(sri: str = '', name: str = '', connector: secop_ophyd.SECoPDevices.SECoPDeviceConnector | None = None, loglevel=logging.INFO, logdir: str | None = None)[source]#
- class secop_ophyd.SECoPDevices.SECoPMoveableDevice(sri: str = '', name: str = '', connector: secop_ophyd.SECoPDevices.SECoPDeviceConnector | None = None, loglevel=logging.INFO, logdir: str | None = None)[source]#
Bases:
secop_ophyd.SECoPDevices.SECoPReadableDevice,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]#
- secop_ophyd.SECoPDevices.IF_CLASSES = None#