stoner_measurement.instruments.protocol.modbus.ModbusRtuProtocol¶
- class stoner_measurement.instruments.protocol.modbus.ModbusRtuProtocol[source]¶
Bases:
BaseProtocolMinimal protocol descriptor for Modbus RTU binary frames.
- format_command(command: str) bytes[source]¶
Encode command as ASCII bytes.
The Modbus drivers in this project do not use
BaseInstrument.write(); they talk to the transport with pre-built binary frames. This implementation exists only to satisfy theBaseProtocolinterface.
- format_query(query: str) bytes[source]¶
Encode query as ASCII bytes.
See
format_command()for why this is intentionally minimal.
- parse_response(raw: bytes, *, command: str | None = None) str[source]¶
Decode raw for diagnostic purposes.
- terminator = None¶