Merge branch 'pr_863' into 'main'

[GH_PR] support r/w floating(single) value type (CON-1077)

See merge request app-frameworks/esp-matter!674
This commit is contained in:
Hrishikesh Dhayagude
2024-04-02 12:51:23 +08:00
7 changed files with 741 additions and 628 deletions
+219 -219
View File
@@ -2124,28 +2124,28 @@ attribute_t *create_replacement_product_list(cluster_t *cluster, uint8_t *value,
namespace carbon_monoxide_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value)
@@ -2154,10 +2154,10 @@ attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t valu
ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
}
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value)
@@ -2166,10 +2166,10 @@ attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t v
ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
}
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value)
attribute_t *create_uncertainty(cluster_t *cluster, float value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
ATTRIBUTE_FLAG_NONE, esp_matter_float(value));
}
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value)
@@ -2195,69 +2195,69 @@ attribute_t *create_level_value(cluster_t *cluster, uint8_t value)
namespace carbon_dioxide_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id,
return esp_matter::attribute::create(cluster, CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
}
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id,
return esp_matter::attribute::create(cluster, CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
}
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value)
attribute_t *create_uncertainty(cluster_t *cluster, float value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
return esp_matter::attribute::create(cluster, CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_float(value));
}
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::Id,
return esp_matter::attribute::create(cluster, CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::Id,
return esp_matter::attribute::create(cluster, CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
attribute_t *create_level_value(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::Id,
return esp_matter::attribute::create(cluster, CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
@@ -2266,69 +2266,69 @@ attribute_t *create_level_value(cluster_t *cluster, uint8_t value)
namespace nitrogen_dioxide_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id,
return esp_matter::attribute::create(cluster, NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
}
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id,
return esp_matter::attribute::create(cluster, NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
}
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value)
attribute_t *create_uncertainty(cluster_t *cluster, float value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
return esp_matter::attribute::create(cluster, NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_float(value));
}
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::Id,
return esp_matter::attribute::create(cluster, NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::Id,
return esp_matter::attribute::create(cluster, NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
attribute_t *create_level_value(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::Id,
return esp_matter::attribute::create(cluster, NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
@@ -2337,69 +2337,69 @@ attribute_t *create_level_value(cluster_t *cluster, uint8_t value)
namespace ozone_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, OzoneConcentrationMeasurement::Attributes::MeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id,
return esp_matter::attribute::create(cluster, OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
}
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id,
return esp_matter::attribute::create(cluster, OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
}
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value)
attribute_t *create_uncertainty(cluster_t *cluster, float value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
return esp_matter::attribute::create(cluster, OzoneConcentrationMeasurement::Attributes::Uncertainty::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_float(value));
}
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::Id,
return esp_matter::attribute::create(cluster, OzoneConcentrationMeasurement::Attributes::MeasurementUnit::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::Id,
return esp_matter::attribute::create(cluster, OzoneConcentrationMeasurement::Attributes::MeasurementMedium::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
attribute_t *create_level_value(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::Id,
return esp_matter::attribute::create(cluster, OzoneConcentrationMeasurement::Attributes::LevelValue::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
@@ -2408,69 +2408,69 @@ attribute_t *create_level_value(cluster_t *cluster, uint8_t value)
namespace formaldehyde_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id,
return esp_matter::attribute::create(cluster, FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
}
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id,
return esp_matter::attribute::create(cluster, FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
}
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value)
attribute_t *create_uncertainty(cluster_t *cluster, float value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
return esp_matter::attribute::create(cluster, FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_float(value));
}
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::Id,
return esp_matter::attribute::create(cluster, FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::Id,
return esp_matter::attribute::create(cluster, FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
attribute_t *create_level_value(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::Id,
return esp_matter::attribute::create(cluster, FormaldehydeConcentrationMeasurement::Attributes::LevelValue::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
@@ -2479,69 +2479,69 @@ attribute_t *create_level_value(cluster_t *cluster, uint8_t value)
namespace pm1_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, Pm1ConcentrationMeasurement::Attributes::MeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id,
return esp_matter::attribute::create(cluster, Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
}
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id,
return esp_matter::attribute::create(cluster, Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
}
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value)
attribute_t *create_uncertainty(cluster_t *cluster, float value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
return esp_matter::attribute::create(cluster, Pm1ConcentrationMeasurement::Attributes::Uncertainty::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_float(value));
}
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::Id,
return esp_matter::attribute::create(cluster, Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::Id,
return esp_matter::attribute::create(cluster, Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
attribute_t *create_level_value(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::Id,
return esp_matter::attribute::create(cluster, Pm1ConcentrationMeasurement::Attributes::LevelValue::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
@@ -2550,69 +2550,69 @@ attribute_t *create_level_value(cluster_t *cluster, uint8_t value)
namespace pm25_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, Pm25ConcentrationMeasurement::Attributes::MeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id,
return esp_matter::attribute::create(cluster, Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
}
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id,
return esp_matter::attribute::create(cluster, Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
}
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value)
attribute_t *create_uncertainty(cluster_t *cluster, float value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
return esp_matter::attribute::create(cluster, Pm25ConcentrationMeasurement::Attributes::Uncertainty::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_float(value));
}
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::Id,
return esp_matter::attribute::create(cluster, Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::Id,
return esp_matter::attribute::create(cluster, Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
attribute_t *create_level_value(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::Id,
return esp_matter::attribute::create(cluster, Pm25ConcentrationMeasurement::Attributes::LevelValue::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
@@ -2621,69 +2621,69 @@ attribute_t *create_level_value(cluster_t *cluster, uint8_t value)
namespace pm10_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, Pm10ConcentrationMeasurement::Attributes::MeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id,
return esp_matter::attribute::create(cluster, Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
}
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id,
return esp_matter::attribute::create(cluster, Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
}
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value)
attribute_t *create_uncertainty(cluster_t *cluster, float value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
return esp_matter::attribute::create(cluster, Pm10ConcentrationMeasurement::Attributes::Uncertainty::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_float(value));
}
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::Id,
return esp_matter::attribute::create(cluster, Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::Id,
return esp_matter::attribute::create(cluster, Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
attribute_t *create_level_value(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::Id,
return esp_matter::attribute::create(cluster, Pm10ConcentrationMeasurement::Attributes::LevelValue::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
@@ -2692,69 +2692,69 @@ attribute_t *create_level_value(cluster_t *cluster, uint8_t value)
namespace radon_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, RadonConcentrationMeasurement::Attributes::MeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, RadonConcentrationMeasurement::Attributes::MinMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id,
return esp_matter::attribute::create(cluster, RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
}
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id,
return esp_matter::attribute::create(cluster, RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
}
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value)
attribute_t *create_uncertainty(cluster_t *cluster, float value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
return esp_matter::attribute::create(cluster, RadonConcentrationMeasurement::Attributes::Uncertainty::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_float(value));
}
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::Id,
return esp_matter::attribute::create(cluster, RadonConcentrationMeasurement::Attributes::MeasurementUnit::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::Id,
return esp_matter::attribute::create(cluster, RadonConcentrationMeasurement::Attributes::MeasurementMedium::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
attribute_t *create_level_value(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::Id,
return esp_matter::attribute::create(cluster, RadonConcentrationMeasurement::Attributes::LevelValue::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
@@ -2763,69 +2763,69 @@ attribute_t *create_level_value(cluster_t *cluster, uint8_t value)
namespace total_volatile_organic_compound_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id,
return esp_matter::attribute::create(cluster, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
}
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value)
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_uint16(value));
return esp_matter::attribute::create(cluster, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::Id,
ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_float(value));
}
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id,
return esp_matter::attribute::create(cluster, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint32(value));
}
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value)
attribute_t *create_uncertainty(cluster_t *cluster, float value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value));
return esp_matter::attribute::create(cluster, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_float(value));
}
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::Id,
return esp_matter::attribute::create(cluster, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::Id,
return esp_matter::attribute::create(cluster, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
attribute_t *create_level_value(cluster_t *cluster, uint8_t value)
{
return esp_matter::attribute::create(cluster, CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::Id,
return esp_matter::attribute::create(cluster, TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::Id,
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
}
+60 -60
View File
@@ -479,14 +479,14 @@ attribute_t *create_replacement_product_list(cluster_t *cluster, uint8_t *value,
namespace carbon_monoxide_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value);
attribute_t *create_uncertainty(cluster_t *cluster, float value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
@@ -495,14 +495,14 @@ attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
namespace carbon_dioxide_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value);
attribute_t *create_uncertainty(cluster_t *cluster, float value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
@@ -511,14 +511,14 @@ attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
namespace nitrogen_dioxide_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value);
attribute_t *create_uncertainty(cluster_t *cluster, float value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
@@ -527,14 +527,14 @@ attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
namespace ozone_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value);
attribute_t *create_uncertainty(cluster_t *cluster, float value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
@@ -543,14 +543,14 @@ attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
namespace formaldehyde_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value);
attribute_t *create_uncertainty(cluster_t *cluster, float value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
@@ -559,14 +559,14 @@ attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
namespace pm1_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value);
attribute_t *create_uncertainty(cluster_t *cluster, float value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
@@ -575,14 +575,14 @@ attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
namespace pm25_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value);
attribute_t *create_uncertainty(cluster_t *cluster, float value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
@@ -591,14 +591,14 @@ attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
namespace pm10_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value);
attribute_t *create_uncertainty(cluster_t *cluster, float value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
@@ -607,14 +607,14 @@ attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
namespace radon_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value);
attribute_t *create_uncertainty(cluster_t *cluster, float value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
@@ -623,14 +623,14 @@ attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
namespace total_volatile_organic_compounds_concentration_measurement {
namespace attribute {
attribute_t *create_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_min_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_max_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_peak_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_average_measured_value(cluster_t *cluster, nullable<float> value);
attribute_t *create_average_measured_value_window(cluster_t *cluster, uint32_t value);
attribute_t *create_uncertainty(cluster_t *cluster, uint16_t value);
attribute_t *create_uncertainty(cluster_t *cluster, float value);
attribute_t *create_measurement_unit(cluster_t *cluster, uint8_t value);
attribute_t *create_measurement_medium(cluster_t *cluster, uint8_t value);
attribute_t *create_level_value(cluster_t *cluster, uint8_t value);
@@ -709,6 +709,18 @@ static esp_err_t console_set_handler(int argc, char **argv)
uint16_t value = atoi(argv[3]);
val = esp_matter_enum16(value);
}
} else if (type == ESP_MATTER_VAL_TYPE_FLOAT) {
if (matter_attribute->IsNullable()) {
if (strncmp(argv[3], "null", sizeof("null")) == 0) {
val = esp_matter_nullable_float(nullable<float>());
} else {
float value = (float)atof(argv[3]);
val = esp_matter_nullable_float(value);
}
} else {
float value = (float)atof(argv[3]);
val = esp_matter_float(value);
}
} else {
ESP_LOGE(TAG, "Type not handled: %d", type);
return ESP_ERR_INVALID_ARG;
@@ -935,6 +947,20 @@ static esp_err_t console_get_handler(int argc, char **argv)
} else {
val = esp_matter_enum16(Traits::StorageToWorking(value));
}
} else if (type == ESP_MATTER_VAL_TYPE_FLOAT) {
using Traits = chip::app::NumericAttributeTraits<float>;
Traits::StorageType value;
uint8_t *read_able = Traits::ToAttributeStoreRepresentation(value);
get_val_raw(endpoint_id, cluster_id, attribute_id, read_able, sizeof(value));
if (matter_attribute->IsNullable()) {
if (Traits::IsNullValue(value)) {
val = esp_matter_nullable_float(nullable<float>());
} else {
val = esp_matter_nullable_float(Traits::StorageToWorking(value));
}
} else {
val = esp_matter_float(Traits::StorageToWorking(value));
}
} else {
ESP_LOGE(TAG, "Type not handled: %d", type);
return ESP_ERR_INVALID_ARG;
@@ -1828,6 +1854,22 @@ static esp_err_t get_attr_val_from_data(esp_matter_attr_val_t *val, EmberAfAttri
break;
}
case ZCL_SINGLE_ATTRIBUTE_TYPE: {
using Traits = chip::app::NumericAttributeTraits<float>;
Traits::StorageType attribute_value;
memcpy((float *)&attribute_value, value, sizeof(Traits::StorageType));
if (attribute_metadata->IsNullable()) {
if (Traits::IsNullValue(attribute_value)) {
*val = esp_matter_nullable_float(nullable<float>());
} else {
*val = esp_matter_nullable_float(attribute_value);
}
} else {
*val = esp_matter_float(attribute_value);
}
break;
}
default:
*val = esp_matter_invalid(NULL);
break;
+93 -82
View File
@@ -104,7 +104,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
/* Attributes not managed internally */
if (config) {
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
} else {
@@ -143,7 +143,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
attribute::create_action_list(cluster, NULL, 0, 0);
attribute::create_endpoint_lists(cluster, NULL, 0, 0);
/* Attributes not managed internally */
/* Attributes not managed internally */
if (config) {
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
} else {
@@ -804,26 +804,26 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, EthernetNetworkDiagnostics::Id, flags);
if (!cluster) {
ESP_LOGE(TAG, "Could not create cluster");
return NULL;
ESP_LOGE(TAG, "Could not create cluster");
return NULL;
}
if (flags & CLUSTER_FLAG_SERVER) {
static const auto plugin_server_init_cb = CALL_ONCE(MatterEthernetNetworkDiagnosticsPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
static const auto plugin_server_init_cb = CALL_ONCE(MatterEthernetNetworkDiagnosticsPluginServerInitCallback);
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
} else {
ESP_LOGE(TAG, "Config is NULL. Cannot add some attributes.");
}
if (config) {
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
} else {
ESP_LOGE(TAG, "Config is NULL. Cannot add some attributes.");
}
}
/* Commands */
@@ -1219,7 +1219,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
attribute::create_scene_table_size(cluster, config->scene_table_size);
attribute::create_fabric_scene_info(cluster, NULL, 0, 0);
} else {
} else {
ESP_LOGE(TAG, "Config is NULL. Cannot add some attributes.");
}
}
@@ -1407,7 +1407,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_
/* Attributes managed internally */
attribute::create_remaining_time(cluster, 0);
for (uint8_t idx = 1; idx <= config->number_of_primaries.value_or(0); ++idx) {
for (uint8_t idx = 1; idx <= config->number_of_primaries.value_or(0); ++idx) {
attribute::create_primary_n_x(cluster, 0, idx);
attribute::create_primary_n_y(cluster, 0, idx);
attribute::create_primary_n_intensity(cluster, nullable<uint8_t>(), idx);
@@ -1558,30 +1558,30 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
cluster_t *cluster = cluster::create(endpoint, ThermostatUserInterfaceConfiguration::Id, flags);
if (!cluster) {
ESP_LOGE(TAG, "Could not create cluster");
return NULL;
return NULL;
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
create_default_binding_cluster(endpoint);
}
if (flags & CLUSTER_FLAG_SERVER) {
add_function_list(cluster, function_list, function_flags);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
attribute::create_temperature_display_mode(cluster, config->temperature_display_mode);
attribute::create_keypad_lockout(cluster, config->keypad_lockout);
} else {
ESP_LOGE(TAG, "Config is NULL. Cannot add some attributes.");
}
if (config) {
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
attribute::create_temperature_display_mode(cluster, config->temperature_display_mode);
attribute::create_keypad_lockout(cluster, config->keypad_lockout);
} else {
ESP_LOGE(TAG, "Config is NULL. Cannot add some attributes.");
}
}
return cluster;
@@ -1611,9 +1611,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_air_quality(cluster, 0);
attribute::create_air_quality(cluster, 0);
/* Attributes not managed internally */
if (config) {
@@ -1652,7 +1652,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_change_indication(cluster, 0);
attribute::create_change_indication(cluster, 0);
/* Attributes not managed internally */
if (config) {
@@ -1689,9 +1689,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_change_indication(cluster, 0);
attribute::create_change_indication(cluster, 0);
/* Attributes not managed internally */
if (config) {
@@ -1728,9 +1728,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_measurement_medium(cluster, 0);
attribute::create_measurement_medium(cluster, config->measurement_medium);
/* Attributes not managed internally */
if (config) {
@@ -1768,8 +1768,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_measurement_medium(cluster, config->measurement_medium);
/* Attributes not managed internally */
if (config) {
@@ -1807,8 +1808,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_measurement_medium(cluster, config->measurement_medium);
/* Attributes not managed internally */
if (config) {
@@ -1846,8 +1848,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_measurement_medium(cluster, config->measurement_medium);
/* Attributes not managed internally */
if (config) {
@@ -1885,8 +1888,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_measurement_medium(cluster, config->measurement_medium);
/* Attributes not managed internally */
if (config) {
@@ -1924,8 +1928,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_measurement_medium(cluster, config->measurement_medium);
/* Attributes not managed internally */
if (config) {
@@ -1963,8 +1968,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_measurement_medium(cluster, config->measurement_medium);
/* Attributes not managed internally */
if (config) {
@@ -2002,8 +2008,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_measurement_medium(cluster, config->measurement_medium);
/* Attributes not managed internally */
if (config) {
@@ -2041,8 +2048,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_measurement_medium(cluster, config->measurement_medium);
/* Attributes not managed internally */
if (config) {
@@ -2077,16 +2085,19 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
}
if (flags & CLUSTER_FLAG_SERVER) {
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
global::attribute::create_event_list(cluster, NULL, 0,0);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_measurement_medium(cluster, config->measurement_medium);
/* Attributes not managed internally */
if (config) {
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
} else {
ESP_LOGE(TAG, "Config is NULL. Cannot add some attributes.");
}
/* Attributes not managed internally */
if (config) {
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
} else {
ESP_LOGE(TAG, "Config is NULL. Cannot add some attributes.");
}
}
return cluster;
@@ -2117,9 +2128,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_phase_list(cluster, NULL, 0, 0);
attribute::create_phase_list(cluster, NULL, 0, 0);
attribute::create_current_phase(cluster, 0);
attribute::create_operational_state_list(cluster, NULL, 0, 0);
attribute::create_operational_state(cluster, 0);
@@ -2162,10 +2173,10 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
/* Attributes not managed internally */
if (config) {
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
attribute::create_current_mode(cluster, config->current_mode);
@@ -2204,7 +2215,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -2241,7 +2252,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
@@ -2302,35 +2313,35 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, SmokeCoAlarm::Id, flags);
if (!cluster) {
ESP_LOGE(TAG, "Could not create cluster");
return NULL;
ESP_LOGE(TAG, "Could not create cluster");
return NULL;
}
if (flags & CLUSTER_FLAG_SERVER) {
add_function_list(cluster, function_list, function_flags);
add_function_list(cluster, function_list, function_flags);
}
if (flags & CLUSTER_FLAG_CLIENT) {
create_default_binding_cluster(endpoint);
create_default_binding_cluster(endpoint);
}
if (flags & CLUSTER_FLAG_SERVER) {
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_expressed_state(cluster, 0);
attribute::create_battery_alert(cluster, 0);
attribute::create_test_in_progress(cluster, false);
attribute::create_hardware_fault_alert(cluster, false);
attribute::create_end_of_service_alert(cluster, 0);
attribute::create_expressed_state(cluster, 0);
attribute::create_battery_alert(cluster, 0);
attribute::create_test_in_progress(cluster, false);
attribute::create_hardware_fault_alert(cluster, false);
attribute::create_end_of_service_alert(cluster, 0);
/* Attributes not managed internally */
if (config) {
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
} else {
ESP_LOGE(TAG, "Config is NULL. Cannot add some attributes.");
}
/* Attributes not managed internally */
if (config) {
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
} else {
ESP_LOGE(TAG, "Config is NULL. Cannot add some attributes.");
}
}
event::create_low_battery(cluster);
@@ -3177,9 +3188,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_supported_modes(cluster, NULL, 0, 0);
attribute::create_supported_modes(cluster, NULL, 0, 0);
/* Attributes not managed internally */
if (config) {
@@ -3256,7 +3267,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
@@ -3280,7 +3291,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
cluster_t *cluster = cluster::create(endpoint, KeypadInput::Id, flags);
if (!cluster) {
ESP_LOGE(TAG, "Could not create cluster");
return NULL;
return NULL;
}
if (flags & CLUSTER_FLAG_CLIENT) {
@@ -3293,7 +3304,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes managed internally */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
+40 -10
View File
@@ -416,71 +416,101 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
namespace carbon_monoxide_concentration_measurement {
typedef struct config {
uint16_t cluster_revision;
config() : cluster_revision(3) {}
uint8_t measurement_medium;
config() : cluster_revision(3), measurement_medium(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* carbon_monoxide_concentration_measurement */
namespace carbon_dioxide_concentration_measurement {
typedef struct config {
uint16_t cluster_revision;
config() : cluster_revision(3) {}
uint8_t measurement_medium;
config() : cluster_revision(3), measurement_medium(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* carbon_dioxide_concentration_measurement */
namespace nitrogen_dioxide_concentration_measurement {
typedef struct config {
uint16_t cluster_revision;
config() : cluster_revision(3) {}
uint8_t measurement_medium;
config() : cluster_revision(3), measurement_medium(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* nitrogen_dioxide_concentration_measurement */
namespace ozone_concentration_measurement {
typedef struct config {
uint16_t cluster_revision;
config() : cluster_revision(3) {}
uint8_t measurement_medium;
config() : cluster_revision(3), measurement_medium(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* ozone_concentration_measurement */
namespace formaldehyde_concentration_measurement {
typedef struct config {
uint16_t cluster_revision;
config() : cluster_revision(3) {}
uint8_t measurement_medium;
config() : cluster_revision(3), measurement_medium(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* formaldehyde_concentration_measurement */
namespace pm1_concentration_measurement {
typedef struct config {
uint16_t cluster_revision;
config() : cluster_revision(3) {}
uint8_t measurement_medium;
config() : cluster_revision(3), measurement_medium(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* pm1_concentration_measurement */
namespace pm25_concentration_measurement {
typedef struct config {
uint16_t cluster_revision;
config() : cluster_revision(3) {}
uint8_t measurement_medium;
config() : cluster_revision(3), measurement_medium(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* pm25_concentration_measurement */
namespace pm10_concentration_measurement {
typedef struct config {
uint16_t cluster_revision;
config() : cluster_revision(1) {}
uint8_t measurement_medium;
config() : cluster_revision(3), measurement_medium(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* pm10_concentration_measurement */
namespace radon_concentration_measurement {
typedef struct config {
uint16_t cluster_revision;
config() : cluster_revision(3) {}
uint8_t measurement_medium;
config() : cluster_revision(3), measurement_medium(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* radon_concentration_measurement */
namespace total_volatile_organic_compounds_concentration_measurement {
typedef struct config {
uint16_t cluster_revision;
config() : cluster_revision(3) {}
uint8_t measurement_medium;
config() : cluster_revision(3), measurement_medium(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* total_volatile_organic_compounds_concentration_measurement */
namespace operational_state {
+177 -187
View File
@@ -718,13 +718,13 @@ esp_err_t add(cluster_t *cluster, config_t *config)
command::create_go_to_lift_percentage(cluster);
// We should update config_status attribute as position_aware_lift feature is added
uint8_t set_third_bit = 1 << 3;
attribute_t *attribute = esp_matter::attribute::get(cluster, WindowCovering::Attributes::ConfigStatus::Id);
esp_matter_attr_val_t val = esp_matter_invalid(NULL);
esp_matter::attribute::get_val(attribute, &val);
val.val.u8 = val.val.u8 | set_third_bit;
esp_matter::attribute::set_val(attribute, &val);
// We should update config_status attribute as position_aware_lift feature is added
uint8_t set_third_bit = 1 << 3;
attribute_t *attribute = esp_matter::attribute::get(cluster, WindowCovering::Attributes::ConfigStatus::Id);
esp_matter_attr_val_t val = esp_matter_invalid(NULL);
esp_matter::attribute::get_val(attribute, &val);
val.val.u8 = val.val.u8 | set_third_bit;
esp_matter::attribute::set_val(attribute, &val);
} else {
ESP_LOGE(TAG, "Cluster shall support Lift feature");
return ESP_ERR_NOT_SUPPORTED;
@@ -781,7 +781,7 @@ esp_err_t add(cluster_t *cluster, config_t *config)
}
if((get_feature_map_value(cluster) & abs_and_lift_feature_map) == abs_and_lift_feature_map) {
command::create_go_to_lift_value(cluster);
command::create_go_to_lift_value(cluster);
} else {
ESP_LOGW(TAG, "Lift commands were not created because cluster does not support Lift feature");
}
@@ -822,13 +822,13 @@ esp_err_t add(cluster_t *cluster, config_t *config)
command::create_go_to_tilt_percentage(cluster);
// We should update config_status attribute as position_aware_tilt feature is added
uint8_t set_fourth_bit = 1 << 4;
attribute_t *attribute = esp_matter::attribute::get(cluster, WindowCovering::Attributes::ConfigStatus::Id);
esp_matter_attr_val_t val = esp_matter_invalid(NULL);
esp_matter::attribute::get_val(attribute, &val);
val.val.u8 = val.val.u8 | set_fourth_bit;
esp_matter::attribute::set_val(attribute, &val);
// We should update config_status attribute as position_aware_tilt feature is added
uint8_t set_fourth_bit = 1 << 4;
attribute_t *attribute = esp_matter::attribute::get(cluster, WindowCovering::Attributes::ConfigStatus::Id);
esp_matter_attr_val_t val = esp_matter_invalid(NULL);
esp_matter::attribute::get_val(attribute, &val);
val.val.u8 = val.val.u8 | set_fourth_bit;
esp_matter::attribute::set_val(attribute, &val);
} else {
ESP_LOGE(TAG, "Cluster shall support Tilt feature");
return ESP_ERR_NOT_SUPPORTED;
@@ -918,8 +918,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -942,8 +942,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1059,15 +1059,14 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
attribute::create_measured_value(cluster, config->measured_value);
attribute::create_min_measured_value(cluster, config->min_measured_value);
attribute::create_max_measured_value(cluster, config->max_measured_value);
attribute::create_uncertainty(cluster, config->uncertainty);
attribute::create_measurement_unit(cluster, config->measurement_unit);
return ESP_OK;
@@ -1085,8 +1084,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1107,8 +1106,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1128,8 +1127,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1148,8 +1147,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1168,16 +1167,16 @@ uint32_t get_id()
return (uint32_t)CarbonMonoxideConcentrationMeasurement::Feature::kAverageMeasurement;
}
esp_err_t add(cluster_t *cluster)
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
attribute::create_average_measured_value(cluster, 0);
attribute::create_average_measured_value_window(cluster, 1);
attribute::create_average_measured_value(cluster, config->average_measured_value);
attribute::create_average_measured_value_window(cluster, config->average_measured_value_window);
return ESP_OK;
}
@@ -1200,15 +1199,14 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
attribute::create_measured_value(cluster, config->measured_value);
attribute::create_min_measured_value(cluster, config->min_measured_value);
attribute::create_max_measured_value(cluster, config->max_measured_value);
attribute::create_uncertainty(cluster, config->uncertainty);
attribute::create_measurement_unit(cluster, config->measurement_unit);
return ESP_OK;
@@ -1226,8 +1224,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1248,8 +1246,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1269,8 +1267,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1289,8 +1287,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1309,16 +1307,16 @@ uint32_t get_id()
return (uint32_t)CarbonDioxideConcentrationMeasurement::Feature::kAverageMeasurement;
}
esp_err_t add(cluster_t *cluster)
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
attribute::create_average_measured_value(cluster, 0);
attribute::create_average_measured_value_window(cluster, 1);
attribute::create_average_measured_value(cluster, config->average_measured_value);
attribute::create_average_measured_value_window(cluster, config->average_measured_value_window);
return ESP_OK;
}
@@ -1341,15 +1339,14 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
attribute::create_measured_value(cluster, config->measured_value);
attribute::create_min_measured_value(cluster, config->min_measured_value);
attribute::create_max_measured_value(cluster, config->max_measured_value);
attribute::create_uncertainty(cluster, config->uncertainty);
attribute::create_measurement_unit(cluster, config->measurement_unit);
return ESP_OK;
@@ -1367,8 +1364,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1389,8 +1386,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1410,8 +1407,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1430,8 +1427,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1450,16 +1447,16 @@ uint32_t get_id()
return (uint32_t)NitrogenDioxideConcentrationMeasurement::Feature::kAverageMeasurement;
}
esp_err_t add(cluster_t *cluster)
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
attribute::create_average_measured_value(cluster, 0);
attribute::create_average_measured_value_window(cluster, 1);
attribute::create_average_measured_value(cluster, config->average_measured_value);
attribute::create_average_measured_value_window(cluster, config->average_measured_value_window);
return ESP_OK;
}
@@ -1482,15 +1479,14 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
attribute::create_measured_value(cluster, config->measured_value);
attribute::create_min_measured_value(cluster, config->min_measured_value);
attribute::create_max_measured_value(cluster, config->max_measured_value);
attribute::create_uncertainty(cluster, config->uncertainty);
attribute::create_measurement_unit(cluster, config->measurement_unit);
return ESP_OK;
@@ -1508,8 +1504,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1530,8 +1526,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1551,8 +1547,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1571,8 +1567,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1591,16 +1587,16 @@ uint32_t get_id()
return (uint32_t)OzoneConcentrationMeasurement::Feature::kAverageMeasurement;
}
esp_err_t add(cluster_t *cluster)
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
attribute::create_average_measured_value(cluster, 0);
attribute::create_average_measured_value_window(cluster, 1);
attribute::create_average_measured_value(cluster, config->average_measured_value);
attribute::create_average_measured_value_window(cluster, config->average_measured_value_window);
return ESP_OK;
}
@@ -1623,15 +1619,14 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
attribute::create_measured_value(cluster, config->measured_value);
attribute::create_min_measured_value(cluster, config->min_measured_value);
attribute::create_max_measured_value(cluster, config->max_measured_value);
attribute::create_uncertainty(cluster, config->uncertainty);
attribute::create_measurement_unit(cluster, config->measurement_unit);
return ESP_OK;
@@ -1649,8 +1644,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1671,8 +1666,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1692,8 +1687,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1712,8 +1707,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1732,16 +1727,16 @@ uint32_t get_id()
return (uint32_t)FormaldehydeConcentrationMeasurement::Feature::kAverageMeasurement;
}
esp_err_t add(cluster_t *cluster)
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
attribute::create_average_measured_value(cluster, 0);
attribute::create_average_measured_value_window(cluster, 1);
attribute::create_average_measured_value(cluster, config->average_measured_value);
attribute::create_average_measured_value_window(cluster, config->average_measured_value_window);
return ESP_OK;
}
@@ -1764,15 +1759,14 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
attribute::create_measured_value(cluster, config->measured_value);
attribute::create_min_measured_value(cluster, config->min_measured_value);
attribute::create_max_measured_value(cluster, config->max_measured_value);
attribute::create_uncertainty(cluster, config->uncertainty);
attribute::create_measurement_unit(cluster, config->measurement_unit);
return ESP_OK;
@@ -1790,8 +1784,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1812,8 +1806,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1833,8 +1827,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1853,8 +1847,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1873,16 +1867,16 @@ uint32_t get_id()
return (uint32_t)Pm1ConcentrationMeasurement::Feature::kAverageMeasurement;
}
esp_err_t add(cluster_t *cluster)
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
attribute::create_average_measured_value(cluster, 0);
attribute::create_average_measured_value_window(cluster, 1);
attribute::create_average_measured_value(cluster, config->average_measured_value);
attribute::create_average_measured_value_window(cluster, config->average_measured_value_window);
return ESP_OK;
}
@@ -1905,15 +1899,14 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
attribute::create_measured_value(cluster, config->measured_value);
attribute::create_min_measured_value(cluster, config->min_measured_value);
attribute::create_max_measured_value(cluster, config->max_measured_value);
attribute::create_uncertainty(cluster, config->uncertainty);
attribute::create_measurement_unit(cluster, config->measurement_unit);
return ESP_OK;
@@ -1931,8 +1924,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1953,8 +1946,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1974,8 +1967,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -1994,8 +1987,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -2014,16 +2007,16 @@ uint32_t get_id()
return (uint32_t)Pm25ConcentrationMeasurement::Feature::kAverageMeasurement;
}
esp_err_t add(cluster_t *cluster)
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
attribute::create_average_measured_value(cluster, 0);
attribute::create_average_measured_value_window(cluster, 1);
attribute::create_average_measured_value(cluster, config->average_measured_value);
attribute::create_average_measured_value_window(cluster, config->average_measured_value_window);
return ESP_OK;
}
@@ -2046,15 +2039,14 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
attribute::create_measured_value(cluster, config->measured_value);
attribute::create_min_measured_value(cluster, config->min_measured_value);
attribute::create_max_measured_value(cluster, config->max_measured_value);
attribute::create_uncertainty(cluster, config->uncertainty);
attribute::create_measurement_unit(cluster, config->measurement_unit);
return ESP_OK;
@@ -2072,8 +2064,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -2094,8 +2086,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -2115,8 +2107,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -2135,8 +2127,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -2155,16 +2147,16 @@ uint32_t get_id()
return (uint32_t)Pm10ConcentrationMeasurement::Feature::kAverageMeasurement;
}
esp_err_t add(cluster_t *cluster)
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
attribute::create_average_measured_value(cluster, 0);
attribute::create_average_measured_value_window(cluster, 1);
attribute::create_average_measured_value(cluster, config->average_measured_value);
attribute::create_average_measured_value_window(cluster, config->average_measured_value_window);
return ESP_OK;
}
@@ -2187,15 +2179,14 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
attribute::create_measured_value(cluster, config->measured_value);
attribute::create_min_measured_value(cluster, config->min_measured_value);
attribute::create_max_measured_value(cluster, config->max_measured_value);
attribute::create_uncertainty(cluster, config->uncertainty);
attribute::create_measurement_unit(cluster, config->measurement_unit);
return ESP_OK;
@@ -2213,8 +2204,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -2235,8 +2226,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -2256,8 +2247,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -2276,8 +2267,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -2296,16 +2287,16 @@ uint32_t get_id()
return (uint32_t)RadonConcentrationMeasurement::Feature::kAverageMeasurement;
}
esp_err_t add(cluster_t *cluster)
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
attribute::create_average_measured_value(cluster, 0);
attribute::create_average_measured_value_window(cluster, 1);
attribute::create_average_measured_value(cluster, config->average_measured_value);
attribute::create_average_measured_value_window(cluster, config->average_measured_value_window);
return ESP_OK;
}
@@ -2328,15 +2319,14 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
attribute::create_measured_value(cluster, config->measured_value);
attribute::create_min_measured_value(cluster, config->min_measured_value);
attribute::create_max_measured_value(cluster, config->max_measured_value);
attribute::create_uncertainty(cluster, config->uncertainty);
attribute::create_measurement_unit(cluster, config->measurement_unit);
return ESP_OK;
@@ -2354,8 +2344,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -2376,8 +2366,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -2397,8 +2387,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -2417,8 +2407,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -2437,16 +2427,16 @@ uint32_t get_id()
return (uint32_t)TotalVolatileOrganicCompoundsConcentrationMeasurement::Feature::kAverageMeasurement;
}
esp_err_t add(cluster_t *cluster)
esp_err_t add(cluster_t *cluster, config_t *config)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
attribute::create_average_measured_value(cluster, 0);
attribute::create_average_measured_value_window(cluster, 1);
attribute::create_average_measured_value(cluster, config->average_measured_value);
attribute::create_average_measured_value_window(cluster, config->average_measured_value_window);
return ESP_OK;
}
@@ -2663,8 +2653,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -2691,8 +2681,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -3345,8 +3335,8 @@ uint32_t get_id()
esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -3365,7 +3355,7 @@ esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
@@ -3384,7 +3374,7 @@ esp_err_t add(cluster_t *cluster)
{
if (!cluster) {
ESP_LOGE(TAG, "Cluster cannot be NULL");
return ESP_ERR_INVALID_ARG;
return ESP_ERR_INVALID_ARG;
}
update_feature_map(cluster, get_id());
+110 -70
View File
@@ -584,12 +584,11 @@ namespace feature {
namespace numeric_measurement {
typedef struct config {
nullable<uint16_t> measured_value;
nullable<uint16_t> min_measured_value;
nullable<uint16_t> max_measured_value;
uint16_t uncertainty;
nullable<float> measured_value;
nullable<float> min_measured_value;
nullable<float> max_measured_value;
uint8_t measurement_unit;
config() : measured_value(), min_measured_value(), max_measured_value(), uncertainty(0), measurement_unit(0) {}
config() : measured_value(), min_measured_value(), max_measured_value(), measurement_unit(0) {}
} config_t;
uint32_t get_id();
@@ -624,7 +623,7 @@ esp_err_t add(cluster_t *cluster);
namespace peak_measurement {
typedef struct config {
nullable<uint16_t> peak_measured_value;
nullable<float> peak_measured_value;
uint32_t peak_measured_value_window;
config() : peak_measured_value(), peak_measured_value_window(1) {}
} config_t;
@@ -635,9 +634,14 @@ esp_err_t add(cluster_t *cluster, config_t *config);
} /* peak_measurement */
namespace average_measurement {
typedef struct config {
nullable<float> average_measured_value;
uint32_t average_measured_value_window;
config() : average_measured_value(), average_measured_value_window(1) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
esp_err_t add(cluster_t *cluster, config_t *config);
} /* average_measurement */
@@ -649,12 +653,11 @@ namespace feature {
namespace numeric_measurement {
typedef struct config {
nullable<uint16_t> measured_value;
nullable<uint16_t> min_measured_value;
nullable<uint16_t> max_measured_value;
uint16_t uncertainty;
nullable<float> measured_value;
nullable<float> min_measured_value;
nullable<float> max_measured_value;
uint8_t measurement_unit;
config() : measured_value(), min_measured_value(), max_measured_value(), uncertainty(0), measurement_unit(0) {}
config() : measured_value(), min_measured_value(), max_measured_value(), measurement_unit(0) {}
} config_t;
uint32_t get_id();
@@ -689,7 +692,7 @@ esp_err_t add(cluster_t *cluster);
namespace peak_measurement {
typedef struct config {
nullable<uint16_t> peak_measured_value;
nullable<float> peak_measured_value;
uint32_t peak_measured_value_window;
config() : peak_measured_value(), peak_measured_value_window(1) {}
} config_t;
@@ -700,9 +703,14 @@ esp_err_t add(cluster_t *cluster, config_t *config);
} /* peak_measurement */
namespace average_measurement {
typedef struct config {
nullable<float> average_measured_value;
uint32_t average_measured_value_window;
config() : average_measured_value(), average_measured_value_window(1) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
esp_err_t add(cluster_t *cluster, config_t *config);
} /* average_measurement */
@@ -714,12 +722,11 @@ namespace feature {
namespace numeric_measurement {
typedef struct config {
nullable<uint16_t> measured_value;
nullable<uint16_t> min_measured_value;
nullable<uint16_t> max_measured_value;
uint16_t uncertainty;
nullable<float> measured_value;
nullable<float> min_measured_value;
nullable<float> max_measured_value;
uint8_t measurement_unit;
config() : measured_value(), min_measured_value(), max_measured_value(), uncertainty(0), measurement_unit(0) {}
config() : measured_value(), min_measured_value(), max_measured_value(), measurement_unit(0) {}
} config_t;
uint32_t get_id();
@@ -754,7 +761,7 @@ esp_err_t add(cluster_t *cluster);
namespace peak_measurement {
typedef struct config {
nullable<uint16_t> peak_measured_value;
nullable<float> peak_measured_value;
uint32_t peak_measured_value_window;
config() : peak_measured_value(), peak_measured_value_window(1) {}
} config_t;
@@ -765,9 +772,14 @@ esp_err_t add(cluster_t *cluster, config_t *config);
} /* peak_measurement */
namespace average_measurement {
typedef struct config {
nullable<float> average_measured_value;
uint32_t average_measured_value_window;
config() : average_measured_value(), average_measured_value_window(1) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
esp_err_t add(cluster_t *cluster, config_t *config);
} /* average_measurement */
@@ -779,12 +791,11 @@ namespace feature {
namespace numeric_measurement {
typedef struct config {
nullable<uint16_t> measured_value;
nullable<uint16_t> min_measured_value;
nullable<uint16_t> max_measured_value;
uint16_t uncertainty;
nullable<float> measured_value;
nullable<float> min_measured_value;
nullable<float> max_measured_value;
uint8_t measurement_unit;
config() : measured_value(), min_measured_value(), max_measured_value(), uncertainty(0), measurement_unit(0) {}
config() : measured_value(), min_measured_value(), max_measured_value(), measurement_unit(0) {}
} config_t;
uint32_t get_id();
@@ -819,7 +830,7 @@ esp_err_t add(cluster_t *cluster);
namespace peak_measurement {
typedef struct config {
nullable<uint16_t> peak_measured_value;
nullable<float> peak_measured_value;
uint32_t peak_measured_value_window;
config() : peak_measured_value(), peak_measured_value_window(1) {}
} config_t;
@@ -830,9 +841,14 @@ esp_err_t add(cluster_t *cluster, config_t *config);
} /* peak_measurement */
namespace average_measurement {
typedef struct config {
nullable<float> average_measured_value;
uint32_t average_measured_value_window;
config() : average_measured_value(), average_measured_value_window(1) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
esp_err_t add(cluster_t *cluster, config_t *config);
} /* average_measurement */
@@ -844,12 +860,11 @@ namespace feature {
namespace numeric_measurement {
typedef struct config {
nullable<uint16_t> measured_value;
nullable<uint16_t> min_measured_value;
nullable<uint16_t> max_measured_value;
uint16_t uncertainty;
nullable<float> measured_value;
nullable<float> min_measured_value;
nullable<float> max_measured_value;
uint8_t measurement_unit;
config() : measured_value(), min_measured_value(), max_measured_value(), uncertainty(0), measurement_unit(0) {}
config() : measured_value(), min_measured_value(), max_measured_value(), measurement_unit(0) {}
} config_t;
uint32_t get_id();
@@ -884,7 +899,7 @@ esp_err_t add(cluster_t *cluster);
namespace peak_measurement {
typedef struct config {
nullable<uint16_t> peak_measured_value;
nullable<float> peak_measured_value;
uint32_t peak_measured_value_window;
config() : peak_measured_value(), peak_measured_value_window(1) {}
} config_t;
@@ -895,9 +910,14 @@ esp_err_t add(cluster_t *cluster, config_t *config);
} /* peak_measurement */
namespace average_measurement {
typedef struct config {
nullable<float> average_measured_value;
uint32_t average_measured_value_window;
config() : average_measured_value(), average_measured_value_window(1) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
esp_err_t add(cluster_t *cluster, config_t *config);
} /* average_measurement */
@@ -909,12 +929,11 @@ namespace feature {
namespace numeric_measurement {
typedef struct config {
nullable<uint16_t> measured_value;
nullable<uint16_t> min_measured_value;
nullable<uint16_t> max_measured_value;
uint16_t uncertainty;
nullable<float> measured_value;
nullable<float> min_measured_value;
nullable<float> max_measured_value;
uint8_t measurement_unit;
config() : measured_value(), min_measured_value(), max_measured_value(), uncertainty(0), measurement_unit(0) {}
config() : measured_value(), min_measured_value(), max_measured_value(), measurement_unit(0) {}
} config_t;
uint32_t get_id();
@@ -949,7 +968,7 @@ esp_err_t add(cluster_t *cluster);
namespace peak_measurement {
typedef struct config {
nullable<uint16_t> peak_measured_value;
nullable<float> peak_measured_value;
uint32_t peak_measured_value_window;
config() : peak_measured_value(), peak_measured_value_window(1) {}
} config_t;
@@ -960,9 +979,14 @@ esp_err_t add(cluster_t *cluster, config_t *config);
} /* peak_measurement */
namespace average_measurement {
typedef struct config {
nullable<float> average_measured_value;
uint32_t average_measured_value_window;
config() : average_measured_value(), average_measured_value_window(1) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
esp_err_t add(cluster_t *cluster, config_t *config);
} /* average_measurement */
@@ -974,12 +998,11 @@ namespace feature {
namespace numeric_measurement {
typedef struct config {
nullable<uint16_t> measured_value;
nullable<uint16_t> min_measured_value;
nullable<uint16_t> max_measured_value;
uint16_t uncertainty;
nullable<float> measured_value;
nullable<float> min_measured_value;
nullable<float> max_measured_value;
uint8_t measurement_unit;
config() : measured_value(), min_measured_value(), max_measured_value(), uncertainty(0), measurement_unit(0) {}
config() : measured_value(), min_measured_value(), max_measured_value(), measurement_unit(0) {}
} config_t;
uint32_t get_id();
@@ -1014,7 +1037,7 @@ esp_err_t add(cluster_t *cluster);
namespace peak_measurement {
typedef struct config {
nullable<uint16_t> peak_measured_value;
nullable<float> peak_measured_value;
uint32_t peak_measured_value_window;
config() : peak_measured_value(), peak_measured_value_window(1) {}
} config_t;
@@ -1025,9 +1048,14 @@ esp_err_t add(cluster_t *cluster, config_t *config);
} /* peak_measurement */
namespace average_measurement {
typedef struct config {
nullable<float> average_measured_value;
uint32_t average_measured_value_window;
config() : average_measured_value(), average_measured_value_window(1) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
esp_err_t add(cluster_t *cluster, config_t *config);
} /* average_measurement */
@@ -1039,12 +1067,11 @@ namespace feature {
namespace numeric_measurement {
typedef struct config {
nullable<uint16_t> measured_value;
nullable<uint16_t> min_measured_value;
nullable<uint16_t> max_measured_value;
uint16_t uncertainty;
nullable<float> measured_value;
nullable<float> min_measured_value;
nullable<float> max_measured_value;
uint8_t measurement_unit;
config() : measured_value(), min_measured_value(), max_measured_value(), uncertainty(0), measurement_unit(0) {}
config() : measured_value(), min_measured_value(), max_measured_value(), measurement_unit(0) {}
} config_t;
uint32_t get_id();
@@ -1079,7 +1106,7 @@ esp_err_t add(cluster_t *cluster);
namespace peak_measurement {
typedef struct config {
nullable<uint16_t> peak_measured_value;
nullable<float> peak_measured_value;
uint32_t peak_measured_value_window;
config() : peak_measured_value(), peak_measured_value_window(1) {}
} config_t;
@@ -1090,9 +1117,14 @@ esp_err_t add(cluster_t *cluster, config_t *config);
} /* peak_measurement */
namespace average_measurement {
typedef struct config {
nullable<float> average_measured_value;
uint32_t average_measured_value_window;
config() : average_measured_value(), average_measured_value_window(1) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
esp_err_t add(cluster_t *cluster, config_t *config);
} /* average_measurement */
@@ -1104,12 +1136,11 @@ namespace feature {
namespace numeric_measurement {
typedef struct config {
nullable<uint16_t> measured_value;
nullable<uint16_t> min_measured_value;
nullable<uint16_t> max_measured_value;
uint16_t uncertainty;
nullable<float> measured_value;
nullable<float> min_measured_value;
nullable<float> max_measured_value;
uint8_t measurement_unit;
config() : measured_value(), min_measured_value(), max_measured_value(), uncertainty(0), measurement_unit(0) {}
config() : measured_value(), min_measured_value(), max_measured_value(), measurement_unit(0) {}
} config_t;
uint32_t get_id();
@@ -1144,7 +1175,7 @@ esp_err_t add(cluster_t *cluster);
namespace peak_measurement {
typedef struct config {
nullable<uint16_t> peak_measured_value;
nullable<float> peak_measured_value;
uint32_t peak_measured_value_window;
config() : peak_measured_value(), peak_measured_value_window(1) {}
} config_t;
@@ -1155,9 +1186,14 @@ esp_err_t add(cluster_t *cluster, config_t *config);
} /* peak_measurement */
namespace average_measurement {
typedef struct config {
nullable<float> average_measured_value;
uint32_t average_measured_value_window;
config() : average_measured_value(), average_measured_value_window(1) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
esp_err_t add(cluster_t *cluster, config_t *config);
} /* average_measurement */
@@ -1169,12 +1205,11 @@ namespace feature {
namespace numeric_measurement {
typedef struct config {
nullable<uint16_t> measured_value;
nullable<uint16_t> min_measured_value;
nullable<uint16_t> max_measured_value;
uint16_t uncertainty;
nullable<float> measured_value;
nullable<float> min_measured_value;
nullable<float> max_measured_value;
uint8_t measurement_unit;
config() : measured_value(), min_measured_value(), max_measured_value(), uncertainty(0), measurement_unit(0) {}
config() : measured_value(), min_measured_value(), max_measured_value(), measurement_unit(0) {}
} config_t;
uint32_t get_id();
@@ -1209,7 +1244,7 @@ esp_err_t add(cluster_t *cluster);
namespace peak_measurement {
typedef struct config {
nullable<uint16_t> peak_measured_value;
nullable<float> peak_measured_value;
uint32_t peak_measured_value_window;
config() : peak_measured_value(), peak_measured_value_window(1) {}
} config_t;
@@ -1220,9 +1255,14 @@ esp_err_t add(cluster_t *cluster, config_t *config);
} /* peak_measurement */
namespace average_measurement {
typedef struct config {
nullable<float> average_measured_value;
uint32_t average_measured_value_window;
config() : average_measured_value(), average_measured_value_window(1) {}
} config_t;
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
esp_err_t add(cluster_t *cluster, config_t *config);
} /* average_measurement */