From 44650d70b3cba64170f00300d89e39ee608a8768 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Sun, 5 Jan 2025 13:10:10 -0300 Subject: [PATCH 1/6] feat(matter): adds esp_matter:: namespace to attribute_t --- libraries/Matter/src/MatterEndPoint.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/Matter/src/MatterEndPoint.h b/libraries/Matter/src/MatterEndPoint.h index 6f99aa7cd33..5baa4747d18 100644 --- a/libraries/Matter/src/MatterEndPoint.h +++ b/libraries/Matter/src/MatterEndPoint.h @@ -38,7 +38,7 @@ class MatterEndPoint { } // helper functions for attribute manipulation - attribute_t *getAttribute(uint32_t cluster_id, uint32_t attribute_id) { + esp_matter::attribute_t *getAttribute(uint32_t cluster_id, uint32_t attribute_id) { if (endpoint_id == 0) { log_e("Endpoint ID is not set"); return NULL; @@ -53,7 +53,7 @@ class MatterEndPoint { log_e("Cluster [%d] not found", cluster_id); return NULL; } - attribute_t *attribute = attribute::get(cluster, attribute_id); + esp_matter::attribute_t *attribute = attribute::get(cluster, attribute_id); if (attribute == NULL) { log_e("Attribute [%d] not found", attribute_id); return NULL; @@ -63,7 +63,7 @@ class MatterEndPoint { // get the value of an attribute from its cluster id and attribute it bool getAttributeVal(uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *attrVal) { - attribute_t *attribute = getAttribute(cluster_id, attribute_id); + esp_matter::attribute_t *attribute = getAttribute(cluster_id, attribute_id); if (attribute == NULL) { return false; } @@ -77,7 +77,7 @@ class MatterEndPoint { // set the value of an attribute from its cluster id and attribute it bool setAttributeVal(uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *attrVal) { - attribute_t *attribute = getAttribute(cluster_id, attribute_id); + esp_matter::attribute_t *attribute = getAttribute(cluster_id, attribute_id); if (attribute == NULL) { return false; } From 52d8dc6457f39614ac4adae0dd56f2a09ebc9440 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Sun, 5 Jan 2025 13:21:10 -0300 Subject: [PATCH 2/6] feat(matter): adds esp_matter:: namespace to attribute_t --- libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp b/libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp index eaaf0bf2ffe..39d79e86325 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp @@ -194,7 +194,7 @@ bool MatterColorLight::begin(bool initialState, espHsvColor_t _colorHSV) { /* Mark deferred persistence for some attributes that might be changed rapidly */ cluster_t *level_control_cluster = cluster::get(endpoint, LevelControl::Id); - attribute_t *current_level_attribute = attribute::get(level_control_cluster, LevelControl::Attributes::CurrentLevel::Id); + esp_matter::attribute_t *current_level_attribute = attribute::get(level_control_cluster, LevelControl::Attributes::CurrentLevel::Id); attribute::set_deferred_persistence(current_level_attribute); started = true; @@ -220,7 +220,7 @@ bool MatterColorLight::setOnOff(bool newState) { endpoint_t *endpoint = endpoint::get(node::get(), endpoint_id); cluster_t *cluster = cluster::get(endpoint, OnOff::Id); - attribute_t *attribute = attribute::get(cluster, OnOff::Attributes::OnOff::Id); + esp_matter::attribute_t *attribute = attribute::get(cluster, OnOff::Attributes::OnOff::Id); esp_matter_attr_val_t val = esp_matter_invalid(NULL); attribute::get_val(attribute, &val); @@ -271,7 +271,7 @@ bool MatterColorLight::setColorHSV(espHsvColor_t _hsvColor) { endpoint_t *endpoint = endpoint::get(node::get(), endpoint_id); cluster_t *cluster = cluster::get(endpoint, ColorControl::Id); // update hue - attribute_t *attribute = attribute::get(cluster, ColorControl::Attributes::CurrentHue::Id); + esp_matter::attribute_t *attribute = attribute::get(cluster, ColorControl::Attributes::CurrentHue::Id); esp_matter_attr_val_t val = esp_matter_invalid(NULL); attribute::get_val(attribute, &val); if (val.val.u8 != colorHSV.h) { From 196c965c75cf583c6b016541950ae4e5dd36a5cd Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Sun, 5 Jan 2025 13:23:04 -0300 Subject: [PATCH 3/6] feat(matter): adds esp_matter:: namespace to attribute_t --- .../MatterEndpoints/MatterColorTemperatureLight.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/Matter/src/MatterEndpoints/MatterColorTemperatureLight.cpp b/libraries/Matter/src/MatterEndpoints/MatterColorTemperatureLight.cpp index 5ef69749bb1..3c4fccfa046 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterColorTemperatureLight.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterColorTemperatureLight.cpp @@ -122,11 +122,11 @@ bool MatterColorTemperatureLight::begin(bool initialState, uint8_t brightness, u /* Mark deferred persistence for some attributes that might be changed rapidly */ cluster_t *level_control_cluster = cluster::get(endpoint, LevelControl::Id); - attribute_t *current_level_attribute = attribute::get(level_control_cluster, LevelControl::Attributes::CurrentLevel::Id); + esp_matter::attribute_t *current_level_attribute = attribute::get(level_control_cluster, LevelControl::Attributes::CurrentLevel::Id); attribute::set_deferred_persistence(current_level_attribute); cluster_t *color_control_cluster = cluster::get(endpoint, ColorControl::Id); - attribute_t *color_temp_attribute = attribute::get(color_control_cluster, ColorControl::Attributes::ColorTemperatureMireds::Id); + esp_matter::attribute_t *color_temp_attribute = attribute::get(color_control_cluster, ColorControl::Attributes::ColorTemperatureMireds::Id); attribute::set_deferred_persistence(color_temp_attribute); started = true; @@ -152,7 +152,7 @@ bool MatterColorTemperatureLight::setOnOff(bool newState) { endpoint_t *endpoint = endpoint::get(node::get(), endpoint_id); cluster_t *cluster = cluster::get(endpoint, OnOff::Id); - attribute_t *attribute = attribute::get(cluster, OnOff::Attributes::OnOff::Id); + esp_matter::attribute_t *attribute = attribute::get(cluster, OnOff::Attributes::OnOff::Id); esp_matter_attr_val_t val = esp_matter_invalid(NULL); attribute::get_val(attribute, &val); @@ -193,7 +193,7 @@ bool MatterColorTemperatureLight::setBrightness(uint8_t newBrightness) { endpoint_t *endpoint = endpoint::get(node::get(), endpoint_id); cluster_t *cluster = cluster::get(endpoint, LevelControl::Id); - attribute_t *attribute = attribute::get(cluster, LevelControl::Attributes::CurrentLevel::Id); + esp_matter::attribute_t *attribute = attribute::get(cluster, LevelControl::Attributes::CurrentLevel::Id); esp_matter_attr_val_t val = esp_matter_invalid(NULL); attribute::get_val(attribute, &val); @@ -224,7 +224,7 @@ bool MatterColorTemperatureLight::setColorTemperature(uint16_t newTemperature) { endpoint_t *endpoint = endpoint::get(node::get(), endpoint_id); cluster_t *cluster = cluster::get(endpoint, ColorControl::Id); - attribute_t *attribute = attribute::get(cluster, ColorControl::Attributes::ColorTemperatureMireds::Id); + esp_matter::attribute_t *attribute = attribute::get(cluster, ColorControl::Attributes::ColorTemperatureMireds::Id); esp_matter_attr_val_t val = esp_matter_invalid(NULL); attribute::get_val(attribute, &val); From e8efb1fc003cd063089082e130510bc7a5d5f5dc Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Sun, 5 Jan 2025 13:24:16 -0300 Subject: [PATCH 4/6] feat(matter): adds esp_matter:: namespace to attribute_t --- .../Matter/src/MatterEndpoints/MatterDimmableLight.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/Matter/src/MatterEndpoints/MatterDimmableLight.cpp b/libraries/Matter/src/MatterEndpoints/MatterDimmableLight.cpp index 9f6f872ca3e..5167cf1f21c 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterDimmableLight.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterDimmableLight.cpp @@ -101,7 +101,7 @@ bool MatterDimmableLight::begin(bool initialState, uint8_t brightness) { /* Mark deferred persistence for some attributes that might be changed rapidly */ cluster_t *level_control_cluster = cluster::get(endpoint, LevelControl::Id); - attribute_t *current_level_attribute = attribute::get(level_control_cluster, LevelControl::Attributes::CurrentLevel::Id); + esp_matter::attribute_t *current_level_attribute = attribute::get(level_control_cluster, LevelControl::Attributes::CurrentLevel::Id); attribute::set_deferred_persistence(current_level_attribute); started = true; @@ -127,7 +127,7 @@ bool MatterDimmableLight::setOnOff(bool newState) { endpoint_t *endpoint = endpoint::get(node::get(), endpoint_id); cluster_t *cluster = cluster::get(endpoint, OnOff::Id); - attribute_t *attribute = attribute::get(cluster, OnOff::Attributes::OnOff::Id); + esp_matter::attribute_t *attribute = attribute::get(cluster, OnOff::Attributes::OnOff::Id); esp_matter_attr_val_t val = esp_matter_invalid(NULL); attribute::get_val(attribute, &val); @@ -168,7 +168,7 @@ bool MatterDimmableLight::setBrightness(uint8_t newBrightness) { endpoint_t *endpoint = endpoint::get(node::get(), endpoint_id); cluster_t *cluster = cluster::get(endpoint, LevelControl::Id); - attribute_t *attribute = attribute::get(cluster, LevelControl::Attributes::CurrentLevel::Id); + esp_matter::attribute_t *attribute = attribute::get(cluster, LevelControl::Attributes::CurrentLevel::Id); esp_matter_attr_val_t val = esp_matter_invalid(NULL); attribute::get_val(attribute, &val); From 14159e37ae53b640f86baad50160ddc37972d03b Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Sun, 5 Jan 2025 13:25:57 -0300 Subject: [PATCH 5/6] feat(matter): adds esp_matter:: namespace to attribute_t --- .../src/MatterEndpoints/MatterEnhancedColorLight.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/Matter/src/MatterEndpoints/MatterEnhancedColorLight.cpp b/libraries/Matter/src/MatterEndpoints/MatterEnhancedColorLight.cpp index 022e62654df..9b245fb9408 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterEnhancedColorLight.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterEnhancedColorLight.cpp @@ -214,7 +214,7 @@ bool MatterEnhancedColorLight::begin(bool initialState, espHsvColor_t _colorHSV, /* Mark deferred persistence for some attributes that might be changed rapidly */ cluster_t *level_control_cluster = cluster::get(endpoint, LevelControl::Id); - attribute_t *current_level_attribute = attribute::get(level_control_cluster, LevelControl::Attributes::CurrentLevel::Id); + esp_matter::attribute_t *current_level_attribute = attribute::get(level_control_cluster, LevelControl::Attributes::CurrentLevel::Id); attribute::set_deferred_persistence(current_level_attribute); started = true; @@ -240,7 +240,7 @@ bool MatterEnhancedColorLight::setOnOff(bool newState) { endpoint_t *endpoint = endpoint::get(node::get(), endpoint_id); cluster_t *cluster = cluster::get(endpoint, OnOff::Id); - attribute_t *attribute = attribute::get(cluster, OnOff::Attributes::OnOff::Id); + esp_matter::attribute_t *attribute = attribute::get(cluster, OnOff::Attributes::OnOff::Id); esp_matter_attr_val_t val = esp_matter_invalid(NULL); attribute::get_val(attribute, &val); @@ -281,7 +281,7 @@ bool MatterEnhancedColorLight::setBrightness(uint8_t newBrightness) { endpoint_t *endpoint = endpoint::get(node::get(), endpoint_id); cluster_t *cluster = cluster::get(endpoint, LevelControl::Id); - attribute_t *attribute = attribute::get(cluster, LevelControl::Attributes::CurrentLevel::Id); + esp_matter::attribute_t *attribute = attribute::get(cluster, LevelControl::Attributes::CurrentLevel::Id); esp_matter_attr_val_t val = esp_matter_invalid(NULL); attribute::get_val(attribute, &val); @@ -312,7 +312,7 @@ bool MatterEnhancedColorLight::setColorTemperature(uint16_t newTemperature) { endpoint_t *endpoint = endpoint::get(node::get(), endpoint_id); cluster_t *cluster = cluster::get(endpoint, ColorControl::Id); - attribute_t *attribute = attribute::get(cluster, ColorControl::Attributes::ColorTemperatureMireds::Id); + esp_matter::attribute_t *attribute = attribute::get(cluster, ColorControl::Attributes::ColorTemperatureMireds::Id); esp_matter_attr_val_t val = esp_matter_invalid(NULL); attribute::get_val(attribute, &val); @@ -353,7 +353,7 @@ bool MatterEnhancedColorLight::setColorHSV(espHsvColor_t _hsvColor) { endpoint_t *endpoint = endpoint::get(node::get(), endpoint_id); cluster_t *cluster = cluster::get(endpoint, ColorControl::Id); // update hue - attribute_t *attribute = attribute::get(cluster, ColorControl::Attributes::CurrentHue::Id); + esp_matter::attribute_t *attribute = attribute::get(cluster, ColorControl::Attributes::CurrentHue::Id); esp_matter_attr_val_t val = esp_matter_invalid(NULL); attribute::get_val(attribute, &val); if (val.val.u8 != colorHSV.h) { From 0ab998e176aef58b250e9e6d649c3a4a08f8b247 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Sun, 5 Jan 2025 13:26:50 -0300 Subject: [PATCH 6/6] feat(matter): adds esp_matter:: namespace to attribute_t --- libraries/Matter/src/MatterEndpoints/MatterOnOffLight.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Matter/src/MatterEndpoints/MatterOnOffLight.cpp b/libraries/Matter/src/MatterEndpoints/MatterOnOffLight.cpp index 3faba821528..f400390f9a7 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterOnOffLight.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterOnOffLight.cpp @@ -108,7 +108,7 @@ bool MatterOnOffLight::setOnOff(bool newState) { endpoint_t *endpoint = endpoint::get(node::get(), endpoint_id); cluster_t *cluster = cluster::get(endpoint, OnOff::Id); - attribute_t *attribute = attribute::get(cluster, OnOff::Attributes::OnOff::Id); + esp_matter::attribute_t *attribute = attribute::get(cluster, OnOff::Attributes::OnOff::Id); esp_matter_attr_val_t val = esp_matter_invalid(NULL); attribute::get_val(attribute, &val);