stoner_measurement.instruments.protocol.ieee488.parse_ieee_block

stoner_measurement.instruments.protocol.ieee488.parse_ieee_block(response: bytes, *, terminator: bytes = b'\n', allow_indefinite: bool = False, itemsize: int | None = None) → bytes[source]

Return the payload from a complete IEEE 488.2 binary-block response.

Definite blocks use #<n><length><payload>. Some Keithley instruments instead use the #0<payload><terminator> indefinite form; callers must opt into that form and should provide itemsize so a missing terminator cannot be confused with a valid final data byte.