mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 19:13:13 +00:00
update scene management cluster for matter1.3
This commit is contained in:
@@ -1182,7 +1182,7 @@ esp_err_t send_add_scene(peer_device_t *remote_device, uint16_t remote_endpoint_
|
||||
command_data.sceneName = chip::CharSpan(scene_name, strnlen(scene_name, 16));
|
||||
command_data.extensionFieldSets = efs;
|
||||
|
||||
chip::Controller::ScenesCluster cluster(*remote_device->GetExchangeManager(),
|
||||
chip::Controller::ScenesManagementCluster cluster(*remote_device->GetExchangeManager(),
|
||||
remote_device->GetSecureSession().Value(), remote_endpoint_id);
|
||||
cluster.InvokeCommand(command_data, NULL, add_scene_cb, send_command_failure_callback);
|
||||
return ESP_OK;
|
||||
@@ -1195,7 +1195,7 @@ esp_err_t send_view_scene(peer_device_t *remote_device, uint16_t remote_endpoint
|
||||
command_data.groupID = group_id;
|
||||
command_data.sceneID = scene_id;
|
||||
|
||||
chip::Controller::ScenesCluster cluster(*remote_device->GetExchangeManager(),
|
||||
chip::Controller::ScenesManagementCluster cluster(*remote_device->GetExchangeManager(),
|
||||
remote_device->GetSecureSession().Value(), remote_endpoint_id);
|
||||
cluster.InvokeCommand(command_data, NULL, view_scene_cb, send_command_failure_callback);
|
||||
return ESP_OK;
|
||||
@@ -1208,7 +1208,7 @@ esp_err_t send_remove_scene(peer_device_t *remote_device, uint16_t remote_endpoi
|
||||
command_data.groupID = group_id;
|
||||
command_data.sceneID = scene_id;
|
||||
|
||||
chip::Controller::ScenesCluster cluster(*remote_device->GetExchangeManager(),
|
||||
chip::Controller::ScenesManagementCluster cluster(*remote_device->GetExchangeManager(),
|
||||
remote_device->GetSecureSession().Value(), remote_endpoint_id);
|
||||
cluster.InvokeCommand(command_data, NULL, remove_scene_cb, send_command_failure_callback);
|
||||
return ESP_OK;
|
||||
@@ -1220,7 +1220,7 @@ esp_err_t send_remove_all_scenes(peer_device_t *remote_device, uint16_t remote_e
|
||||
ScenesManagement::Commands::RemoveAllScenes::Type command_data;
|
||||
command_data.groupID = group_id;
|
||||
|
||||
chip::Controller::ScenesCluster cluster(*remote_device->GetExchangeManager(),
|
||||
chip::Controller::ScenesManagementCluster cluster(*remote_device->GetExchangeManager(),
|
||||
remote_device->GetSecureSession().Value(), remote_endpoint_id);
|
||||
cluster.InvokeCommand(command_data, NULL, remove_all_scenes_cb, send_command_failure_callback);
|
||||
return ESP_OK;
|
||||
@@ -1233,7 +1233,7 @@ esp_err_t send_store_scene(peer_device_t *remote_device, uint16_t remote_endpoin
|
||||
command_data.groupID = group_id;
|
||||
command_data.sceneID = scene_id;
|
||||
|
||||
chip::Controller::ScenesCluster cluster(*remote_device->GetExchangeManager(),
|
||||
chip::Controller::ScenesManagementCluster cluster(*remote_device->GetExchangeManager(),
|
||||
remote_device->GetSecureSession().Value(), remote_endpoint_id);
|
||||
cluster.InvokeCommand(command_data, NULL, store_scene_cb, send_command_failure_callback);
|
||||
return ESP_OK;
|
||||
@@ -1246,7 +1246,7 @@ esp_err_t send_recall_scene(peer_device_t *remote_device, uint16_t remote_endpoi
|
||||
command_data.groupID = group_id;
|
||||
command_data.sceneID = scene_id;
|
||||
|
||||
chip::Controller::ScenesCluster cluster(*remote_device->GetExchangeManager(),
|
||||
chip::Controller::ScenesManagementCluster cluster(*remote_device->GetExchangeManager(),
|
||||
remote_device->GetSecureSession().Value(), remote_endpoint_id);
|
||||
cluster.InvokeCommand(command_data, NULL, send_command_success_callback, send_command_failure_callback);
|
||||
return ESP_OK;
|
||||
@@ -1258,7 +1258,7 @@ esp_err_t send_get_scene_membership(peer_device_t *remote_device, uint16_t remot
|
||||
ScenesManagement::Commands::GetSceneMembership::Type command_data;
|
||||
command_data.groupID = group_id;
|
||||
|
||||
chip::Controller::ScenesCluster cluster(*remote_device->GetExchangeManager(),
|
||||
chip::Controller::ScenesManagementCluster cluster(*remote_device->GetExchangeManager(),
|
||||
remote_device->GetSecureSession().Value(), remote_endpoint_id);
|
||||
cluster.InvokeCommand(command_data, NULL, get_scene_membership_cb, send_command_failure_callback);
|
||||
return ESP_OK;
|
||||
|
||||
@@ -1187,8 +1187,11 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
|
||||
} /* groups */
|
||||
|
||||
namespace scenes_management {
|
||||
const function_generic_t *function_list = NULL;
|
||||
const int function_flags = CLUSTER_FLAG_NONE;
|
||||
const function_generic_t function_list[] = {
|
||||
(function_generic_t)emberAfScenesManagementClusterServerInitCallback,
|
||||
(function_generic_t)MatterScenesManagementClusterServerShutdownCallback,
|
||||
};
|
||||
const int function_flags = CLUSTER_FLAG_INIT_FUNCTION | CLUSTER_FLAG_SHUTDOWN_FUNCTION;
|
||||
|
||||
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
|
||||
{
|
||||
@@ -1214,7 +1217,6 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
|
||||
/* Attributes not managed internally */
|
||||
if (config) {
|
||||
global::attribute::create_cluster_revision(cluster, config->cluster_revision);
|
||||
attribute::create_last_configured_by(cluster, 0);
|
||||
attribute::create_scene_table_size(cluster, config->scene_table_size);
|
||||
attribute::create_fabric_scene_info(cluster, NULL, 0, 0);
|
||||
} else {
|
||||
|
||||
@@ -42,11 +42,11 @@ public:
|
||||
~GroupsCluster() {}
|
||||
};
|
||||
|
||||
class DLL_EXPORT ScenesCluster : public ClusterBase
|
||||
class DLL_EXPORT ScenesManagementCluster : public ClusterBase
|
||||
{
|
||||
public:
|
||||
ScenesCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
|
||||
~ScenesCluster() {}
|
||||
ScenesManagementCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, endpoint) {}
|
||||
~ScenesManagementCluster() {}
|
||||
};
|
||||
|
||||
class DLL_EXPORT OnOffCluster : public ClusterBase
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
#define ZCL_USING_PUMP_CONFIG_CONTROL_CLUSTER_SERVER
|
||||
#define ZCL_USING_PWM_CLUSTER_SERVER
|
||||
#define ZCL_USING_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_SERVER
|
||||
#define ZCL_USING_SCENES_CLUSTER_SERVER
|
||||
#define ZCL_USING_SCENES_MANAGEMENT_CLUSTER_SERVER
|
||||
#define ZCL_USING_SHADE_CONFIG_CLUSTER_SERVER
|
||||
#define ZCL_USING_SODIUM_CONCENTRATION_MEASUREMENT_CLUSTER_SERVER
|
||||
#define ZCL_USING_SOFTWARE_DIAGNOSTICS_CLUSTER_SERVER
|
||||
@@ -153,6 +153,7 @@
|
||||
/* Cluster specific macros which are generic */
|
||||
#define MATTER_DM_PLUGIN_ON_OFF // used in level control
|
||||
|
||||
#define MATTER_DM_PLUGIN_LEVEL_CONTROL
|
||||
#define MATTER_DM_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 // used in level control
|
||||
#define MATTER_DM_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 // used in level control
|
||||
#define MATTER_DM_PLUGIN_LEVEL_CONTROL_RATE 0 // used in level control
|
||||
@@ -163,7 +164,7 @@
|
||||
|
||||
#define MATTER_DM_PLUGIN_GROUPS_SERVER // used in scenes, util
|
||||
|
||||
#define MATTER_DM_PLUGIN_SCENES // used in groups, level control, on off
|
||||
#define MATTER_DM_PLUGIN_SCENES_MANAGEMENT // used in groups, level control, on off
|
||||
|
||||
#define MATTER_DM_PLUGIN_IAS_ZONE_SERVER_ZONE_TYPE 541 // used in ias zone server
|
||||
|
||||
|
||||
Reference in New Issue
Block a user