diff --git a/components/esp_matter/esp_matter_attribute.cpp b/components/esp_matter/esp_matter_attribute.cpp index e3410fb88..cb09b47c5 100644 --- a/components/esp_matter/esp_matter_attribute.cpp +++ b/components/esp_matter/esp_matter_attribute.cpp @@ -37,6 +37,12 @@ attribute_t *create_feature_map(cluster_t *cluster, uint32_t value) esp_matter_bitmap32(value)); } +attribute_t *create_event_list(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count) +{ + return esp_matter::attribute::create(cluster, Globals::Attributes::EventList::Id, ATTRIBUTE_FLAG_NONE, + esp_matter_array(value, length, count)); +} + } /* attribute */ } /* global */ diff --git a/components/esp_matter/esp_matter_attribute.h b/components/esp_matter/esp_matter_attribute.h index 69dfb18ec..ee5ea264f 100644 --- a/components/esp_matter/esp_matter_attribute.h +++ b/components/esp_matter/esp_matter_attribute.h @@ -30,6 +30,7 @@ namespace global { namespace attribute { attribute_t *create_cluster_revision(cluster_t *cluster, uint16_t value); attribute_t *create_feature_map(cluster_t *cluster, uint32_t value); +attribute_t *create_event_list(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count); } /* attribute */ } /* global */ diff --git a/components/esp_matter/esp_matter_cluster.cpp b/components/esp_matter/esp_matter_cluster.cpp index db5c55a4d..3c6297b7b 100644 --- a/components/esp_matter/esp_matter_cluster.cpp +++ b/components/esp_matter/esp_matter_cluster.cpp @@ -92,6 +92,7 @@ cluster_t *create(endpoint_t *endpoint, uint8_t flags) /* Attributes updated later */ global::attribute::create_feature_map(cluster, 0); + global::attribute::create_event_list(cluster, NULL, 0, 0); } return cluster; @@ -119,6 +120,7 @@ cluster_t *create(endpoint_t *endpoint, uint8_t flags) /* Attributes managed internally */ global::attribute::create_cluster_revision(cluster, 1); global::attribute::create_feature_map(cluster, 0); + global::attribute::create_event_list(cluster, NULL, 0, 0); attribute::create_action_list(cluster, NULL, 0, 0); attribute::create_endpoint_lists(cluster, NULL, 0, 0); } @@ -153,6 +155,7 @@ cluster_t *create(endpoint_t *endpoint, uint8_t flags) /* Attributes updated later */ global::attribute::create_feature_map(cluster, 0); + global::attribute::create_event_list(cluster, NULL, 0, 0); } return cluster; @@ -181,6 +184,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); attribute::create_data_model_revision(cluster, 0); attribute::create_location(cluster, NULL, 0); attribute::create_vendor_name(cluster, NULL, 0); @@ -229,6 +233,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); attribute::create_binding(cluster, NULL, 0, 0); /* Attributes not managed internally */ @@ -263,6 +268,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ if (config) { @@ -303,6 +309,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); attribute::create_default_ota_providers(cluster, NULL, 0, 0); /* Attributes not managed internally */ @@ -343,6 +350,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); attribute::create_regulatory_config(cluster, 0); attribute::create_location_capability(cluster, 0); attribute::create_basic_commissioning_info(cluster, NULL, 0, 0); @@ -397,6 +405,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags) attribute::create_last_network_id(cluster, NULL, 0); attribute::create_last_connect_error_value(cluster, nullable()); global::attribute::create_feature_map(cluster, 0); + global::attribute::create_event_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ if (config) { @@ -444,6 +453,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags) attribute::create_reboot_count(cluster, 0); attribute::create_test_event_triggers_enabled(cluster, 0); global::attribute::create_feature_map(cluster, 0); + global::attribute::create_event_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ if (config) { @@ -479,6 +489,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); attribute::create_window_status(cluster, 0); attribute::create_admin_fabric_index(cluster, 0); attribute::create_admin_vendor_id(cluster, 0); @@ -520,6 +531,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); attribute::create_nocs(cluster, NULL, 0, 0); attribute::create_supported_fabrics(cluster, 0); attribute::create_commissioned_fabrics(cluster, 0); @@ -573,6 +585,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_event_list(cluster, NULL, 0, 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); @@ -612,6 +625,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); attribute::create_bssid(cluster, NULL, 0); attribute::create_security_type(cluster, nullable()); attribute::create_wifi_version(cluster, nullable()); @@ -650,6 +664,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); attribute::create_channel(cluster, nullable(0)); attribute::create_routing_role(cluster, nullable(0)); attribute::create_network_name(cluster, NULL, 0); @@ -703,6 +718,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ if (config) { @@ -736,6 +752,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ if (config) { @@ -770,6 +787,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); attribute::create_label_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ @@ -804,6 +822,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); attribute::create_label_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ @@ -845,6 +864,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ if (config) { @@ -885,6 +905,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, 1); + global::attribute::create_event_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ if (config) { @@ -933,6 +954,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ if (config) { @@ -989,6 +1011,7 @@ 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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ if (config) { @@ -1036,6 +1059,7 @@ 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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ if (config) { @@ -1093,6 +1117,7 @@ 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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ if (config) { @@ -1162,6 +1187,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ if (config) { @@ -1205,6 +1231,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ if (config) { @@ -1252,6 +1279,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ if (config) { @@ -1299,6 +1327,7 @@ 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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ if (config) { @@ -1350,6 +1379,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ if (config) { @@ -1388,6 +1418,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ if (config) { @@ -1427,6 +1458,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ if (config) { @@ -1468,6 +1500,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ if (config) { @@ -1507,6 +1540,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /* Attributes not managed internally */ if (config) { @@ -1543,6 +1577,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags) if (flags & CLUSTER_FLAG_SERVER) { /* Attributes not managed internally */ global::attribute::create_feature_map(cluster, 0); + global::attribute::create_event_list(cluster, NULL, 0, 0); if (config) { /* Attributes not managed internally */ @@ -1583,6 +1618,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_ if (flags & CLUSTER_FLAG_SERVER) { /* Attributes not managed internally */ global::attribute::create_feature_map(cluster, 0); + global::attribute::create_event_list(cluster, NULL, 0, 0); if (config) { /* Attributes not managed internally */ @@ -1626,6 +1662,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /** Attributes not managed internally **/ if (config) { global::attribute::create_cluster_revision(cluster, config->cluster_revision); @@ -1665,6 +1702,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /** Attributes not managed internally **/ if (config) { global::attribute::create_cluster_revision(cluster, config->cluster_revision); @@ -1702,6 +1740,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /** Attributes not managed internally **/ if (config) { global::attribute::create_cluster_revision(cluster, config->cluster_revision); @@ -1744,6 +1783,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); + global::attribute::create_event_list(cluster, NULL, 0, 0); /** Attributes not managed internally **/ if (config) {