hvl_ccb.experiment_manager
Main module containing the top level ExperimentManager class. Inherit from this class to implement your own experiment functionality in another project and it will help you start, stop and manage your devices.
- exception ExperimentError[source]
Bases:
CCBError
Error to indicate that the current status of the experiment manager is on ERROR and thus no operations can be made until reset.
- class ExperimentManager(*args, **kwargs)[source]
Bases:
DeviceSequenceMixin
Experiment Manager can start and stop communication protocols and devices. It provides methods to queue commands to devices and collect results.
- add_device(name: str, device: Device) None [source]
Add a new device to the manager. If the experiment is running, automatically start the device. If a device with this name already exists, raise an error.
- Parameters:
name – is the name of the device.
device – is the instantiated Device object.
- Raises:
- is_error() bool [source]
Returns true, if the status of the experiment manager is error.
- Returns:
True if on error, false otherwise
- is_finished() bool [source]
Returns true, if the status of the experiment manager is finished.
- Returns:
True if finished, false otherwise
- is_running() bool [source]
Returns true, if the status of the experiment manager is running.
- Returns:
True if running, false otherwise
- property status: ExperimentStatus
Get experiment status.
- Returns:
experiment status enum code.