[components/esp-matter] Remove features parameter from cluster::creater() API and make component spec complient.

This commit is contained in:
Rohit
2025-05-13 16:10:07 +05:30
parent 080c9e7efc
commit 8027319b76
4 changed files with 159 additions and 130 deletions
+9 -1
View File
@@ -1,10 +1,18 @@
# 13-May-2025
API Change.
Removed the `features` parameter from the `cluster::create()` API to make it consistent across all clusters.
The new API signature is:
```
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
```
# 3-Feb-2024
Cluster structure change.
- `feature_flags` are now part of `cluster::config` to configure the features in the application.
- moved `features::config` frome `cluster::config` to `cluster::config::features` structure.
# 27-December-2024
Added ``matter esp factoryreset`` command to factory reset a Matter device.
+31 -31
View File
@@ -498,7 +498,7 @@ namespace administrator_commissioning {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, AdministratorCommissioning::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, AdministratorCommissioning::Id));
@@ -762,7 +762,7 @@ namespace unit_localization {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, UnitLocalization::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, UnitLocalization::Id));
@@ -828,7 +828,7 @@ namespace power_source {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, PowerSource::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, PowerSource::Id));
@@ -879,7 +879,7 @@ namespace icd_management {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, IcdManagement::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, IcdManagement::Id));
@@ -1127,7 +1127,7 @@ const function_generic_t function_list[] = {
};
const int function_flags = CLUSTER_FLAG_INIT_FUNCTION | CLUSTER_FLAG_SHUTDOWN_FUNCTION;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, OnOff::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, OnOff::Id));
@@ -1183,7 +1183,7 @@ const function_generic_t function_list[] = {
};
const int function_flags = CLUSTER_FLAG_INIT_FUNCTION | CLUSTER_FLAG_SHUTDOWN_FUNCTION;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, LevelControl::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, LevelControl::Id));
@@ -1242,7 +1242,7 @@ const function_generic_t function_list[] = {
};
const int function_flags = CLUSTER_FLAG_INIT_FUNCTION | CLUSTER_FLAG_SHUTDOWN_FUNCTION;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, ColorControl::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, ColorControl::Id));
@@ -1379,7 +1379,7 @@ const function_generic_t function_list[] = {
};
const int function_flags = CLUSTER_FLAG_INIT_FUNCTION | CLUSTER_FLAG_PRE_ATTRIBUTE_CHANGED_FUNCTION;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, Thermostat::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, Thermostat::Id));
@@ -2037,7 +2037,7 @@ const function_generic_t function_list[] = {
};
const int function_flags = CLUSTER_FLAG_PRE_ATTRIBUTE_CHANGED_FUNCTION;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, LaundryWasherControls::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, LaundryWasherControls::Id));
@@ -2332,7 +2332,7 @@ const function_generic_t function_list[] = {
};
const int function_flags = CLUSTER_FLAG_ATTRIBUTE_CHANGED_FUNCTION;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, WindowCovering::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, WindowCovering::Id));
@@ -2644,7 +2644,7 @@ namespace boolean_state_configuration {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, BooleanStateConfiguration::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, BooleanStateConfiguration::Id));
@@ -2730,7 +2730,7 @@ const function_generic_t function_list[] = {
(function_generic_t)MatterTimeFormatLocalizationClusterServerPreAttributeChangedCallback};
const int function_flags = CLUSTER_FLAG_INIT_FUNCTION | CLUSTER_FLAG_PRE_ATTRIBUTE_CHANGED_FUNCTION;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, TimeFormatLocalization::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, TimeFormatLocalization::Id));
@@ -2959,7 +2959,7 @@ const function_generic_t function_list[] = {
};
const int function_flags = CLUSTER_FLAG_INIT_FUNCTION;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, ModeSelect::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, ModeSelect::Id));
@@ -3037,7 +3037,7 @@ namespace software_diagnostics {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, SoftwareDiagnostics::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, SoftwareDiagnostics::Id));
@@ -3066,7 +3066,7 @@ namespace temperature_control {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, TemperatureControl::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, TemperatureControl::Id));
@@ -3285,7 +3285,7 @@ namespace microwave_oven_control {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, MicrowaveOvenControl::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, MicrowaveOvenControl::Id));
@@ -3412,7 +3412,7 @@ namespace power_topology {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, PowerTopology::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, PowerTopology::Id));
@@ -3455,7 +3455,7 @@ namespace electrical_power_measurement {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, ElectricalPowerMeasurement::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, ElectricalPowerMeasurement::Id));
@@ -3513,7 +3513,7 @@ namespace electrical_energy_measurement {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, ElectricalEnergyMeasurement::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, ElectricalEnergyMeasurement::Id));
@@ -3601,7 +3601,7 @@ namespace energy_evse {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, EnergyEvse::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, EnergyEvse::Id));
@@ -3661,7 +3661,7 @@ namespace valve_configuration_and_control {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, ValveConfigurationAndControl::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, ValveConfigurationAndControl::Id));
@@ -3716,7 +3716,7 @@ namespace device_energy_management {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, DeviceEnergyManagement::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, DeviceEnergyManagement::Id));
@@ -3824,7 +3824,7 @@ namespace application_basic {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, ApplicationBasic::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, ApplicationBasic::Id));
@@ -3862,7 +3862,7 @@ namespace thread_border_router_management {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, ThreadBorderRouterManagement::Id, flags);
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster"));
@@ -3907,7 +3907,7 @@ namespace wifi_network_management {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, WiFiNetworkManagement::Id, flags);
if (!cluster) {
@@ -3941,7 +3941,7 @@ namespace thread_network_directory {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, ThreadNetworkDirectory::Id, flags);
if (!cluster) {
@@ -3977,7 +3977,7 @@ namespace service_area {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, ServiceArea::Id, flags);
if (!cluster) {
@@ -4026,7 +4026,7 @@ namespace water_heater_management {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, WaterHeaterManagement::Id, flags);
if (!cluster) {
@@ -4116,7 +4116,7 @@ namespace energy_preference {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, EnergyPreference::Id, flags);
if (!cluster) {
@@ -4161,7 +4161,7 @@ namespace commissioner_control {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, CommissionerControl::Id, flags);
if (!cluster) {
@@ -4203,7 +4203,7 @@ namespace ecosystem_information {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features)
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
{
cluster_t *cluster = cluster::create(endpoint, EcosystemInformation::Id, flags);
if (!cluster) {
+25 -27
View File
@@ -167,7 +167,7 @@ typedef struct config {
} features;
config() : feature_flags(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* software_diagnostics */
namespace administrator_commissioning {
@@ -175,7 +175,7 @@ typedef struct config {
uint32_t feature_flags;
config() : feature_flags(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* administrator_commissioning */
namespace operational_credentials {
@@ -237,7 +237,7 @@ typedef struct config {
config() : feature_flags(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* unit_localization */
namespace bridged_device_basic_information {
@@ -264,8 +264,7 @@ typedef struct config {
uint32_t feature_flags;
config() : status(0), order(0), description{0}, feature_flags(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* power_source */
namespace icd_management {
@@ -276,8 +275,7 @@ typedef struct config {
uint32_t feature_flags;
config() : feature_flags(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* icd_management */
namespace user_label {
@@ -326,7 +324,7 @@ typedef struct config {
config() : on_off(false), feature_flags(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* on_off */
namespace level_control {
@@ -342,7 +340,7 @@ typedef struct config {
config() : current_level(), on_level(), options(0), feature_flags(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* level_control */
namespace color_control {
@@ -364,7 +362,7 @@ typedef struct config {
color_capabilities(0), number_of_primaries(0), feature_flags(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* color_control */
namespace fan_control {
@@ -405,7 +403,7 @@ typedef struct config {
config() : local_temperature(), control_sequence_of_operation(4), system_mode(1), feature_flags(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* thermostat */
namespace thermostat_user_interface_configuration {
@@ -724,7 +722,7 @@ typedef struct config {
config(uint8_t end_product_type = 0) : type(0), config_status(0), operational_status(0), end_product_type(end_product_type), mode(0), feature_flags(0), delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* window_covering */
namespace switch_cluster {
@@ -798,7 +796,7 @@ typedef struct config {
config() : feature_flags(0), delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* boolean_state */
namespace localization_configuration {
@@ -820,7 +818,7 @@ typedef struct config {
config() : hour_format(0), feature_flags(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* time_format_localization */
namespace illuminance_measurement {
@@ -900,7 +898,7 @@ typedef struct config {
config() : mode_select_description{0}, standard_namespace(), current_mode(0), feature_flags(0), delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* mode_select */
namespace temperature_control {
@@ -914,7 +912,7 @@ typedef struct config {
config() : feature_flags(0) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* temperature_control */
namespace refrigerator_alarm {
@@ -975,7 +973,7 @@ typedef struct config {
config() : feature_flags(0), delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* microwave_oven_control */
namespace rvc_operational_state {
@@ -1000,7 +998,7 @@ typedef struct config {
config() : feature_flags(0), delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* power_topology */
namespace electrical_power_measurement {
@@ -1010,7 +1008,7 @@ typedef struct config {
config() : feature_flags(0), delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* electrical_power_measurement */
namespace electrical_energy_measurement {
@@ -1020,7 +1018,7 @@ typedef struct config {
config() : feature_flags(0), delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* electrical_energy_measurement */
namespace energy_evse_mode {
@@ -1040,7 +1038,7 @@ typedef struct config {
config() : feature_flags(0), delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* energy_evse */
namespace valve_configuration_and_control {
@@ -1058,7 +1056,7 @@ typedef struct config {
config() : open_duration(), default_open_duration(), current_state(), target_state(), feature_flags(0), delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* valve_configuration_and_control */
namespace device_energy_management {
@@ -1068,7 +1066,7 @@ typedef struct config {
config() : feature_flags(0), delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* device_energy_management */
namespace device_energy_management_mode {
@@ -1097,7 +1095,7 @@ typedef struct config {
config() : feature_flags(0), delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* thread_border_router_management */
namespace wifi_network_management {
@@ -1117,7 +1115,7 @@ typedef struct config {
config() : feature_flags(0), delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* service_area */
namespace water_heater_management {
@@ -1134,7 +1132,7 @@ typedef struct config {
config() : heater_types(0), heat_demand(0), boost_state(0), feature_flags(0), delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* water_heater_management */
namespace water_heater_mode {
@@ -1158,7 +1156,7 @@ typedef struct config {
config() : feature_flags(0), delegate(nullptr) {}
} config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags, uint32_t features);
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* energy_preference */
namespace commissioner_control {
+94 -71
View File
@@ -71,14 +71,13 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
general_commissioning::create(endpoint, &(config->general_commissioning), CLUSTER_FLAG_SERVER);
network_commissioning::create(endpoint, &(config->network_commissioning), CLUSTER_FLAG_SERVER);
general_diagnostics::create(endpoint, &(config->general_diagnostics), CLUSTER_FLAG_SERVER);
administrator_commissioning::create(endpoint, &(config->administrator_commissioning), CLUSTER_FLAG_SERVER,
ESP_MATTER_NONE_FEATURE_ID);
administrator_commissioning::create(endpoint, &(config->administrator_commissioning), CLUSTER_FLAG_SERVER);
operational_credentials::create(endpoint, &(config->operational_credentials), CLUSTER_FLAG_SERVER);
group_key_management::create(endpoint, CLUSTER_FLAG_SERVER);
#if CHIP_CONFIG_ENABLE_ICD_SERVER
if (icd::get_icd_server_enabled()) {
icd_management::create(endpoint, &(config->icd_management), CLUSTER_FLAG_SERVER,
config->icd_management.feature_flags |=
#if CHIP_CONFIG_ENABLE_ICD_LIT
icd_management::feature::long_idle_time_support::get_id() |
#if CHIP_CONFIG_ENABLE_ICD_CIP
@@ -88,7 +87,8 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
icd_management::feature::user_active_mode_trigger::get_id() |
#endif // CHIP_CONFIG_ENABLE_ICD_UAT
#endif // CHIP_CONFIG_ENABLE_ICD_LIT
0);
0;
icd_management::create(endpoint, &(config->icd_management), CLUSTER_FLAG_SERVER);
}
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
return ESP_OK;
@@ -189,7 +189,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
esp_err_t err = add_device_type(endpoint, get_device_type_id(), get_device_type_version());
VerifyOrReturnError(err == ESP_OK, err);
cluster_t *cluster = power_source::create(endpoint, &(config->power_source), CLUSTER_FLAG_SERVER, ESP_MATTER_NONE_FEATURE_ID);
cluster_t *cluster = power_source::create(endpoint, &(config->power_source), CLUSTER_FLAG_SERVER);
if (!cluster) {
return ESP_ERR_INVALID_STATE;
}
@@ -223,7 +223,8 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
cluster_t *identify_cluster = identify::create(endpoint, &(config->identify), CLUSTER_FLAG_SERVER);
identify::command::create_trigger_effect(identify_cluster);
groups::create(endpoint, &(config->groups), CLUSTER_FLAG_SERVER);
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER, on_off::feature::lighting::get_id());
config->on_off.feature_flags |= on_off::feature::lighting::get_id();
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER);
return ESP_OK;
}
@@ -254,9 +255,11 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
cluster_t *identify_cluster = identify::create(endpoint, &(config->identify), CLUSTER_FLAG_SERVER);
identify::command::create_trigger_effect(identify_cluster);
groups::create(endpoint, &(config->groups), CLUSTER_FLAG_SERVER);
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER, on_off::feature::lighting::get_id());
level_control::create(endpoint, &(config->level_control), CLUSTER_FLAG_SERVER,
level_control::feature::on_off::get_id() | level_control::feature::lighting::get_id());
config->on_off.feature_flags |= on_off::feature::lighting::get_id();
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER);
// Set the mandatory feature flags in the config structure
config->level_control.feature_flags |= level_control::feature::on_off::get_id() | level_control::feature::lighting::get_id();
level_control::create(endpoint, &(config->level_control), CLUSTER_FLAG_SERVER);
return ESP_OK;
}
@@ -286,15 +289,17 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
cluster_t *identify_cluster = identify::create(endpoint, &(config->identify), CLUSTER_FLAG_SERVER);
identify::command::create_trigger_effect(identify_cluster);
groups::create(endpoint, &(config->groups), CLUSTER_FLAG_SERVER);
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER, on_off::feature::lighting::get_id());
level_control::create(endpoint, &(config->level_control), CLUSTER_FLAG_SERVER,
level_control::feature::on_off::get_id() | level_control::feature::lighting::get_id());
color_control::create(endpoint, &(config->color_control), CLUSTER_FLAG_SERVER,
color_control::feature::color_temperature::get_id());
config->on_off.feature_flags |= on_off::feature::lighting::get_id();
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER);
// Set the mandatory feature flags in the config structure
config->level_control.feature_flags |= level_control::feature::on_off::get_id() | level_control::feature::lighting::get_id();
level_control::create(endpoint, &(config->level_control), CLUSTER_FLAG_SERVER);
// Set the mandatory feature flags in the config structure
config->color_control.feature_flags |= color_control::feature::color_temperature::get_id();
color_control::create(endpoint, &(config->color_control), CLUSTER_FLAG_SERVER);
return ESP_OK;
}
} /* color_temperature_light */
namespace extended_color_light {
@@ -321,13 +326,15 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
cluster_t *identify_cluster = identify::create(endpoint, &(config->identify), CLUSTER_FLAG_SERVER);
identify::command::create_trigger_effect(identify_cluster);
groups::create(endpoint, &(config->groups), CLUSTER_FLAG_SERVER);
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER, on_off::feature::lighting::get_id());
level_control::create(endpoint, &(config->level_control), CLUSTER_FLAG_SERVER,
level_control::feature::on_off::get_id() | level_control::feature::lighting::get_id());
color_control::create(endpoint, &(config->color_control), CLUSTER_FLAG_SERVER,
color_control::feature::color_temperature::get_id() | color_control::feature::xy::get_id());
config->on_off.feature_flags |= on_off::feature::lighting::get_id();
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER);
// Set the mandatory feature flags in the config structure
config->level_control.feature_flags |= level_control::feature::on_off::get_id() | level_control::feature::lighting::get_id();
level_control::create(endpoint, &(config->level_control), CLUSTER_FLAG_SERVER);
// Set the mandatory feature flags in the config structure
config->color_control.feature_flags |= color_control::feature::color_temperature::get_id() | color_control::feature::xy::get_id();
color_control::create(endpoint, &(config->color_control), CLUSTER_FLAG_SERVER);
return ESP_OK;
}
} /* extended_color_light */
@@ -359,7 +366,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
VerifyOrReturnError(err == ESP_OK, err);
identify::create(endpoint, &(config->identify), CLUSTER_FLAG_SERVER | CLUSTER_FLAG_CLIENT);
on_off::create(endpoint, NULL, CLUSTER_FLAG_CLIENT, ESP_MATTER_NONE_FEATURE_ID);
on_off::create(endpoint, NULL, CLUSTER_FLAG_CLIENT);
return ESP_OK;
}
@@ -393,8 +400,8 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
VerifyOrReturnError(err == ESP_OK, err);
identify::create(endpoint, &(config->identify), CLUSTER_FLAG_SERVER | CLUSTER_FLAG_CLIENT);
on_off::create(endpoint, NULL, CLUSTER_FLAG_CLIENT, ESP_MATTER_NONE_FEATURE_ID);
level_control::create(endpoint, NULL, CLUSTER_FLAG_CLIENT, ESP_MATTER_NONE_FEATURE_ID);
on_off::create(endpoint, NULL, CLUSTER_FLAG_CLIENT);
level_control::create(endpoint, NULL, CLUSTER_FLAG_CLIENT);
return ESP_OK;
}
@@ -429,9 +436,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
VerifyOrReturnError(err == ESP_OK, err);
identify::create(endpoint, &(config->identify), CLUSTER_FLAG_SERVER | CLUSTER_FLAG_CLIENT);
on_off::create(endpoint, NULL, CLUSTER_FLAG_CLIENT, ESP_MATTER_NONE_FEATURE_ID);
level_control::create(endpoint, NULL, CLUSTER_FLAG_CLIENT, ESP_MATTER_NONE_FEATURE_ID);
color_control::create(endpoint, NULL, CLUSTER_FLAG_CLIENT, ESP_MATTER_NONE_FEATURE_ID);
on_off::create(endpoint, NULL, CLUSTER_FLAG_CLIENT);
level_control::create(endpoint, NULL, CLUSTER_FLAG_CLIENT);
color_control::create(endpoint, NULL, CLUSTER_FLAG_CLIENT);
return ESP_OK;
}
@@ -489,7 +496,8 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
cluster_t *identify_cluster = identify::create(endpoint, &(config->identify), CLUSTER_FLAG_SERVER);
identify::command::create_trigger_effect(identify_cluster);
groups::create(endpoint, &(config->groups), CLUSTER_FLAG_SERVER);
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER, on_off::feature::lighting::get_id());
config->on_off.feature_flags |= on_off::feature::lighting::get_id();
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER);
return ESP_OK;
}
@@ -519,9 +527,10 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
cluster_t *identify_cluster = identify::create(endpoint, &(config->identify), CLUSTER_FLAG_SERVER);
identify::command::create_trigger_effect(identify_cluster);
groups::create(endpoint, &(config->groups), CLUSTER_FLAG_SERVER);
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER, on_off::feature::lighting::get_id());
level_control::create(endpoint, &(config->level_control), CLUSTER_FLAG_SERVER,
level_control::feature::on_off::get_id() | level_control::feature::lighting::get_id());
config->on_off.feature_flags |= on_off::feature::lighting::get_id();
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER);
config->level_control.feature_flags |= level_control::feature::on_off::get_id() | level_control::feature::lighting::get_id();
level_control::create(endpoint, &(config->level_control), CLUSTER_FLAG_SERVER);
return ESP_OK;
}
@@ -579,8 +588,8 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
identify::create(endpoint, &(config->identify), CLUSTER_FLAG_SERVER);
groups::create(endpoint, &(config->groups), CLUSTER_FLAG_SERVER);
cluster::thermostat::create(endpoint, &(config->thermostat), CLUSTER_FLAG_SERVER, cluster::thermostat::feature::cooling::get_id()
| cluster::thermostat::feature::heating::get_id());
config->thermostat.feature_flags |= cluster::thermostat::feature::heating::get_id();
cluster::thermostat::create(endpoint, &(config->thermostat), CLUSTER_FLAG_SERVER);
return ESP_OK;
}
@@ -640,9 +649,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
identify::create(endpoint, &(config->identify), CLUSTER_FLAG_SERVER | CLUSTER_FLAG_CLIENT);
groups::create(endpoint, NULL, CLUSTER_FLAG_CLIENT);
on_off::create(endpoint, NULL, CLUSTER_FLAG_CLIENT, ESP_MATTER_NONE_FEATURE_ID);
level_control::create(endpoint, NULL, CLUSTER_FLAG_CLIENT, ESP_MATTER_NONE_FEATURE_ID);
color_control::create(endpoint, NULL, CLUSTER_FLAG_CLIENT, ESP_MATTER_NONE_FEATURE_ID);
on_off::create(endpoint, NULL, CLUSTER_FLAG_CLIENT);
level_control::create(endpoint, NULL, CLUSTER_FLAG_CLIENT);
color_control::create(endpoint, NULL, CLUSTER_FLAG_CLIENT);
return ESP_OK;
}
} /* control_bridge */
@@ -903,7 +912,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
identify::create(endpoint, &(config->identify), CLUSTER_FLAG_SERVER);
groups::create(endpoint, &(config->groups), CLUSTER_FLAG_SERVER);
window_covering::create(endpoint, &(config->window_covering), CLUSTER_FLAG_SERVER, ESP_MATTER_NONE_FEATURE_ID);
window_covering::create(endpoint, &(config->window_covering), CLUSTER_FLAG_SERVER);
return ESP_OK;
}
@@ -1129,7 +1138,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
VerifyOrReturnError(err == ESP_OK, err);
identify::create(endpoint, &(config->identify), CLUSTER_FLAG_SERVER);
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER, ESP_MATTER_NONE_FEATURE_ID);
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER);
pump_configuration_and_control::create(endpoint, &(config->pump_configuration_and_control), CLUSTER_FLAG_SERVER);
return ESP_OK;
@@ -1159,7 +1168,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
VerifyOrReturnError(err == ESP_OK, err);
identify::create(endpoint, &(config->identify), CLUSTER_FLAG_SERVER);
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_CLIENT, ESP_MATTER_NONE_FEATURE_ID);
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_CLIENT);
pump_configuration_and_control::create(endpoint, &(config->pump_configuration_and_control), CLUSTER_FLAG_CLIENT);
binding::create(endpoint, &(config->binding), CLUSTER_FLAG_SERVER);
@@ -1188,7 +1197,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
esp_err_t err = add_device_type(endpoint, get_device_type_id(), get_device_type_version());
VerifyOrReturnError(err == ESP_OK, err);
cluster_t *cluster = mode_select::create(endpoint, &(config->mode_select), CLUSTER_FLAG_SERVER, ESP_MATTER_NONE_FEATURE_ID);
cluster_t *cluster = mode_select::create(endpoint, &(config->mode_select), CLUSTER_FLAG_SERVER);
if (!cluster) {
return ESP_ERR_INVALID_STATE;
}
@@ -1221,11 +1230,12 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
VerifyOrReturnError(err == ESP_OK, err);
identify::create(endpoint, &(config->identify), CLUSTER_FLAG_SERVER);
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER, on_off::feature::dead_front_behavior::get_id());
cluster::thermostat::create(endpoint, &(config->thermostat), CLUSTER_FLAG_SERVER, cluster::thermostat::feature::cooling::get_id());
config->on_off.feature_flags |= on_off::feature::dead_front_behavior::get_id();
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER);
config->thermostat.feature_flags |= cluster::thermostat::feature::cooling::get_id();
cluster::thermostat::create(endpoint, &(config->thermostat), CLUSTER_FLAG_SERVER);
return ESP_OK;
}
} /** room_air_conditioner **/
@@ -1251,7 +1261,8 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
esp_err_t err = add_device_type(endpoint, get_device_type_id(), get_device_type_version());
VerifyOrReturnError(err == ESP_OK, err);
temperature_control::create(endpoint, &(config->temperature_control), CLUSTER_FLAG_SERVER, temperature_control::feature::temperature_number::get_id());
config->temperature_control.feature_flags |= temperature_control::feature::temperature_number::get_id();
temperature_control::create(endpoint, &(config->temperature_control), CLUSTER_FLAG_SERVER);
return ESP_OK;
}
@@ -1446,11 +1457,13 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
esp_err_t err = add_device_type(endpoint, get_device_type_id(), get_device_type_version());
VerifyOrReturnError(err == ESP_OK, err);
power_topology::create(endpoint, &(config->power_topology), CLUSTER_FLAG_SERVER,
power_topology::feature::set_topology::get_id());
electrical_power_measurement::create(endpoint, &(config->electrical_power_measurement), CLUSTER_FLAG_SERVER,
electrical_power_measurement::feature::direct_current::get_id()
| electrical_power_measurement::feature::alternating_current::get_id());
// Set the mandatory feature flags in the config structures
config->power_topology.feature_flags |= power_topology::feature::set_topology::get_id();
power_topology::create(endpoint, &(config->power_topology), CLUSTER_FLAG_SERVER);
config->electrical_power_measurement.feature_flags |= electrical_power_measurement::feature::direct_current::get_id()
| electrical_power_measurement::feature::alternating_current::get_id();
electrical_power_measurement::create(endpoint, &(config->electrical_power_measurement), CLUSTER_FLAG_SERVER);
return ESP_OK;
}
@@ -1477,7 +1490,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
esp_err_t err = add_device_type(endpoint, get_device_type_id(), get_device_type_version());
VerifyOrReturnError(err == ESP_OK, err);
temperature_control::create(endpoint, &(config->temperature_control), CLUSTER_FLAG_SERVER, ESP_MATTER_NONE_FEATURE_ID);
temperature_control::create(endpoint, &(config->temperature_control), CLUSTER_FLAG_SERVER);
return ESP_OK;
}
@@ -1504,7 +1517,8 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
esp_err_t err = add_device_type(endpoint, get_device_type_id(), get_device_type_version());
VerifyOrReturnError(err == ESP_OK, err);
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER, on_off::feature::off_only::get_id());
config->on_off.feature_flags |= on_off::feature::off_only::get_id();
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER);
return ESP_OK;
}
@@ -1531,9 +1545,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
esp_err_t err = add_device_type(endpoint, get_device_type_id(), get_device_type_version());
VerifyOrReturnError(err == ESP_OK, err);
cluster::energy_evse::create(endpoint, &(config->energy_evse), CLUSTER_FLAG_SERVER, ESP_MATTER_NONE_FEATURE_ID);
cluster::energy_evse::create(endpoint, &(config->energy_evse), CLUSTER_FLAG_SERVER);
energy_evse_mode::create(endpoint, &(config->energy_evse_mode), CLUSTER_FLAG_SERVER);
cluster::device_energy_management::create(endpoint, &(config->device_energy_management), CLUSTER_FLAG_SERVER, ESP_MATTER_NONE_FEATURE_ID);
cluster::device_energy_management::create(endpoint, &(config->device_energy_management), CLUSTER_FLAG_SERVER);
return ESP_OK;
}
@@ -1563,7 +1577,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
cluster_t *cluster = operational_state::create(endpoint, &(config->operational_state), CLUSTER_FLAG_SERVER);
operational_state::attribute::create_countdown_time(cluster, 0);
microwave_oven_mode::create(endpoint, &(config->microwave_oven_mode), CLUSTER_FLAG_SERVER);
microwave_oven_control::create(endpoint, &(config->microwave_oven_control), CLUSTER_FLAG_SERVER, ESP_MATTER_NONE_FEATURE_ID);
microwave_oven_control::create(endpoint, &(config->microwave_oven_control), CLUSTER_FLAG_SERVER);
return ESP_OK;
}
@@ -1619,7 +1633,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
VerifyOrReturnError(err == ESP_OK, err);
identify::create(endpoint, &(config->identify), CLUSTER_FLAG_SERVER);
valve_configuration_and_control::create(endpoint, &(config->valve_configuration_and_control), CLUSTER_FLAG_SERVER, ESP_MATTER_NONE_FEATURE_ID);
valve_configuration_and_control::create(endpoint, &(config->valve_configuration_and_control), CLUSTER_FLAG_SERVER);
return ESP_OK;
}
@@ -1647,7 +1661,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
esp_err_t err = add_device_type(endpoint, get_device_type_id(), get_device_type_version());
VerifyOrReturnError(err == ESP_OK, err);
cluster::device_energy_management::create(endpoint, &(config->device_energy_management), CLUSTER_FLAG_SERVER, ESP_MATTER_NONE_FEATURE_ID);
cluster::device_energy_management::create(endpoint, &(config->device_energy_management), CLUSTER_FLAG_SERVER);
device_energy_management_mode::create(endpoint, &(config->device_energy_management_mode), CLUSTER_FLAG_SERVER);
return ESP_OK;
@@ -1677,8 +1691,8 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
VerifyOrReturnError(err == ESP_OK, err);
thread_network_diagnostics::create(endpoint, &(config->thread_network_diagnostics), CLUSTER_FLAG_SERVER);
thread_border_router_management::create(endpoint, &(config->thread_border_router_management), CLUSTER_FLAG_SERVER,
thread_border_router_management::feature::pan_change::get_id());
config->thread_border_router_management.feature_flags |= thread_border_router_management::feature::pan_change::get_id();
thread_border_router_management::create(endpoint, &(config->thread_border_router_management), CLUSTER_FLAG_SERVER);
return ESP_OK;
}
@@ -1735,7 +1749,8 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
cluster_t *identify_cluster = identify::create(endpoint, &(config->identify), CLUSTER_FLAG_SERVER);
identify::command::create_trigger_effect(identify_cluster);
groups::create(endpoint, &(config->groups), CLUSTER_FLAG_SERVER);
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER, on_off::feature::lighting::get_id());
config->on_off.feature_flags |= on_off::feature::lighting::get_id();
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER);
return ESP_OK;
}
@@ -1766,9 +1781,11 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
cluster_t *identify_cluster = identify::create(endpoint, &(config->identify), CLUSTER_FLAG_SERVER);
identify::command::create_trigger_effect(identify_cluster);
groups::create(endpoint, &(config->groups), CLUSTER_FLAG_SERVER);
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER, on_off::feature::lighting::get_id());
level_control::create(endpoint, &(config->level_control), CLUSTER_FLAG_SERVER,
level_control::feature::on_off::get_id() | level_control::feature::lighting::get_id());
config->on_off.feature_flags |= on_off::feature::lighting::get_id();
on_off::create(endpoint, &(config->on_off), CLUSTER_FLAG_SERVER);
// Set the mandatory feature flags in the config structure
config->level_control.feature_flags |= level_control::feature::on_off::get_id() | level_control::feature::lighting::get_id();
level_control::create(endpoint, &(config->level_control), CLUSTER_FLAG_SERVER);
return ESP_OK;
}
@@ -1795,8 +1812,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
esp_err_t err = add_device_type(endpoint, get_device_type_id(), get_device_type_version());
VerifyOrReturnError(err == ESP_OK, err);
cluster::thermostat::create(endpoint, &(config->thermostat), CLUSTER_FLAG_SERVER, cluster::thermostat::feature::heating::get_id());
water_heater_management::create(endpoint, &(config->water_heater_management), CLUSTER_FLAG_SERVER, ESP_MATTER_NONE_FEATURE_ID);
config->thermostat.feature_flags |= cluster::thermostat::feature::heating::get_id();
cluster::thermostat::create(endpoint, &(config->thermostat), CLUSTER_FLAG_SERVER);
water_heater_management::create(endpoint, &(config->water_heater_management), CLUSTER_FLAG_SERVER);
water_heater_mode::create(endpoint, &(config->water_heater_mode), CLUSTER_FLAG_SERVER);
return ESP_OK;
@@ -1832,7 +1850,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
cluster_t *power_source_cluster = cluster::get(endpoint, PowerSource::Id);
power_source::feature::wired::add(power_source_cluster, &config->power_source_device.power_source.features.wired);
electrical_sensor::add(endpoint, &config->electrical_sensor);
electrical_energy_measurement::create(endpoint, &(config->electrical_energy_measurement), CLUSTER_FLAG_SERVER, electrical_energy_measurement::feature::exported_energy::get_id() | electrical_energy_measurement::feature::cumulative_energy::get_id());
// Set the mandatory feature flags in the config structure
config->electrical_energy_measurement.feature_flags |= electrical_energy_measurement::feature::exported_energy::get_id() | electrical_energy_measurement::feature::cumulative_energy::get_id();
electrical_energy_measurement::create(endpoint, &(config->electrical_energy_measurement), CLUSTER_FLAG_SERVER);
cluster_t *elec_power_measurement_cluster = cluster::get(endpoint, ElectricalPowerMeasurement::Id);
@@ -1840,7 +1860,6 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
electrical_power_measurement::attribute::create_voltage(elec_power_measurement_cluster, voltage);
electrical_power_measurement::attribute::create_active_current(elec_power_measurement_cluster, active_current);
return ESP_OK;
}
} /* solar_power */
@@ -1885,10 +1904,12 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
power_source::attribute::create_active_bat_charge_faults(power_source_cluster, NULL, 0, 0);
electrical_sensor::add(endpoint, &config->electrical_sensor);
electrical_energy_measurement::create(endpoint, &(config->electrical_energy_measurement), CLUSTER_FLAG_SERVER, electrical_energy_measurement::feature::exported_energy::get_id() | electrical_energy_measurement::feature::cumulative_energy::get_id());
cluster_t *elec_power_measurement_cluster = cluster::get(endpoint, ElectricalPowerMeasurement::Id);
// Set the mandatory feature flags in the config structure
config->electrical_energy_measurement.feature_flags |= electrical_energy_measurement::feature::exported_energy::get_id() | electrical_energy_measurement::feature::cumulative_energy::get_id();
electrical_energy_measurement::create(endpoint, &(config->electrical_energy_measurement), CLUSTER_FLAG_SERVER);
cluster_t *elec_power_measurement_cluster = cluster::get(endpoint, ElectricalPowerMeasurement::Id);
electrical_power_measurement::attribute::create_voltage(elec_power_measurement_cluster, config->voltage);
electrical_power_measurement::attribute::create_active_current(elec_power_measurement_cluster, config->active_current);
@@ -1936,7 +1957,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
electrical_power_measurement::attribute::create_voltage(elec_power_measurement_cluster, config->voltage);
electrical_power_measurement::attribute::create_active_current(elec_power_measurement_cluster, config->active_current);
electrical_energy_measurement::create(endpoint, &(config->electrical_energy_measurement), CLUSTER_FLAG_SERVER, electrical_energy_measurement::feature::exported_energy::get_id() | electrical_energy_measurement::feature::cumulative_energy::get_id());
// Set the mandatory feature flags in the config structure
config->electrical_energy_measurement.feature_flags |= electrical_energy_measurement::feature::exported_energy::get_id() | electrical_energy_measurement::feature::cumulative_energy::get_id();
electrical_energy_measurement::create(endpoint, &(config->electrical_energy_measurement), CLUSTER_FLAG_SERVER);
device_energy_management::add(endpoint, &config->device_energy_management);