#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
-# (c) Copyright 2023 Sensirion AG, Switzerland
+# (c) Copyright 2024 Sensirion AG, Switzerland
#
# THIS FILE IS AUTOMATICALLY GENERATED!
#
-# Generator: sensirion-driver-generator 0.32.0
+# Generator: sensirion-driver-generator 0.40.1
# Product: sfx6xxx
-# Model-Version: 2.2.0
+# Model-Version: 2.3.0
#
"""
The class Sfx6xxxDeviceBase implements the low level interface of the sensor.
@@ -90,10 +95,10 @@ Source code for sensirion_i2c_sfx6xxx.device
from sensirion_driver_adapters.transfer import execute_transfer
from sensirion_driver_support_types.mixin_access import MixinAccess
-from sensirion_i2c_sfx6xxx.commands import (DisableRawFlowValues, EnableRawFlowValues, ForceCloseValve, ForceOpenValve,
- GetRawTemperature, PrepareReadGasCalibration, ReadFlow, ReadGasCalibration,
- ReadMeasurementData, ReadProductIdentifier, ResetForceCloseValve,
- ResetForceOpenValve, ResetPointerToMeasurementBuffer,
+from sensirion_i2c_sfx6xxx.commands import (DisableRawFlowValues, EnableRawFlowValues, FlowUnitT, ForceCloseValve,
+ ForceOpenValve, GetRawTemperature, PrepareReadGasCalibration, ReadFlow,
+ ReadGasCalibration, ReadMeasurementData, ReadProductIdentifier,
+ ResetForceCloseValve, ResetForceOpenValve, ResetPointerToMeasurementBuffer,
StartAirContinuousMeasurement, StartArContinuousMeasurement,
StartCo2ContinuousMeasurement, StartN2oContinuousMeasurement,
StartO2ContinuousMeasurement, StartO2InAirContinuousMeasurement,
@@ -259,7 +264,8 @@ Source code for sensirion_i2c_sfx6xxx.device
Contains status information about the read data.
"""
transfer = ReadMeasurementData()
- return execute_transfer(self._channel, transfer)
+ res_0, res_1, res_2 = execute_transfer(self._channel, transfer)
+ return res_0, res_1, StatusWordT(res_2)
[docs] def read_flow(self):
"""
@@ -389,7 +395,8 @@
Source code for sensirion_i2c_sfx6xxx.device
- This command is only valid after prepare_read_gas_calibration
"""
transfer = ReadGasCalibration()
- return execute_transfer(self._channel, transfer)
+
res_0, res_1, res_2, res_3, res_4 = execute_transfer(self._channel, transfer)
+
return res_0, res_1, FlowUnitT(res_2), res_3, res_4
[docs] def enable_raw_flow_values(self):
"""
@@ -452,32 +459,37 @@
Source code for sensirion_i2c_sfx6xxx.device
[docs] def start_o2_continuous_measurement(self):
"""Start O2 measurement and readout the corresponding scale factor from the sensor"""
- (self._flow_scale_factor, self._flow_offset, self._flow_unit, self._full_flow, self._gas_id
+ (self._flow_scale_factor, self._flow_offset, flow_unit_field, self._full_flow, self._gas_id
) = self.get_gas_calibration(StartO2ContinuousMeasurement.CMD_ID)
+ self._flow_unit = int(flow_unit_field)
return self.sfx6xxx.start_o2_continuous_measurement()
[docs] def start_air_continuous_measurement(self):
"""Start Air measurement and readout the corresponding scale factor from the sensor"""
-
(self._flow_scale_factor, self._flow_offset, self._flow_unit, self._full_flow, self._gas_id
+
(self._flow_scale_factor, self._flow_offset, flow_unit_field, self._full_flow, self._gas_id
) = self.get_gas_calibration(StartAirContinuousMeasurement.CMD_ID)
+
self._flow_unit = int(flow_unit_field)
return self.sfx6xxx.start_air_continuous_measurement()
[docs] def start_co2_continuous_measurement(self):
"""Start CO2 measurement and readout the corresponding scale factor from the sensor"""
-
(self._flow_scale_factor, self._flow_offset, self._flow_unit, self._full_flow, self._gas_id
+
(self._flow_scale_factor, self._flow_offset, flow_unit_field, self._full_flow, self._gas_id
) = self.get_gas_calibration(StartCo2ContinuousMeasurement.CMD_ID)
+
self._flow_unit = int(flow_unit_field)
return self.sfx6xxx.start_co2_continuous_measurement()
[docs] def start_n2o_continuous_measurement(self):
"""Start N2O measurement and readout the corresponding scale factor from the sensor"""
-
(self._flow_scale_factor, self._flow_offset, self._flow_unit, self._full_flow, self._gas_id
+
(self._flow_scale_factor, self._flow_offset, flow_unit_field, self._full_flow, self._gas_id
) = self.get_gas_calibration(StartN2oContinuousMeasurement.CMD_ID)
+
self._flow_unit = int(flow_unit_field)
return self.sfx6xxx.start_n2o_continuous_measurement()
[docs] def start_ar_continuous_measurement(self):
"""Start Ar measurement and readout the corresponding scale factor from the sensor"""
-
(self._flow_scale_factor, self._flow_offset, self._flow_unit, self._full_flow, self._gas_id
+
(self._flow_scale_factor, self._flow_offset, flow_unit_field, self._full_flow, self._gas_id
) = self.get_gas_calibration(StartArContinuousMeasurement.CMD_ID)
+
self._flow_unit = int(flow_unit_field)
return self.sfx6xxx.start_ar_continuous_measurement()
[docs] def start_o2_in_air_continuous_measurement(self, volume_fraction):
@@ -487,14 +499,16 @@
Source code for sensirion_i2c_sfx6xxx.device
:param volume_fraction:
Volume fraction of O2 in Air in per mille (‰).
"""
- (self._flow_scale_factor, self._flow_offset, self._flow_unit, self._full_flow, self._gas_id
+ (self._flow_scale_factor, self._flow_offset, flow_unit_field, self._full_flow, self._gas_id
) = self.get_gas_calibration(StartO2InAirContinuousMeasurement.CMD_ID)
+ self._flow_unit = int(flow_unit_field)
return self.sfx6xxx.start_o2_in_air_continuous_measurement(volume_fraction)
[docs] def start_raw_thermal_conductivity_continuous_measurement(self):
"""Start thermal conductivity measurement and readout the corresponding scale factor from the sensor"""
-
(self._flow_scale_factor, self._flow_offset, self._flow_unit, self._full_flow, self._gas_id
+
(self._flow_scale_factor, self._flow_offset, flow_unit_field, self._full_flow, self._gas_id
) = self.get_gas_calibration(StartRawThermalConductivityContinuousMeasurement.CMD_ID)
+
self._flow_unit = int(flow_unit_field)
return self.sfx6xxx.start_raw_thermal_conductivity_continuous_measurement()
[docs] def read_measurement_data_raw(self):
@@ -508,7 +522,7 @@
Source code for sensirion_i2c_sfx6xxx.device
"""
(flow_raw, reserved, status
) = self.sfx6xxx.read_measurement_data()
- return (flow_raw, StatusWordT(status))
+
return (flow_raw, status)
[docs] def read_measurement_data(self):
"""
@@ -588,7 +602,7 @@
Source code for sensirion_i2c_sfx6xxx.device
-
© Copyright 2023 Sensirion AG, Switzerland.
+
© Copyright 2024 Sensirion AG, Switzerland.
Built with
Sphinx using a
diff --git a/_modules/sensirion_i2c_sfx6xxx/result_types.html b/_modules/sensirion_i2c_sfx6xxx/result_types.html
index 0b3ecc9..2111bee 100644
--- a/_modules/sensirion_i2c_sfx6xxx/result_types.html
+++ b/_modules/sensirion_i2c_sfx6xxx/result_types.html
@@ -12,10 +12,11 @@
-
-
-
-
+
+
+
+
+
@@ -26,14 +27,18 @@