Reference#

Device Classes#

class SECoPBaseDevice(secclient: secop_ophyd.AsyncFrappyClient.AsyncFrappyClient, module_name: str, loglevel=logging.INFO, logdir: str | None = None)#

Bases: ophyd_async.core.StandardReadable

Base 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

add_signals_by_format(format, format_params: list, module_name, module_desc: dict)#
generate_cmd_plan(cmd_dev: secop_ophyd.SECoPDevices.SECoPCMDDevice, argument_type: Type | None = None, return_type: Type | None = None)#
class SECoPNodeDevice(sec_node_uri: str, prefix: str = '', name: str = '', loglevel: str = 'INFO', logdir: str | None = None)#

Bases: ophyd_async.core.StandardReadable

Generates 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

name: str = <Multiline-String>#
async connect(mock: bool | ophyd_async.core.LazyMock = False, timeout: float = DEFAULT_TIMEOUT, force_reconnect: bool = False)#
class_from_instance(path_to_module: str | None = None)#

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)#

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

nodeStateChange(online, state)#

called when the state of the connection changes

‘online’ is True when connected or reconnecting, False when disconnected or connecting ‘state’ is the connection state as a string

class_from_interface(mod_properties: dict)#
class SECoPCommunicatorDevice(secclient: secop_ophyd.AsyncFrappyClient.AsyncFrappyClient, module_name: str, loglevel=logging.INFO, logdir: str | None = None)#

Bases: secop_ophyd.SECoPDevices.SECoPBaseDevice

class SECoPReadableDevice(secclient: secop_ophyd.AsyncFrappyClient.AsyncFrappyClient, module_name: str, loglevel=logging.INFO, logdir: str | None = None)#

Bases: secop_ophyd.SECoPDevices.SECoPCommunicatorDevice, bluesky.protocols.Triggerable, bluesky.protocols.Subscribable

Standard 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()#

asynchronously waits until module is IDLE again. this is helpful, for running commands that are not done immediately

observe_status_change(monitored_status_code: int)#
trigger() ophyd_async.core.AsyncStatus#
subscribe(function: ophyd_async.core._utils.Callback[dict[str, bluesky.protocols.Reading]]) None#

Subscribe to updates in the reading

clear_sub(function: ophyd_async.core._utils.Callback) None#

Remove a subscription.

class SECoPTriggerableDevice(secclient: secop_ophyd.AsyncFrappyClient.AsyncFrappyClient, module_name: str, loglevel=logging.info, logdir: str | None = None)#

Bases: secop_ophyd.SECoPDevices.SECoPReadableDevice, bluesky.protocols.Stoppable

Standard 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

wait_for_prepared()#
trigger() ophyd_async.core.AsyncStatus#
async stop(success=True)#

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)

class SECoPWritableDevice(secclient: secop_ophyd.AsyncFrappyClient.AsyncFrappyClient, module_name: str, loglevel=logging.INFO, logdir: str | None = None)#

Bases: secop_ophyd.SECoPDevices.SECoPReadableDevice

Fast 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 SECoPMoveableDevice(secclient: secop_ophyd.AsyncFrappyClient.AsyncFrappyClient, module_name: str, loglevel=logging.INFO, logdir: str | None = None)#

Bases: secop_ophyd.SECoPDevices.SECoPWritableDevice, bluesky.protocols.Locatable, bluesky.protocols.Stoppable

Standard 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#

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)#

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#