pylabrobot.heating_shaking.heater_shaker.HeaterShaker.assign_child_resource#
- HeaterShaker.assign_child_resource(resource: Resource, location: Coordinate | None = None, reassign: bool = True)#
Assign a child resource to this resource.
Before the resource is assigned, all callbacks registered with
register_will_assign_resource_callback()
will be called. If any of these callbacks raises an exception, the resource will not be assigned.After the resource is assigned, all callbacks registered with
register_did_assign_resource_callback()
will be called.- Parameters:
resource (Resource) – The resource to assign.
location (Coordinate | None) – The location of the resource, relative to this resource. None if undefined.
reassign (bool) – If
False
, an error will be raised if the resource to be assigned is already assigned to this resource. Defaults toTrue
.