bec_lib.device.DeviceBase#

class DeviceBase(*, name: str, info: dict | None = None, config: dict | None = None, parent=None, signal_info: dict | None = None)[source]#

Bases: object

The DeviceBase class is the base class for all devices that are controlled via the DeviceManager. It provides a simple interface to perform RPC calls on the device. The DeviceBase class is not meant to be used directly, but rather to be subclassed.

Parameters:
  • name (dict) – The name of the device.

  • info (dict, optional) – The device info dictionary. Defaults to None.

  • parent ([type], optional) – The parent object. Defaults to None.

  • signal_info (dict, optional) – The signal info dictionary. Defaults to None.

Methods

add_device_tag

add a device tag for this device

get_device_config

get the device config for this device

get_device_tags

get the device tags for this device

remove_device_tag

remove a device tag for this device

set_device_config

set the device config for this device

set_device_tags

set the device tags for this device

set_user_parameter

set the user parameter for this device

update_config

Updates the device configuration.

update_user_parameter

update the user parameter for this device :param val: New user parameter :type val: dict

Attributes

enabled

Returns True if the device is enabled, otherwise False.

full_name

Returns the full name of the device.

on_failure

get the failure behaviour for this device

read_only

Whether or not the device can be set

readout_priority

get the readout priority for this device

root

Returns the root object of the device tree.

software_trigger

Whether or not the device can be software triggered

user_parameter

get the user parameter for this device

wm

get the current position of a device

add_device_tag(val: str)[source]#

add a device tag for this device

property enabled#

Returns True if the device is enabled, otherwise False.

property full_name#

Returns the full name of the device.

get_device_config()[source]#

get the device config for this device

get_device_tags() list[source]#

get the device tags for this device

property on_failure: OnFailure#

get the failure behaviour for this device

property read_only#

Whether or not the device can be set

property readout_priority: ReadoutPriority#

get the readout priority for this device

remove_device_tag(val: str)[source]#

remove a device tag for this device

property root#

Returns the root object of the device tree.

set_device_config(val: dict)[source]#

set the device config for this device

set_device_tags(val: list)[source]#

set the device tags for this device

set_user_parameter(val: dict)[source]#

set the user parameter for this device

property software_trigger#

Whether or not the device can be software triggered

update_config(update: dict) None[source]#

Updates the device configuration.

Parameters:

update (dict) – The update dictionary.

update_user_parameter(val: dict)[source]#

update the user parameter for this device :param val: New user parameter :type val: dict

property user_parameter: dict#

get the user parameter for this device

property wm: None#

get the current position of a device