pylabrobot.bmg_labtech.vantastar.driver.master.VANTAstarDriver.send_command#

async VANTAstarDriver.send_command(command_id: int, body: bytes = b'', *, retries: int = 3, when_idle: bool = True) → bytes#

Send [command id] + body and return the reply payload.

Parameters:
  • command_id (int) – the command id, from CommandId.

  • body (bytes) – the command’s fields, appended after the id.

  • retries (int) – attempts on a missing or malformed reply.

  • when_idle (bool) – first poll status until the reader is not busy.

Raises:
  • FrameError – if every attempt gets a missing or malformed reply.

  • CommandRefusedError – if the reader refused the command.

  • DeviceError – if the reader reports a device error.

  • RuntimeError – under estimate_duration, for any command but STATUS and a time estimate.

Return type:

bytes