pylabrobot.liquid_handling.backends.websocket.WebSocketBackend

Contents

pylabrobot.liquid_handling.backends.websocket.WebSocketBackend#

class pylabrobot.liquid_handling.backends.websocket.WebSocketBackend(num_channels: int, ws_host: str = '127.0.0.1', ws_port: int = 2121)#

Bases: SerializingBackend

A backend that hosts a websocket server and sends commands over it.

Attributes

deck

loop

The event loop.

num_channels

The number of channels that the robot has.

stop_

The future that is set when the web socket is stopped.

t

The thread that runs the event loop.

websocket

The websocket connection.

Methods

__init__(num_channels[, ws_host, ws_port])

Create a new web socket backend.

aspirate(ops, use_channels)

Aspirate liquid from the specified resource using pip.

aspirate96(aspiration)

Aspirate from all wells in 96 well plate.

assigned_resource_callback(resource)

Called when a new resource was assigned to the robot.

deserialize(data)

dispense(ops, use_channels)

Dispense liquid from the specified resource using pip.

dispense96(dispense)

Dispense to all wells in 96 well plate.

drop_tips(ops, use_channels)

Drop tips from the specified resource.

drop_tips96(drop)

Drop tips to the specified resource using CoRe 96.

handle_event(event, data)

Handle an event from the browser.

has_connection()

Return True if a websocket connection has been established.

move_channel_x(channel, x)

Move the specified channel to the specified x coordinate.

move_channel_y(channel, y)

Move the specified channel to the specified y coordinate.

move_channel_z(channel, z)

Move the specified channel to the specified z coordinate.

move_resource(move, **backend_kwargs)

Move a resource to a new location.

pick_up_tips(ops, use_channels)

Pick up tips from the specified resource.

pick_up_tips96(pickup)

Pick up tips from the specified resource using CoRe 96.

prepare_for_manual_channel_operation()

Prepare the robot for manual operation.

send_command(command[, data, wait_for_response])

Send an event to the browser.

serialize()

set_deck(deck)

Set the deck for the robot.

setup()

Start the websocket server.

stop()

Stop the web socket server.

unassigned_resource_callback(name)

Called when a resource is unassigned from the robot.

wait_for_connection()

Wait for a websocket connection to be established.

Parameters:
  • num_channels (int)

  • ws_host (str)

  • ws_port (int)