Source code for sensirion_i2c_sen69c.result_types

#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# (c) Copyright 2026 Sensirion AG, Switzerland
#
#     THIS FILE IS AUTOMATICALLY GENERATED!
#
# Generator:     sensirion-driver-generator 1.6.1
# Product:       sen69c
# Model-Version: 1.1.0
#
"""
The signal classes specify transformations of the raw sensor signals into a meaningful units.
The generated signal types are used by the driver class and not intended for direct use.
"""

from sensirion_driver_support_types.signals import AbstractSignal


[docs] class SignalDividedBy10Uint16(AbstractSignal): """ All mass and number concentrations are scaled by a factor 10 to avoid floating point operations on the communication interface. """ def __init__(self, scaled_integer_value): self._divided_by_10_uint16 = scaled_integer_value / 10.0 @property def value(self): return self._divided_by_10_uint16 def __str__(self): return '{0:.2f}'.format(self.value)
[docs] class SignalDividedBy10Int16(AbstractSignal): """ The VOC and NOx indices are scaled by a factor 10 to avoid floating point operations on the communication interface. """ def __init__(self, scaled_integer_value): self._divided_by_10_int16 = scaled_integer_value / 10.0 @property def value(self): return self._divided_by_10_int16 def __str__(self): return '{0:.2f}'.format(self.value)
[docs] class SignalTemperature(AbstractSignal): """Measured temperature in degrees Celsius. The raw value is scaled appropriately.""" def __init__(self, temperature_raw): self._temperature = temperature_raw / 200.0 @property def value(self): return self._temperature def __str__(self): return '{0:.2f}'.format(self.value)
[docs] class SignalHumidity(AbstractSignal): """Measured humidity in %RH. The raw value is scaled appropriately.""" def __init__(self, humidity_raw): self._humidity = humidity_raw / 100.0 @property def value(self): return self._humidity def __str__(self): return '{0:.2f}'.format(self.value)