pylabrobot.resources.volume_tracker.VolumeTracker#
- class pylabrobot.resources.volume_tracker.VolumeTracker(max_volume: float, liquids: Optional[List[Tuple[Optional[Liquid], float]]] = None, pending_liquids: Optional[List[Tuple[Optional[Liquid], float]]] = None)#
Bases:
object
A volume tracker tracks operations that change the volume in a container and raises errors if the volume operations are invalid.
Attributes
Methods
__init__
(max_volume[, liquids, pending_liquids])add_liquid
(liquid, volume)Add liquid to the container.
commit
()Commit the pending operations.
disable
()Disable the volume tracker.
enable
()Enable the volume tracker.
Get the free volume of the container.
Get the used volume of the container.
load_state
(state)Load the state of the volume tracker.
remove_liquid
(volume)Remove liquid from the container.
rollback
()Rollback the pending operations.
Serialize the volume tracker.
set_liquids
(liquids)Set the liquids in the container.