stoner_measurement.instruments.protocol.mks.MKSPR4000Protocol¶
- class stoner_measurement.instruments.protocol.mks.MKSPR4000Protocol[source]¶
Bases:
BaseProtocolPR4000B-S compact ASCII protocol with carriage-return framing.
- property max_frame_size: int¶
Maximum number of response bytes expected for one protocol frame.
- Returns:
Default frame-size limit used by transports when reading a single response frame.
- Return type:
(int)
- parse_response(raw: bytes, *, command: str | None = None) str[source]¶
Parse a raw response from the instrument.
- Parameters:
raw (bytes) – Raw bytes as returned by the transport layer.
- Keyword Parameters:
command (str | None) – Command/query string that produced raw, when available. Defaults to
None.- Returns:
The cleaned-up response string, stripped of any protocol- specific framing, terminators, or whitespace.
- Return type:
(str)
- terminator = b'\r'¶