rtd_sensor.measurement
The hardware-neutral measurement API was introduced in rtd-sensor 0.5.0.
The older simulation compatibility imports remain available.
ResistanceReader
Introduced in: rtd-sensor 0.5.0 in the hardware-neutral
rtd_sensor.measurement module. The earlier simulation-specific protocol dates
to project release 0.1.0.
Structural protocol:
No inheritance is required for compatible implementations.
read_temperature_celsius
Introduced in: rtd-sensor 0.5.0 in the hardware-neutral
rtd_sensor.measurement module. A simulation-focused predecessor existed from
project release 0.1.0.
read_temperature_celsius(
reader: ResistanceReader,
*,
model: RTDModel | None = None,
rtd_type: str | None = None,
) -> float
Selection rules:
modelis preferred for new code and accepts any structural RTD model.rtd_typeselects a canonical built-in ID.- A neutral reader defaults to Pt100 when neither is supplied.
modelandrtd_typecannot both be supplied.- An explicit model cannot be combined with a reader that itself declares
rtd_type. - A reader-declared
rtd_typemust agree with an explicitrtd_type.
Selection conflicts raise RTDModelSelectionError. Reader and model exceptions
otherwise propagate unchanged.