mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 19:13:13 +00:00
esp-matter: add some missing attributes
This commit is contained in:
@@ -18,7 +18,7 @@ git clone --recursive https://github.com/espressif/esp-matter.git
|
||||
|
||||
## Supported ESP-IDF and connectedhomeip versions
|
||||
|
||||
- ESP Matter currently works with [TE9 tag](https://github.com/project-chip/connectedhomeip/releases/tag/TE9) of connectedhomeip.
|
||||
- ESP Matter currently works with [commit c38e915](https://github.com/project-chip/connectedhomeip/commit/c38e915) of connectedhomeip.
|
||||
- For Wi-Fi devices (ESP32, ESP32-C3, ESP32-S3), ESP-IDF [v4.4.1 release](https://github.com/espressif/esp-idf/releases/tag/v4.4.1) is required.
|
||||
- For Thread devices (ESP32-H2), ESP-IDF master branch at [commit 047903c](https://github.com/espressif/esp-idf/commit/047903c) should be used.
|
||||
|
||||
|
||||
@@ -85,6 +85,24 @@ attribute_t *create_extension(cluster_t *cluster, uint8_t *value, uint16_t lengt
|
||||
esp_matter_array(value, length, count));
|
||||
}
|
||||
|
||||
attribute_t *create_subjects_per_access_control_entry(cluster_t *cluster, uint16_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, AccessControl::Attributes::SubjectsPerAccessControlEntry::Id, ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(value));
|
||||
}
|
||||
|
||||
attribute_t *create_targets_per_access_control_entry(cluster_t *cluster, uint16_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, AccessControl::Attributes::TargetsPerAccessControlEntry::Id, ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(value));
|
||||
}
|
||||
|
||||
attribute_t *create_access_control_entries_per_fabric(cluster_t *cluster, uint16_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, AccessControl::Attributes::AccessControlEntriesPerFabric::Id, ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_uint16(value));
|
||||
}
|
||||
|
||||
} /* attribute */
|
||||
} /* access_control */
|
||||
|
||||
@@ -157,6 +175,12 @@ attribute_t *create_software_version_string(cluster_t *cluster, char *value, uin
|
||||
esp_matter_char_str(value, length));
|
||||
}
|
||||
|
||||
attribute_t *create_capability_minima(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, Basic::Attributes::CapabilityMinima::Id, ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_array(value, length, count));
|
||||
}
|
||||
|
||||
} /* attribute */
|
||||
} /* basic */
|
||||
|
||||
@@ -229,6 +253,12 @@ attribute_t *create_location_capability(cluster_t *cluster, uint8_t value)
|
||||
ATTRIBUTE_FLAG_NONE, esp_matter_enum8(value));
|
||||
}
|
||||
|
||||
attribute_t *create_supports_concurrent_connection(cluster_t *cluster, bool value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, GeneralCommissioning::Attributes::SupportsConcurrentConnection::Id,
|
||||
ATTRIBUTE_FLAG_NONE, esp_matter_bool(value));
|
||||
}
|
||||
|
||||
} /* attribute */
|
||||
} /* general_commissioning */
|
||||
|
||||
@@ -301,6 +331,12 @@ attribute_t *create_reboot_count(cluster_t *cluster, uint16_t value)
|
||||
esp_matter_uint16(value));
|
||||
}
|
||||
|
||||
attribute_t *create_test_event_triggers_enabled(cluster_t *cluster, bool value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id, ATTRIBUTE_FLAG_NONE,
|
||||
esp_matter_bool(value));
|
||||
}
|
||||
|
||||
} /* attribute */
|
||||
} /* general_diagnostics */
|
||||
|
||||
|
||||
@@ -46,6 +46,9 @@ namespace access_control {
|
||||
namespace attribute {
|
||||
attribute_t *create_acl(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count);
|
||||
attribute_t *create_extension(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count);
|
||||
attribute_t *create_subjects_per_access_control_entry(cluster_t *cluster, uint16_t value);
|
||||
attribute_t *create_targets_per_access_control_entry(cluster_t *cluster, uint16_t value);
|
||||
attribute_t *create_access_control_entries_per_fabric(cluster_t *cluster, uint16_t value);
|
||||
} /* attribute */
|
||||
} /* access_control */
|
||||
|
||||
@@ -62,6 +65,7 @@ attribute_t *create_hardware_version(cluster_t *cluster, uint16_t value);
|
||||
attribute_t *create_hardware_version_string(cluster_t *cluster, char *value, uint16_t length);
|
||||
attribute_t *create_software_version(cluster_t *cluster, uint32_t value);
|
||||
attribute_t *create_software_version_string(cluster_t *cluster, char *value, uint16_t length);
|
||||
attribute_t *create_capability_minima(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count);
|
||||
} /* attribute */
|
||||
} /* basic */
|
||||
|
||||
@@ -86,6 +90,7 @@ attribute_t *create_breadcrumb(cluster_t *cluster, uint64_t value);
|
||||
attribute_t *create_basic_commissioning_info(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count);
|
||||
attribute_t *create_regulatory_config(cluster_t *cluster, uint8_t value);
|
||||
attribute_t *create_location_capability(cluster_t *cluster, uint8_t value);
|
||||
attribute_t *create_supports_concurrent_connection(cluster_t *cluster, bool value);
|
||||
} /* attribute */
|
||||
} /* general_commissioning */
|
||||
|
||||
@@ -106,6 +111,7 @@ namespace general_diagnostics {
|
||||
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_test_event_triggers_enabled(cluster_t *cluster, bool value);
|
||||
} /* attribute */
|
||||
} /* general_diagnostics */
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ cluster_t *create(endpoint_t *endpoint, uint8_t flags)
|
||||
if (flags & CLUSTER_FLAG_SERVER) {
|
||||
/* Attributes managed internally */
|
||||
global::attribute::create_cluster_revision(cluster, 0);
|
||||
global::attribute::create_feature_map(cluster, 0);
|
||||
attribute::create_device_list(cluster, NULL, 0, 0);
|
||||
attribute::create_server_list(cluster, NULL, 0, 0);
|
||||
attribute::create_client_list(cluster, NULL, 0, 0);
|
||||
@@ -122,8 +123,12 @@ cluster_t *create(endpoint_t *endpoint, uint8_t flags)
|
||||
if (flags & CLUSTER_FLAG_SERVER) {
|
||||
/* Attributes managed internally */
|
||||
global::attribute::create_cluster_revision(cluster, 0);
|
||||
global::attribute::create_feature_map(cluster, 0);
|
||||
attribute::create_acl(cluster, NULL, 0, 0);
|
||||
attribute::create_extension(cluster, NULL, 0, 0);
|
||||
attribute::create_subjects_per_access_control_entry(cluster, 0);
|
||||
attribute::create_access_control_entries_per_fabric(cluster, 0);
|
||||
attribute::create_targets_per_access_control_entry(cluster, 0);
|
||||
}
|
||||
|
||||
return cluster;
|
||||
@@ -155,6 +160,7 @@ 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);
|
||||
attribute::create_data_model_revision(cluster, 0);
|
||||
attribute::create_location(cluster, NULL, 0);
|
||||
attribute::create_vendor_name(cluster, NULL, 0);
|
||||
@@ -165,6 +171,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
|
||||
attribute::create_hardware_version_string(cluster, NULL, 0);
|
||||
attribute::create_software_version(cluster, 0);
|
||||
attribute::create_software_version_string(cluster, NULL, 0);
|
||||
attribute::create_capability_minima(cluster, NULL, 0, 0);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
if (config) {
|
||||
@@ -204,6 +211,7 @@ 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);
|
||||
attribute::create_binding(cluster, NULL, 0, 0);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
@@ -240,6 +248,9 @@ 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 not managed internally */
|
||||
if (config) {
|
||||
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
|
||||
@@ -282,6 +293,7 @@ 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);
|
||||
attribute::create_default_ota_providers(cluster, NULL, 0);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
@@ -325,9 +337,11 @@ 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);
|
||||
attribute::create_regulatory_config(cluster, 0);
|
||||
attribute::create_location_capability(cluster, 0);
|
||||
attribute::create_basic_commissioning_info(cluster, NULL, 0, 0);
|
||||
attribute::create_supports_concurrent_connection(cluster, 0);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
if (config) {
|
||||
@@ -431,6 +445,8 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
|
||||
/* Attributes managed internally */
|
||||
attribute::create_network_interfaces(cluster, NULL, 0, 0);
|
||||
attribute::create_reboot_count(cluster, 0);
|
||||
attribute::create_test_event_triggers_enabled(cluster, 0);
|
||||
global::attribute::create_feature_map(cluster, 0);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
if (config) {
|
||||
@@ -440,6 +456,8 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
|
||||
}
|
||||
}
|
||||
|
||||
command::create_test_event_trigger(cluster);
|
||||
|
||||
return cluster;
|
||||
}
|
||||
} /* general_diagnostics */
|
||||
@@ -467,6 +485,7 @@ 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);
|
||||
attribute::create_window_status(cluster, 0);
|
||||
attribute::create_admin_fabric_index(cluster, 0);
|
||||
attribute::create_admin_vendor_id(cluster, 0);
|
||||
@@ -511,6 +530,7 @@ 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);
|
||||
attribute::create_nocs(cluster, NULL, 0, 0);
|
||||
attribute::create_supported_fabrics(cluster, 0);
|
||||
attribute::create_commissioned_fabrics(cluster, 0);
|
||||
@@ -567,6 +587,7 @@ cluster_t *create(endpoint_t *endpoint, uint8_t flags)
|
||||
|
||||
if (flags & CLUSTER_FLAG_SERVER) {
|
||||
/* Attributes managed internally */
|
||||
global::attribute::create_feature_map(cluster, 0);
|
||||
global::attribute::create_cluster_revision(cluster, 0);
|
||||
attribute::create_group_key_map(cluster, NULL, 0, 0);
|
||||
attribute::create_group_table(cluster, NULL, 0, 0);
|
||||
@@ -609,6 +630,7 @@ 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);
|
||||
attribute::create_bssid(cluster, NULL, 0);
|
||||
attribute::create_security_type(cluster, 0);
|
||||
attribute::create_wifi_version(cluster, 0);
|
||||
@@ -650,6 +672,7 @@ 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);
|
||||
attribute::create_channel(cluster, 0);
|
||||
attribute::create_routing_role(cluster, 0);
|
||||
attribute::create_network_name(cluster, NULL, 0);
|
||||
@@ -676,6 +699,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
|
||||
}
|
||||
}
|
||||
|
||||
/* commands */
|
||||
command::create_reset_counts(cluster);
|
||||
|
||||
return cluster;
|
||||
}
|
||||
} /* diagnostics_network_thread */
|
||||
@@ -705,6 +731,9 @@ 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 not managed internally */
|
||||
if (config) {
|
||||
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
|
||||
@@ -747,6 +776,9 @@ 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, 1);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
if (config) {
|
||||
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
|
||||
@@ -796,6 +828,9 @@ 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 not managed internally */
|
||||
if (config) {
|
||||
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
|
||||
@@ -852,6 +887,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_
|
||||
}
|
||||
|
||||
if (flags & CLUSTER_FLAG_SERVER) {
|
||||
/* Attributes managed internally */
|
||||
global::attribute::create_feature_map(cluster, 0);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
if (config) {
|
||||
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
|
||||
@@ -899,6 +937,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_
|
||||
}
|
||||
|
||||
if (flags & CLUSTER_FLAG_SERVER) {
|
||||
/* Attributes managed internally */
|
||||
global::attribute::create_feature_map(cluster, 0);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
if (config) {
|
||||
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
|
||||
@@ -956,6 +997,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_
|
||||
}
|
||||
|
||||
if (flags & CLUSTER_FLAG_SERVER) {
|
||||
/* Attributes managed internally */
|
||||
global::attribute::create_feature_map(cluster, 0);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
if (config) {
|
||||
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
|
||||
@@ -1004,6 +1048,9 @@ 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 not managed internally */
|
||||
if (config) {
|
||||
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
|
||||
@@ -1046,6 +1093,9 @@ 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 not managed internally */
|
||||
if (config) {
|
||||
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
|
||||
@@ -1091,6 +1141,9 @@ 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 not managed internally */
|
||||
if (config) {
|
||||
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
|
||||
@@ -1135,6 +1188,9 @@ 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 not managed internally */
|
||||
if (config) {
|
||||
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
|
||||
@@ -1165,6 +1221,9 @@ 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 not managed internally */
|
||||
if (config) {
|
||||
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
|
||||
@@ -1202,6 +1261,7 @@ 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);
|
||||
attribute::create_label_list(cluster, NULL, 0, 0);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
@@ -1238,6 +1298,9 @@ 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 not managed internally */
|
||||
if (config) {
|
||||
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
|
||||
@@ -1275,6 +1338,9 @@ 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 not managed internally */
|
||||
if (config) {
|
||||
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
|
||||
@@ -1312,6 +1378,9 @@ 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 not managed internally */
|
||||
if (config) {
|
||||
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
|
||||
@@ -1349,6 +1418,9 @@ 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 not managed internally */
|
||||
if (config) {
|
||||
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace basic {
|
||||
typedef struct config {
|
||||
uint16_t cluster_revision;
|
||||
char node_label[32];
|
||||
config() : cluster_revision(3), node_label{0} {}
|
||||
config() : cluster_revision(1), node_label{0} {}
|
||||
} config_t;
|
||||
|
||||
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
|
||||
@@ -161,7 +161,7 @@ typedef struct config {
|
||||
uint16_t cluster_revision;
|
||||
uint16_t identify_time;
|
||||
uint8_t identify_type;
|
||||
config() : cluster_revision(2), identify_time(0), identify_type(0) {}
|
||||
config() : cluster_revision(4), identify_time(0), identify_type(0) {}
|
||||
} config_t;
|
||||
|
||||
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
|
||||
@@ -171,7 +171,7 @@ namespace groups {
|
||||
typedef struct config {
|
||||
uint16_t cluster_revision;
|
||||
uint8_t group_name_support;
|
||||
config() : cluster_revision(3), group_name_support(0) {}
|
||||
config() : cluster_revision(4), group_name_support(0) {}
|
||||
} config_t;
|
||||
|
||||
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
|
||||
@@ -185,7 +185,7 @@ typedef struct config {
|
||||
uint16_t current_group;
|
||||
bool scene_valid;
|
||||
uint8_t scene_name_support;
|
||||
config() : cluster_revision(3), scene_count(0), current_scene(0), current_group(0), scene_valid(false),
|
||||
config() : cluster_revision(4), scene_count(0), current_scene(0), current_group(0), scene_valid(false),
|
||||
scene_name_support(0) {}
|
||||
} config_t;
|
||||
|
||||
@@ -210,7 +210,7 @@ typedef struct config {
|
||||
uint8_t on_level;
|
||||
uint8_t options;
|
||||
feature::lighting::config_t lighting;
|
||||
config() : cluster_revision(3), current_level(0), on_level(0), options(0) {}
|
||||
config() : cluster_revision(5), current_level(0), on_level(1), options(0) {}
|
||||
} config_t;
|
||||
|
||||
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
|
||||
@@ -225,7 +225,7 @@ typedef struct config {
|
||||
uint16_t color_capabilities;
|
||||
feature::hue_saturation::config_t hue_saturation;
|
||||
feature::color_temperature::config_t color_temperature;
|
||||
config() : cluster_revision(3), color_mode(1), color_control_options(0), enhanced_color_mode(1),
|
||||
config() : cluster_revision(5), color_mode(1), color_control_options(0), enhanced_color_mode(1),
|
||||
color_capabilities(0) {}
|
||||
} config_t;
|
||||
|
||||
@@ -241,7 +241,7 @@ typedef struct config {
|
||||
uint8_t percent_setting;
|
||||
uint8_t percent_current;
|
||||
*/
|
||||
config() : cluster_revision(3), fan_mode(5), fan_mode_sequence(2) {}
|
||||
config() : cluster_revision(2), fan_mode(5), fan_mode_sequence(2) {}
|
||||
} config_t;
|
||||
|
||||
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
|
||||
@@ -255,7 +255,7 @@ typedef struct config {
|
||||
int16_t occupied_heating_setpoint;
|
||||
uint8_t control_sequence_of_operation;
|
||||
uint8_t system_mode;
|
||||
config() : cluster_revision(3), local_temperature(0), occupied_cooling_setpoint(0x0A28),
|
||||
config() : cluster_revision(5), local_temperature(0), occupied_cooling_setpoint(0x0A28),
|
||||
occupied_heating_setpoint(0x07D0), control_sequence_of_operation(4), system_mode(1) {}
|
||||
} config_t;
|
||||
|
||||
@@ -271,7 +271,7 @@ typedef struct config {
|
||||
uint32_t auto_relock_time;
|
||||
uint8_t operating_mode;
|
||||
uint16_t supported_operating_modes;
|
||||
config() : cluster_revision(3), lock_state(0), lock_type(0), actuator_enabled(0), auto_relock_time(0),
|
||||
config() : cluster_revision(6), lock_state(0), lock_type(0), actuator_enabled(0), auto_relock_time(0),
|
||||
operating_mode(0), supported_operating_modes(0) {}
|
||||
} config_t;
|
||||
|
||||
@@ -325,7 +325,7 @@ typedef struct config {
|
||||
int16_t measured_value;
|
||||
int16_t min_measured_value;
|
||||
int16_t max_measured_value;
|
||||
config() : cluster_revision(3), measured_value(-32768), min_measured_value(-32768), max_measured_value(-32768) {}
|
||||
config() : cluster_revision(4), measured_value(-32768), min_measured_value(-32768), max_measured_value(-32768) {}
|
||||
} config_t;
|
||||
|
||||
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
|
||||
@@ -348,7 +348,7 @@ namespace boolean_state {
|
||||
typedef struct config {
|
||||
uint16_t cluster_revision;
|
||||
bool state_value;
|
||||
config() : cluster_revision(3), state_value(0) {}
|
||||
config() : cluster_revision(1), state_value(0) {}
|
||||
} config_t;
|
||||
|
||||
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
|
||||
|
||||
@@ -921,9 +921,55 @@ static esp_err_t esp_matter_command_callback_setpoint_raise_lower(const Concrete
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
static esp_err_t esp_matter_command_callback_reset_counts(const ConcreteCommandPath &command_path,
|
||||
TLVReader &tlv_data, void *opaque_ptr)
|
||||
{
|
||||
chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::DecodableType command_data;
|
||||
CHIP_ERROR error = Decode(tlv_data, command_data);
|
||||
if (error == CHIP_NO_ERROR) {
|
||||
emberAfThreadNetworkDiagnosticsClusterResetCountsCallback((CommandHandler *)opaque_ptr, command_path, command_data);
|
||||
}
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
static esp_err_t esp_matter_command_callback_test_event_trigger(const ConcreteCommandPath &command_path,
|
||||
TLVReader &tlv_data, void *opaque_ptr)
|
||||
{
|
||||
chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::DecodableType command_data;
|
||||
CHIP_ERROR error = Decode(tlv_data, command_data);
|
||||
if (error == CHIP_NO_ERROR) {
|
||||
emberAfGeneralDiagnosticsClusterTestEventTriggerCallback((CommandHandler *)opaque_ptr, command_path, command_data);
|
||||
}
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
namespace esp_matter {
|
||||
namespace cluster {
|
||||
|
||||
namespace diagnostics_network_thread {
|
||||
namespace command {
|
||||
|
||||
command_t *create_reset_counts(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, ThreadNetworkDiagnostics::Commands::ResetCounts::Id, COMMAND_FLAG_ACCEPTED,
|
||||
esp_matter_command_callback_reset_counts);
|
||||
}
|
||||
|
||||
} /* command */
|
||||
} /* diagnostics_network_thread */
|
||||
|
||||
namespace general_diagnostics {
|
||||
namespace command {
|
||||
|
||||
command_t *create_test_event_trigger(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, GeneralDiagnostics::Commands::TestEventTrigger::Id, COMMAND_FLAG_ACCEPTED,
|
||||
esp_matter_command_callback_test_event_trigger);
|
||||
}
|
||||
|
||||
} /* command */
|
||||
} /* general_diagnostics */
|
||||
|
||||
namespace group_key_management {
|
||||
namespace command {
|
||||
|
||||
|
||||
@@ -25,6 +25,18 @@ namespace cluster {
|
||||
* If a custom command needs to be created, the low level esp_matter::command::create() API can be used.
|
||||
*/
|
||||
|
||||
namespace diagnostics_network_thread {
|
||||
namespace command {
|
||||
command_t *create_reset_counts(cluster_t *cluster);
|
||||
} /* command */
|
||||
} /* diagnostics_network_thread */
|
||||
|
||||
namespace general_diagnostics {
|
||||
namespace command {
|
||||
command_t *create_test_event_trigger(cluster_t *cluster);
|
||||
} /* command */
|
||||
} /* general_diagnostics */
|
||||
|
||||
namespace group_key_management {
|
||||
namespace command {
|
||||
command_t *create_key_set_write(cluster_t *cluster);
|
||||
|
||||
Reference in New Issue
Block a user