hvl_ccb.dev.sst_luminox.utils

Inheritance diagram of hvl_ccb.dev.sst_luminox.utils

class LuminoxMeasurementType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: ValueEnum

Measurement types for LuminoxOutputMode.POLLING.

The ALL_MEASUREMENTS type will read values for the actual measurement types as given in LuminoxOutputMode.all_measurements_types(); it parses multiple single values using regexp’s for other measurement types, therefore, no regexp is defined for this measurement type.

ALL_MEASUREMENTS = 'A'
BAROMETRIC_PRESSURE = 'P'
DATE_OF_MANUFACTURE = '# 0'
PARTIAL_PRESSURE_O2 = 'O'
PERCENT_O2 = '%'
SENSOR_STATUS = 'e'
SERIAL_NUMBER = '# 1'
SOFTWARE_REVISION = '# 2'
TEMPERATURE = 'T'
classmethod all_measurements_types() tuple[LuminoxMeasurementType, ...][source]

A tuple of LuminoxMeasurementType enum instances which are actual measurements, i.e. not date of manufacture or software revision.

parse_read_measurement_value(read_txt: str) dict[str | LuminoxMeasurementType, int | float | str] | int | float | str[source]
LuminoxMeasurementTypeDict

A typing hint for a dictionary holding LuminoxMeasurementType values. Keys are allowed as strings because LuminoxMeasurementType is of a StrEnumBase type.

LuminoxMeasurementTypeValue: TypeAlias = int | float | str

A typing hint for all possible LuminoxMeasurementType values as read in either streaming mode or in a polling mode with LuminoxMeasurementType.ALL_MEASUREMENTS.

Beware: has to be manually kept in sync with LuminoxMeasurementType instances cast_type attribute values.

class LuminoxOutputMode(value)[source]

Bases: Enum

output mode.

OFF = 2
POLLING = 1
STREAMING = 0