pylabrobot.brooks.precise_flex.PreciseFlexDriver.send_command#

async PreciseFlexDriver.send_command(command: str) → str#

Send a command and return the accepted <code> <data> payload.

Writes the command and reads one reply line (as one locked exchange), then applies the standard acceptance gate (_ensure_successful): a non-zero reply code raises, otherwise the data payload is returned. A reply in a different grammar goes through the same _locked_exchange and is parsed by the caller instead.

The exchange is wrapped in the firmware-command events so a command keeps its enclosing operation context.

Parameters:

command (str) – the command line, without its line ending.

Raises:

PreciseFlexError – on an empty reply or a non-zero reply code.

Return type:

str