diff --git a/components/esp_matter/data_model/esp_matter_attribute.cpp b/components/esp_matter/data_model/esp_matter_attribute.cpp index be673fe24..ec0a7e380 100644 --- a/components/esp_matter/data_model/esp_matter_attribute.cpp +++ b/components/esp_matter/data_model/esp_matter_attribute.cpp @@ -327,7 +327,7 @@ attribute_t *create_binding(cluster_t *cluster, uint8_t *value, uint16_t length, } /* attribute */ } /* binding */ -namespace ota_requestor { +namespace ota_software_update_requestor { namespace attribute { attribute_t *create_default_ota_providers(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count) @@ -356,7 +356,7 @@ attribute_t *create_update_state_progress(cluster_t *cluster, nullable } } /* attribute */ -} /* ota_requestor */ +} /* ota_software_update_requestor */ namespace general_commissioning { namespace attribute { @@ -1687,7 +1687,7 @@ attribute_t *create_couple_color_temp_to_level_min_mireds(cluster_t *cluster, ui ATTRIBUTE_FLAG_NONE, esp_matter_uint16(value)); } -attribute_t *create_startup_color_temperature_mireds(cluster_t *cluster, nullable value) +attribute_t *create_start_up_color_temperature_mireds(cluster_t *cluster, nullable value) { return esp_matter::attribute::create(cluster, ColorControl::Attributes::StartUpColorTemperatureMireds::Id, ATTRIBUTE_FLAG_NULLABLE | ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_NONVOLATILE, diff --git a/components/esp_matter/data_model/esp_matter_attribute.h b/components/esp_matter/data_model/esp_matter_attribute.h index 2ff8c9bcc..f268ca955 100644 --- a/components/esp_matter/data_model/esp_matter_attribute.h +++ b/components/esp_matter/data_model/esp_matter_attribute.h @@ -109,14 +109,14 @@ attribute_t *create_binding(cluster_t *cluster, uint8_t *value, uint16_t length, } /* attribute */ } /* binding */ -namespace ota_requestor { +namespace ota_software_update_requestor { namespace attribute { attribute_t *create_default_ota_providers(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count); attribute_t *create_update_possible(cluster_t *cluster, bool value); attribute_t *create_update_state(cluster_t *cluster, uint8_t value); attribute_t *create_update_state_progress(cluster_t *cluster, nullable value); } /* attribute */ -} /* ota_requestor */ +} /* ota_software_update_requestor */ namespace general_commissioning { namespace attribute { @@ -438,7 +438,7 @@ attribute_t *create_color_temperature_mireds(cluster_t *cluster, uint16_t value) attribute_t *create_color_temp_physical_min_mireds(cluster_t *cluster, uint16_t value); attribute_t *create_color_temp_physical_max_mireds(cluster_t *cluster, uint16_t value); attribute_t *create_couple_color_temp_to_level_min_mireds(cluster_t *cluster, uint16_t value); -attribute_t *create_startup_color_temperature_mireds(cluster_t *cluster, nullable value); +attribute_t *create_start_up_color_temperature_mireds(cluster_t *cluster, nullable value); attribute_t *create_current_x(cluster_t *cluster, uint16_t value); attribute_t *create_current_y(cluster_t *cluster, uint16_t value); attribute_t *create_drift_compensation(cluster_t *cluster, uint8_t value); diff --git a/components/esp_matter/data_model/esp_matter_cluster.cpp b/components/esp_matter/data_model/esp_matter_cluster.cpp index 6660bf780..2eafd1e69 100644 --- a/components/esp_matter/data_model/esp_matter_cluster.cpp +++ b/components/esp_matter/data_model/esp_matter_cluster.cpp @@ -358,7 +358,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags) } } /* binding */ -namespace ota_provider { +namespace ota_software_update_provider { const function_generic_t *function_list = NULL; const int function_flags = CLUSTER_FLAG_NONE; @@ -369,7 +369,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags) if (flags & CLUSTER_FLAG_SERVER) { if (config -> delegate != nullptr) { - static const auto delegate_init_cb = OtaProviderDelegateInitCB; + static const auto delegate_init_cb = OtaSoftwareUpdateProviderDelegateInitCB; set_delegate_and_init_callback(cluster, delegate_init_cb, config->delegate); } static const auto plugin_server_init_cb = CALL_ONCE(MatterOtaSoftwareUpdateProviderPluginServerInitCallback); @@ -394,9 +394,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags) return cluster; } -} /* ota_provider */ +} /* ota_software_update_provider */ -namespace ota_requestor { +namespace ota_software_update_requestor { const function_generic_t *function_list = NULL; const int function_flags = CLUSTER_FLAG_NONE; @@ -435,7 +435,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags) return cluster; } -} /* ota_requestor */ +} /* ota_software_update_requestor */ namespace general_commissioning { const function_generic_t *function_list = NULL; diff --git a/components/esp_matter/data_model/esp_matter_cluster.h b/components/esp_matter/data_model/esp_matter_cluster.h index b13ae0913..7c4580cb9 100644 --- a/components/esp_matter/data_model/esp_matter_cluster.h +++ b/components/esp_matter/data_model/esp_matter_cluster.h @@ -103,15 +103,15 @@ using config_t = common::config_t; cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags); } /* binding */ -namespace ota_provider { +namespace ota_software_update_provider { typedef struct config { void *delegate; config() : delegate(nullptr) {} } config_t; cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags); -} /* ota_provider */ +} /* ota_software_update_provider */ -namespace ota_requestor { +namespace ota_software_update_requestor { typedef struct config { bool update_possible; uint8_t update_state; @@ -120,7 +120,7 @@ typedef struct config { } config_t; cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags); -} /* ota_requestor */ +} /* ota_software_update_requestor */ namespace general_commissioning { typedef struct config { diff --git a/components/esp_matter/data_model/esp_matter_command.cpp b/components/esp_matter/data_model/esp_matter_command.cpp index a4f929492..2d76ba406 100644 --- a/components/esp_matter/data_model/esp_matter_command.cpp +++ b/components/esp_matter/data_model/esp_matter_command.cpp @@ -1966,7 +1966,7 @@ command_t *create_sign_vid_verification_response(cluster_t *cluster) } /* command */ } /* operational_credentials */ -namespace ota_provider { +namespace ota_software_update_provider { namespace command { command_t *create_query_image(cluster_t *cluster) @@ -2000,9 +2000,9 @@ command_t *create_apply_update_response(cluster_t *cluster) } } /* command */ -} /* ota_provider */ +} /* ota_software_update_provider */ -namespace ota_requestor { +namespace ota_software_update_requestor { namespace command { command_t *create_announce_ota_provider(cluster_t *cluster) @@ -2012,7 +2012,7 @@ command_t *create_announce_ota_provider(cluster_t *cluster) } } /* command */ -} /* ota_requestor */ +} /* ota_software_update_requestor */ namespace identify { namespace command { diff --git a/components/esp_matter/data_model/esp_matter_command.h b/components/esp_matter/data_model/esp_matter_command.h index 190467827..c92b14e7c 100644 --- a/components/esp_matter/data_model/esp_matter_command.h +++ b/components/esp_matter/data_model/esp_matter_command.h @@ -160,7 +160,7 @@ command_t *create_sign_vid_verification_response(cluster_t *cluster); } /* command */ } /* operational_credentials */ -namespace ota_provider { +namespace ota_software_update_provider { namespace command { command_t *create_query_image(cluster_t *cluster); command_t *create_apply_update_request(cluster_t *cluster); @@ -168,13 +168,13 @@ command_t *create_notify_update_applied(cluster_t *cluster); command_t *create_query_image_response(cluster_t *cluster); command_t *create_apply_update_response(cluster_t *cluster); } /* command */ -} /* ota_provider */ +} /* ota_software_update_provider */ -namespace ota_requestor { +namespace ota_software_update_requestor { namespace command { command_t *create_announce_ota_provider(cluster_t *cluster); } /* command */ -} /* ota_requestor */ +} /* ota_software_update_requestor */ namespace identify { namespace command { diff --git a/components/esp_matter/data_model/esp_matter_delegate_callbacks.cpp b/components/esp_matter/data_model/esp_matter_delegate_callbacks.cpp index beb0201f0..e76034dd6 100644 --- a/components/esp_matter/data_model/esp_matter_delegate_callbacks.cpp +++ b/components/esp_matter/data_model/esp_matter_delegate_callbacks.cpp @@ -524,7 +524,7 @@ void ThermostatDelegateInitCB(void *delegate, uint16_t endpoint_id) Thermostat::SetDefaultDelegate(endpoint_id, thermostat_delegate); } -void OtaProviderDelegateInitCB(void *delegate, uint16_t endpoint_id) +void OtaSoftwareUpdateProviderDelegateInitCB(void *delegate, uint16_t endpoint_id) { VerifyOrReturn(delegate != nullptr); chip::app::Clusters::OTAProvider::SetDelegate(endpoint_id, static_cast(delegate)); diff --git a/components/esp_matter/data_model/esp_matter_delegate_callbacks.h b/components/esp_matter/data_model/esp_matter_delegate_callbacks.h index 8378b4cb3..1aced6b06 100644 --- a/components/esp_matter/data_model/esp_matter_delegate_callbacks.h +++ b/components/esp_matter/data_model/esp_matter_delegate_callbacks.h @@ -53,7 +53,7 @@ void EnergyPreferenceDelegateInitCB(void *delegate, uint16_t endpoint_id); void CommissionerControlDelegateInitCB(void *delegate, uint16_t endpoint_id); void ActionsDelegateInitCB(void *delegate, uint16_t endpoint_id); void ThermostatDelegateInitCB(void *delegate, uint16_t endpoint_id); -void OtaProviderDelegateInitCB(void *delegate, uint16_t endpoint_id); +void OtaSoftwareUpdateProviderDelegateInitCB(void *delegate, uint16_t endpoint_id); void DiagnosticLogsDelegateInitCB(void *delegate, uint16_t endpoint_id); } // namespace delegate_cb diff --git a/components/esp_matter/data_model/esp_matter_endpoint.cpp b/components/esp_matter/data_model/esp_matter_endpoint.cpp index b2e3e6702..c061ccad2 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_requestor{ +namespace ota_software_update_requestor{ uint32_t get_device_type_id() { return ESP_MATTER_OTA_REQUESTOR_DEVICE_TYPE_ID; @@ -120,8 +120,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); - cluster_t *cluster_p = cluster::ota_provider::create(endpoint, NULL, CLUSTER_FLAG_CLIENT); - cluster_t *cluster_r = cluster::ota_requestor::create(endpoint, &(config->ota_requestor), CLUSTER_FLAG_SERVER); + cluster_t *cluster_p = cluster::ota_software_update_provider::create(endpoint, NULL, CLUSTER_FLAG_CLIENT); + cluster_t *cluster_r = cluster::ota_software_update_requestor::create(endpoint, &(config->ota_software_update_requestor), CLUSTER_FLAG_SERVER); if (!cluster_p || !cluster_r) { return ESP_FAIL; } @@ -133,9 +133,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config) #endif } -} /** ota_requestor **/ +} /** ota_software_update_requestor **/ -namespace ota_provider{ +namespace ota_software_update_provider{ uint32_t get_device_type_id() { return ESP_MATTER_OTA_PROVIDER_DEVICE_TYPE_ID; @@ -156,7 +156,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 = cluster::ota_provider::create(endpoint, &(config->ota_provider), CLUSTER_FLAG_SERVER); + cluster_t *cluster = cluster::ota_software_update_provider::create(endpoint, &(config->ota_software_update_provider), CLUSTER_FLAG_SERVER); if (!cluster) { return ESP_FAIL; } @@ -164,9 +164,9 @@ esp_err_t add(endpoint_t *endpoint, config_t *config) return ESP_OK; } -} /** ota_provider **/ +} /** ota_software_update_provider **/ -namespace power_source_device{ +namespace power_source{ uint32_t get_device_type_id() { return ESP_MATTER_POWER_SOURCE_DEVICE_TYPE_ID; @@ -187,7 +187,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); + cluster_t *cluster = cluster::power_source::create(endpoint, &(config->power_source), CLUSTER_FLAG_SERVER); if (!cluster) { return ESP_ERR_INVALID_STATE; } @@ -195,7 +195,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config) return ESP_OK; } -} /** power_source_device **/ +} /** power_source **/ namespace on_off_light { uint32_t get_device_type_id() @@ -360,15 +360,15 @@ esp_err_t add(endpoint_t *endpoint, config_t *config) } } /* extended_color_light */ -namespace on_off_switch { +namespace on_off_light_switch { uint32_t get_device_type_id() { - return ESP_MATTER_ON_OFF_SWITCH_DEVICE_TYPE_ID; + return ESP_MATTER_ON_OFF_LIGHT_SWITCH_DEVICE_TYPE_ID; } uint8_t get_device_type_version() { - return ESP_MATTER_ON_OFF_SWITCH_DEVICE_TYPE_VERSION; + return ESP_MATTER_ON_OFF_LIGHT_SWITCH_DEVICE_TYPE_VERSION; } endpoint_t *create(node_t *node, config_t *config, uint8_t flags, void *priv_data) @@ -392,7 +392,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config) return ESP_OK; } -} /* on_off_switch */ +} /* on_off_light_switch */ namespace dimmer_switch { uint32_t get_device_type_id() @@ -494,15 +494,15 @@ esp_err_t add(endpoint_t *endpoint, config_t *config) } } /* generic_switch */ -namespace on_off_plugin_unit { +namespace on_off_plug_in_unit { uint32_t get_device_type_id() { - return ESP_MATTER_ON_OFF_PLUGIN_UNIT_DEVICE_TYPE_ID; + return ESP_MATTER_ON_OFF_PLUG_IN_UNIT_DEVICE_TYPE_ID; } uint8_t get_device_type_version() { - return ESP_MATTER_ON_OFF_PLUGIN_UNIT_DEVICE_TYPE_VERSION; + return ESP_MATTER_ON_OFF_PLUG_IN_UNIT_DEVICE_TYPE_VERSION; } endpoint_t *create(node_t *node, config_t *config, uint8_t flags, void *priv_data) @@ -528,17 +528,17 @@ esp_err_t add(endpoint_t *endpoint, config_t *config) return ESP_OK; } -} /* on_off_plugin_unit */ +} /* on_off_plug_in_unit */ -namespace dimmable_plugin_unit { +namespace dimmable_plug_in_unit { uint32_t get_device_type_id() { - return ESP_MATTER_DIMMABLE_PLUGIN_UNIT_DEVICE_TYPE_ID; + return ESP_MATTER_DIMMABLE_PLUG_IN_UNIT_DEVICE_TYPE_ID; } uint8_t get_device_type_version() { - return ESP_MATTER_DIMMABLE_PLUGIN_UNIT_DEVICE_TYPE_VERSION; + return ESP_MATTER_DIMMABLE_PLUG_IN_UNIT_DEVICE_TYPE_VERSION; } endpoint_t *create(node_t *node, config_t *config, uint8_t flags, void *priv_data) @@ -567,7 +567,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config) return ESP_OK; } -} /* dimmable_plugin_unit */ +} /* dimmable_plug_in_unit */ namespace fan { uint32_t get_device_type_id() @@ -924,7 +924,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config) } } /* door_lock */ -namespace window_covering_device { +namespace window_covering { uint32_t get_device_type_id() { return ESP_MATTER_WINDOW_COVERING_DEVICE_TYPE_ID; @@ -947,7 +947,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); + cluster::window_covering::create(endpoint, &(config->window_covering), CLUSTER_FLAG_SERVER); return ESP_OK; } @@ -1213,7 +1213,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config) } } /** pump_controller **/ -namespace mode_select_device { +namespace mode_select { uint32_t get_device_type_id() { return ESP_MATTER_MODE_SELECT_DEVICE_TYPE_ID; @@ -1234,14 +1234,14 @@ 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); + cluster_t *cluster = cluster::mode_select::create(endpoint, &(config->mode_select), CLUSTER_FLAG_SERVER); if (!cluster) { return ESP_ERR_INVALID_STATE; } return ESP_OK; } -} /** mode_select_device **/ +} /** mode_select **/ namespace room_air_conditioner { @@ -1890,10 +1890,10 @@ esp_err_t add(endpoint_t *endpoint, config_t *config) VerifyOrReturnError(err == ESP_OK, err); cluster_t *descriptor_cluster = cluster::get(endpoint, Descriptor::Id); - descriptor::feature::taglist::add(descriptor_cluster); + descriptor::feature::tag_list::add(descriptor_cluster); - config->power_source_device.power_source.feature_flags = power_source::feature::wired::get_id(); - power_source_device::add(endpoint, &config->power_source_device); + config->power_source_device.power_source.feature_flags = cluster::power_source::feature::wired::get_id(); + endpoint::power_source::add(endpoint, &config->power_source_device); config->electrical_energy_measurement.feature_flags = electrical_energy_measurement::feature::exported_energy::get_id() | electrical_energy_measurement::feature::cumulative_energy::get_id(); config->electrical_sensor.electrical_power_measurement.feature_flags |= electrical_power_measurement::feature::alternating_current::get_id(); @@ -1932,21 +1932,21 @@ esp_err_t add(endpoint_t *endpoint, config_t *config) VerifyOrReturnError(err == ESP_OK, err); cluster_t *descriptor_cluster = cluster::get(endpoint, Descriptor::Id); - descriptor::feature::taglist::add(descriptor_cluster); + descriptor::feature::tag_list::add(descriptor_cluster); - config->power_source_device.power_source.feature_flags = power_source::feature::battery::get_id() | power_source::feature::wired::get_id(); - power_source_device::add(endpoint, &config->power_source_device); + config->power_source_device.power_source.feature_flags = cluster::power_source::feature::battery::get_id() | cluster::power_source::feature::wired::get_id(); + endpoint::power_source::add(endpoint, &config->power_source_device); cluster_t *power_source_cluster = cluster::get(endpoint, PowerSource::Id); - power_source::attribute::create_bat_voltage(power_source_cluster, config->bat_voltage, 0x00, 0xFFFF); - power_source::attribute::create_bat_percent_remaining(power_source_cluster, config->bat_percent_remaining, 0, 200); - power_source::attribute::create_bat_time_remaining(power_source_cluster, config->bat_time_remaining, 0x00, 0xFFFF); - power_source::attribute::create_active_bat_faults(power_source_cluster, NULL, 0, 0); - power_source::attribute::create_bat_capacity(power_source_cluster, config->bat_capacity, 0x00, 0xFFFF); - power_source::attribute::create_bat_time_to_full_charge(power_source_cluster, config->bat_time_to_full_charge, 0x00, 0xFFFF); - power_source::attribute::create_bat_charging_current(power_source_cluster, config->bat_charging_current, 0x00, 0xFFFF); - power_source::attribute::create_active_bat_charge_faults(power_source_cluster, NULL, 0, 0); + cluster::power_source::attribute::create_bat_voltage(power_source_cluster, config->bat_voltage, 0x00, 0xFFFF); + cluster::power_source::attribute::create_bat_percent_remaining(power_source_cluster, config->bat_percent_remaining, 0, 200); + cluster::power_source::attribute::create_bat_time_remaining(power_source_cluster, config->bat_time_remaining, 0x00, 0xFFFF); + cluster::power_source::attribute::create_active_bat_faults(power_source_cluster, NULL, 0, 0); + cluster::power_source::attribute::create_bat_capacity(power_source_cluster, config->bat_capacity, 0x00, 0xFFFF); + cluster::power_source::attribute::create_bat_time_to_full_charge(power_source_cluster, config->bat_time_to_full_charge, 0x00, 0xFFFF); + cluster::power_source::attribute::create_bat_charging_current(power_source_cluster, config->bat_charging_current, 0x00, 0xFFFF); + cluster::power_source::attribute::create_active_bat_charge_faults(power_source_cluster, NULL, 0, 0); config->electrical_energy_measurement.feature_flags = electrical_energy_measurement::feature::exported_energy::get_id() | electrical_energy_measurement::feature::cumulative_energy::get_id(); config->electrical_sensor.electrical_power_measurement.feature_flags = electrical_power_measurement::feature::alternating_current::get_id(); @@ -1987,10 +1987,10 @@ esp_err_t add(endpoint_t *endpoint, config_t *config) VerifyOrReturnError(err == ESP_OK, err); cluster_t *descriptor_cluster = cluster::get(endpoint, Descriptor::Id); - descriptor::feature::taglist::add(descriptor_cluster); + descriptor::feature::tag_list::add(descriptor_cluster); - config->power_source_device.power_source.feature_flags = power_source::feature::wired::get_id(); - power_source_device::add(endpoint, &config->power_source_device); + config->power_source_device.power_source.feature_flags = cluster::power_source::feature::wired::get_id(); + endpoint::power_source::add(endpoint, &config->power_source_device); config->electrical_sensor.electrical_power_measurement.feature_flags = electrical_power_measurement::feature::alternating_current::get_id(); electrical_sensor::add(endpoint, &config->electrical_sensor); diff --git a/components/esp_matter/data_model/esp_matter_endpoint.h b/components/esp_matter/data_model/esp_matter_endpoint.h index dd00e3291..9d5f14576 100644 --- a/components/esp_matter/data_model/esp_matter_endpoint.h +++ b/components/esp_matter/data_model/esp_matter_endpoint.h @@ -44,8 +44,8 @@ #define ESP_MATTER_EXTENDED_COLOR_LIGHT_DEVICE_TYPE_ID 0x010D #define ESP_MATTER_EXTENDED_COLOR_LIGHT_DEVICE_TYPE_VERSION 4 -#define ESP_MATTER_ON_OFF_SWITCH_DEVICE_TYPE_ID 0x0103 -#define ESP_MATTER_ON_OFF_SWITCH_DEVICE_TYPE_VERSION 3 +#define ESP_MATTER_ON_OFF_LIGHT_SWITCH_DEVICE_TYPE_ID 0x0103 +#define ESP_MATTER_ON_OFF_LIGHT_SWITCH_DEVICE_TYPE_VERSION 3 #define ESP_MATTER_DIMMER_SWITCH_DEVICE_TYPE_ID 0x0104 #define ESP_MATTER_DIMMER_SWITCH_DEVICE_TYPE_VERSION 3 #define ESP_MATTER_COLOR_DIMMER_SWITCH_DEVICE_TYPE_ID 0x0105 @@ -53,10 +53,10 @@ #define ESP_MATTER_GENERIC_SWITCH_DEVICE_TYPE_ID 0x000F #define ESP_MATTER_GENERIC_SWITCH_DEVICE_TYPE_VERSION 3 -#define ESP_MATTER_ON_OFF_PLUGIN_UNIT_DEVICE_TYPE_ID 0x010A -#define ESP_MATTER_ON_OFF_PLUGIN_UNIT_DEVICE_TYPE_VERSION 4 -#define ESP_MATTER_DIMMABLE_PLUGIN_UNIT_DEVICE_TYPE_ID 0x010B -#define ESP_MATTER_DIMMABLE_PLUGIN_UNIT_DEVICE_TYPE_VERSION 5 +#define ESP_MATTER_ON_OFF_PLUG_IN_UNIT_DEVICE_TYPE_ID 0x010A +#define ESP_MATTER_ON_OFF_PLUG_IN_UNIT_DEVICE_TYPE_VERSION 4 +#define ESP_MATTER_DIMMABLE_PLUG_IN_UNIT_DEVICE_TYPE_ID 0x010B +#define ESP_MATTER_DIMMABLE_PLUG_IN_UNIT_DEVICE_TYPE_VERSION 5 #define ESP_MATTER_MOUNTED_ON_OFF_CONTROL_DEVICE_TYPE_ID 0x010F #define ESP_MATTER_MOUNTED_ON_OFF_CONTROL_DEVICE_TYPE_VERSION 2 #define ESP_MATTER_MOUNTED_DIMMABLE_LOAD_CONTROL_DEVICE_TYPE_ID 0x0110 @@ -216,31 +216,31 @@ 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_requestor{ +namespace ota_software_update_requestor{ typedef struct config { cluster::descriptor::config_t descriptor; - cluster::ota_requestor::config_t ota_requestor; + cluster::ota_software_update_requestor::config_t ota_software_update_requestor; } config_t; 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_requestor */ +} /* ota_software_update_requestor */ -namespace ota_provider{ +namespace ota_software_update_provider{ typedef struct config { cluster::descriptor::config_t descriptor; - cluster::ota_provider::config_t ota_provider; + cluster::ota_software_update_provider::config_t ota_software_update_provider; } config_t; 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_provider */ +} /* ota_software_update_provider */ -namespace power_source_device{ +namespace power_source{ typedef struct config { cluster::descriptor::config_t descriptor; cluster::power_source::config_t power_source; @@ -250,7 +250,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); -} /* power_source_device */ +} /* power_source */ namespace on_off_light { @@ -309,7 +309,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); } /* extended_color_light */ -namespace on_off_switch { +namespace on_off_light_switch { typedef struct config : app_client_config { config() { @@ -321,7 +321,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); -} /* on_off_switch */ +} /* on_off_light_switch */ namespace dimmer_switch { @@ -365,7 +365,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); } /* generic_switch */ -namespace on_off_plugin_unit { +namespace on_off_plug_in_unit { typedef struct config : on_off_with_lighting_config { config() { @@ -377,10 +377,10 @@ 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); -} /* on_off_plugin_unit */ +} /* on_off_plug_in_unit */ -namespace dimmable_plugin_unit { -typedef struct config : on_off_plugin_unit::config_t { +namespace dimmable_plug_in_unit { +typedef struct config : on_off_plug_in_unit::config_t { cluster::level_control::config_t level_control; cluster::level_control::feature::lighting::config_t level_control_lighting; } config_t; @@ -389,7 +389,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); -} /* dimmable_plugin_unit */ +} /* dimmable_plug_in_unit */ namespace fan { typedef struct config : app_with_group_config { @@ -536,7 +536,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); } /* door_lock */ -namespace window_covering_device { +namespace window_covering { typedef struct config : app_with_group_config { cluster::window_covering::config_t window_covering; config(uint8_t end_product_type = 0) : window_covering(end_product_type) { @@ -680,7 +680,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); } /** pump_controller **/ -namespace mode_select_device { +namespace mode_select { typedef struct config { cluster::descriptor::config_t descriptor; cluster::mode_select::config_t mode_select; @@ -690,7 +690,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); -} /** mode_select_device **/ +} /** mode_select **/ namespace room_air_conditioner { typedef struct config : app_base_config { @@ -964,7 +964,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config); namespace solar_power { typedef struct config { cluster::descriptor::config_t descriptor; - power_source_device::config_t power_source_device; + endpoint::power_source::config_t power_source_device; electrical_sensor::config_t electrical_sensor; cluster::electrical_energy_measurement::config_t electrical_energy_measurement; } config_t; @@ -978,7 +978,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config); namespace battery_storage { typedef struct config { cluster::descriptor::config_t descriptor; - power_source_device::config_t power_source_device; + endpoint::power_source::config_t power_source_device; electrical_sensor::config_t electrical_sensor; device_energy_management::config_t device_energy_management; cluster::electrical_energy_measurement::config_t electrical_energy_measurement; @@ -1005,7 +1005,7 @@ esp_err_t add(endpoint_t *endpoint, config_t *config); namespace heat_pump { typedef struct config { cluster::descriptor::config_t descriptor; - power_source_device::config_t power_source_device; + endpoint::power_source::config_t power_source_device; electrical_sensor::config_t electrical_sensor; device_energy_management::config_t device_energy_management; cluster::electrical_energy_measurement::config_t electrical_energy_measurement; diff --git a/components/esp_matter/data_model/esp_matter_event.cpp b/components/esp_matter/data_model/esp_matter_event.cpp index 4cc7d2cb2..7385c94ae 100644 --- a/components/esp_matter/data_model/esp_matter_event.cpp +++ b/components/esp_matter/data_model/esp_matter_event.cpp @@ -105,7 +105,7 @@ event_t *create_reachable_changed(cluster_t *cluster) } // namespace event } // namespace basic_information -namespace ota_requestor { +namespace ota_software_update_requestor { namespace event { event_t *create_state_transition(cluster_t *cluster) { @@ -123,7 +123,7 @@ event_t *create_download_error(cluster_t *cluster) } } // namespace event -} // namespace ota_requestor +} // namespace ota_software_update_requestor namespace general_diagnostics { namespace event { diff --git a/components/esp_matter/data_model/esp_matter_event.h b/components/esp_matter/data_model/esp_matter_event.h index 5a873705b..1fe8c6b2a 100644 --- a/components/esp_matter/data_model/esp_matter_event.h +++ b/components/esp_matter/data_model/esp_matter_event.h @@ -56,13 +56,13 @@ event_t *create_reachable_changed(cluster_t *cluster); } // namespace event } // namespace basic_information -namespace ota_requestor { +namespace ota_software_update_requestor { namespace event { event_t *create_state_transition(cluster_t *cluster); event_t *create_version_applied(cluster_t *cluster); event_t *create_download_error(cluster_t *cluster); } // namespace event -} // namespace ota_requestor +} // namespace ota_software_update_requestor namespace general_diagnostics { namespace event { diff --git a/components/esp_matter/data_model/esp_matter_feature.cpp b/components/esp_matter/data_model/esp_matter_feature.cpp index fb1d1a13c..97432898f 100644 --- a/components/esp_matter/data_model/esp_matter_feature.cpp +++ b/components/esp_matter/data_model/esp_matter_feature.cpp @@ -58,7 +58,7 @@ static uint32_t get_feature_map_value(cluster_t *cluster) namespace descriptor { namespace feature { -namespace taglist { +namespace tag_list { uint32_t get_id() { @@ -76,7 +76,7 @@ esp_err_t add(cluster_t *cluster) return ESP_OK; } -} /* taglist */ +} /* tag_list */ } } @@ -640,7 +640,7 @@ esp_err_t add(cluster_t *cluster, config_t *config) attribute::create_color_temp_physical_min_mireds(cluster, config->color_temp_physical_min_mireds); attribute::create_color_temp_physical_max_mireds(cluster, config->color_temp_physical_max_mireds); attribute::create_couple_color_temp_to_level_min_mireds(cluster, config->couple_color_temp_to_level_min_mireds); - attribute::create_startup_color_temperature_mireds(cluster, config->startup_color_temperature_mireds); + attribute::create_start_up_color_temperature_mireds(cluster, config->start_up_color_temperature_mireds); /* Commands */ command::create_move_to_color_temperature(cluster); diff --git a/components/esp_matter/data_model/esp_matter_feature.h b/components/esp_matter/data_model/esp_matter_feature.h index 1b5382a24..c44e19d4b 100644 --- a/components/esp_matter/data_model/esp_matter_feature.h +++ b/components/esp_matter/data_model/esp_matter_feature.h @@ -34,12 +34,12 @@ namespace cluster { namespace descriptor { namespace feature { -namespace taglist { +namespace tag_list { uint32_t get_id(); esp_err_t add(cluster_t *cluster); -} /* taglist */ +} /* tag_list */ } /* feature */ } /* descriptor */ @@ -302,10 +302,10 @@ typedef struct config { uint16_t color_temp_physical_min_mireds; uint16_t color_temp_physical_max_mireds; uint16_t couple_color_temp_to_level_min_mireds; - nullable startup_color_temperature_mireds; + nullable start_up_color_temperature_mireds; config() : color_temperature_mireds(0x00fa), color_temp_physical_min_mireds(1), color_temp_physical_max_mireds(0xfeff), couple_color_temp_to_level_min_mireds(1), - startup_color_temperature_mireds(0x00fa) {} + start_up_color_temperature_mireds(0x00fa) {} } config_t; uint32_t get_id(); diff --git a/components/esp_matter/data_model/private/esp_matter_cluster_revisions.h b/components/esp_matter/data_model/private/esp_matter_cluster_revisions.h index 0dd5d3891..d71587a83 100644 --- a/components/esp_matter/data_model/private/esp_matter_cluster_revisions.h +++ b/components/esp_matter/data_model/private/esp_matter_cluster_revisions.h @@ -39,13 +39,13 @@ namespace binding { constexpr uint16_t cluster_revision = 1; } // namespace binding -namespace ota_provider { +namespace ota_software_update_provider { constexpr uint16_t cluster_revision = 1; -} // namespace ota_provider +} // namespace ota_software_update_provider -namespace ota_requestor { +namespace ota_software_update_requestor { constexpr uint16_t cluster_revision = 1; -} // namespace ota_requestor +} // namespace ota_software_update_requestor namespace general_commissioning { constexpr uint16_t cluster_revision = 2; diff --git a/components/esp_matter/esp_matter_ota.cpp b/components/esp_matter/esp_matter_ota.cpp index e733a7a5e..fb2ebb590 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_requestor::config_t config; + endpoint::ota_software_update_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_requestor::add(root_node_endpoint, &config); + return endpoint::ota_software_update_requestor::add(root_node_endpoint, &config); #else return ESP_ERR_NOT_SUPPORTED; #endif diff --git a/components/esp_matter_bridge/esp_matter_console_bridge.cpp b/components/esp_matter_bridge/esp_matter_console_bridge.cpp index ca59c1373..cdaf4b56e 100644 --- a/components/esp_matter_bridge/esp_matter_console_bridge.cpp +++ b/components/esp_matter_bridge/esp_matter_console_bridge.cpp @@ -52,9 +52,9 @@ struct device_type_handler { const device_type_handler device_handlers[] = { {"on_off_light", ESP_MATTER_ON_OFF_LIGHT_DEVICE_TYPE_ID, ADD_DEVICE_FUN(on_off_light)}, {"dimmable_light", ESP_MATTER_DIMMABLE_LIGHT_DEVICE_TYPE_ID, ADD_DEVICE_FUN(dimmable_light)}, - {"on_off_switch", ESP_MATTER_ON_OFF_SWITCH_DEVICE_TYPE_ID, ADD_DEVICE_FUN(on_off_switch)}, + {"on_off_light_switch", ESP_MATTER_ON_OFF_LIGHT_SWITCH_DEVICE_TYPE_ID, ADD_DEVICE_FUN(on_off_light_switch)}, {"occupancy_sensor", ESP_MATTER_OCCUPANCY_SENSOR_DEVICE_TYPE_ID, ADD_DEVICE_FUN(occupancy_sensor)}, - {"on_off_plugin_unit", ESP_MATTER_ON_OFF_PLUGIN_UNIT_DEVICE_TYPE_ID, ADD_DEVICE_FUN(on_off_plugin_unit)}, + {"on_off_plug_in_unit", ESP_MATTER_ON_OFF_PLUG_IN_UNIT_DEVICE_TYPE_ID, ADD_DEVICE_FUN(on_off_plug_in_unit)}, {"color_temperature_light", ESP_MATTER_COLOR_TEMPERATURE_LIGHT_DEVICE_TYPE_ID, ADD_DEVICE_FUN(color_temperature_light)}, {"extended_color_light", ESP_MATTER_EXTENDED_COLOR_LIGHT_DEVICE_TYPE_ID, ADD_DEVICE_FUN(extended_color_light)}, {"thermostat", ESP_MATTER_THERMOSTAT_DEVICE_TYPE_ID, ADD_DEVICE_FUN(thermostat)}, diff --git a/examples/all_device_types_app/main/device_types.h b/examples/all_device_types_app/main/device_types.h index 3b3ae655f..30e041a4c 100644 --- a/examples/all_device_types_app/main/device_types.h +++ b/examples/all_device_types_app/main/device_types.h @@ -7,12 +7,12 @@ enum device_type_enum { ESP_MATTER_DIMMABLE_LIGHT, ESP_MATTER_COLOR_TEMP_LIGHT, ESP_MATTER_EXTENDED_COLOR_LIGHT, - ESP_MATTER_ON_OFF_SWITCH, + ESP_MATTER_ON_OFF_LIGHT_SWITCH, ESP_MATTER_DIMMER_SWITCH, ESP_MATTER_COLOR_DIMMER_SWITCH, ESP_MATTER_GENERIC_SWITCH, - ESP_MATTER_ON_OFF_PLUGIN_UNIT, - ESP_MATTER_DIMMABLE_PLUGIN_UNIT, + ESP_MATTER_ON_OFF_PLUG_IN_UNIT, + ESP_MATTER_DIMMABLE_PLUG_IN_UNIT, ESP_MATTER_FAN, ESP_MATTER_THERMOSTAT, ESP_MATTER_AGGREGATOR, @@ -73,19 +73,19 @@ const device_type_name device_type_list[ESP_MATTER_DEVICE_TYPE_MAX] = { {"dimmable_light", ESP_MATTER_DIMMABLE_LIGHT}, {"color_temperature_light",ESP_MATTER_COLOR_TEMP_LIGHT}, {"extended_color_light", ESP_MATTER_EXTENDED_COLOR_LIGHT}, - {"on_off_switch", ESP_MATTER_ON_OFF_SWITCH}, + {"on_off_light_switch", ESP_MATTER_ON_OFF_LIGHT_SWITCH}, {"dimmer_switch", ESP_MATTER_DIMMER_SWITCH}, {"color_dimmer_switch", ESP_MATTER_COLOR_DIMMER_SWITCH}, {"generic_switch", ESP_MATTER_GENERIC_SWITCH}, - {"on_off_plugin_unit", ESP_MATTER_ON_OFF_PLUGIN_UNIT}, - {"dimmable_plugin_unit", ESP_MATTER_DIMMABLE_PLUGIN_UNIT}, + {"on_off_plug_in_unit", ESP_MATTER_ON_OFF_PLUG_IN_UNIT}, + {"dimmable_plug_in_unit", ESP_MATTER_DIMMABLE_PLUG_IN_UNIT}, {"fan", ESP_MATTER_FAN}, {"thermostat", ESP_MATTER_THERMOSTAT}, {"aggregator", ESP_MATTER_AGGREGATOR}, {"bridged_node", ESP_MATTER_BRIDGED_NODE}, {"control_bridge", ESP_MATTER_CONTROL_BRIDGE}, {"door_lock", ESP_MATTER_DOOR_LOCK}, - {"window_covering_device", ESP_MATTER_WINDOW_COVERING_DEVICE}, + {"window_covering", ESP_MATTER_WINDOW_COVERING_DEVICE}, {"temperature_sensor", ESP_MATTER_TEMP_SENSOR}, {"humidity_sensor", ESP_MATTER_HUMIDITY_SENSOR}, {"occupancy_sensor", ESP_MATTER_OCCUPANCY_SENSOR}, diff --git a/examples/all_device_types_app/main/esp_matter_console_helpers.cpp b/examples/all_device_types_app/main/esp_matter_console_helpers.cpp index 69deb7913..8d04efaaf 100644 --- a/examples/all_device_types_app/main/esp_matter_console_helpers.cpp +++ b/examples/all_device_types_app/main/esp_matter_console_helpers.cpp @@ -165,7 +165,6 @@ static void initialize_console(void) #endif } - namespace esp_matter { static chip::app::Clusters::PowerTopology::PowerTopologyDelegate powerTopologyDelegate; @@ -197,9 +196,9 @@ int create(uint8_t device_type_index) endpoint = esp_matter::endpoint::extended_color_light::create(node, &extended_color_light_config, ENDPOINT_FLAG_NONE, NULL); break; } - case ESP_MATTER_ON_OFF_SWITCH: { - esp_matter::endpoint::on_off_switch::config_t on_off_switch_config; - endpoint = esp_matter::endpoint::on_off_switch::create(node, &on_off_switch_config, ENDPOINT_FLAG_NONE, NULL); + case ESP_MATTER_ON_OFF_LIGHT_SWITCH: { + esp_matter::endpoint::on_off_light_switch::config_t on_off_light_switch_config; + endpoint = esp_matter::endpoint::on_off_light_switch::create(node, &on_off_light_switch_config, ENDPOINT_FLAG_NONE, NULL); break; } case ESP_MATTER_DIMMER_SWITCH: { @@ -218,14 +217,14 @@ int create(uint8_t device_type_index) endpoint = esp_matter::endpoint::generic_switch::create(node, &generic_switch_config, ENDPOINT_FLAG_NONE, NULL); break; } - case ESP_MATTER_ON_OFF_PLUGIN_UNIT: { - esp_matter::endpoint::on_off_plugin_unit::config_t on_off_plugin_unit_config; - endpoint = esp_matter::endpoint::on_off_plugin_unit::create(node, &on_off_plugin_unit_config, ENDPOINT_FLAG_NONE, NULL); + case ESP_MATTER_ON_OFF_PLUG_IN_UNIT: { + esp_matter::endpoint::on_off_plug_in_unit::config_t on_off_plug_in_unit_config; + endpoint = esp_matter::endpoint::on_off_plug_in_unit::create(node, &on_off_plug_in_unit_config, ENDPOINT_FLAG_NONE, NULL); break; } - case ESP_MATTER_DIMMABLE_PLUGIN_UNIT: { - esp_matter::endpoint::dimmable_plugin_unit::config_t dimmable_plugin_unit_config; - endpoint = esp_matter::endpoint::dimmable_plugin_unit::create(node, &dimmable_plugin_unit_config, ENDPOINT_FLAG_NONE, NULL); + case ESP_MATTER_DIMMABLE_PLUG_IN_UNIT: { + esp_matter::endpoint::dimmable_plug_in_unit::config_t dimmable_plug_in_unit_config; + endpoint = esp_matter::endpoint::dimmable_plug_in_unit::create(node, &dimmable_plug_in_unit_config, ENDPOINT_FLAG_NONE, NULL); break; } case ESP_MATTER_FAN: { @@ -287,9 +286,9 @@ int create(uint8_t device_type_index) break; } case ESP_MATTER_WINDOW_COVERING_DEVICE: { - esp_matter::endpoint::window_covering_device::config_t window_covering_device_config; - window_covering_device_config.window_covering.feature_flags = cluster::window_covering::feature::lift::get_id(); - endpoint = esp_matter::endpoint::window_covering_device::create(node, &window_covering_device_config, ENDPOINT_FLAG_NONE, NULL); + esp_matter::endpoint::window_covering::config_t window_covering_config; + window_covering_config.window_covering.feature_flags = cluster::window_covering::feature::lift::get_id(); + endpoint = esp_matter::endpoint::window_covering::create(node, &window_covering_config, ENDPOINT_FLAG_NONE, NULL); cluster_t *cluster = cluster::get(endpoint, chip::app::Clusters::WindowCovering::Id); cluster::window_covering::feature::position_aware_lift::config_t position_aware_lift; cluster::window_covering::feature::absolute_position::config_t absolute_position; @@ -347,8 +346,8 @@ int create(uint8_t device_type_index) break; } case ESP_MATTER_MODE_SELECT_DEVICE: { - esp_matter::endpoint::mode_select_device::config_t mode_select_device_config; - endpoint = esp_matter::endpoint::mode_select_device::create(node, &mode_select_device_config, ENDPOINT_FLAG_NONE, NULL); + esp_matter::endpoint::mode_select::config_t mode_select_config; + endpoint = esp_matter::endpoint::mode_select::create(node, &mode_select_config, ENDPOINT_FLAG_NONE, NULL); break; } case ESP_MATTER_RAC: { @@ -422,9 +421,9 @@ int create(uint8_t device_type_index) smoke_co_alarm_config.smoke_co_alarm.feature_flags = cluster::smoke_co_alarm::feature::smoke_alarm::get_id(); endpoint = esp_matter::endpoint::smoke_co_alarm::create(node, &smoke_co_alarm_config, ENDPOINT_FLAG_NONE, NULL); - esp_matter::endpoint::power_source_device::config_t power_source_config; + esp_matter::endpoint::power_source::config_t power_source_config; power_source_config.power_source.feature_flags = cluster::power_source::feature::wired::get_id(); - esp_matter::endpoint_t *ps_endpoint = esp_matter::endpoint::power_source_device::create(node, &power_source_config, ENDPOINT_FLAG_NONE, NULL); + esp_matter::endpoint_t *ps_endpoint = esp_matter::endpoint::power_source::create(node, &power_source_config, ENDPOINT_FLAG_NONE, NULL); if (!ps_endpoint) { ESP_LOGE(TAG, "Matter create endpoint failed"); @@ -443,9 +442,9 @@ int create(uint8_t device_type_index) break; } case ESP_MATTER_POWER_SOURCE: { - esp_matter::endpoint::power_source_device::config_t power_source_device_config; - power_source_device_config.power_source.feature_flags = esp_matter::cluster::power_source::feature::wired::get_id(); - endpoint = esp_matter::endpoint::power_source_device::create(node, &power_source_device_config, ENDPOINT_FLAG_NONE, NULL); + esp_matter::endpoint::power_source::config_t power_source_config; + power_source_config.power_source.feature_flags = esp_matter::cluster::power_source::feature::wired::get_id(); + endpoint = esp_matter::endpoint::power_source::create(node, &power_source_config, ENDPOINT_FLAG_NONE, NULL); break; } case ESP_MATTER_RAIN_SENSOR: { @@ -497,8 +496,8 @@ int create(uint8_t device_type_index) esp_matter::endpoint::energy_evse::config_t energy_evse_config; endpoint = esp_matter::endpoint::energy_evse::create(node, &energy_evse_config, ENDPOINT_FLAG_NONE, NULL); - esp_matter::endpoint::power_source_device::config_t power_source_config; - esp_matter::endpoint_t *ps_endpoint = esp_matter::endpoint::power_source_device::create(node, &power_source_config, ENDPOINT_FLAG_NONE, NULL); + esp_matter::endpoint::power_source::config_t power_source_config; + esp_matter::endpoint_t *ps_endpoint = esp_matter::endpoint::power_source::create(node, &power_source_config, ENDPOINT_FLAG_NONE, NULL); esp_matter::endpoint::electrical_sensor::config_t electrical_sensor_config; esp_matter::endpoint::electrical_sensor::add(ps_endpoint, &electrical_sensor_config); diff --git a/examples/bridge_apps/blemesh_bridge/main/app_main.cpp b/examples/bridge_apps/blemesh_bridge/main/app_main.cpp index 6a66096c1..c8dc6986e 100644 --- a/examples/bridge_apps/blemesh_bridge/main/app_main.cpp +++ b/examples/bridge_apps/blemesh_bridge/main/app_main.cpp @@ -104,9 +104,9 @@ esp_err_t create_bridge_devices(esp_matter::endpoint_t *ep, uint32_t device_type err = extended_color_light::add(ep, &extended_color_light_conf); break; } - case ESP_MATTER_ON_OFF_SWITCH_DEVICE_TYPE_ID: { - on_off_switch::config_t switch_config; - err = on_off_switch::add(ep, &switch_config); + case ESP_MATTER_ON_OFF_LIGHT_SWITCH_DEVICE_TYPE_ID: { + on_off_light_switch::config_t switch_config; + err = on_off_light_switch::add(ep, &switch_config); break; } default: { diff --git a/examples/bridge_apps/esp-now_bridge_light/main/app_espnow.cpp b/examples/bridge_apps/esp-now_bridge_light/main/app_espnow.cpp index 86c8f29fc..aade7583b 100644 --- a/examples/bridge_apps/esp-now_bridge_light/main/app_espnow.cpp +++ b/examples/bridge_apps/esp-now_bridge_light/main/app_espnow.cpp @@ -109,8 +109,8 @@ static void espnow_event_handler(void* handler_args, esp_event_base_t base, int3 case ESP_EVENT_ESPNOW_CTRL_BIND: { espnow_ctrl_bind_info_t *info = (espnow_ctrl_bind_info_t *)event_data; ESP_LOGI(TAG, "bind, uuid: " MACSTR ", initiator_type: %d", MAC2STR(info->mac), info->initiator_attribute); - ESP_LOGI(TAG, "Create bridged switch type: 0x%04x", ESP_MATTER_ON_OFF_SWITCH_DEVICE_TYPE_ID); - espnow_bridge_match_bridged_switch(info->mac, info->initiator_attribute, ESP_MATTER_ON_OFF_SWITCH_DEVICE_TYPE_ID); + ESP_LOGI(TAG, "Create bridged switch type: 0x%04x", ESP_MATTER_ON_OFF_LIGHT_SWITCH_DEVICE_TYPE_ID); + espnow_bridge_match_bridged_switch(info->mac, info->initiator_attribute, ESP_MATTER_ON_OFF_LIGHT_SWITCH_DEVICE_TYPE_ID); attribute::get_val(attribute, &val); val.val.b = !val.val.b; attribute::update(endpoint_id, cluster_id, attribute_id, &val); diff --git a/examples/bridge_apps/esp-now_bridge_light/main/app_main.cpp b/examples/bridge_apps/esp-now_bridge_light/main/app_main.cpp index 5ef0e6faf..3396b5513 100644 --- a/examples/bridge_apps/esp-now_bridge_light/main/app_main.cpp +++ b/examples/bridge_apps/esp-now_bridge_light/main/app_main.cpp @@ -117,9 +117,9 @@ esp_err_t create_bridge_devices(esp_matter::endpoint_t *ep, uint32_t device_type err = extended_color_light::add(ep, &extended_color_light_conf); break; } - case ESP_MATTER_ON_OFF_SWITCH_DEVICE_TYPE_ID: { - on_off_switch::config_t switch_config; - err = on_off_switch::add(ep, &switch_config); + case ESP_MATTER_ON_OFF_LIGHT_SWITCH_DEVICE_TYPE_ID: { + on_off_light_switch::config_t switch_config; + err = on_off_light_switch::add(ep, &switch_config); break; } default: { @@ -155,7 +155,7 @@ extern "C" void app_main() light_config.level_control_lighting.start_up_current_level = DEFAULT_BRIGHTNESS; light_config.color_control.color_mode = (uint8_t)ColorControl::ColorMode::kColorTemperature; light_config.color_control.enhanced_color_mode = (uint8_t)ColorControl::ColorMode::kColorTemperature; - light_config.color_control_color_temperature.startup_color_temperature_mireds = nullptr; + light_config.color_control_color_temperature.start_up_color_temperature_mireds = nullptr; // endpoint handles can be used to add/modify clusters. endpoint_t *endpoint = color_temperature_light::create(node, &light_config, ENDPOINT_FLAG_NONE, light_handle); diff --git a/examples/bridge_apps/zigbee_bridge/main/app_main.cpp b/examples/bridge_apps/zigbee_bridge/main/app_main.cpp index 2889cb003..17e714454 100644 --- a/examples/bridge_apps/zigbee_bridge/main/app_main.cpp +++ b/examples/bridge_apps/zigbee_bridge/main/app_main.cpp @@ -104,9 +104,9 @@ esp_err_t create_bridge_devices(esp_matter::endpoint_t *ep, uint32_t device_type err = extended_color_light::add(ep, &extended_color_light_conf); break; } - case ESP_MATTER_ON_OFF_SWITCH_DEVICE_TYPE_ID: { - on_off_switch::config_t switch_config; - err = on_off_switch::add(ep, &switch_config); + case ESP_MATTER_ON_OFF_LIGHT_SWITCH_DEVICE_TYPE_ID: { + on_off_light_switch::config_t switch_config; + err = on_off_light_switch::add(ep, &switch_config); break; } default: { diff --git a/examples/generic_switch/main/app_main.cpp b/examples/generic_switch/main/app_main.cpp index 97b3daeb8..cafd9efdd 100644 --- a/examples/generic_switch/main/app_main.cpp +++ b/examples/generic_switch/main/app_main.cpp @@ -146,7 +146,7 @@ static esp_err_t create_button(struct gpio_button* button, node_t* node) endpoint_t *endpoint = generic_switch::create(node, &switch_config, ENDPOINT_FLAG_NONE, button_handle); cluster_t* descriptor = cluster::get(endpoint,Descriptor::Id); - descriptor::feature::taglist::add(descriptor); + descriptor::feature::tag_list::add(descriptor); /* These node and endpoint handles can be used to create/add other endpoints and clusters. */ if (!node || !endpoint) diff --git a/examples/light/main/app_main.cpp b/examples/light/main/app_main.cpp index e852be554..9a4f51268 100644 --- a/examples/light/main/app_main.cpp +++ b/examples/light/main/app_main.cpp @@ -197,7 +197,7 @@ extern "C" void app_main() light_config.level_control_lighting.start_up_current_level = DEFAULT_BRIGHTNESS; light_config.color_control.color_mode = (uint8_t)ColorControl::ColorMode::kColorTemperature; light_config.color_control.enhanced_color_mode = (uint8_t)ColorControl::ColorMode::kColorTemperature; - light_config.color_control_color_temperature.startup_color_temperature_mireds = nullptr; + light_config.color_control_color_temperature.start_up_color_temperature_mireds = nullptr; // endpoint handles can be used to add/modify clusters. endpoint_t *endpoint = extended_color_light::create(node, &light_config, ENDPOINT_FLAG_NONE, light_handle); diff --git a/examples/light_network_prov/main/app_main.cpp b/examples/light_network_prov/main/app_main.cpp index f3b6b27b8..a9145f66d 100644 --- a/examples/light_network_prov/main/app_main.cpp +++ b/examples/light_network_prov/main/app_main.cpp @@ -339,7 +339,7 @@ extern "C" void app_main() light_config.level_control_lighting.start_up_current_level = DEFAULT_BRIGHTNESS; light_config.color_control.color_mode = (uint8_t)ColorControl::ColorMode::kColorTemperature; light_config.color_control.enhanced_color_mode = (uint8_t)ColorControl::ColorMode::kColorTemperature; - light_config.color_control_color_temperature.startup_color_temperature_mireds = nullptr; + light_config.color_control_color_temperature.start_up_color_temperature_mireds = nullptr; // endpoint handles can be used to add/modify clusters. endpoint_t *endpoint = extended_color_light::create(node, &light_config, ENDPOINT_FLAG_NONE, light_handle); diff --git a/examples/ota_provider/main/app_main.cpp b/examples/ota_provider/main/app_main.cpp index 83525b640..aae199fd6 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_provider; +using namespace esp_matter::ota_software_update_provider; using namespace chip::app::Clusters; -using chip::app::Clusters::OTAProviderDelegate; +using chip::app::Clusters::OtaSoftwareUpdateProviderDelegate; static void app_event_cb(const ChipDeviceEvent *event, intptr_t arg) { @@ -53,10 +53,10 @@ extern "C" void app_main() node::config_t node_config; node_t *node = node::create(&node_config, NULL, NULL); endpoint_t *root_node_endpoint = endpoint::get(node, 0); - cluster::ota_provider::config_t config; - EspOtaProvider::GetInstance().Init(true); - config.delegate = &EspOtaProvider::GetInstance(); - cluster_t *ota_provider_cluster = cluster::ota_provider::create(root_node_endpoint, &config, CLUSTER_FLAG_SERVER); + cluster::ota_software_update_provider::config_t config; + EspOtaSoftwareUpdateProvider::GetInstance().Init(true); + config.delegate = &EspOtaSoftwareUpdateProvider::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"); return;