AnalogIO¶
- class pyniryo_nate.models.io.AnalogIO(id: IOLabel | str, value: float | None = None, unavailable_reason: AnalogUnavailableReason | None = None)[source]¶
Bases:
objectAn analog input or output of the tool or of the controller.
An input that measures nothing is served without a value:
valueis then None andunavailable_reasonsays why. Testis_availableorvalue is None, never a default value, since0.0is a legitimate measurement.- Parameters:
id (IOLabel | str) – The label of the input or output.
value (float | None) – The measurement, in volts in voltage mode and in amperes in current mode. None when no measurement is available.
unavailable_reason (AnalogUnavailableReason | None) – Why no measurement is available. Set if and only if
valueis None.
Attributes
Whether the input carries a measurement.
Methods
- value: float | None = None¶
- property is_available: bool¶
Whether the input carries a measurement. False means
valueis None andunavailable_reasonsays why.
- classmethod from_transport_model(model: AnalogIO) AnalogIO[source]¶
- Parameters:
model (AnalogIO)
- Return type: