#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# (c) Copyright 2026 Sensirion AG, Switzerland
#
# THIS FILE IS AUTOMATICALLY GENERATED!
#
# Generator: sensirion-driver-generator 1.5.3
# Product: sen62
# 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 SignalDividedBy10(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 = scaled_integer_value / 10.0
@property
def value(self):
return self._divided_by_10
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)