Note
Ophyd.v2 is included on a provisional basis until the v2.0 release and may change API on minor release numbers before then
ophyd.v2.core.DeviceCollector#
- class ophyd.v2.core.DeviceCollector(set_name=True, connect=True, sim=False, timeout: float = 10.0)#
Bases:
object
Collector of top level Device instances to be used as a context manager
- Parameters:
- set_name:
If True, call
device.set_name(variable_name)
on all collected Devices- connect:
If True, call
device.connect(sim)
in parallel on all collected Devices- sim:
If True, connect Signals in simulation mode
- timeout:
How long to wait for connect before logging an exception
Notes
Example usage:
[async] with DeviceCollector(): t1x = motor.Motor("BLxxI-MO-TABLE-01:X") t1y = motor.Motor("pva://BLxxI-MO-TABLE-01:Y") # Names and connects devices here assert t1x.comm.velocity.source assert t1x.name == "t1x"
Methods