pylabrobot.resources.TubeCarrier.assign_child_resource#

TubeCarrier.assign_child_resource(resource: Resource, location: Coordinate, reassign: bool = True, spot: int | None = None)#

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) – The location of the resource, relative to this resource.

  • reassign (bool) – If False, an error will be raised if the resource to be assigned is already assigned to this resource. Defaults to True.

  • spot (int | None)