- attribute: support r/w floating(single) value type

- concentration measurement clusters: change attr value type (float)
- remove 'add uncentainty attribute'
- add 'measurement medium' attribute
This commit is contained in:
SEUNGHEE LEE
2024-03-08 22:44:36 +09:00
committed by mahesh
parent a72a13adeb
commit d2b567a5dd
7 changed files with 687 additions and 574 deletions
+219 -219
View File
@@ -2107,28 +2107,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)
@@ -2137,10 +2137,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)
@@ -2149,10 +2149,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)
@@ -2178,69 +2178,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));
}
@@ -2249,69 +2249,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));
}
@@ -2320,69 +2320,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));
}
@@ -2391,69 +2391,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));
}
@@ -2462,69 +2462,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));
}
@@ -2533,69 +2533,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));
}
@@ -2604,69 +2604,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));
}
@@ -2675,69 +2675,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));
}
@@ -2746,69 +2746,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
@@ -476,14 +476,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);
@@ -492,14 +492,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);
@@ -508,14 +508,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);
@@ -524,14 +524,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);
@@ -540,14 +540,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);
@@ -556,14 +556,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);
@@ -572,14 +572,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);
@@ -588,14 +588,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);
@@ -604,14 +604,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);
@@ -620,14 +620,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;
@@ -1826,6 +1852,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;
+85 -74
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 {
@@ -792,26 +792,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 */
@@ -1380,7 +1380,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);
@@ -1531,30 +1531,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;
@@ -1584,9 +1584,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) {
@@ -1625,7 +1625,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) {
@@ -1662,9 +1662,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) {
@@ -1701,9 +1701,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) {
@@ -1741,8 +1741,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) {
@@ -1780,8 +1781,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) {
@@ -1819,8 +1821,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) {
@@ -1858,8 +1861,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) {
@@ -1897,8 +1901,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) {
@@ -1936,8 +1941,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) {
@@ -1975,8 +1981,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) {
@@ -2014,8 +2021,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) {
@@ -2050,16 +2058,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;
@@ -2090,9 +2101,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);
@@ -2135,10 +2146,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);
@@ -2177,7 +2188,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) {
@@ -2214,7 +2225,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 */
@@ -2287,23 +2298,23 @@ 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);
/* 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);
@@ -3150,7 +3161,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
attribute::create_supported_modes(cluster, NULL, 0, 0);
@@ -3229,7 +3240,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
@@ -422,71 +422,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 {
+131 -141
View File
@@ -754,13 +754,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;
@@ -817,7 +817,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");
}
@@ -858,13 +858,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;
@@ -978,8 +978,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());
@@ -1103,7 +1103,6 @@ esp_err_t add(cluster_t *cluster, config_t *config)
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;
@@ -1143,8 +1142,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());
@@ -1164,8 +1163,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());
@@ -1184,8 +1183,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());
@@ -1204,16 +1203,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;
}
@@ -1244,7 +1243,6 @@ esp_err_t add(cluster_t *cluster, config_t *config)
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;
@@ -1284,8 +1282,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());
@@ -1305,8 +1303,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());
@@ -1325,8 +1323,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());
@@ -1345,16 +1343,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;
}
@@ -1385,7 +1383,6 @@ esp_err_t add(cluster_t *cluster, config_t *config)
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;
@@ -1425,8 +1422,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());
@@ -1446,8 +1443,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());
@@ -1466,8 +1463,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());
@@ -1486,16 +1483,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;
}
@@ -1526,7 +1523,6 @@ esp_err_t add(cluster_t *cluster, config_t *config)
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;
@@ -1566,8 +1562,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());
@@ -1587,8 +1583,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());
@@ -1607,8 +1603,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());
@@ -1627,16 +1623,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;
}
@@ -1667,7 +1663,6 @@ esp_err_t add(cluster_t *cluster, config_t *config)
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;
@@ -1707,8 +1702,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());
@@ -1728,8 +1723,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());
@@ -1748,8 +1743,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());
@@ -1768,16 +1763,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;
}
@@ -1808,7 +1803,6 @@ esp_err_t add(cluster_t *cluster, config_t *config)
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;
@@ -1848,8 +1842,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());
@@ -1869,8 +1863,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());
@@ -1889,8 +1883,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());
@@ -1909,16 +1903,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;
}
@@ -1949,7 +1943,6 @@ esp_err_t add(cluster_t *cluster, config_t *config)
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;
@@ -1989,8 +1982,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());
@@ -2010,8 +2003,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());
@@ -2030,8 +2023,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());
@@ -2050,16 +2043,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;
}
@@ -2090,7 +2083,6 @@ esp_err_t add(cluster_t *cluster, config_t *config)
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;
@@ -2130,8 +2122,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());
@@ -2151,8 +2143,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());
@@ -2171,8 +2163,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());
@@ -2191,16 +2183,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;
}
@@ -2231,7 +2223,6 @@ esp_err_t add(cluster_t *cluster, config_t *config)
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;
@@ -2271,8 +2262,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());
@@ -2292,8 +2283,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());
@@ -2312,8 +2303,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());
@@ -2332,16 +2323,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;
}
@@ -2372,7 +2363,6 @@ esp_err_t add(cluster_t *cluster, config_t *config)
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;
@@ -2412,8 +2402,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());
@@ -2433,8 +2423,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());
@@ -2453,8 +2443,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());
@@ -2473,16 +2463,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;
}
@@ -2699,8 +2689,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());
@@ -2727,8 +2717,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());
+110 -70
View File
@@ -575,12 +575,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();
@@ -615,7 +614,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;
@@ -626,9 +625,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 */
@@ -640,12 +644,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();
@@ -680,7 +683,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;
@@ -691,9 +694,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 */
@@ -705,12 +713,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();
@@ -745,7 +752,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;
@@ -756,9 +763,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 */
@@ -770,12 +782,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();
@@ -810,7 +821,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;
@@ -821,9 +832,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 */
@@ -835,12 +851,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();
@@ -875,7 +890,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;
@@ -886,9 +901,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 */
@@ -900,12 +920,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();
@@ -940,7 +959,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;
@@ -951,9 +970,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 */
@@ -965,12 +989,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();
@@ -1005,7 +1028,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;
@@ -1016,9 +1039,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 */
@@ -1030,12 +1058,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();
@@ -1070,7 +1097,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;
@@ -1081,9 +1108,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 */
@@ -1095,12 +1127,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();
@@ -1135,7 +1166,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;
@@ -1146,9 +1177,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 */
@@ -1160,12 +1196,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();
@@ -1200,7 +1235,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;
@@ -1211,9 +1246,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 */