pylabrobot.formulatrix.mantis.driver.simulator.MantisSimulationDriver#

class pylabrobot.formulatrix.mantis.driver.simulator.MantisSimulationDriver(declared_configuration_json: str, name: str = 'Mantis', *, oem_config_directory: str | None = None, show_actions: bool = True)#

Bases: MantisDriver

A Mantis driver with no device behind it.

Nothing reaches a wire. The configuration comes from declared_configuration_json, and the reads answer from it; a board it leaves None does not answer. The plate clamp’s state changes at once, every RFID slot reads empty, and the LED bar takes every command and holds nothing. The motors read idle at 0, as after power-on, and every awaited event comes at once. The device name and the motor reads the configuration does not hold are not simulated.

The sequencer holds SEQUENCER_QUEUE_SIZE items, stopped and empty after setup; started, it plays each item at once. Stop and abort keep what is queued, as on a v4; only a clear drops it. The arm (MantisSimulationArm) moves at once; its motors read where it stands.

Attributes

default_queue_full_timeout

Seconds a queue write is sent again under a new item while the sequencer's queue is full.

default_read_timeout

Seconds one attempt of a command waits for its reply when timeout is None.

Methods

__init__(declared_configuration_json[, ...])

discover()

Read the configuration into configuration, check it against the declared one, then build the features it lists, read the pump's sensor calibration into configuration, and build the RFID reader if it answers on interface A.

request_absolute_encoder_position(*, motor)

Raise: a raw reading means nothing without the unit's encoder correction.

request_encoder_position(*, motor)

Where the simulated arm's motor is: where its controller holds it; 0 without one, as after power-on.

request_firmware_version(*[, board])

The declared firmware version of a board.

request_following_error_configuration(*, motor)

Raise: the following-error check is not part of the configuration.

request_motor_configuration(*, motor)

Raise: a motor's configuration is not part of the device configuration.

request_motor_currents(*, motor)

Raise: the currents are not part of the configuration.

request_motor_limits(*, motor)

A motor's (lower, upper) limit as its generation's recording holds it.

request_motor_position(*, motor)

Where the simulated arm's controller holds the motor; 0 without one, as after power-on.

request_motor_status(*, motor)

The simulated arm's status word for the motor; 0, idle, without one.

request_name()

Raise: the name is not part of the configuration.

save_configuration(path[, indent])

Write what this device reported to a file, to be declared later (declared_configuration_json), with the unit's blocks; none taken from a recording.

setup(*[, skip_arm])

Open the link if it is not open, read the device's configuration and check it, then bring the arm and Z up (Arm.initialize).

stop()

Fail the command in flight and every event waiter; abort the sequencer, stop the motors and park a v4 arm brought up; release the plate clamp, turn the LED bar off, stop reading the link and close it.

Parameters:
  • declared_configuration_json (str)

  • name (str)

  • oem_config_directory (str | None)

  • show_actions (bool)