stoner_measurement.instruments.protocol.leybold.LeyboldCenterProtocol

class stoner_measurement.instruments.protocol.leybold.LeyboldCenterProtocol[source]

Bases: BaseProtocol

CR-terminated Leybold CENTER THREE RS232 protocol framing.

check_error(response: str, *, command: str | None = None) → None[source]

Raise when an ERR response reports one or more Leybold error bits.

property errors_in_response: bool

Leybold CENTER reports NAK/error status in the normal transaction.

format_command(command: str) → bytes[source]

Return command with the Leybold CR terminator.

format_query(query: str) → bytes[source]

Leybold query and set commands use the same command frame.

parse_response(raw: bytes, *, command: str | None = None) → str[source]

Decode and strip CR/LF framing from a response payload.