mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 19:13:13 +00:00
components/esp_matter: add meter_identification cluster in esp_matter
This commit is contained in:
@@ -5351,5 +5351,41 @@ attribute_t *create_forecast_conditions(cluster_t *cluster, uint8_t *value, uint
|
||||
|
||||
} /* electrical_grid_conditions */
|
||||
|
||||
namespace meter_identification {
|
||||
namespace attribute {
|
||||
attribute_t *create_meter_type(cluster_t *cluster, nullable<uint8_t> value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, MeterIdentification::Attributes::MeterType::Id,
|
||||
ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_nullable_enum8(value));
|
||||
}
|
||||
|
||||
attribute_t *create_point_of_delivery(cluster_t *cluster, char *value, uint16_t length)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, MeterIdentification::Attributes::PointOfDelivery::Id,
|
||||
ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_char_str(value, length));
|
||||
}
|
||||
|
||||
attribute_t *create_meter_serial_number(cluster_t *cluster, char *value, uint16_t length)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, MeterIdentification::Attributes::MeterSerialNumber::Id,
|
||||
ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_char_str(value, length));
|
||||
}
|
||||
|
||||
attribute_t *create_protocol_version(cluster_t *cluster, char *value, uint16_t length)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, MeterIdentification::Attributes::ProtocolVersion::Id,
|
||||
ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_char_str(value, length));
|
||||
}
|
||||
|
||||
attribute_t *create_power_threshold(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, MeterIdentification::Attributes::PowerThreshold::Id,
|
||||
ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NULLABLE, esp_matter_array(value, length, count));
|
||||
}
|
||||
|
||||
} /* attribute */
|
||||
|
||||
} /* meter_identification */
|
||||
|
||||
} /* cluster */
|
||||
} /* esp_matter */
|
||||
|
||||
Reference in New Issue
Block a user