hvl_ccb.dev.sst_luminox.dev

Inheritance diagram of hvl_ccb.dev.sst_luminox.dev

class Luminox(com, dev_config=None)[source]

Bases: SingleCommDevice

Luminox oxygen sensor device class.

property barometric_pressure: int | None
Returns:

Ambient pressure (mbar).

static config_cls()[source]

Return the default configdataclass class.

Returns:

a reference to the default configdataclass class

property date_of_manufacture: str | None
Returns:

Date of manufacture.

static default_com_cls()[source]

Get the class for the default communication protocol used with this device.

Returns:

the type of the standard communication protocol for this device

property mode: LuminoxOutputMode | None

Sends command to sensor to request the current mode then calls _update_mode() to update private variable _mode.

Returns:

Current mode read from _mode.

property partial_pressure_o2: float | None
Returns:

Partial pressure of O₂ (mbar).

property percent_o2: float | None
Returns:

O₂ concentration (%)

property sensor_status: int | None
Returns:

Raw sensor status code.

property serial_number: str | None
Returns:

Device serial number.

property software_revision: str | None
Returns:

Software revision.

start() None[source]

Starts the device. Opens the communication protocol.

stop() None[source]

Stops the device. Closes also the communication protocol.

property temperature: float | None
Returns:

Internal sensor temperature (°C).

class LuminoxConfig[source]

Bases: object

Configuration for the SST Luminox oxygen sensor.

clean_values()

Cleans and enforces configuration values. Does nothing by default, but may be overridden to add custom configuration value checks.

force_value(fieldname, value)

Forces a value to a dataclass field despite the class being frozen.

NOTE: you can define post_force_value method with same signature as this method to do extra processing after value has been forced on fieldname.

Parameters:
  • fieldname – name of the field

  • value – value to assign

is_configdataclass = True
classmethod keys() Sequence[str]

Returns a list of all configdataclass fields key-names.

Returns:

a list of strings containing all keys.

classmethod optional_defaults() dict[str, object]

Returns a list of all configdataclass fields, that have a default value assigned and may be optionally specified on instantiation.

Returns:

a list of strings containing all optional keys.

classmethod required_keys() Sequence[str]

Returns a list of all configdataclass fields, that have no default value assigned and need to be specified on instantiation.

Returns:

a list of strings containing all required keys.

exception LuminoxError[source]

Bases: DeviceError

General Error for Luminox Device.

exception LuminoxMeasurementTypeError[source]

Bases: LuminoxError

Wrong measurement type for requested data.

exception LuminoxOutputModeError[source]

Bases: LuminoxError

Wrong output mode for requested data.