devctrl.devices.device_info.DeviceInfo#

class DeviceInfo(key: str, name: str, device_type: Type[Device], global_varname: str, connect_priority: int)[source]#

Bases: object

Small data class for device management. A DeviceInfo should provide information about a device instance that is optinally managed by a DeviceManager and can be seen as describing the ‘role’ of a device.

Parameters:
  • key – Device key. This is used with the DeviceManager and in config files. Should not contain spaces.

  • name – A descriptive device name, like Shutter for the blue laser.

  • device_type – The subclass of Device that the device belongs to.

  • global_varname – Name of a global variable that the connected device can be assigned to. Must be a valid python variable name.

  • connect_priority – A higher priority means the device should be connected before others (eg. a power switch) and disconnected after others.

Methods

Attributes

key

name

device_type

global_varname

connect_priority