Merge branch 'feature/add_judgement_for_event_list_create' into 'main'

add a judgement for create event list attribute

See merge request app-frameworks/esp-matter!495
This commit is contained in:
Hrishikesh Dhayagude
2023-09-22 17:12:00 +08:00
@@ -90,7 +90,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes updated later */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -125,7 +127,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes managed internally */
global::attribute::create_cluster_revision(cluster, 1);
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_action_list(cluster, NULL, 0, 0);
attribute::create_endpoint_lists(cluster, NULL, 0, 0);
@@ -170,7 +174,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
/* Attributes updated later */
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -208,7 +214,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_data_model_revision(cluster, 0);
attribute::create_location(cluster, NULL, 0);
attribute::create_vendor_name(cluster, NULL, 0);
@@ -259,7 +267,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_binding(cluster, NULL, 0, 0);
/* Attributes not managed internally */
@@ -294,7 +304,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -335,7 +347,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_default_ota_providers(cluster, NULL, 0, 0);
/* Attributes not managed internally */
@@ -380,7 +394,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_regulatory_config(cluster, 0);
attribute::create_location_capability(cluster, 0);
attribute::create_basic_commissioning_info(cluster, NULL, 0, 0);
@@ -435,7 +451,9 @@ 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<int32_t>());
global::attribute::create_feature_map(cluster, 0);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -483,7 +501,9 @@ 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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -521,7 +541,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_window_status(cluster, 0);
attribute::create_admin_fabric_index(cluster, 0);
attribute::create_admin_vendor_id(cluster, 0);
@@ -563,7 +585,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_nocs(cluster, NULL, 0, 0);
attribute::create_supported_fabrics(cluster, 0);
attribute::create_commissioned_fabrics(cluster, 0);
@@ -617,7 +641,9 @@ cluster_t *create(endpoint_t *endpoint, uint8_t flags)
if (flags & CLUSTER_FLAG_SERVER) {
/* 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
global::attribute::create_cluster_revision(cluster, 0);
attribute::create_group_key_map(cluster, NULL, 0, 0);
attribute::create_group_table(cluster, NULL, 0, 0);
@@ -657,7 +683,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_bssid(cluster, NULL, 0);
attribute::create_security_type(cluster, nullable<uint8_t>());
attribute::create_wifi_version(cluster, nullable<uint8_t>());
@@ -696,7 +724,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_channel(cluster, nullable<uint16_t>(0));
attribute::create_routing_role(cluster, nullable<uint8_t>(0));
attribute::create_network_name(cluster, NULL, 0);
@@ -747,7 +777,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -783,7 +815,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -817,7 +851,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_
/* 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
/** Attributes not managed internally **/
if (config) {
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
@@ -870,7 +906,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_label_list(cluster, NULL, 0, 0);
/* Attributes not managed internally */
@@ -905,7 +943,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
attribute::create_label_list(cluster, NULL, 0, 0);
/* Attributes not managed internally */
@@ -947,7 +987,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -988,7 +1030,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -1035,7 +1079,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -1093,7 +1139,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -1141,7 +1189,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -1199,7 +1249,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -1274,7 +1326,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -1318,7 +1372,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -1377,7 +1433,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -1429,7 +1487,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -1481,7 +1541,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -1520,7 +1582,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -1560,7 +1624,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -1602,7 +1668,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -1642,7 +1710,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -1679,7 +1749,9 @@ 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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
if (config) {
/* Attributes not managed internally */
@@ -1720,7 +1792,9 @@ 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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
if (config) {
/* Attributes not managed internally */
@@ -1764,7 +1838,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
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);
@@ -1804,7 +1880,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
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);
@@ -1842,7 +1920,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
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);
@@ -1885,7 +1965,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/** Attributes not managed internally **/
if (config) {
@@ -1925,7 +2007,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_
/* 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_supported_modes(cluster, NULL, 0, 0);
/** Attributes not managed internally **/
if (config) {
@@ -1971,7 +2055,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -2008,7 +2094,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);
#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE
global::attribute::create_event_list(cluster, NULL, 0, 0);
#endif
/* Attributes not managed internally */
if (config) {
@@ -2044,7 +2132,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_
/* 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
/* Attributes not managed internally */
if (config) {
@@ -2090,7 +2180,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);
#endif
/* Attributes not managed internally */
if (config) {