mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 19:13:13 +00:00
[v1.3]backport: components/esp_matter:add optional attributes for general diagnostic cluster
This commit is contained in:
@@ -468,6 +468,36 @@ attribute_t *create_up_time(cluster_t *cluster, uint64_t value)
|
||||
ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint64(value));
|
||||
}
|
||||
|
||||
attribute_t *create_total_operational_hours(cluster_t *cluster, uint32_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, GeneralDiagnostics::Attributes::TotalOperationalHours::Id,
|
||||
ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint32(value));
|
||||
}
|
||||
|
||||
attribute_t *create_boot_reason(cluster_t *cluster, uint8_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, GeneralDiagnostics::Attributes::BootReason::Id,
|
||||
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
|
||||
}
|
||||
|
||||
attribute_t *create_active_hardware_faults(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, GeneralDiagnostics::Attributes::ActiveHardwareFaults::Id,
|
||||
ATTRIBUTE_FLAG_NONE, esp_matter_array(value, length, count));
|
||||
}
|
||||
|
||||
attribute_t *create_active_radio_faults(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, GeneralDiagnostics::Attributes::ActiveRadioFaults::Id,
|
||||
ATTRIBUTE_FLAG_NONE, esp_matter_array(value, length, count));
|
||||
}
|
||||
|
||||
attribute_t *create_active_network_faults(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, GeneralDiagnostics::Attributes::ActiveNetworkFaults::Id,
|
||||
ATTRIBUTE_FLAG_NONE, esp_matter_array(value, length, count));
|
||||
}
|
||||
|
||||
attribute_t *create_test_event_triggers_enabled(cluster_t *cluster, bool value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id,
|
||||
|
||||
@@ -141,6 +141,11 @@ namespace attribute {
|
||||
attribute_t *create_network_interfaces(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count);
|
||||
attribute_t *create_reboot_count(cluster_t *cluster, uint16_t value);
|
||||
attribute_t *create_up_time(cluster_t *cluster, uint64_t value);
|
||||
attribute_t *create_total_operational_hours(cluster_t *cluster, uint32_t value);
|
||||
attribute_t *create_boot_reason(cluster_t *cluster, uint8_t value);
|
||||
attribute_t *create_active_hardware_faults(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count);
|
||||
attribute_t *create_active_radio_faults(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count);
|
||||
attribute_t *create_active_network_faults(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count);
|
||||
attribute_t *create_test_event_triggers_enabled(cluster_t *cluster, bool value);
|
||||
} /* attribute */
|
||||
} /* general_diagnostics */
|
||||
|
||||
Reference in New Issue
Block a user