zhinst.toolkit.session.Devices(session)
¶
Bases: MutableMapping
Mapping class for the connected devices.
Maps the connected devices from data server to lazy device objects. On every access the connected devices are read from the data server. This ensures that even if devices get connected/disconnected through another session the list will be up to date.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session |
Session
|
An active session to the data server. |
required |
connected()
¶
created_devices()
¶
View on all created device.
The list contains all toolkit device objects that have been created for the underlying session.
This is not equal to the devices connected to the data server!
Use the iterator of the Devices
class directly to get all devices
connected to the data server.
Returns:
Type | Description |
---|---|
ValuesView[DeviceType]
|
View on all created devices. |
zhinst.toolkit.session.HF2Devices(session)
¶
Bases: Devices
Mapping class for the connected HF2 devices.
Maps the connected devices from data server to lazy device objects.
It derives from the general Devices
class and adds the special handling
for the HF2 data server. Since the HF2 Data Server is based on the API Level
1 it as a much more restricted API. This means it is not possible to get
the connected or visible devices from the data server. This class must
track the connected devices itself and use discovery to mimic the
behavior of the new data server used for the other devices.
add_hf2_device(serial)
¶
Add a new HF2 device.
Since the HF2 data server is not able to report its connected devices toolkit manually needs to update the list of known connected devices.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
serial |
str
|
Serial of the HF2 device |
required |
Raises:
Type | Description |
---|---|
ToolkitError
|
If the device was already added in that session. |