diff --git a/CHANGES.md b/CHANGES.md index f6bf2e31f..0d953d8f9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,7 +11,7 @@ static esp_matter_node_config_t node_config = NODE_CONFIG_DEFAULT(); static esp_matter_endpoint_color_dimmable_light_config_t light_config = ENDPOINT_CONFIG_COLOR_DIMMABLE_LIGHT_DEFAULT(); esp_matter_node_t *node = esp_matter_node_create(&node_config, app_attribute_update_cb, NULL); -esp_matter_endpoint_t *endpoint = esp_matter_endpoint_create_color_dimmable_light(node, &light_config, ENDPOINT_MASK_NONE); +esp_matter_endpoint_t *endpoint = esp_matter_endpoint_create_color_dimmable_light(node, &light_config, ESP_MATTER_ENDPOINT_FLAG_NONE); ``` The examples have also been restructured and the matter submodule specific initialisations have diff --git a/components/esp_matter/esp_matter.h b/components/esp_matter/esp_matter.h index 9edcd5c59..24b1625ea 100644 --- a/components/esp_matter/esp_matter.h +++ b/components/esp_matter/esp_matter.h @@ -34,15 +34,6 @@ application. #include #include -#define ATTRIBUTE_MASK_NONE 0x0 -#define COMMAND_MASK_NONE 0x0 -#define CLUSTER_MASK_NONE 0x0 -#define ENDPOINT_MASK_NONE 0x0 - -#define ENDPOINT_MASK_DELETABLE 0x1 - -#define COMMAND_MASK_CUSTOM 0x80 - typedef enum esp_matter_endpoint_flags { ESP_MATTER_ENDPOINT_FLAG_NONE = 0x00, ESP_MATTER_ENDPOINT_FLAG_DELETABLE = 0x01, diff --git a/components/esp_matter/esp_matter_cluster.cpp b/components/esp_matter/esp_matter_cluster.cpp index 36ab7ace7..899662c96 100644 --- a/components/esp_matter/esp_matter_cluster.cpp +++ b/components/esp_matter/esp_matter_cluster.cpp @@ -27,87 +27,87 @@ static const char *TAG = "esp_matter_cluster"; const esp_matter_cluster_function_generic_t *esp_matter_cluster_descriptor_function_list = NULL; -const int esp_matter_cluster_descriptor_function_flags = CLUSTER_MASK_NONE; +const int esp_matter_cluster_descriptor_function_flags = ESP_MATTER_CLUSTER_FLAG_NONE; const esp_matter_cluster_function_generic_t *esp_matter_cluster_ota_provider_function_list = NULL; -const int esp_matter_cluster_ota_provider_function_flags = CLUSTER_MASK_NONE; +const int esp_matter_cluster_ota_provider_function_flags = ESP_MATTER_CLUSTER_FLAG_NONE; const esp_matter_cluster_function_generic_t *esp_matter_cluster_ota_requestor_function_list = NULL; -const int esp_matter_cluster_ota_requestor_function_flags = CLUSTER_MASK_NONE; +const int esp_matter_cluster_ota_requestor_function_flags = ESP_MATTER_CLUSTER_FLAG_NONE; const esp_matter_cluster_function_generic_t *esp_matter_cluster_general_commissioning_function_list = NULL; -const int esp_matter_cluster_general_commissioning_function_flags = CLUSTER_MASK_NONE; +const int esp_matter_cluster_general_commissioning_function_flags = ESP_MATTER_CLUSTER_FLAG_NONE; const esp_matter_cluster_function_generic_t *esp_matter_cluster_network_commissioning_function_list = NULL; -const int esp_matter_cluster_network_commissioning_function_flags = CLUSTER_MASK_NONE; +const int esp_matter_cluster_network_commissioning_function_flags = ESP_MATTER_CLUSTER_FLAG_NONE; const esp_matter_cluster_function_generic_t *esp_matter_cluster_general_diagnostics_function_list = NULL; -const int esp_matter_cluster_general_diagnostics_function_flags = CLUSTER_MASK_NONE; +const int esp_matter_cluster_general_diagnostics_function_flags = ESP_MATTER_CLUSTER_FLAG_NONE; const esp_matter_cluster_function_generic_t *esp_matter_cluster_administrator_commissioning_function_list = NULL; -const int esp_matter_cluster_administrator_commissioning_function_flags = CLUSTER_MASK_NONE; +const int esp_matter_cluster_administrator_commissioning_function_flags = ESP_MATTER_CLUSTER_FLAG_NONE; const esp_matter_cluster_function_generic_t *esp_matter_cluster_operational_credentials_function_list = NULL; -const int esp_matter_cluster_operational_credentials_function_flags = CLUSTER_MASK_NONE; +const int esp_matter_cluster_operational_credentials_function_flags = ESP_MATTER_CLUSTER_FLAG_NONE; const esp_matter_cluster_function_generic_t *esp_matter_cluster_group_key_management_function_list = NULL; -const int esp_matter_cluster_group_key_management_function_flags = CLUSTER_MASK_NONE; +const int esp_matter_cluster_group_key_management_function_flags = ESP_MATTER_CLUSTER_FLAG_NONE; const esp_matter_cluster_function_generic_t *esp_matter_cluster_binding_function_list = NULL; -const int esp_matter_cluster_binding_function_flags = CLUSTER_MASK_NONE; +const int esp_matter_cluster_binding_function_flags = ESP_MATTER_CLUSTER_FLAG_NONE; const esp_matter_cluster_function_generic_t *esp_matter_cluster_bridged_device_basic_function_list = NULL; -const int esp_matter_cluster_bridged_device_basic_function_flags = CLUSTER_MASK_NONE; +const int esp_matter_cluster_bridged_device_basic_function_flags = ESP_MATTER_CLUSTER_FLAG_NONE; const esp_matter_cluster_function_generic_t *esp_matter_cluster_fixed_label_function_list = NULL; -const int esp_matter_cluster_fixed_label_function_flags = CLUSTER_MASK_NONE; +const int esp_matter_cluster_fixed_label_function_flags = ESP_MATTER_CLUSTER_FLAG_NONE; const esp_matter_cluster_function_generic_t esp_matter_cluster_access_control_function_list[] = { (esp_matter_cluster_function_generic_t)emberAfAccessControlClusterServerInitCallback, }; -const int esp_matter_cluster_access_control_function_flags = CLUSTER_MASK_INIT_FUNCTION; +const int esp_matter_cluster_access_control_function_flags = ESP_MATTER_CLUSTER_FLAG_INIT_FUNCTION; const esp_matter_cluster_function_generic_t esp_matter_cluster_basic_function_list[] = { (esp_matter_cluster_function_generic_t)emberAfBasicClusterServerInitCallback, }; -const int esp_matter_cluster_basic_function_flags = CLUSTER_MASK_INIT_FUNCTION; +const int esp_matter_cluster_basic_function_flags = ESP_MATTER_CLUSTER_FLAG_INIT_FUNCTION; const esp_matter_cluster_function_generic_t esp_matter_cluster_identify_function_list[] = { (esp_matter_cluster_function_generic_t)emberAfIdentifyClusterServerInitCallback, (esp_matter_cluster_function_generic_t)MatterIdentifyClusterServerAttributeChangedCallback, }; -const int esp_matter_cluster_identify_function_flags = CLUSTER_MASK_INIT_FUNCTION | - CLUSTER_MASK_ATTRIBUTE_CHANGED_FUNCTION; +const int esp_matter_cluster_identify_function_flags = ESP_MATTER_CLUSTER_FLAG_INIT_FUNCTION | + ESP_MATTER_CLUSTER_FLAG_ATTRIBUTE_CHANGED_FUNCTION; const esp_matter_cluster_function_generic_t esp_matter_cluster_groups_function_list[] = { (esp_matter_cluster_function_generic_t)emberAfGroupsClusterServerInitCallback, }; -const int esp_matter_cluster_groups_function_flags = CLUSTER_MASK_INIT_FUNCTION; +const int esp_matter_cluster_groups_function_flags = ESP_MATTER_CLUSTER_FLAG_INIT_FUNCTION; const esp_matter_cluster_function_generic_t esp_matter_cluster_scenes_function_list[] = { (esp_matter_cluster_function_generic_t)emberAfScenesClusterServerInitCallback, }; -const int esp_matter_cluster_scenes_function_flags = CLUSTER_MASK_INIT_FUNCTION; +const int esp_matter_cluster_scenes_function_flags = ESP_MATTER_CLUSTER_FLAG_INIT_FUNCTION; const esp_matter_cluster_function_generic_t esp_matter_cluster_on_off_function_list[] = { (esp_matter_cluster_function_generic_t)emberAfOnOffClusterServerInitCallback, }; -const int esp_matter_cluster_on_off_function_flags = CLUSTER_MASK_INIT_FUNCTION; +const int esp_matter_cluster_on_off_function_flags = ESP_MATTER_CLUSTER_FLAG_INIT_FUNCTION; const esp_matter_cluster_function_generic_t esp_matter_cluster_level_control_function_list[] = { (esp_matter_cluster_function_generic_t)emberAfLevelControlClusterServerInitCallback, }; -const int esp_matter_cluster_level_control_function_flags = CLUSTER_MASK_INIT_FUNCTION; +const int esp_matter_cluster_level_control_function_flags = ESP_MATTER_CLUSTER_FLAG_INIT_FUNCTION; const esp_matter_cluster_function_generic_t esp_matter_cluster_color_control_function_list[] = { (esp_matter_cluster_function_generic_t)emberAfColorControlClusterServerInitCallback, }; -const int esp_matter_cluster_color_control_function_flags = CLUSTER_MASK_INIT_FUNCTION; +const int esp_matter_cluster_color_control_function_flags = ESP_MATTER_CLUSTER_FLAG_INIT_FUNCTION; const esp_matter_cluster_function_generic_t esp_matter_cluster_thermostat_function_list[] = { (esp_matter_cluster_function_generic_t)emberAfThermostatClusterServerInitCallback, }; -const int esp_matter_cluster_thermostat_function_flags = CLUSTER_MASK_INIT_FUNCTION; +const int esp_matter_cluster_thermostat_function_flags = ESP_MATTER_CLUSTER_FLAG_INIT_FUNCTION; void esp_matter_cluster_plugin_init_callback_common() { @@ -145,24 +145,24 @@ esp_matter_cluster_t *esp_matter_cluster_create_descriptor(esp_matter_endpoint_t return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { esp_matter_cluster_set_plugin_server_init_callback(cluster, MatterDescriptorPluginServerInitCallback); esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_descriptor_function_list, esp_matter_cluster_descriptor_function_flags); } - if (flags & CLUSTER_MASK_CLIENT) { + if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) { esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterDescriptorPluginClientInitCallback); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); - esp_matter_attribute_create(cluster, ZCL_DEVICE_LIST_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_DEVICE_LIST_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_array(config->device_type_list, sizeof(config->device_type_list), 0)); - esp_matter_attribute_create(cluster, ZCL_SERVER_LIST_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_SERVER_LIST_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_array(config->server_list, sizeof(config->server_list), 0)); - esp_matter_attribute_create(cluster, ZCL_CLIENT_LIST_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLIENT_LIST_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_array(config->client_list, sizeof(config->client_list), 0)); - esp_matter_attribute_create(cluster, ZCL_PARTS_LIST_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_PARTS_LIST_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_array(config->parts_list, sizeof(config->parts_list), 0)); return cluster; @@ -174,26 +174,26 @@ esp_matter_cluster_t *esp_matter_cluster_create_access_control(esp_matter_endpoi { /* Not implemented esp_matter_cluster_t *cluster = esp_matter_cluster_create(endpoint, ZCL_ACCESS_CONTROL_CLUSTER_ID, - CLUSTER_MASK_SERVER); + ESP_MATTER_CLUSTER_FLAG_SERVER); if (!cluster) { ESP_LOGE(TAG, "Could not create cluster"); return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { esp_matter_cluster_set_plugin_server_init_callback(cluster, MatterAcccessControlPluginServerInitCallback); esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_access_control_function_list, esp_matter_cluster_access_control_function_flags); } - if (flags & CLUSTER_MASK_CLIENT) { + if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) { esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterAcccessControlPluginClientInitCallback); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); - esp_matter_attribute_create(cluster, ZCL_ACL_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_ACL_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_array(config->acl, sizeof(config->acl), 0)); - esp_matter_attribute_create(cluster, ZCL_EXTENSION_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_EXTENSION_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_array(config->extension, sizeof(config->extension), 0)); return cluster; @@ -210,42 +210,42 @@ esp_matter_cluster_t *esp_matter_cluster_create_basic(esp_matter_endpoint_t *end return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { esp_matter_cluster_set_plugin_server_init_callback(cluster, MatterBasicPluginServerInitCallback); esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_basic_function_list, esp_matter_cluster_basic_function_flags); } - if (flags & CLUSTER_MASK_CLIENT) { + if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) { esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterBasicPluginClientInitCallback); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); - esp_matter_attribute_create(cluster, ZCL_INTERACTION_MODEL_VERSION_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_INTERACTION_MODEL_VERSION_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->interaction_model_version)); - esp_matter_attribute_create(cluster, ZCL_VENDOR_NAME_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_VENDOR_NAME_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_char_str(config->vendor_name, sizeof(config->vendor_name))); - esp_matter_attribute_create(cluster, ZCL_VENDOR_ID_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_VENDOR_ID_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->vendor_id)); - esp_matter_attribute_create(cluster, ZCL_PRODUCT_NAME_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_PRODUCT_NAME_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_char_str(config->product_name, sizeof(config->product_name))); - esp_matter_attribute_create(cluster, ZCL_PRODUCT_ID_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_PRODUCT_ID_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->product_id)); - esp_matter_attribute_create(cluster, ZCL_NODE_LABEL_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_NODE_LABEL_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_char_str(config->node_label, sizeof(config->node_label))); - esp_matter_attribute_create(cluster, ZCL_LOCATION_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_LOCATION_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_char_str(config->location, sizeof(config->location))); - esp_matter_attribute_create(cluster, ZCL_HARDWARE_VERSION_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_HARDWARE_VERSION_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->hardware_version)); - esp_matter_attribute_create(cluster, ZCL_HARDWARE_VERSION_STRING_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_HARDWARE_VERSION_STRING_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_char_str(config->hardware_version_string, sizeof(config->hardware_version_string))); - esp_matter_attribute_create(cluster, ZCL_SOFTWARE_VERSION_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_SOFTWARE_VERSION_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint32(config->software_version)); - esp_matter_attribute_create(cluster, ZCL_SOFTWARE_VERSION_STRING_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_SOFTWARE_VERSION_STRING_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_char_str(config->software_version_string, sizeof(config->software_version_string))); - esp_matter_attribute_create(cluster, ZCL_SERIAL_NUMBER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_SERIAL_NUMBER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_char_str(config->serial_number, sizeof(config->serial_number))); return cluster; @@ -261,16 +261,16 @@ esp_matter_cluster_t *esp_matter_cluster_create_binding(esp_matter_endpoint_t *e return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { esp_matter_cluster_set_plugin_server_init_callback(cluster, MatterBasicPluginServerInitCallback); esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_binding_function_list, esp_matter_cluster_binding_function_flags); } - if (flags & CLUSTER_MASK_CLIENT) { + if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) { esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterBasicPluginClientInitCallback); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); esp_matter_command_create_bind(cluster); @@ -289,18 +289,18 @@ esp_matter_cluster_t *esp_matter_cluster_create_ota_provider(esp_matter_endpoint return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { esp_matter_cluster_set_plugin_server_init_callback(cluster, MatterOtaSoftwareUpdateProviderPluginServerInitCallback); esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_ota_provider_function_list, esp_matter_cluster_ota_provider_function_flags); } - if (flags & CLUSTER_MASK_CLIENT) { + if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) { esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterOtaSoftwareUpdateProviderPluginClientInitCallback); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); esp_matter_command_create_query_image(cluster); @@ -322,27 +322,27 @@ esp_matter_cluster_t *esp_matter_cluster_create_ota_requestor(esp_matter_endpoin return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { esp_matter_cluster_set_plugin_server_init_callback(cluster, MatterOtaSoftwareUpdateRequestorPluginServerInitCallback); esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_ota_requestor_function_list, esp_matter_cluster_ota_requestor_function_flags); } - if (flags & CLUSTER_MASK_CLIENT) { + if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) { esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterOtaSoftwareUpdateRequestorPluginClientInitCallback); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); - esp_matter_attribute_create(cluster, ZCL_DEFAULT_OTA_PROVIDERS_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_DEFAULT_OTA_PROVIDERS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_octet_str(config->default_ota_providers, sizeof(config->default_ota_providers), 0)); - esp_matter_attribute_create(cluster, ZCL_UPDATE_POSSIBLE_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_UPDATE_POSSIBLE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_bool(config->update_possible)); - esp_matter_attribute_create(cluster, ZCL_UPDATE_STATE_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_UPDATE_STATE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_enum8(config->update_state)); - esp_matter_attribute_create(cluster, ZCL_UPDATE_STATE_PROGRESS_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_UPDATE_STATE_PROGRESS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint8(config->update_state_progress)); esp_matter_command_create_announce_ota_provider(cluster); @@ -360,25 +360,25 @@ esp_matter_cluster_t *esp_matter_cluster_create_general_commissioning(esp_matter return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { esp_matter_cluster_set_plugin_server_init_callback(cluster, MatterGeneralCommissioningPluginServerInitCallback); esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_general_commissioning_function_list, esp_matter_cluster_general_commissioning_function_flags); } - if (flags & CLUSTER_MASK_CLIENT) { + if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) { esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterGeneralCommissioningPluginClientInitCallback); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); - esp_matter_attribute_create(cluster, ZCL_BREADCRUMB_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_BREADCRUMB_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint64(config->breadcrumb)); - esp_matter_attribute_create(cluster, ZCL_BASICCOMMISSIONINGINFO_LIST_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_BASICCOMMISSIONINGINFO_LIST_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_array(config->basic_commissioning_info, sizeof(config->basic_commissioning_info), 0)); - esp_matter_attribute_create(cluster, ZCL_REGULATORYCONFIG_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_REGULATORYCONFIG_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_enum8(config->regulatory_config)); - esp_matter_attribute_create(cluster, ZCL_LOCATIONCAPABILITY_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_LOCATIONCAPABILITY_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_enum8(config->location_capability)); esp_matter_command_create_arm_fail_safe(cluster); @@ -401,34 +401,34 @@ esp_matter_cluster_t *esp_matter_cluster_create_network_commissioning(esp_matter return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { esp_matter_cluster_set_plugin_server_init_callback(cluster, MatterNetworkCommissioningPluginServerInitCallback); esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_network_commissioning_function_list, esp_matter_cluster_network_commissioning_function_flags); } - if (flags & CLUSTER_MASK_CLIENT) { + if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) { esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterNetworkCommissioningPluginClientInitCallback); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); - esp_matter_attribute_create(cluster, ZCL_FEATURE_MAP_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_FEATURE_MAP_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_bitmap32(config->feature_map)); - esp_matter_attribute_create(cluster, ZCL_MAX_NETWORKS_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_MAX_NETWORKS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint8(config->max_networks)); - esp_matter_attribute_create(cluster, ZCL_NETWORKS_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_NETWORKS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_array(config->networks, sizeof(config->networks), 0)); - esp_matter_attribute_create(cluster, ZCL_SCAN_MAX_TIME_SECONDS_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_SCAN_MAX_TIME_SECONDS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint8(config->scan_max_time_seconds)); - esp_matter_attribute_create(cluster, ZCL_CONNECT_MAX_TIME_SECONDS_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CONNECT_MAX_TIME_SECONDS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint8(config->connect_max_time_seconds)); - esp_matter_attribute_create(cluster, ZCL_INTERFACE_ENABLED_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_INTERFACE_ENABLED_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_bool(config->interface_enabled)); - esp_matter_attribute_create(cluster, ZCL_LAST_NETWORKING_STATUS_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_LAST_NETWORKING_STATUS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_enum8(config->last_networking_status)); - esp_matter_attribute_create(cluster, ZCL_LAST_NETWORK_ID_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_LAST_NETWORK_ID_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_octet_str(config->last_network_id, sizeof(config->last_network_id), 0)); - esp_matter_attribute_create(cluster, ZCL_LAST_CONNECT_ERROR_VALUE_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_LAST_CONNECT_ERROR_VALUE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint32(config->last_connect_error_value)); esp_matter_command_create_scan_networks(cluster); @@ -454,20 +454,20 @@ esp_matter_cluster_t *esp_matter_cluster_create_general_diagnostics(esp_matter_e return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { esp_matter_cluster_set_plugin_server_init_callback(cluster, MatterGeneralDiagnosticsPluginServerInitCallback); esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_general_diagnostics_function_list, esp_matter_cluster_general_diagnostics_function_flags); } - if (flags & CLUSTER_MASK_CLIENT) { + if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) { esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterGeneralDiagnosticsPluginClientInitCallback); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); - esp_matter_attribute_create(cluster, ZCL_NETWORK_INTERFACES_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_NETWORK_INTERFACES_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_array(config->network_interfaces, sizeof(config->network_interfaces), 0)); - esp_matter_attribute_create(cluster, ZCL_REBOOT_COUNT_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_REBOOT_COUNT_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->reboot_count)); return cluster; @@ -484,24 +484,24 @@ esp_matter_cluster_t *esp_matter_cluster_create_administrator_commissioning(esp_ return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { esp_matter_cluster_set_plugin_server_init_callback(cluster, MatterAdministratorCommissioningPluginServerInitCallback); esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_administrator_commissioning_function_list, esp_matter_cluster_administrator_commissioning_function_flags); } - if (flags & CLUSTER_MASK_CLIENT) { + if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) { esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterAdministratorCommissioningPluginClientInitCallback); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); - esp_matter_attribute_create(cluster, ZCL_WINDOW_STATUS_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_WINDOW_STATUS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint8(config->window_status)); - esp_matter_attribute_create(cluster, ZCL_ADMIN_FABRIC_INDEX_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_ADMIN_FABRIC_INDEX_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->admin_fabric_index)); - esp_matter_attribute_create(cluster, ZCL_ADMIN_VENDOR_ID_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_ADMIN_VENDOR_ID_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->admin_vendor_id)); esp_matter_command_create_open_commissioning_window(cluster); @@ -521,33 +521,33 @@ esp_matter_cluster_t *esp_matter_cluster_create_operational_credentials(esp_matt return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { esp_matter_cluster_set_plugin_server_init_callback(cluster, MatterOperationalCredentialsPluginServerInitCallback); esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_operational_credentials_function_list, esp_matter_cluster_operational_credentials_function_flags); } - if (flags & CLUSTER_MASK_CLIENT) { + if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) { esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterOperationalCredentialsPluginClientInitCallback); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); /* Not implemented - esp_matter_attribute_create(cluster, ZCL_NOCS_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_NOCS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_array(config->nocs, sizeof(config->nocs), 0)); */ - esp_matter_attribute_create(cluster, ZCL_FABRICS_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_FABRICS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_array(config->fabrics, sizeof(config->fabrics), 0)); - esp_matter_attribute_create(cluster, ZCL_SUPPORTED_FABRICS_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_SUPPORTED_FABRICS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint8(config->supported_fabrics)); - esp_matter_attribute_create(cluster, ZCL_COMMISSIONED_FABRICS_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_COMMISSIONED_FABRICS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint8(config->commissioned_fabrics)); - esp_matter_attribute_create(cluster, ZCL_TRUSTED_ROOTS_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_TRUSTED_ROOTS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_array(config->trusted_root_certificates, sizeof(config->trusted_root_certificates), 0)); - esp_matter_attribute_create(cluster, ZCL_CURRENT_FABRIC_INDEX_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CURRENT_FABRIC_INDEX_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint8(config->current_fabric_index)); esp_matter_command_create_attestation_request(cluster); @@ -577,25 +577,25 @@ esp_matter_cluster_t *esp_matter_cluster_create_group_key_management(esp_matter_ return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { esp_matter_cluster_set_plugin_server_init_callback(cluster, MatterGroupKeyManagementPluginServerInitCallback); esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_group_key_management_function_list, esp_matter_cluster_group_key_management_function_flags); } - if (flags & CLUSTER_MASK_CLIENT) { + if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) { esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterGroupKeyManagementPluginClientInitCallback); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); - esp_matter_attribute_create(cluster, ZCL_GROUP_KEY_MAP_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_GROUP_KEY_MAP_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_array(config->group_key_map, sizeof(config->group_key_map), 0)); - esp_matter_attribute_create(cluster, ZCL_GROUP_TABLE_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_GROUP_TABLE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_array(config->group_table, sizeof(config->group_table), 0)); /* Not implemented - esp_matter_attribute_create(cluster, ZCL_MAX_GROUPS_PER_FABRIC_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_MAX_GROUPS_PER_FABRIC_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->max_groups_per_fabric)); - esp_matter_attribute_create(cluster, ZCL_MAX_GROUP_KEYS_PER_FABRIC_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_MAX_GROUP_KEYS_PER_FABRIC_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->max_group_keys_per_fabric)); esp_matter_command_create_key_set_write(cluster); @@ -618,20 +618,20 @@ esp_matter_cluster_t *esp_matter_cluster_create_identify(esp_matter_endpoint_t * return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { esp_matter_cluster_set_plugin_server_init_callback(cluster, MatterIdentifyPluginServerInitCallback); esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_identify_function_list, esp_matter_cluster_identify_function_flags); } - if (flags & CLUSTER_MASK_CLIENT) { + if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) { esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterIdentifyPluginClientInitCallback); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); - esp_matter_attribute_create(cluster, ZCL_IDENTIFY_TIME_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_IDENTIFY_TIME_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->identify_time)); - esp_matter_attribute_create(cluster, ZCL_IDENTIFY_TYPE_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_IDENTIFY_TYPE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint8(config->identify_type)); esp_matter_command_create_identify(cluster); @@ -650,18 +650,18 @@ esp_matter_cluster_t *esp_matter_cluster_create_groups(esp_matter_endpoint_t *en return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { esp_matter_cluster_set_plugin_server_init_callback(cluster, MatterGroupsPluginServerInitCallback); esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_groups_function_list, esp_matter_cluster_groups_function_flags); } - if (flags & CLUSTER_MASK_CLIENT) { + if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) { esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterGroupsPluginClientInitCallback); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); - esp_matter_attribute_create(cluster, ZCL_GROUP_NAME_SUPPORT_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_GROUP_NAME_SUPPORT_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_bitmap8(config->name_support)); esp_matter_command_create_add_group(cluster); @@ -687,26 +687,26 @@ esp_matter_cluster_t *esp_matter_cluster_create_scenes(esp_matter_endpoint_t *en return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { esp_matter_cluster_set_plugin_server_init_callback(cluster, MatterScenesPluginServerInitCallback); esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_scenes_function_list, esp_matter_cluster_scenes_function_flags); } - if (flags & CLUSTER_MASK_CLIENT) { + if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) { esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterScenesPluginClientInitCallback); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); - esp_matter_attribute_create(cluster, ZCL_SCENE_COUNT_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_SCENE_COUNT_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint8(config->scene_count)); - esp_matter_attribute_create(cluster, ZCL_CURRENT_SCENE_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CURRENT_SCENE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint8(config->current_scene)); - esp_matter_attribute_create(cluster, ZCL_CURRENT_GROUP_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CURRENT_GROUP_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->current_group)); - esp_matter_attribute_create(cluster, ZCL_SCENE_VALID_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_SCENE_VALID_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_bool(config->scene_valid)); - esp_matter_attribute_create(cluster, ZCL_SCENE_NAME_SUPPORT_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_SCENE_NAME_SUPPORT_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_bitmap8(config->name_support)); esp_matter_command_create_add_scene(cluster); @@ -735,18 +735,19 @@ esp_matter_cluster_t *esp_matter_cluster_create_on_off(esp_matter_endpoint_t *en return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { esp_matter_cluster_set_plugin_server_init_callback(cluster, MatterOnOffPluginServerInitCallback); esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_on_off_function_list, esp_matter_cluster_on_off_function_flags); } - if (flags & CLUSTER_MASK_CLIENT) { + if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) { esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterOnOffPluginClientInitCallback); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); - esp_matter_attribute_create(cluster, ZCL_ON_OFF_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, esp_matter_bool(config->on_off)); + esp_matter_attribute_create(cluster, ZCL_ON_OFF_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, + esp_matter_bool(config->on_off)); esp_matter_command_create_off(cluster); esp_matter_command_create_on(cluster); @@ -765,22 +766,22 @@ esp_matter_cluster_t *esp_matter_cluster_create_level_control(esp_matter_endpoin return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { esp_matter_cluster_set_plugin_server_init_callback(cluster, MatterLevelControlPluginServerInitCallback); esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_level_control_function_list, esp_matter_cluster_level_control_function_flags); } - if (flags & CLUSTER_MASK_CLIENT) { + if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) { esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterLevelControlPluginClientInitCallback); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); - esp_matter_attribute_create(cluster, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint8(config->current_level)); - esp_matter_attribute_create(cluster, ZCL_ON_LEVEL_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_ON_LEVEL_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint8(config->on_level)); - esp_matter_attribute_create(cluster, ZCL_OPTIONS_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_OPTIONS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_bitmap8(config->options)); esp_matter_command_create_move_to_level(cluster); @@ -805,31 +806,31 @@ esp_matter_cluster_t *esp_matter_cluster_create_color_control(esp_matter_endpoin return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { esp_matter_cluster_set_plugin_server_init_callback(cluster, MatterColorControlPluginServerInitCallback); esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_color_control_function_list, esp_matter_cluster_color_control_function_flags); } - if (flags & CLUSTER_MASK_CLIENT) { + if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) { esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterColorControlPluginClientInitCallback); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); - esp_matter_attribute_create(cluster, ZCL_FEATURE_MAP_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_FEATURE_MAP_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_bitmap32(config->feature_map)); - esp_matter_attribute_create(cluster, ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint8(config->current_hue)); - esp_matter_attribute_create(cluster, ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, - esp_matter_uint8(config->current_saturation)); - esp_matter_attribute_create(cluster, ZCL_COLOR_CONTROL_COLOR_MODE_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID, + ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint8(config->current_saturation)); + esp_matter_attribute_create(cluster, ZCL_COLOR_CONTROL_COLOR_MODE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_enum8(config->color_mode)); - esp_matter_attribute_create(cluster, ZCL_OPTIONS_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_OPTIONS_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_bitmap8(config->options)); - esp_matter_attribute_create(cluster, ZCL_COLOR_CONTROL_ENHANCED_COLOR_MODE_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, - esp_matter_enum8(config->enhanced_color_mode)); - esp_matter_attribute_create(cluster, ZCL_COLOR_CONTROL_COLOR_CAPABILITIES_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, - esp_matter_bitmap16(config->color_capabilities)); + esp_matter_attribute_create(cluster, ZCL_COLOR_CONTROL_ENHANCED_COLOR_MODE_ATTRIBUTE_ID, + ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_enum8(config->enhanced_color_mode)); + esp_matter_attribute_create(cluster, ZCL_COLOR_CONTROL_COLOR_CAPABILITIES_ATTRIBUTE_ID, + ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_bitmap16(config->color_capabilities)); esp_matter_command_create_move_to_hue(cluster); esp_matter_command_create_move_hue(cluster); @@ -852,26 +853,26 @@ esp_matter_cluster_t *esp_matter_cluster_create_thermostat(esp_matter_endpoint_t return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { esp_matter_cluster_set_plugin_server_init_callback(cluster, MatterThermostatPluginServerInitCallback); esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_thermostat_function_list, esp_matter_cluster_thermostat_function_flags); } - if (flags & CLUSTER_MASK_CLIENT) { + if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) { esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterThermostatPluginClientInitCallback); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); - esp_matter_attribute_create(cluster, ZCL_LOCAL_TEMPERATURE_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_LOCAL_TEMPERATURE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_int16(config->local_temperature)); - esp_matter_attribute_create(cluster, ZCL_OCCUPIED_COOLING_SETPOINT_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_OCCUPIED_COOLING_SETPOINT_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_int16(config->occupied_cooling_setpoint)); - esp_matter_attribute_create(cluster, ZCL_OCCUPIED_HEATING_SETPOINT_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_OCCUPIED_HEATING_SETPOINT_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_int16(config->occupied_heating_setpoint)); - esp_matter_attribute_create(cluster, ZCL_CONTROL_SEQUENCE_OF_OPERATION_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CONTROL_SEQUENCE_OF_OPERATION_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_enum8(config->control_sequence_of_operation)); - esp_matter_attribute_create(cluster, ZCL_SYSTEM_MODE_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_SYSTEM_MODE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_enum8(config->system_mode)); esp_matter_command_create_setpoint_raise_lower(cluster); @@ -889,17 +890,17 @@ esp_matter_cluster_t *esp_matter_cluster_create_bridged_device_basic(esp_matter_ return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { // There is not PluginServer(Client)InitCallback for this cluster esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_bridged_device_basic_function_list, esp_matter_cluster_bridged_device_basic_function_flags); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); - esp_matter_attribute_create(cluster, ZCL_NODE_LABEL_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_NODE_LABEL_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_char_str(config->node_label, sizeof(config->node_label))); - esp_matter_attribute_create(cluster, ZCL_REACHABLE_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_REACHABLE_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_bool(config->reachable)); return cluster; } @@ -913,18 +914,18 @@ esp_matter_cluster_t *esp_matter_cluster_create_fixed_label(esp_matter_endpoint_ return NULL; } - if (flags & CLUSTER_MASK_SERVER) { + if (flags & ESP_MATTER_CLUSTER_FLAG_SERVER) { esp_matter_cluster_set_plugin_server_init_callback(cluster, MatterFixedLabelPluginServerInitCallback); esp_matter_cluster_add_function_list(cluster, esp_matter_cluster_fixed_label_function_list, esp_matter_cluster_fixed_label_function_flags); } - if (flags & CLUSTER_MASK_CLIENT) { + if (flags & ESP_MATTER_CLUSTER_FLAG_CLIENT) { esp_matter_cluster_set_plugin_client_init_callback(cluster, MatterFixedLabelPluginClientInitCallback); } - esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_uint16(config->cluster_revision)); - esp_matter_attribute_create(cluster, ZCL_LABEL_LIST_ATTRIBUTE_ID, ATTRIBUTE_MASK_NONE, + esp_matter_attribute_create(cluster, ZCL_LABEL_LIST_ATTRIBUTE_ID, ESP_MATTER_ATTRIBUTE_FLAG_NONE, esp_matter_array(config->label_list, sizeof(config->label_list), 0)); return cluster; } diff --git a/components/esp_matter/esp_matter_command.cpp b/components/esp_matter/esp_matter_command.cpp index 42aaf8a92..92973347e 100644 --- a/components/esp_matter/esp_matter_command.cpp +++ b/components/esp_matter/esp_matter_command.cpp @@ -62,7 +62,7 @@ void DispatchSingleClusterCommandCommon(const ConcreteCommandPath &command_path, return; } int flags = esp_matter_command_get_flags(command); - if (flags & COMMAND_MASK_CUSTOM) { + if (flags & ESP_MATTER_COMMAND_FLAG_CUSTOM) { if (custom_callback) { custom_callback(endpoint_id, cluster_id, command_id, tlv_data, custom_callback_priv_data); } @@ -1594,537 +1594,548 @@ static void esp_matter_command_callback_get_scene_membership_response(void *comm esp_matter_command_t *esp_matter_command_create_key_set_write(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_KEY_SET_WRITE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_KEY_SET_WRITE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_key_set_write); } esp_matter_command_t *esp_matter_command_create_key_set_read(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_KEY_SET_READ_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_KEY_SET_READ_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_key_set_read); } esp_matter_command_t *esp_matter_command_create_key_set_remove(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_KEY_SET_REMOVE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_KEY_SET_REMOVE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_key_set_remove); } esp_matter_command_t *esp_matter_command_create_key_set_read_all_indices(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_KEY_SET_READ_ALL_INDICES_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_KEY_SET_READ_ALL_INDICES_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_key_set_read_all_indices); } esp_matter_command_t *esp_matter_command_create_arm_fail_safe(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_ARM_FAIL_SAFE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_ARM_FAIL_SAFE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_arm_fail_safe); } esp_matter_command_t *esp_matter_command_create_set_regulatory_config(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_SET_REGULATORY_CONFIG_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_SET_REGULATORY_CONFIG_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_set_regulatory_config); } esp_matter_command_t *esp_matter_command_create_commissioning_complete(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_COMMISSIONING_COMPLETE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_COMMISSIONING_COMPLETE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_commissioning_complete); } esp_matter_command_t *esp_matter_command_create_scan_networks(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_SCAN_NETWORKS_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_SCAN_NETWORKS_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_scan_networks); } esp_matter_command_t *esp_matter_command_create_add_or_update_wifi_network(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_ADD_OR_UPDATE_WI_FI_NETWORK_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_ADD_OR_UPDATE_WI_FI_NETWORK_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_add_or_update_wifi_network); } esp_matter_command_t *esp_matter_command_create_add_or_update_thread_network(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_ADD_OR_UPDATE_THREAD_NETWORK_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_ADD_OR_UPDATE_THREAD_NETWORK_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_add_or_update_thread_network); } esp_matter_command_t *esp_matter_command_create_remove_network(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_REMOVE_NETWORK_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_REMOVE_NETWORK_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_remove_network); } esp_matter_command_t *esp_matter_command_create_connect_network(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_CONNECT_NETWORK_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_CONNECT_NETWORK_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_connect_network); } esp_matter_command_t *esp_matter_command_create_reorder_network(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_REORDER_NETWORK_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_REORDER_NETWORK_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_reorder_network); } esp_matter_command_t *esp_matter_command_create_open_commissioning_window(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_OPEN_COMMISSIONING_WINDOW_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_OPEN_COMMISSIONING_WINDOW_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_open_commissioning_window); } esp_matter_command_t *esp_matter_command_create_open_basic_commissioning_window(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_OPEN_BASIC_COMMISSIONING_WINDOW_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_OPEN_BASIC_COMMISSIONING_WINDOW_COMMAND_ID, + ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_open_basic_commissioning_window); } esp_matter_command_t *esp_matter_command_create_revoke_commissioning(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_REVOKE_COMMISSIONING_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_REVOKE_COMMISSIONING_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_revoke_commissioning); } esp_matter_command_t *esp_matter_command_create_attestation_request(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_ATTESTATION_REQUEST_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_ATTESTATION_REQUEST_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_attestation_request); } esp_matter_command_t *esp_matter_command_create_certificate_chain_request(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_CERTIFICATE_CHAIN_REQUEST_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_CERTIFICATE_CHAIN_REQUEST_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_certificate_chain_request); } esp_matter_command_t *esp_matter_command_create_csr_request(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_OP_CSR_REQUEST_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_OP_CSR_REQUEST_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_csr_request); } esp_matter_command_t *esp_matter_command_create_add_noc(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_ADD_NOC_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_ADD_NOC_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_add_noc); } esp_matter_command_t *esp_matter_command_create_update_noc(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_UPDATE_NOC_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_UPDATE_NOC_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_update_noc); } esp_matter_command_t *esp_matter_command_create_update_fabric_label(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_UPDATE_FABRIC_LABEL_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_UPDATE_FABRIC_LABEL_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_update_fabric_label); } esp_matter_command_t *esp_matter_command_create_remove_fabric(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_REMOVE_FABRIC_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_REMOVE_FABRIC_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_remove_fabric); } esp_matter_command_t *esp_matter_command_create_add_trusted_root_certificate(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_ADD_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_ADD_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_add_trusted_root_certificate); } esp_matter_command_t *esp_matter_command_create_remove_trusted_root_certificate(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_REMOVE_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_REMOVE_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID, + ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_remove_trusted_root_certificate); } esp_matter_command_t *esp_matter_command_create_query_image(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_QUERY_IMAGE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_QUERY_IMAGE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_query_image); } esp_matter_command_t *esp_matter_command_create_apply_update_request(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_APPLY_UPDATE_REQUEST_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_APPLY_UPDATE_REQUEST_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_apply_update_request); } esp_matter_command_t *esp_matter_command_create_notify_update_applied(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_NOTIFY_UPDATE_APPLIED_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_NOTIFY_UPDATE_APPLIED_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_notify_update_applied); } esp_matter_command_t *esp_matter_command_create_announce_ota_provider(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_ANNOUNCE_OTA_PROVIDER_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_ANNOUNCE_OTA_PROVIDER_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_announce_ota_provider); } esp_matter_command_t *esp_matter_command_create_identify(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_IDENTIFY_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_IDENTIFY_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_identify); } esp_matter_command_t *esp_matter_command_create_identify_query(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_IDENTIFY_QUERY_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_IDENTIFY_QUERY_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_identify_query); } esp_matter_command_t *esp_matter_command_create_add_group(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_ADD_GROUP_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_ADD_GROUP_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_add_group); } esp_matter_command_t *esp_matter_command_create_view_group(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_VIEW_GROUP_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_VIEW_GROUP_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_view_group); } esp_matter_command_t *esp_matter_command_create_get_group_membership(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_GET_GROUP_MEMBERSHIP_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_GET_GROUP_MEMBERSHIP_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_get_group_membership); } esp_matter_command_t *esp_matter_command_create_remove_group(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_REMOVE_GROUP_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_REMOVE_GROUP_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_remove_group); } esp_matter_command_t *esp_matter_command_create_remove_all_groups(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_REMOVE_ALL_GROUPS_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_REMOVE_ALL_GROUPS_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_remove_all_groups); } esp_matter_command_t *esp_matter_command_create_add_group_if_identifying(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_ADD_GROUP_IF_IDENTIFYING_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_ADD_GROUP_IF_IDENTIFYING_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_add_group_if_identifying); } esp_matter_command_t *esp_matter_command_create_add_scene(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_ADD_SCENE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_ADD_SCENE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_add_scene); } esp_matter_command_t *esp_matter_command_create_view_scene(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_VIEW_SCENE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_VIEW_SCENE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_view_scene); } esp_matter_command_t *esp_matter_command_create_remove_scene(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_REMOVE_SCENE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_REMOVE_SCENE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_remove_scene); } esp_matter_command_t *esp_matter_command_create_remove_all_scenes(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_REMOVE_ALL_SCENES_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_REMOVE_ALL_SCENES_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_remove_all_scenes); } esp_matter_command_t *esp_matter_command_create_store_scene(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_STORE_SCENE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_STORE_SCENE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_store_scene); } esp_matter_command_t *esp_matter_command_create_recall_scene(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_RECALL_SCENE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_RECALL_SCENE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_recall_scene); } esp_matter_command_t *esp_matter_command_create_get_scene_membership(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_GET_SCENE_MEMBERSHIP_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_GET_SCENE_MEMBERSHIP_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_get_scene_membership); } esp_matter_command_t *esp_matter_command_create_bind(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_BIND_COMMAND_ID, COMMAND_MASK_NONE, esp_matter_command_callback_bind); + return esp_matter_command_create(cluster, ZCL_BIND_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, + esp_matter_command_callback_bind); } esp_matter_command_t *esp_matter_command_create_unbind(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_UNBIND_COMMAND_ID, COMMAND_MASK_NONE, esp_matter_command_callback_unbind); + return esp_matter_command_create(cluster, ZCL_UNBIND_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, + esp_matter_command_callback_unbind); } esp_matter_command_t *esp_matter_command_create_off(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_OFF_COMMAND_ID, COMMAND_MASK_NONE, esp_matter_command_callback_off); + return esp_matter_command_create(cluster, ZCL_OFF_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, + esp_matter_command_callback_off); } esp_matter_command_t *esp_matter_command_create_on(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_ON_COMMAND_ID, COMMAND_MASK_NONE, esp_matter_command_callback_on); + return esp_matter_command_create(cluster, ZCL_ON_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, + esp_matter_command_callback_on); } esp_matter_command_t *esp_matter_command_create_toggle(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_TOGGLE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_TOGGLE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_toggle); } esp_matter_command_t *esp_matter_command_create_move_to_level(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_MOVE_TO_LEVEL_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_MOVE_TO_LEVEL_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_move_to_level); } esp_matter_command_t *esp_matter_command_create_move(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_MOVE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_MOVE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_move); } esp_matter_command_t *esp_matter_command_create_step(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_STEP_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_STEP_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_step); } esp_matter_command_t *esp_matter_command_create_stop(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_STOP_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_STOP_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_stop); } esp_matter_command_t *esp_matter_command_create_move_to_level_with_on_off(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_MOVE_TO_LEVEL_WITH_ON_OFF_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_MOVE_TO_LEVEL_WITH_ON_OFF_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_move_to_level_with_on_off); } esp_matter_command_t *esp_matter_command_create_move_with_on_off(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_MOVE_WITH_ON_OFF_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_MOVE_WITH_ON_OFF_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_move_with_on_off); } esp_matter_command_t *esp_matter_command_create_step_with_on_off(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_STEP_WITH_ON_OFF_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_STEP_WITH_ON_OFF_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_step_with_on_off); } esp_matter_command_t *esp_matter_command_create_stop_with_on_off(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_STOP_WITH_ON_OFF_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_STOP_WITH_ON_OFF_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_stop_with_on_off); } esp_matter_command_t *esp_matter_command_create_move_to_hue(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_MOVE_TO_HUE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_MOVE_TO_HUE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_move_to_hue); } esp_matter_command_t *esp_matter_command_create_move_hue(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_MOVE_HUE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_MOVE_HUE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_move_hue); } esp_matter_command_t *esp_matter_command_create_step_hue(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_STEP_HUE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_STEP_HUE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_step_hue); } esp_matter_command_t *esp_matter_command_create_move_to_saturation(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_MOVE_TO_SATURATION_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_MOVE_TO_SATURATION_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_move_to_saturation); } esp_matter_command_t *esp_matter_command_create_move_saturation(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_MOVE_SATURATION_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_MOVE_SATURATION_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_move_saturation); } esp_matter_command_t *esp_matter_command_create_step_saturation(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_STEP_SATURATION_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_STEP_SATURATION_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_step_saturation); } esp_matter_command_t *esp_matter_command_create_move_to_hue_and_saturation(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_MOVE_TO_HUE_AND_SATURATION_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_MOVE_TO_HUE_AND_SATURATION_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_move_to_hue_and_saturation); } esp_matter_command_t *esp_matter_command_create_setpoint_raise_lower(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_SETPOINT_RAISE_LOWER_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_SETPOINT_RAISE_LOWER_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_setpoint_raise_lower); } esp_matter_command_t *esp_matter_command_create_key_set_read_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_KEY_SET_READ_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_KEY_SET_READ_RESPONSE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_key_set_read_response); } esp_matter_command_t *esp_matter_command_create_key_set_read_all_indices_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_KEY_SET_READ_ALL_INDICES_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_KEY_SET_READ_ALL_INDICES_RESPONSE_COMMAND_ID, + ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_key_set_read_all_indices_response); } esp_matter_command_t *esp_matter_command_create_arm_fail_safe_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_ARM_FAIL_SAFE_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_ARM_FAIL_SAFE_RESPONSE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_arm_fail_safe_response); } esp_matter_command_t *esp_matter_command_create_set_regulatory_config_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_SET_REGULATORY_CONFIG_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_SET_REGULATORY_CONFIG_RESPONSE_COMMAND_ID, + ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_set_regulatory_config_response); } esp_matter_command_t *esp_matter_command_create_commissioning_complete_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_COMMISSIONING_COMPLETE_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_COMMISSIONING_COMPLETE_RESPONSE_COMMAND_ID, + ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_commissioning_complete_response); } esp_matter_command_t *esp_matter_command_create_scan_networks_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_SCAN_NETWORKS_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_SCAN_NETWORKS_RESPONSE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_scan_networks_response); } esp_matter_command_t *esp_matter_command_create_network_config_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_NETWORK_CONFIG_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_NETWORK_CONFIG_RESPONSE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_network_config_response); } esp_matter_command_t *esp_matter_command_create_connect_network_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_CONNECT_NETWORK_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_CONNECT_NETWORK_RESPONSE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_connect_network_response); } esp_matter_command_t *esp_matter_command_create_attestation_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_ATTESTATION_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_ATTESTATION_RESPONSE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_attestation_response); } esp_matter_command_t *esp_matter_command_create_certificate_chain_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_CERTIFICATE_CHAIN_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_CERTIFICATE_CHAIN_RESPONSE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_certificate_chain_response); } esp_matter_command_t *esp_matter_command_create_csr_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_OP_CSR_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_OP_CSR_RESPONSE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_csr_response); } esp_matter_command_t *esp_matter_command_create_noc_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_NOC_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_NOC_RESPONSE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_noc_response); } esp_matter_command_t *esp_matter_command_create_query_image_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_QUERY_IMAGE_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_QUERY_IMAGE_RESPONSE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_query_image_response); } esp_matter_command_t *esp_matter_command_create_apply_update_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_APPLY_UPDATE_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_APPLY_UPDATE_RESPONSE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_apply_update_response); } esp_matter_command_t *esp_matter_command_create_identify_query_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_IDENTIFY_QUERY_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_IDENTIFY_QUERY_RESPONSE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_identify_query_response); } esp_matter_command_t *esp_matter_command_create_add_group_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_ADD_GROUP_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_ADD_GROUP_RESPONSE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_add_group_response); } esp_matter_command_t *esp_matter_command_create_view_group_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_VIEW_GROUP_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_VIEW_GROUP_RESPONSE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_view_group_response); } esp_matter_command_t *esp_matter_command_create_get_group_membership_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_GET_GROUP_MEMBERSHIP_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_GET_GROUP_MEMBERSHIP_RESPONSE_COMMAND_ID, + ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_get_group_membership_response); } esp_matter_command_t *esp_matter_command_create_remove_group_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_REMOVE_GROUP_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_REMOVE_GROUP_RESPONSE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_remove_group_response); } esp_matter_command_t *esp_matter_command_create_add_scene_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_ADD_SCENE_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_ADD_SCENE_RESPONSE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_add_scene_response); } esp_matter_command_t *esp_matter_command_create_view_scene_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_VIEW_SCENE_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_VIEW_SCENE_RESPONSE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_view_scene_response); } esp_matter_command_t *esp_matter_command_create_remove_scene_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_REMOVE_SCENE_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_REMOVE_SCENE_RESPONSE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_remove_scene_response); } esp_matter_command_t *esp_matter_command_create_remove_all_scenes_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_REMOVE_ALL_SCENES_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_REMOVE_ALL_SCENES_RESPONSE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_remove_all_scenes_response); } esp_matter_command_t *esp_matter_command_create_store_scene_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_STORE_SCENE_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_STORE_SCENE_RESPONSE_COMMAND_ID, ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_store_scene_response); } esp_matter_command_t *esp_matter_command_create_get_scene_membership_response(esp_matter_cluster_t *cluster) { - return esp_matter_command_create(cluster, ZCL_GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_ID, COMMAND_MASK_NONE, + return esp_matter_command_create(cluster, ZCL_GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_ID, + ESP_MATTER_COMMAND_FLAG_NONE, esp_matter_command_callback_get_scene_membership_response); } diff --git a/components/esp_matter/esp_matter_core.cpp b/components/esp_matter/esp_matter_core.cpp index 70e20f248..196d72cda 100644 --- a/components/esp_matter/esp_matter_core.cpp +++ b/components/esp_matter/esp_matter_core.cpp @@ -662,7 +662,7 @@ esp_matter_attribute_t *esp_matter_attribute_create(esp_matter_cluster_t *cluste /* Set */ attribute->attribute_id = attribute_id; attribute->flags = flags; - attribute->flags |= ATTRIBUTE_MASK_EXTERNAL_STORAGE; + attribute->flags |= ESP_MATTER_ATTRIBUTE_FLAG_EXTERNAL_STORAGE; attribute->val = val; /* Add */ @@ -806,8 +806,8 @@ esp_err_t esp_matter_endpoint_delete(esp_matter_node_t *node, esp_matter_endpoin _esp_matter_node_t *current_node = (_esp_matter_node_t *)node; _esp_matter_endpoint_t *_endpoint = (_esp_matter_endpoint_t *)endpoint; - if (!(_endpoint->flags & ENDPOINT_MASK_DELETABLE)) { - ESP_LOGE(TAG, "This endpoint cannot be deleted since the ENDPOINT_MASK_DELETABLE is not set"); + if (!(_endpoint->flags & ESP_MATTER_ENDPOINT_FLAG_DELETABLE)) { + ESP_LOGE(TAG, "This endpoint cannot be deleted since the ESP_MATTER_ENDPOINT_FLAG_DELETABLE is not set"); return ESP_FAIL; } diff --git a/components/esp_matter/esp_matter_endpoint.cpp b/components/esp_matter/esp_matter_endpoint.cpp index 75bc60496..22904e678 100644 --- a/components/esp_matter/esp_matter_endpoint.cpp +++ b/components/esp_matter/esp_matter_endpoint.cpp @@ -29,19 +29,23 @@ esp_matter_endpoint_t *esp_matter_endpoint_create_root_node(esp_matter_node_t *n } esp_matter_endpoint_set_device_type_id(endpoint, ESP_MATTER_ROOT_NODE_DEVICE_TYPE_ID); - esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_access_control(endpoint, &(config->access_control), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_basic(endpoint, &(config->basic), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_ota_provider(endpoint, &(config->ota_provider), CLUSTER_MASK_CLIENT); - esp_matter_cluster_create_ota_requestor(endpoint, &(config->ota_requestor), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_general_commissioning(endpoint, &(config->general_commissioning), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_network_commissioning(endpoint, &(config->network_commissioning), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_general_diagnostics(endpoint, &(config->general_diagnostics), CLUSTER_MASK_SERVER); + esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_access_control(endpoint, &(config->access_control), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_basic(endpoint, &(config->basic), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_ota_provider(endpoint, &(config->ota_provider), ESP_MATTER_CLUSTER_FLAG_CLIENT); + esp_matter_cluster_create_ota_requestor(endpoint, &(config->ota_requestor), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_general_commissioning(endpoint, &(config->general_commissioning), + ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_network_commissioning(endpoint, &(config->network_commissioning), + ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_general_diagnostics(endpoint, &(config->general_diagnostics), + ESP_MATTER_CLUSTER_FLAG_SERVER); esp_matter_cluster_create_administrator_commissioning(endpoint, &(config->administrator_commissioning), - CLUSTER_MASK_SERVER); + ESP_MATTER_CLUSTER_FLAG_SERVER); esp_matter_cluster_create_operational_credentials(endpoint, &(config->operational_credentials), - CLUSTER_MASK_SERVER); - esp_matter_cluster_create_group_key_management(endpoint, &(config->group_key_management), CLUSTER_MASK_SERVER); + ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_group_key_management(endpoint, &(config->group_key_management), + ESP_MATTER_CLUSTER_FLAG_SERVER); return endpoint; } @@ -57,12 +61,12 @@ esp_matter_endpoint_t *esp_matter_endpoint_create_on_off_light(esp_matter_node_t } esp_matter_endpoint_set_device_type_id(endpoint, ESP_MATTER_ON_OFF_LIGHT_DEVICE_TYPE_ID); - esp_matter_cluster_create_identify(endpoint, &(config->identify), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_groups(endpoint, &(config->groups), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_scenes(endpoint, &(config->scenes), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_on_off(endpoint, &(config->on_off), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_basic(endpoint, &(config->basic), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), CLUSTER_MASK_SERVER); + esp_matter_cluster_create_identify(endpoint, &(config->identify), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_groups(endpoint, &(config->groups), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_scenes(endpoint, &(config->scenes), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_on_off(endpoint, &(config->on_off), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_basic(endpoint, &(config->basic), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), ESP_MATTER_CLUSTER_FLAG_SERVER); return endpoint; } @@ -78,13 +82,13 @@ esp_matter_endpoint_t *esp_matter_endpoint_create_dimmable_light(esp_matter_node } esp_matter_endpoint_set_device_type_id(endpoint, ESP_MATTER_DIMMABLE_LIGHT_DEVICE_TYPE_ID); - esp_matter_cluster_create_identify(endpoint, &(config->identify), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_groups(endpoint, &(config->groups), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_scenes(endpoint, &(config->scenes), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_on_off(endpoint, &(config->on_off), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_level_control(endpoint, &(config->level_control), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_basic(endpoint, &(config->basic), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), CLUSTER_MASK_SERVER); + esp_matter_cluster_create_identify(endpoint, &(config->identify), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_groups(endpoint, &(config->groups), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_scenes(endpoint, &(config->scenes), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_on_off(endpoint, &(config->on_off), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_level_control(endpoint, &(config->level_control), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_basic(endpoint, &(config->basic), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), ESP_MATTER_CLUSTER_FLAG_SERVER); return endpoint; } @@ -100,14 +104,14 @@ esp_matter_endpoint_t *esp_matter_endpoint_create_color_dimmable_light(esp_matte } esp_matter_endpoint_set_device_type_id(endpoint, ESP_MATTER_COLOR_DIMMABLE_LIGHT_DEVICE_TYPE_ID); - esp_matter_cluster_create_identify(endpoint, &(config->identify), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_groups(endpoint, &(config->groups), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_scenes(endpoint, &(config->scenes), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_on_off(endpoint, &(config->on_off), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_level_control(endpoint, &(config->level_control), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_basic(endpoint, &(config->basic), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_color_control(endpoint, &(config->color_control), CLUSTER_MASK_SERVER); + esp_matter_cluster_create_identify(endpoint, &(config->identify), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_groups(endpoint, &(config->groups), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_scenes(endpoint, &(config->scenes), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_on_off(endpoint, &(config->on_off), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_level_control(endpoint, &(config->level_control), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_basic(endpoint, &(config->basic), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_color_control(endpoint, &(config->color_control), ESP_MATTER_CLUSTER_FLAG_SERVER); return endpoint; } @@ -123,13 +127,13 @@ esp_matter_endpoint_t *esp_matter_endpoint_create_on_off_switch(esp_matter_node_ } esp_matter_endpoint_set_device_type_id(endpoint, ESP_MATTER_ON_OFF_SWITCH_DEVICE_TYPE_ID); - esp_matter_cluster_create_identify(endpoint, &(config->identify), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_groups(endpoint, &(config->groups), CLUSTER_MASK_CLIENT); - esp_matter_cluster_create_scenes(endpoint, &(config->scenes), CLUSTER_MASK_CLIENT); - esp_matter_cluster_create_on_off(endpoint, &(config->on_off), CLUSTER_MASK_CLIENT); - esp_matter_cluster_create_basic(endpoint, &(config->basic), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_binding(endpoint, &(config->binding), CLUSTER_MASK_SERVER); + esp_matter_cluster_create_identify(endpoint, &(config->identify), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_groups(endpoint, &(config->groups), ESP_MATTER_CLUSTER_FLAG_CLIENT); + esp_matter_cluster_create_scenes(endpoint, &(config->scenes), ESP_MATTER_CLUSTER_FLAG_CLIENT); + esp_matter_cluster_create_on_off(endpoint, &(config->on_off), ESP_MATTER_CLUSTER_FLAG_CLIENT); + esp_matter_cluster_create_basic(endpoint, &(config->basic), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_binding(endpoint, &(config->binding), ESP_MATTER_CLUSTER_FLAG_SERVER); return endpoint; } @@ -145,12 +149,12 @@ esp_matter_endpoint_t *esp_matter_endpoint_create_thermostat(esp_matter_node_t * } esp_matter_endpoint_set_device_type_id(endpoint, ESP_MATTER_THERMOSTAT_DEVICE_TYPE_ID); - esp_matter_cluster_create_identify(endpoint, &(config->identify), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_groups(endpoint, &(config->groups), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_scenes(endpoint, &(config->scenes), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_basic(endpoint, &(config->basic), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_thermostat(endpoint, &(config->thermostat), CLUSTER_MASK_SERVER); + esp_matter_cluster_create_identify(endpoint, &(config->identify), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_groups(endpoint, &(config->groups), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_scenes(endpoint, &(config->scenes), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_basic(endpoint, &(config->basic), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_thermostat(endpoint, &(config->thermostat), ESP_MATTER_CLUSTER_FLAG_SERVER); return endpoint; } @@ -160,7 +164,7 @@ esp_matter_endpoint_t *esp_matter_endpoint_create_bridged_node(esp_matter_node_t uint8_t flags) { // bridged node endpoints are always deletable - esp_matter_endpoint_t *endpoint = esp_matter_endpoint_create_raw(node, flags | ENDPOINT_MASK_DELETABLE); + esp_matter_endpoint_t *endpoint = esp_matter_endpoint_create_raw(node, flags | ESP_MATTER_ENDPOINT_FLAG_DELETABLE); if (!endpoint) { ESP_LOGE(TAG, "Could not create endpoint"); return NULL; @@ -168,9 +172,10 @@ esp_matter_endpoint_t *esp_matter_endpoint_create_bridged_node(esp_matter_node_t esp_matter_endpoint_set_device_type_id(endpoint, ESP_MATTER_BRIDGED_NODE_DEVICE_TYPE_ID); - esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_bridged_device_basic(endpoint, &(config->bridged_device_basic), CLUSTER_MASK_SERVER); - esp_matter_cluster_create_fixed_label(endpoint, &(config->fixed_label), CLUSTER_MASK_SERVER); + esp_matter_cluster_create_descriptor(endpoint, &(config->descriptor), ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_bridged_device_basic(endpoint, &(config->bridged_device_basic), + ESP_MATTER_CLUSTER_FLAG_SERVER); + esp_matter_cluster_create_fixed_label(endpoint, &(config->fixed_label), ESP_MATTER_CLUSTER_FLAG_SERVER); return endpoint; } @@ -186,7 +191,7 @@ esp_matter_node_t *esp_matter_node_create(esp_matter_node_config_t *config, esp_ return NULL; } - esp_matter_endpoint_create_root_node(node, &(config->root_node), ENDPOINT_MASK_NONE); + esp_matter_endpoint_create_root_node(node, &(config->root_node), ESP_MATTER_ENDPOINT_FLAG_NONE); return node; } diff --git a/examples/light/main/app_main.cpp b/examples/light/main/app_main.cpp index 53461c9cb..c4ecda53f 100644 --- a/examples/light/main/app_main.cpp +++ b/examples/light/main/app_main.cpp @@ -60,7 +60,7 @@ extern "C" void app_main() /* Create matter device */ esp_matter_node_t *node = esp_matter_node_create(&node_config, app_attribute_update_cb, NULL); esp_matter_endpoint_t *endpoint = esp_matter_endpoint_create_color_dimmable_light(node, &light_config, - ENDPOINT_MASK_NONE); + ESP_MATTER_ENDPOINT_FLAG_NONE); light_endpoint_id = esp_matter_endpoint_get_id(endpoint); /** These node and endpoint handles can be used to create and add other endpoints and other clusters to the endpoints. diff --git a/examples/rainmaker_light/main/app_main.cpp b/examples/rainmaker_light/main/app_main.cpp index 0d24b1002..38d911597 100644 --- a/examples/rainmaker_light/main/app_main.cpp +++ b/examples/rainmaker_light/main/app_main.cpp @@ -61,7 +61,7 @@ extern "C" void app_main() /* Create matter device */ esp_matter_node_t *node = esp_matter_node_create(&node_config, app_attribute_update_cb, NULL); esp_matter_endpoint_t *endpoint = esp_matter_endpoint_create_color_dimmable_light(node, &light_config, - ENDPOINT_MASK_NONE); + ESP_MATTER_ENDPOINT_FLAG_NONE); light_endpoint_id = esp_matter_endpoint_get_id(endpoint); /** These node and endpoint handles can be used to create and add other endpoints and other clusters to the endpoints. diff --git a/examples/switch/main/app_main.cpp b/examples/switch/main/app_main.cpp index 123d16c53..0208fa873 100644 --- a/examples/switch/main/app_main.cpp +++ b/examples/switch/main/app_main.cpp @@ -60,7 +60,8 @@ extern "C" void app_main() /* Create matter device */ esp_matter_node_t *node = esp_matter_node_create(&node_config, app_attribute_update_cb, NULL); - esp_matter_endpoint_t *endpoint = esp_matter_endpoint_create_on_off_switch(node, &switch_config, ENDPOINT_MASK_NONE); + esp_matter_endpoint_t *endpoint = esp_matter_endpoint_create_on_off_switch(node, &switch_config, + ESP_MATTER_ENDPOINT_FLAG_NONE); switch_endpoint_id = esp_matter_endpoint_get_id(endpoint); /** These node and endpoint handles can be used to create and add other endpoints and other clusters to the endpoints.