device
frog.gui.hardware_set.device
¤
Helper functions for managing connections to devices.
Classes¤
ActiveDeviceManager(active_devices=None)
¤
Bases: QObject
A class used by the frontend to monitor and control backend devices.
Create a new _ActiveDeviceManager.
Source code in src/frog/gui/hardware_set/device.py
88 89 90 91 92 93 94 95 96 97 98 |
|
Attributes¤
connected_devices
property
¤
Active devices which are connected (not connecting).
devices
property
¤
The current active devices.
Functions¤
disconnect_all()
¤
Disconnect from all devices.
Source code in src/frog/gui/hardware_set/device.py
114 115 116 117 118 |
|
ActiveDeviceProperties(args, state)
dataclass
¤
The properties of a device that is connecting or connected.
Attributes¤
args
instance-attribute
¤
Arguments used to open the device.
state
instance-attribute
¤
Whether the device is connecting or connected.
Functions¤
__post_init__()
¤
Check whether user attempted to create for a disconnected device.
Source code in src/frog/gui/hardware_set/device.py
51 52 53 54 55 56 |
|
ConnectionStatus
¤
Bases: Enum
The connection state of a device.
OpenDeviceArgs(instance, class_name, params=frozendict())
dataclass
¤
Arguments needed to open a device.
Functions¤
close()
¤
Close the device.
Source code in src/frog/gui/hardware_set/device.py
30 31 32 |
|
create(instance, class_name, params=frozendict())
classmethod
¤
Create an OpenDeviceArgs using basic types.
Source code in src/frog/gui/hardware_set/device.py
34 35 36 37 38 39 |
|
open()
¤
Open the device.
Source code in src/frog/gui/hardware_set/device.py
26 27 28 |
|
Functions¤
close_device(instance)
¤
Close a connection to a device.
Source code in src/frog/gui/hardware_set/device.py
76 77 78 |
|
open_device(class_name, instance, params)
¤
Open a connection to a device.
Source code in src/frog/gui/hardware_set/device.py
67 68 69 70 71 72 73 |
|