Skip to content

Commit 8b7d90a

Browse files
committed
Merge branch 'update_scene_management_for_matter_1_3' into 'main'
update scene management cluster for matter1.3 See merge request app-frameworks/esp-matter!662
2 parents 8bd97db + 4fb00b5 commit 8b7d90a

File tree

4 files changed

+18
-15
lines changed

4 files changed

+18
-15
lines changed

components/esp_matter/esp_matter_client.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ esp_err_t send_add_scene(peer_device_t *remote_device, uint16_t remote_endpoint_
11821182
command_data.sceneName = chip::CharSpan(scene_name, strnlen(scene_name, 16));
11831183
command_data.extensionFieldSets = efs;
11841184

1185-
chip::Controller::ScenesCluster cluster(*remote_device->GetExchangeManager(),
1185+
chip::Controller::ScenesManagementCluster cluster(*remote_device->GetExchangeManager(),
11861186
remote_device->GetSecureSession().Value(), remote_endpoint_id);
11871187
cluster.InvokeCommand(command_data, NULL, add_scene_cb, send_command_failure_callback);
11881188
return ESP_OK;
@@ -1195,7 +1195,7 @@ esp_err_t send_view_scene(peer_device_t *remote_device, uint16_t remote_endpoint
11951195
command_data.groupID = group_id;
11961196
command_data.sceneID = scene_id;
11971197

1198-
chip::Controller::ScenesCluster cluster(*remote_device->GetExchangeManager(),
1198+
chip::Controller::ScenesManagementCluster cluster(*remote_device->GetExchangeManager(),
11991199
remote_device->GetSecureSession().Value(), remote_endpoint_id);
12001200
cluster.InvokeCommand(command_data, NULL, view_scene_cb, send_command_failure_callback);
12011201
return ESP_OK;
@@ -1208,7 +1208,7 @@ esp_err_t send_remove_scene(peer_device_t *remote_device, uint16_t remote_endpoi
12081208
command_data.groupID = group_id;
12091209
command_data.sceneID = scene_id;
12101210

1211-
chip::Controller::ScenesCluster cluster(*remote_device->GetExchangeManager(),
1211+
chip::Controller::ScenesManagementCluster cluster(*remote_device->GetExchangeManager(),
12121212
remote_device->GetSecureSession().Value(), remote_endpoint_id);
12131213
cluster.InvokeCommand(command_data, NULL, remove_scene_cb, send_command_failure_callback);
12141214
return ESP_OK;
@@ -1220,7 +1220,7 @@ esp_err_t send_remove_all_scenes(peer_device_t *remote_device, uint16_t remote_e
12201220
ScenesManagement::Commands::RemoveAllScenes::Type command_data;
12211221
command_data.groupID = group_id;
12221222

1223-
chip::Controller::ScenesCluster cluster(*remote_device->GetExchangeManager(),
1223+
chip::Controller::ScenesManagementCluster cluster(*remote_device->GetExchangeManager(),
12241224
remote_device->GetSecureSession().Value(), remote_endpoint_id);
12251225
cluster.InvokeCommand(command_data, NULL, remove_all_scenes_cb, send_command_failure_callback);
12261226
return ESP_OK;
@@ -1233,7 +1233,7 @@ esp_err_t send_store_scene(peer_device_t *remote_device, uint16_t remote_endpoin
12331233
command_data.groupID = group_id;
12341234
command_data.sceneID = scene_id;
12351235

1236-
chip::Controller::ScenesCluster cluster(*remote_device->GetExchangeManager(),
1236+
chip::Controller::ScenesManagementCluster cluster(*remote_device->GetExchangeManager(),
12371237
remote_device->GetSecureSession().Value(), remote_endpoint_id);
12381238
cluster.InvokeCommand(command_data, NULL, store_scene_cb, send_command_failure_callback);
12391239
return ESP_OK;
@@ -1246,7 +1246,7 @@ esp_err_t send_recall_scene(peer_device_t *remote_device, uint16_t remote_endpoi
12461246
command_data.groupID = group_id;
12471247
command_data.sceneID = scene_id;
12481248

1249-
chip::Controller::ScenesCluster cluster(*remote_device->GetExchangeManager(),
1249+
chip::Controller::ScenesManagementCluster cluster(*remote_device->GetExchangeManager(),
12501250
remote_device->GetSecureSession().Value(), remote_endpoint_id);
12511251
cluster.InvokeCommand(command_data, NULL, send_command_success_callback, send_command_failure_callback);
12521252
return ESP_OK;
@@ -1258,7 +1258,7 @@ esp_err_t send_get_scene_membership(peer_device_t *remote_device, uint16_t remot
12581258
ScenesManagement::Commands::GetSceneMembership::Type command_data;
12591259
command_data.groupID = group_id;
12601260

1261-
chip::Controller::ScenesCluster cluster(*remote_device->GetExchangeManager(),
1261+
chip::Controller::ScenesManagementCluster cluster(*remote_device->GetExchangeManager(),
12621262
remote_device->GetSecureSession().Value(), remote_endpoint_id);
12631263
cluster.InvokeCommand(command_data, NULL, get_scene_membership_cb, send_command_failure_callback);
12641264
return ESP_OK;

components/esp_matter/esp_matter_cluster.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -1187,8 +1187,11 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
11871187
} /* groups */
11881188

11891189
namespace scenes_management {
1190-
const function_generic_t *function_list = NULL;
1191-
const int function_flags = CLUSTER_FLAG_NONE;
1190+
const function_generic_t function_list[] = {
1191+
(function_generic_t)emberAfScenesManagementClusterServerInitCallback,
1192+
(function_generic_t)MatterScenesManagementClusterServerShutdownCallback,
1193+
};
1194+
const int function_flags = CLUSTER_FLAG_INIT_FUNCTION | CLUSTER_FLAG_SHUTDOWN_FUNCTION;
11921195

11931196
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
11941197
{
@@ -1214,7 +1217,6 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
12141217
/* Attributes not managed internally */
12151218
if (config) {
12161219
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
1217-
attribute::create_last_configured_by(cluster, 0);
12181220
attribute::create_scene_table_size(cluster, config->scene_table_size);
12191221
attribute::create_fabric_scene_info(cluster, NULL, 0, 0);
12201222
} else {

components/esp_matter/zap_common/zap-generated/CHIPClusters.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ class DLL_EXPORT GroupsCluster : public ClusterBase
4242
~GroupsCluster() {}
4343
};
4444

45-
class DLL_EXPORT ScenesCluster : public ClusterBase
45+
class DLL_EXPORT ScenesManagementCluster : public ClusterBase
4646
{
4747
public:
48-
ScenesCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
49-
~ScenesCluster() {}
48+
ScenesManagementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
49+
~ScenesManagementCluster() {}
5050
};
5151

5252
class DLL_EXPORT OnOffCluster : public ClusterBase

components/esp_matter/zap_common/zap-generated/gen_config.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
#define ZCL_USING_PUMP_CONFIG_CONTROL_CLUSTER_SERVER
125125
#define ZCL_USING_PWM_CLUSTER_SERVER
126126
#define ZCL_USING_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_SERVER
127-
#define ZCL_USING_SCENES_CLUSTER_SERVER
127+
#define ZCL_USING_SCENES_MANAGEMENT_CLUSTER_SERVER
128128
#define ZCL_USING_SHADE_CONFIG_CLUSTER_SERVER
129129
#define ZCL_USING_SODIUM_CONCENTRATION_MEASUREMENT_CLUSTER_SERVER
130130
#define ZCL_USING_SOFTWARE_DIAGNOSTICS_CLUSTER_SERVER
@@ -153,6 +153,7 @@
153153
/* Cluster specific macros which are generic */
154154
#define MATTER_DM_PLUGIN_ON_OFF // used in level control
155155

156+
#define MATTER_DM_PLUGIN_LEVEL_CONTROL
156157
#define MATTER_DM_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 // used in level control
157158
#define MATTER_DM_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 // used in level control
158159
#define MATTER_DM_PLUGIN_LEVEL_CONTROL_RATE 0 // used in level control
@@ -163,7 +164,7 @@
163164

164165
#define MATTER_DM_PLUGIN_GROUPS_SERVER // used in scenes, util
165166

166-
#define MATTER_DM_PLUGIN_SCENES // used in groups, level control, on off
167+
#define MATTER_DM_PLUGIN_SCENES_MANAGEMENT // used in groups, level control, on off
167168

168169
#define MATTER_DM_PLUGIN_IAS_ZONE_SERVER_ZONE_TYPE 541 // used in ias zone server
169170

0 commit comments

Comments
 (0)