From 4a317697a43ae24fd5a625c6c68ec2a16151babd Mon Sep 17 00:00:00 2001 From: mahesh Date: Mon, 6 Oct 2025 11:25:55 +0530 Subject: [PATCH] docs: update release notes and docs for the namespace changes components/esp-matter: ota_provider and ota_requstor device type namespace changes examples: use modified namespaces --- RELEASE_NOTES.md | 35 +++++++++++++++++++ .../data_model/esp_matter_endpoint.cpp | 8 ++--- .../data_model/esp_matter_endpoint.h | 8 ++--- components/esp_matter/esp_matter_ota.cpp | 4 +-- docs/en/developing.rst | 12 +++---- examples/light_switch/main/app_main.cpp | 4 +-- .../main/app_main.cpp | 4 +-- examples/ota_provider/main/app_main.cpp | 8 ++--- 8 files changed, 59 insertions(+), 24 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 2a43dc3f8..0f9c60c7b 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,37 @@ +## 30-Sep-2025 + +### Namespace Changes to Align with Matter Specifications + +#### Cluster namespace changes +- `ota_requestor` → `ota_software_update_requestor` +- `ota_provider` → `ota_software_update_provider` + +#### Device type namespace changes +- `on_off_switch` → `on_off_light_switch` +- `power_source_device` → `power_source` +- `window_covering_device` → `window_covering` +- `mode_select_device` → `mode_select` + +### Namespace Changes for Consistency + +- `on_off_plugin_unit` → `on_off_plug_in_unit` +- `dimmable_plugin_unit` -> `dimmable_plug_in_unit` +- `descriptor::feature::taglist` → `descriptor::feature::tag_list` +- `color_temperature_light::color_temperature::startup_color_temperature_mireds` → `color_temperature_light::color_temperature::start_up_color_temperature_mireds` + +### Note + +The following namespaces exist in both the `cluster` and `device_type` namespaces: + +- `window_covering` +- `power_source` +- `mode_select` + +To avoid ambiguity, please reference them explicitly depending on context. For example: + +- Use `endpoint::window_covering::create()` to create the **endpoint** +- Use `cluster::window_covering::create()` to create the **cluster** + # 2-Sep-2025 API change. @@ -5,6 +39,7 @@ API change. Move the macros `REMAP_TO_RANGE()` and `REMAP_TO_RANGE_INVERSE()` to from the `esp_matter_attribute_utils.h` to `common_macros.h` in `examples/common/utils` directory. + # 10-June-2025 API Change. diff --git a/components/esp_matter/data_model/esp_matter_endpoint.cpp b/components/esp_matter/data_model/esp_matter_endpoint.cpp index c061ccad2..4b57229fc 100644 --- a/components/esp_matter/data_model/esp_matter_endpoint.cpp +++ b/components/esp_matter/data_model/esp_matter_endpoint.cpp @@ -93,7 +93,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config) } } /* root_node */ -namespace ota_software_update_requestor{ +namespace ota_requestor { uint32_t get_device_type_id() { return ESP_MATTER_OTA_REQUESTOR_DEVICE_TYPE_ID; @@ -133,9 +133,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config) #endif } -} /** ota_software_update_requestor **/ +} /** ota_requestor **/ -namespace ota_software_update_provider{ +namespace ota_provider { uint32_t get_device_type_id() { return ESP_MATTER_OTA_PROVIDER_DEVICE_TYPE_ID; @@ -164,7 +164,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config) return ESP_OK; } -} /** ota_software_update_provider **/ +} /** ota_provider **/ namespace power_source{ uint32_t get_device_type_id() diff --git a/components/esp_matter/data_model/esp_matter_endpoint.h b/components/esp_matter/data_model/esp_matter_endpoint.h index 9d5f14576..2cda94425 100644 --- a/components/esp_matter/data_model/esp_matter_endpoint.h +++ b/components/esp_matter/data_model/esp_matter_endpoint.h @@ -216,7 +216,7 @@ endpoint_t *create(node_t *node, config_t *config, uint8_t flags, void *priv_dat esp_err_t add(endpoint_t *endpoint, config_t *config); } /* root_node */ -namespace ota_software_update_requestor{ +namespace ota_requestor { typedef struct config { cluster::descriptor::config_t descriptor; cluster::ota_software_update_requestor::config_t ota_software_update_requestor; @@ -226,9 +226,9 @@ uint32_t get_device_type_id(); uint8_t get_device_type_version(); endpoint_t *create(node_t *node, config_t *config, uint8_t flags, void *priv_data); esp_err_t add(endpoint_t *endpoint, config_t *config); -} /* ota_software_update_requestor */ +} /* ota_requestor */ -namespace ota_software_update_provider{ +namespace ota_provider { typedef struct config { cluster::descriptor::config_t descriptor; cluster::ota_software_update_provider::config_t ota_software_update_provider; @@ -238,7 +238,7 @@ uint32_t get_device_type_id(); uint8_t get_device_type_version(); endpoint_t *create(node_t *node, config_t *config, uint8_t flags, void *priv_data); esp_err_t add(endpoint_t *endpoint, config_t *config); -} /* ota_software_update_provider */ +} /* ota_provider */ namespace power_source{ typedef struct config { diff --git a/components/esp_matter/esp_matter_ota.cpp b/components/esp_matter/esp_matter_ota.cpp index fb2ebb590..e733a7a5e 100644 --- a/components/esp_matter/esp_matter_ota.cpp +++ b/components/esp_matter/esp_matter_ota.cpp @@ -57,7 +57,7 @@ static esp_matter_ota_requestor_impl_t s_ota_requestor_impl = { esp_err_t esp_matter_ota_requestor_init(void) { #if (CONFIG_ENABLE_OTA_REQUESTOR && (FIXED_ENDPOINT_COUNT == 0)) - endpoint::ota_software_update_requestor::config_t config; + endpoint::ota_requestor::config_t config; node_t *root_node = esp_matter::node::get(); endpoint_t *root_node_endpoint = esp_matter::endpoint::get(root_node, 0); @@ -65,7 +65,7 @@ esp_err_t esp_matter_ota_requestor_init(void) return ESP_FAIL; } - return endpoint::ota_software_update_requestor::add(root_node_endpoint, &config); + return endpoint::ota_requestor::add(root_node_endpoint, &config); #else return ESP_ERR_NOT_SUPPORTED; #endif diff --git a/docs/en/developing.rst b/docs/en/developing.rst index 35e4d6a2d..0bf362680 100644 --- a/docs/en/developing.rst +++ b/docs/en/developing.rst @@ -791,14 +791,14 @@ creating in the *app_main.cpp* of the example. Examples: door_lock::config_t door_lock_config; endpoint_t *endpoint = door_lock::create(node, &door_lock_config, ENDPOINT_FLAG_NONE); -- window_covering_device: +- window_covering: :: - window_covering_device::config_t window_covering_device_config(static_cast(chip::app::Clusters::WindowCovering::EndProductType::kTiltOnlyInteriorBlind)); - endpoint_t *endpoint = window_covering_device::create(node, &window_covering_config, ENDPOINT_FLAG_NONE); + window_covering::config_t window_covering_config(static_cast(chip::app::Clusters::WindowCovering::EndProductType::kTiltOnlyInteriorBlind)); + endpoint_t *endpoint = endpoint::window_covering::create(node, &window_covering_config, ENDPOINT_FLAG_NONE); - The ``window_covering_device`` ``config_t`` structure includes a constructor that allows specifying + The ``window_covering`` ``config_t`` structure includes a constructor that allows specifying an end product type different than the default one, which is "Roller shade". Once a ``config_t`` instance has been instantiated, its end product type cannot be modified. @@ -915,12 +915,12 @@ For example: Thermostat cluster has O.a+ conformance for Heating and Cooling fea Optional features which are applicable to a cluster can also be added. -- feature: taglist: Descriptor cluster: +- feature: tag_list: Descriptor cluster: :: cluster_t* cluster = cluster::get(endpoint, Descriptor::Id); - descriptor::feature::taglist::add(cluster); + descriptor::feature::tag_list::add(cluster); 2.5.3 Adding custom data model fields ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/examples/light_switch/main/app_main.cpp b/examples/light_switch/main/app_main.cpp index 82c538420..8b3c9034b 100644 --- a/examples/light_switch/main/app_main.cpp +++ b/examples/light_switch/main/app_main.cpp @@ -173,8 +173,8 @@ extern "C" void app_main() cluster::time_synchronization::feature::time_zone::add(time_sync_cluster, &tz_cfg); #endif - on_off_switch::config_t switch_config; - endpoint_t *endpoint = on_off_switch::create(node, &switch_config, ENDPOINT_FLAG_NONE, switch_handle); + on_off_light_switch::config_t switch_config; + endpoint_t *endpoint = on_off_light_switch::create(node, &switch_config, ENDPOINT_FLAG_NONE, switch_handle); ABORT_APP_ON_FAILURE(endpoint != nullptr, ESP_LOGE(TAG, "Failed to create on off switch endpoint")); /* Add group cluster to the switch endpoint */ diff --git a/examples/multiple_on_off_plugin_units/main/app_main.cpp b/examples/multiple_on_off_plugin_units/main/app_main.cpp index cbbb85e7e..8bc215bb4 100644 --- a/examples/multiple_on_off_plugin_units/main/app_main.cpp +++ b/examples/multiple_on_off_plugin_units/main/app_main.cpp @@ -177,9 +177,9 @@ static esp_err_t create_plug(gpio_plug* plug, node_t* node) } } - on_off_plugin_unit::config_t plugin_unit_config; + on_off_plug_in_unit::config_t plugin_unit_config; plugin_unit_config.on_off.on_off = false; - endpoint_t *endpoint = on_off_plugin_unit::create(node, &plugin_unit_config, ENDPOINT_FLAG_NONE, plug); + endpoint_t *endpoint = on_off_plug_in_unit::create(node, &plugin_unit_config, ENDPOINT_FLAG_NONE, plug); if (!endpoint) { ESP_LOGE(TAG, "Matter endpoint creation failed"); diff --git a/examples/ota_provider/main/app_main.cpp b/examples/ota_provider/main/app_main.cpp index aae199fd6..a7adfcd4a 100644 --- a/examples/ota_provider/main/app_main.cpp +++ b/examples/ota_provider/main/app_main.cpp @@ -27,9 +27,9 @@ uint16_t switch_endpoint_id = 0; using namespace esp_matter; using namespace esp_matter::attribute; using namespace esp_matter::endpoint; -using namespace esp_matter::ota_software_update_provider; +using namespace esp_matter::ota_provider; using namespace chip::app::Clusters; -using chip::app::Clusters::OtaSoftwareUpdateProviderDelegate; +using chip::app::Clusters::OTAProviderDelegate; static void app_event_cb(const ChipDeviceEvent *event, intptr_t arg) { @@ -54,8 +54,8 @@ extern "C" void app_main() node_t *node = node::create(&node_config, NULL, NULL); endpoint_t *root_node_endpoint = endpoint::get(node, 0); cluster::ota_software_update_provider::config_t config; - EspOtaSoftwareUpdateProvider::GetInstance().Init(true); - config.delegate = &EspOtaSoftwareUpdateProvider::GetInstance(); + EspOtaProvider::GetInstance().Init(true); + config.delegate = &EspOtaProvider::GetInstance(); cluster_t *ota_provider_cluster = cluster::ota_software_update_provider::create(root_node_endpoint, &config, CLUSTER_FLAG_SERVER); if (!node || !root_node_endpoint || !ota_provider_cluster) { ESP_LOGE(TAG, "Failed to create data model");