mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 19:13:13 +00:00
components/esp_matter: Remove configs for the internally managed attributes
This commit is contained in:
@@ -1,3 +1,17 @@
|
||||
## 21-Oct-2025
|
||||
### API Changes: `feature::add()` Function
|
||||
The following APIs have been updated — the config parameter has been removed, as the corresponding attributes are internally managed and not user-configurable:
|
||||
|
||||
```
|
||||
general_commissioning::feature::terms_and_conditions::add(cluster_t *cluster);
|
||||
ethernet_network_diagnostics::feature::packet_counts::add(cluster_t *cluster);
|
||||
ethernet_network_diagnostics::feature::error_counts::add(cluster_t *cluster);
|
||||
unit_localization::feature::temperature_unit::add(cluster_t *cluster);
|
||||
water_heater_management::feature::energy_management::add(cluster_t *cluster);
|
||||
water_heater_management::feature::tank_percentage::add(cluster_t *cluster);
|
||||
|
||||
```
|
||||
|
||||
## 30-Sep-2025
|
||||
|
||||
### Namespace Changes to Align with Matter Specifications
|
||||
|
||||
@@ -201,7 +201,7 @@ uint32_t get_id()
|
||||
return (uint32_t)GeneralCommissioning::Feature::kTermsAndConditions;
|
||||
}
|
||||
|
||||
esp_err_t add(cluster_t *cluster, config_t *config)
|
||||
esp_err_t add(cluster_t *cluster)
|
||||
{
|
||||
if (!cluster) {
|
||||
ESP_LOGE(TAG, "Cluster cannot be NULL");
|
||||
@@ -209,11 +209,11 @@ esp_err_t add(cluster_t *cluster, config_t *config)
|
||||
}
|
||||
update_feature_map(cluster, get_id());
|
||||
|
||||
attribute::create_tc_accepted_version(cluster, config->tc_accepted_version);
|
||||
attribute::create_tc_min_required_version(cluster, config->tc_min_required_version);
|
||||
attribute::create_tc_acknowledgements(cluster, config->tc_acknowledgements);
|
||||
attribute::create_tc_acknowledgements_required(cluster, config->tc_acknowledgements_required);
|
||||
attribute::create_tc_update_deadline(cluster, config->tc_update_deadline);
|
||||
attribute::create_tc_accepted_version(cluster, 0);
|
||||
attribute::create_tc_min_required_version(cluster, 0);
|
||||
attribute::create_tc_acknowledgements(cluster, 0);
|
||||
attribute::create_tc_acknowledgements_required(cluster, true);
|
||||
attribute::create_tc_update_deadline(cluster, 0);
|
||||
|
||||
command::create_set_tc_acknowledgements(cluster);
|
||||
command::create_set_tc_acknowledgements_response(cluster);
|
||||
@@ -1067,7 +1067,7 @@ uint32_t get_id()
|
||||
return (uint32_t)EthernetNetworkDiagnostics::Feature::kPacketCounts;
|
||||
}
|
||||
|
||||
esp_err_t add(cluster_t *cluster, config_t *config)
|
||||
esp_err_t add(cluster_t *cluster)
|
||||
{
|
||||
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG, ESP_LOGE(TAG, "Cluster cannot be NULL"));
|
||||
update_feature_map(cluster, get_id());
|
||||
@@ -1088,15 +1088,15 @@ uint32_t get_id()
|
||||
return (uint32_t)EthernetNetworkDiagnostics::Feature::kErrorCounts;
|
||||
}
|
||||
|
||||
esp_err_t add(cluster_t *cluster, config_t *config)
|
||||
esp_err_t add(cluster_t *cluster)
|
||||
{
|
||||
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG, ESP_LOGE(TAG, "Cluster cannot be NULL"));
|
||||
update_feature_map(cluster, get_id());
|
||||
|
||||
/* Attributes managed internally */
|
||||
attribute::create_tx_error_count(cluster, config->tx_error_count);
|
||||
attribute::create_collision_count(cluster, config->collision_count);
|
||||
attribute::create_overrun_count(cluster, config->overrun_count);
|
||||
attribute::create_tx_error_count(cluster, 0);
|
||||
attribute::create_collision_count(cluster, 0);
|
||||
attribute::create_overrun_count(cluster, 0);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
@@ -1806,13 +1806,13 @@ uint32_t get_id()
|
||||
return (uint32_t)UnitLocalization::Feature::kTemperatureUnit;
|
||||
}
|
||||
|
||||
esp_err_t add(cluster_t *cluster, config_t *config)
|
||||
esp_err_t add(cluster_t *cluster)
|
||||
{
|
||||
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG, ESP_LOGE(TAG, "Cluster cannot be NULL"));
|
||||
update_feature_map(cluster, get_id());
|
||||
|
||||
/* Attributes not managed internally */
|
||||
attribute::create_temperature_unit(cluster, config->temperature_unit);
|
||||
attribute::create_temperature_unit(cluster, 0);
|
||||
attribute::create_supported_temperature_units(cluster, NULL, 0, 0);
|
||||
|
||||
return ESP_OK;
|
||||
@@ -3491,8 +3491,8 @@ esp_err_t add(cluster_t *cluster, config_t *config)
|
||||
}
|
||||
update_feature_map(cluster, get_id());
|
||||
/* attribute */
|
||||
attribute::create_tank_volume(cluster, config->tank_volume);
|
||||
attribute::create_estimated_heat_required(cluster, config->estimated_heat_required);
|
||||
attribute::create_tank_volume(cluster, 0);
|
||||
attribute::create_estimated_heat_required(cluster, 0);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
@@ -3506,7 +3506,7 @@ uint32_t get_id()
|
||||
return static_cast<uint32_t>(WaterHeaterManagement::Feature::kEnergyManagement);
|
||||
}
|
||||
|
||||
esp_err_t add(cluster_t *cluster, config_t *config)
|
||||
esp_err_t add(cluster_t *cluster)
|
||||
{
|
||||
if (!cluster) {
|
||||
ESP_LOGE(TAG, "Cluster cannot be NULL");
|
||||
@@ -3514,7 +3514,7 @@ esp_err_t add(cluster_t *cluster, config_t *config)
|
||||
}
|
||||
update_feature_map(cluster, get_id());
|
||||
/* attribute */
|
||||
attribute::create_tank_percentage(cluster, config->tank_percentage);
|
||||
attribute::create_tank_percentage(cluster, 0);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
@@ -92,17 +92,9 @@ esp_err_t add(cluster_t *cluster);
|
||||
namespace general_commissioning {
|
||||
namespace feature {
|
||||
namespace terms_and_conditions {
|
||||
typedef struct config {
|
||||
uint16_t tc_accepted_version;
|
||||
uint16_t tc_min_required_version;
|
||||
uint16_t tc_acknowledgements;
|
||||
bool tc_acknowledgements_required;
|
||||
nullable<uint32_t> tc_update_deadline;
|
||||
config(): tc_accepted_version(0), tc_min_required_version(0), tc_acknowledgements(0), tc_acknowledgements_required(true), tc_update_deadline(0) {}
|
||||
} config_t;
|
||||
|
||||
uint32_t get_id();
|
||||
esp_err_t add(cluster_t *cluster, config_t *config);
|
||||
esp_err_t add(cluster_t *cluster);
|
||||
|
||||
} /* terms_and_conditions */
|
||||
} /* feature */
|
||||
@@ -507,28 +499,15 @@ namespace feature {
|
||||
|
||||
namespace packet_counts {
|
||||
|
||||
typedef struct config {
|
||||
uint64_t packet_rx_count;
|
||||
uint64_t packet_tx_count;
|
||||
config() : packet_rx_count(0), packet_tx_count(0) {}
|
||||
} config_t;
|
||||
|
||||
uint32_t get_id();
|
||||
esp_err_t add(cluster_t *cluster, config_t *config);
|
||||
esp_err_t add(cluster_t *cluster);
|
||||
|
||||
} /* packet_counts */
|
||||
|
||||
namespace error_counts {
|
||||
|
||||
typedef struct config {
|
||||
uint64_t tx_error_count;
|
||||
uint64_t collision_count;
|
||||
uint64_t overrun_count;
|
||||
config() : tx_error_count(0), collision_count(0), overrun_count(0) {}
|
||||
} config_t;
|
||||
|
||||
uint32_t get_id();
|
||||
esp_err_t add(cluster_t *cluster, config_t *config);
|
||||
esp_err_t add(cluster_t *cluster);
|
||||
|
||||
} /* error_counts */
|
||||
|
||||
@@ -950,13 +929,8 @@ namespace feature {
|
||||
|
||||
namespace temperature_unit {
|
||||
|
||||
typedef struct config {
|
||||
uint8_t temperature_unit;
|
||||
config() : temperature_unit(0) {}
|
||||
} config_t;
|
||||
|
||||
uint32_t get_id();
|
||||
esp_err_t add(cluster_t *cluster, config_t *config);
|
||||
esp_err_t add(cluster_t *cluster);
|
||||
|
||||
} /* temperature_unit */
|
||||
|
||||
@@ -1597,26 +1571,15 @@ namespace feature {
|
||||
|
||||
namespace energy_management {
|
||||
|
||||
typedef struct config {
|
||||
uint16_t tank_volume;
|
||||
int64_t estimated_heat_required;
|
||||
config(): tank_volume(0), estimated_heat_required(0) {}
|
||||
} config_t;
|
||||
|
||||
uint32_t get_id();
|
||||
esp_err_t add(cluster_t *cluster, config_t *config);
|
||||
esp_err_t add(cluster_t *cluster);
|
||||
|
||||
} /* energy_management */
|
||||
|
||||
namespace tank_percent {
|
||||
|
||||
typedef struct config {
|
||||
uint8_t tank_percentage;
|
||||
config(): tank_percentage(0) {}
|
||||
} config_t;
|
||||
|
||||
uint32_t get_id();
|
||||
esp_err_t add(cluster_t *cluster, config_t *config);
|
||||
esp_err_t add(cluster_t *cluster);
|
||||
} /* tank_percent */
|
||||
} /* feature */
|
||||
} /* water_heater_management */
|
||||
|
||||
Reference in New Issue
Block a user